|
4 | 4 | from ironicclient import client as iclient |
5 | 5 | from keystoneclient.v2_0 import client as oskclient |
6 | 6 | from novaclient import client as osclient |
7 | | -from novaclient.client import HTTPClient |
| 7 | +from novaclient.client import SessionClient |
8 | 8 | from requests.exceptions import Timeout |
9 | 9 |
|
10 | 10 | from .base import WrapanapiAPIBaseVM |
|
24 | 24 | def _request_timeout_handler(self, url, method, retry_count=0, **kwargs): |
25 | 25 | try: |
26 | 26 | # Use the original request method to do the actual work |
27 | | - return HTTPClient.request(self, url, method, **kwargs) |
| 27 | + return SessionClient.request(self, url, method, **kwargs) |
28 | 28 | except Timeout: |
29 | 29 | if retry_count >= 3: |
30 | 30 | self._cfme_logger.error('nova request timed out after {} retries'.format(retry_count)) |
@@ -79,12 +79,12 @@ def api(self): |
79 | 79 | timeout=30) |
80 | 80 | # replace the client request method with our version that |
81 | 81 | # can handle timeouts; uses explicit binding (versus |
82 | | - # replacing the method directly on the HTTPClient class) |
83 | | - # so we can still call out to HTTPClient's original request |
| 82 | + # replacing the method directly on the SessionClient class) |
| 83 | + # so we can still call out to SessionClient's original request |
84 | 84 | # method in the timeout handler method |
85 | 85 | self._api.client._cfme_logger = self.logger |
86 | 86 | self._api.client.request = _request_timeout_handler.__get__(self._api.client, |
87 | | - HTTPClient) |
| 87 | + SessionClient) |
88 | 88 | return self._api |
89 | 89 |
|
90 | 90 | @property |
|
0 commit comments