Skip to content

Commit bd61af9

Browse files
authored
Merge pull request #170 from jasonrahm/enh.proxy_support
This PR fixes issue #168:
2 parents 420f80e + df2fa5f commit bd61af9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

icontrol/session.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ def __init__(self, username, password, **kwargs):
400400

401401
verify = kwargs.pop('verify', False)
402402
timeout = kwargs.pop('timeout', 30)
403+
proxies = kwargs.pop('proxies', {})
403404
token_auth = kwargs.pop('token', None)
404405
user_agent = kwargs.pop('user_agent', None)
405406
token_to_use = kwargs.pop('token_to_use', None)
@@ -422,6 +423,9 @@ def __init__(self, username, password, **kwargs):
422423
# Configure with passed parameters
423424
self.session.timeout = timeout
424425

426+
# Configure with proxy parameters
427+
self.session.proxies = proxies
428+
425429
# Handle token-based auth.
426430
if token_to_use:
427431
self.session.auth = iControlRESTTokenAuth('admin', 'admin')

0 commit comments

Comments
 (0)