Skip to content

Commit

Permalink
Merge pull request #246 from bsquizz/update_reqs
Browse files Browse the repository at this point in the history
[1LP][RFR] Remove need to pin python-novaclient with s/HTTPClient/SessionClient
  • Loading branch information
mshriver authored Apr 18, 2018
2 parents aa4bbda + c8d88fb commit e06a95e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
8 changes: 2 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
six
boto
cached_property
enum34
fauxfactory>=2.0.7
Expand All @@ -11,20 +10,17 @@ pyvmomi>=6.5.0.2017.5.post1
python-cinderclient
python-ironicclient
python-keystoneclient
python-novaclient<7.0.0
python-novaclient==7.1.2
python-heatclient
pywinrm
requests




tzlocal
wait_for
websocket_client
dateparser
boto3==1.6.6
botocore==1.9.6
boto
packaging
azure>=3.0.0
azure-storage-common>=1.0
Expand Down
4 changes: 2 additions & 2 deletions wrapanapi/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ def api(self):
timeout=30)
# replace the client request method with our version that
# can handle timeouts; uses explicit binding (versus
# replacing the method directly on the HTTPClient class)
# so we can still call out to HTTPClient's original request
# replacing the method directly on the SessionClient class)
# so we can still call out to SessionClient's original request
# method in the timeout handler method
self._api.client._cfme_logger = self.logger
self._api.client.request = _request_timeout_handler.__get__(self._api.client,
Expand Down
10 changes: 5 additions & 5 deletions wrapanapi/openstack_infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ironicclient import client as iclient
from keystoneclient.v2_0 import client as oskclient
from novaclient import client as osclient
from novaclient.client import HTTPClient
from novaclient.client import SessionClient
from requests.exceptions import Timeout

from .base import WrapanapiAPIBaseVM
Expand All @@ -24,7 +24,7 @@
def _request_timeout_handler(self, url, method, retry_count=0, **kwargs):
try:
# Use the original request method to do the actual work
return HTTPClient.request(self, url, method, **kwargs)
return SessionClient.request(self, url, method, **kwargs)
except Timeout:
if retry_count >= 3:
self._cfme_logger.error('nova request timed out after {} retries'.format(retry_count))
Expand Down Expand Up @@ -79,12 +79,12 @@ def api(self):
timeout=30)
# replace the client request method with our version that
# can handle timeouts; uses explicit binding (versus
# replacing the method directly on the HTTPClient class)
# so we can still call out to HTTPClient's original request
# replacing the method directly on the SessionClient class)
# so we can still call out to SessionClient's original request
# method in the timeout handler method
self._api.client._cfme_logger = self.logger
self._api.client.request = _request_timeout_handler.__get__(self._api.client,
HTTPClient)
SessionClient)
return self._api

@property
Expand Down

0 comments on commit e06a95e

Please sign in to comment.