add proxy_username/password and doc for the minion

This commit is contained in:
Brendan Beveridge 2015-12-02 14:55:41 +11:00
parent 63a83193c1
commit a2c6592d60
2 changed files with 14 additions and 2 deletions

View file

@ -15,6 +15,12 @@
# resolved, then the minion will fail to start.
#master: salt
# Set http proxy information for the minion when doing requests
#proxy_host:
#proxy_port:
#proxy_username:
#proxy_password:
# If multiple masters are specified in the 'master' setting, the default behavior
# is to always try to connect to them in the order they are listed. If random_master is
# set to True, the order will be randomized instead. This can be helpful in distributing

View file

@ -425,8 +425,10 @@ def query(url,
client_argspec = None
proxy_host = opts.get('proxy_host', None)
proxy_port = opts.get('proxy_port', None)
proxy_host = opts.get('proxy_host', None)
proxy_port = opts.get('proxy_port', None)
proxy_username = opts.get('proxy_username', None)
proxy_password = opts.get('proxy_password', None)
# We want to use curl_http if we have a proxy defined
if proxy_host and proxy_port:
@ -452,6 +454,8 @@ def query(url,
request_timeout=timeout,
proxy_host=proxy_host,
proxy_port=proxy_port,
proxy_username=proxy_username,
proxy_password=proxy_password,
**req_kwargs
)
else:
@ -468,6 +472,8 @@ def query(url,
request_timeout=timeout,
proxy_host=proxy_host,
proxy_port=proxy_port,
proxy_username=proxy_username,
proxy_password=proxy_password,
**req_kwargs
)
except tornado.httpclient.HTTPError as exc: