summaryrefslogtreecommitdiff
path: root/keystoneclient/generic
diff options
context:
space:
mode:
authorJamie Lennox <jlennox@redhat.com>2013-07-31 16:13:13 +1000
committerJamie Lennox <jamielennox@gmail.com>2013-08-10 17:30:09 +1000
commitb7c6f604e7a89082cef41968697f9e7453eb309b (patch)
tree9206a1073e615503d32afe1b98a617dcf6483a7b /keystoneclient/generic
parent08d0ef8ee87f6899662f96af4c95eb8b7ff8f455 (diff)
downloadpython-keystoneclient-b7c6f604e7a89082cef41968697f9e7453eb309b.tar.gz
Rename client.py to httpclient.py
The discoverable entry point is to be client.Client however adding this functionality to the current client.py is impossible as we end up with circular dependencies. This patch simply renames the current client.py to httpclient.py to make future patches that will modify client.py more readable. Required for: blueprint api-version-discovery Change-Id: Ibcea03f6e1df0ae05329297166a8b8117fc3ce7b
Diffstat (limited to 'keystoneclient/generic')
-rw-r--r--keystoneclient/generic/client.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/keystoneclient/generic/client.py b/keystoneclient/generic/client.py
index d3e3ce1..4533de5 100644
--- a/keystoneclient/generic/client.py
+++ b/keystoneclient/generic/client.py
@@ -18,13 +18,13 @@
import logging
import urlparse
-from keystoneclient import client
from keystoneclient import exceptions
+from keystoneclient import httpclient
_logger = logging.getLogger(__name__)
-class Client(client.HTTPClient):
+class Client(httpclient.HTTPClient):
"""Client for the OpenStack Keystone pre-version calls API.
:param string endpoint: A user-supplied endpoint URL for the keystone
@@ -80,10 +80,10 @@ class Client(client.HTTPClient):
def _check_keystone_versions(self, url):
"""Calls Keystone URL and detects the available API versions."""
try:
- httpclient = client.HTTPClient()
- resp, body = httpclient.request(url, "GET",
- headers={'Accept':
- 'application/json'})
+ client = httpclient.HTTPClient()
+ resp, body = client.request(url, "GET",
+ headers={'Accept':
+ 'application/json'})
# Multiple Choices status code is returned by the root
# identity endpoint, with references to one or more
# Identity API versions -- v3 spec
@@ -143,12 +143,12 @@ class Client(client.HTTPClient):
def _check_keystone_extensions(self, url):
"""Calls Keystone URL and detects the available extensions."""
try:
- httpclient = client.HTTPClient()
+ client = httpclient.HTTPClient()
if not url.endswith("/"):
url += '/'
- resp, body = httpclient.request("%sextensions" % url, "GET",
- headers={'Accept':
- 'application/json'})
+ resp, body = client.request("%sextensions" % url, "GET",
+ headers={'Accept':
+ 'application/json'})
if resp.status_code in (200, 204): # some cases we get No Content
try:
results = {}