diff options
| author | Ghanshyam <ghanshyam.mann@nectechnologies.in> | 2015-12-02 19:36:45 +0900 |
|---|---|---|
| committer | Ghanshyam <ghanshyam.mann@nectechnologies.in> | 2015-12-03 11:45:22 +0900 |
| commit | aa73df2649496f049118cfa7dae74a759edf9dd9 (patch) | |
| tree | ca18afb12822b382033f5e939c3dd99ac4eab14f /novaclient/client.py | |
| parent | 9314c89ddeb5fea8b11ca760f883b56f95079384 (diff) | |
| download | python-novaclient-aa73df2649496f049118cfa7dae74a759edf9dd9.tar.gz | |
Fix H404/405 violations in client.py,base.py,api_version.py
There is a lot of H404/405 violations in novaclient, and it is better
to fix those to have a better doc string for class/methods.
This patch fixes these violations for below files-
-api_versions.py
-base.py
-client.py
As there are lot of violations and cannot be fixed in single patches,
So separating those in multiple patches for easy review.
Change-Id: I30a714fc3b0b317f7ffa4a99fbb224b4d5f5477b
Partial-Bug: #1521899
Diffstat (limited to 'novaclient/client.py')
| -rw-r--r-- | novaclient/client.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/novaclient/client.py b/novaclient/client.py index 0fc99838..0660abd4 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -60,9 +60,7 @@ class _ClientConnectionPool(object): self._adapters = {} def get(self, url): - """ - Store and reuse HTTP adapters per Service URL. - """ + """Store and reuse HTTP adapters per Service URL.""" if url not in self._adapters: self._adapters[url] = session.TCPKeepAliveAdapter() @@ -103,9 +101,10 @@ class SessionClient(adapter.LegacyJsonAdapter): def _original_only(f): - """Indicates and enforces that this function can only be used if we are - using the original HTTPClient object. + """Decorator to indicate and enforce original HTTPClient object. + Indicates and enforces that this function can only be used if we are + using the original HTTPClient object. We use this to specify that if you use the newer Session HTTP client then you are aware that the way you use your client has been updated and certain functions are no longer allowed to be used. @@ -471,7 +470,9 @@ class HTTPClient(object): return self.services_url[service_type] def _extract_service_catalog(self, url, resp, body, extract_token=True): - """See what the auth service told us and process the response. + """Extract service catalog from input resource body. + + See what the auth service told us and process the response. We may get redirected to another site, fail or actually get back a service catalog with a token and our endpoints. """ @@ -505,7 +506,9 @@ class HTTPClient(object): raise exceptions.from_response(resp, body, url) def _fetch_endpoints_from_auth(self, url): - """We have a token, but don't know the final endpoint for + """Fetch endpoint using token. + + We have a token, but don't know the final endpoint for the region. We have to go back to the auth service and ask again. This request requires an admin-level token to work. The proxy token supplied could be from a low-level enduser. |
