Add function to export proxy settings as systemd config #271

Merged
merged 5 commits into from Apr 13, 2017

Conversation

Projects
None yet
3 participants
Member

wupeka commented Apr 12, 2017

ProxySettings.AsSystemdDefaultEnv exports proxy settings in a form understandable by systemd.

some comments, mostly about clearly documenting AutoNoProxy

+ Https string
+ Ftp string
+ NoProxy string
+ AutoNoProxy string
@jameinel

jameinel Apr 13, 2017

Owner

We should probably clearly document AutoNoProxy as it isn't something people who know about proxy stuff are going to immediately understand.

At least an update to the Settings doc.

+ allNoProxy = append(allNoProxy, strings.Split(s.AutoNoProxy, ",")...)
+ }
+ noProxySet := set.NewStrings(allNoProxy...)
+ return strings.Join(noProxySet.SortedValues(), ",")
@jameinel

jameinel Apr 13, 2017

Owner

Ordering doesn't matter, right?

@wupeka

wupeka Apr 13, 2017

Member

It doesn't, it's a set.

Member

wupeka commented Apr 13, 2017

!!test!!

Member

wupeka commented Apr 13, 2017

$$merge$$

Contributor

jujubot commented Apr 13, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils

Contributor

jujubot commented Apr 13, 2017

Member

wupeka commented Apr 13, 2017

$$merge$$

Contributor

jujubot commented Apr 13, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju-utils

@jujubot jujubot merged commit 10e5006 into juju:master Apr 13, 2017

rogpeppe added a commit to rogpeppe/juju-utils that referenced this pull request Apr 21, 2017

proxy: do not add extra newline
PR #271 changed AsScriptEnvironment so that
it adds a trailing newline to the script lines.

Some juju tests failed as a result of this change, so revert
to the previous behaviour - the final newline isn't
needed.

jujubot added a commit that referenced this pull request Apr 21, 2017

Merge pull request #275 from rogpeppe/033-proxy-no-extra-newline
proxy: do not add extra newline

PR #271 changed AsScriptEnvironment so that
it adds a trailing newline to the script lines.

Some juju tests failed as a result of this change, so revert
to the previous behaviour - the final newline isn't
needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment