Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add proxy capability #74

Merged
merged 1 commit into from
Mar 18, 2016
Merged

add proxy capability #74

merged 1 commit into from
Mar 18, 2016

Conversation

drewrothstein
Copy link
Contributor

This adds proxy capability to the connection logic. It is backwards compatible. It works with proxies that require authentication and ones that do not.

Attempted running tox but there were endless PEP8 errors that are unrelated to this change.

Local testing:

$ python setup.py install
>>> from dyn.tm.session import DynectSession
>>> s = DynectSession('company', 'user', 'pass', history=True)
>>> s.history
[('2016-03-18T00:05:37.941333', '/REST/Session/', 'POST', {'password': '*****', 'user_name': 'user', 'customer_name': 'company'}, u'success')]
>>> s = DynectSession.new_session('company', 'user', 'pass', history=True, proxy_host='localhost', proxy_port=8888)
>>> s.history
[('2016-03-18T00:06:30.882102', '/REST/Session/', 'POST', {'password': '*****', 'user_name': 'user', 'customer_name': 'customer'}, u'success')]
>>> s = DynectSession.new_session('company', 'user', 'pass', history=True, proxy_host='localhost', proxy_port=8888, proxy_user='user', proxy_pass='pass')
>>> s.history
[('2016-03-18T00:07:44.728913', '/REST/Session/', 'POST', {'password': '*****', 'user_name': 'user', 'customer_name': 'company'}, u'success')]

whisk3y added a commit that referenced this pull request Mar 18, 2016
@whisk3y whisk3y merged commit a487185 into dyninc:master Mar 18, 2016
@whisk3y
Copy link
Contributor

whisk3y commented Mar 18, 2016

Hi Drew, looks good thanks for the commit!

@drewrothstein
Copy link
Contributor Author

Any chance of cutting a release? Looks like the last release was in 2014. :)

@whisk3y
Copy link
Contributor

whisk3y commented Mar 20, 2016

Hi Drew, there have actually been several releases in pip but they haven't been tagged on the repo. We plan on doing a release on Monday 3/21 and tagging the repo as well as updating pip. This release will be 1.6.3 and will include the proxy change and a new helper function to replace one or all rulesets on a TD.

@drewrothstein
Copy link
Contributor Author

Ah, most excellent, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants