summaryrefslogtreecommitdiff
path: root/novaclient/client.py
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-12-10 13:49:14 -0500
committerMorgan Fainberg <morgan.fainberg@gmail.com>2015-12-12 20:39:57 -0800
commit1f11840dd84f3570330d1fcd53d1e8eea5ff7922 (patch)
treedab223bc1dcd0e87aaa2b5356d9ef70737157ae1 /novaclient/client.py
parentc6dd7c7ba9e9fc3dfa45fa568c26529a63b03431 (diff)
downloadpython-novaclient-1f11840dd84f3570330d1fcd53d1e8eea5ff7922.tar.gz
Migrate to keystoneauth from keystoneclient
As a stepping stone to the os-client-config patch, first switch to using keystoneauth, its Session and its argparse registration and plugin loading to sort out any issues with that level of plumbing. The next patch will layer on the ability to use os-client-config for argument processing and client construction. Change-Id: Id681e5eb56b47d06000620f7c92c9b0c5f8d4408
Diffstat (limited to 'novaclient/client.py')
-rw-r--r--novaclient/client.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/novaclient/client.py b/novaclient/client.py
index 889d0922..11190687 100644
--- a/novaclient/client.py
+++ b/novaclient/client.py
@@ -32,8 +32,8 @@ import pkgutil
import re
import warnings
-from keystoneclient import adapter
-from keystoneclient import session
+from keystoneauth1 import adapter
+from keystoneauth1 import session
from oslo_utils import importutils
from oslo_utils import netutils
import pkg_resources
@@ -80,7 +80,7 @@ class SessionClient(adapter.LegacyJsonAdapter):
kwargs.setdefault('headers', kwargs.get('headers', {}))
api_versions.update_headers(kwargs["headers"], self.api_version)
# NOTE(jamielennox): The standard call raises errors from
- # keystoneclient, where we need to raise the novaclient errors.
+ # keystoneauth1, where we need to raise the novaclient errors.
raise_exc = kwargs.pop('raise_exc', True)
with utils.record_time(self.times, self.timings, method, url):
resp, body = super(SessionClient, self).request(url,
@@ -680,6 +680,8 @@ def _construct_http_client(username=None, password=None, project_id=None,
user_id=None, connection_pool=False, session=None,
auth=None, user_agent='python-novaclient',
interface=None, api_version=None, **kwargs):
+ # TODO(mordred): If not session, just make a Session, then return
+ # SessionClient always
if session:
return SessionClient(session=session,
auth=auth,
@@ -806,7 +808,7 @@ def Client(version, *args, **kwargs):
(where X is a microversion).
- Alternatively, you can create a client instance using the keystoneclient
+ Alternatively, you can create a client instance using the keystoneauth
session API. See "The novaclient Python API" page at
python-novaclient's doc.
"""