python-hpOneView
python-hpOneView copied to clipboard
Allow connection reuse
We have to use the SDK in environments were the total number of connections is restricted, where repeatedly opening and closing connections can cause instability, and with fairly large latencies in opening a new connection. To aid stability and SDK performance in these environments we allow for the reuse of https connections as returned by get_connection(). Connections will be reused when 'reuse_connection' is set to True or when the ONEVIEWSDK_REUSE_CONNECTION is anything other than an empty string. We've added a unit-test for this new capability.
Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve. e.g., Fixes #01]
Check List
- [ ] New functionality includes testing.
- [ ] All tests pass for Python 2.7+ & 3.4+(
$ tox
).
- [ ] All tests pass for Python 2.7+ & 3.4+(
- [ ] New functionality has been documented in the README if applicable.
- [ ] New functionality has been thoroughly documented in the examples (please include helpful comments).
- [ ] New endpoints supported are updated in the endpoints-support.md file.
- [ ] Changes are documented in the CHANGELOG.
Can we add this flag-reuse_connection in the sample config file i.e examples/config-rename.json as well?
Thanks Priyanka - change to examples/config-rename.json added
@soodpr I'm having difficulty pushing up the change - networking issues on our side - so I'll try again tomorrow AM (my time) when hopefully the problems will be resolved.
@soodpr Change pushed up.