F5Networks / f5-icontrol-rest-python

Generic python library used by the F5 SDK and other F5 projects to communicate with BIG-IP® via the REST API
http://icontrol.readthedocs.org/en/latest/
Apache License 2.0
36 stars 32 forks source link

Resolve #172, Enable HTTP Proxy Support for `iControlRESTTokenAuth` Object #173

Closed lykinsbd closed 4 years ago

lykinsbd commented 4 years ago

@jasonrahm

What issues does this address?

Fixes #172

What's this change do?

Enable HTTP Proxy support in the iControlRESTTokenAuth object by passing the proxies from iControlRESTSession object down into it, and applying it to the request.<verb> calls that take place in that module.

Where should the reviewer start?

icontrol/authtoken.py, line 58, then follow it through the self.proxies value in that object.

icontrol/session.py, line 432, then follow where self.proxies was passed as an argument to the underlying token/auth object.

Any background context?

This change is required for full HTTP Proxy functionality.

Otherwise, while the outer requests.Session object in iControlRESTSession does attempt to utilize the proxies provided to it, the inner token acquisition and validation methods in iControlRESTTokenAuth fail as they do not know about the proxy.

lykinsbd commented 4 years ago

Thank you!