diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-09-10 05:19:23 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-09-10 05:19:23 +0000 |
| commit | a591ab34c73fc386cb0f68578eeb744b99a5d0ec (patch) | |
| tree | 53ae03e7fe522f4c9dc8c9d9955393f43eac82e4 /openstackclient | |
| parent | c42cd80d6e15339592a7eb3f3e8f9143a26a810d (diff) | |
| parent | c513f05ce994a81044f787bd8460227f785ad8c1 (diff) | |
| download | python-openstackclient-a591ab34c73fc386cb0f68578eeb744b99a5d0ec.tar.gz | |
Merge "Use novaclient.client.Client for initialization Nova client"
Diffstat (limited to 'openstackclient')
| -rw-r--r-- | openstackclient/compute/client.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/openstackclient/compute/client.py b/openstackclient/compute/client.py index dd40b9a9..8ac5f324 100644 --- a/openstackclient/compute/client.py +++ b/openstackclient/compute/client.py @@ -42,10 +42,12 @@ def make_client(instance): except ImportError: from novaclient.v1_1.contrib import list_extensions - compute_client = nova_client.get_client_class( - instance._api_version[API_NAME], - ) - LOG.debug('Instantiating compute client: %s', compute_client) + if _compute_api_version is not None: + version = _compute_api_version + else: + version = instance._api_version[API_NAME] + + LOG.debug('Instantiating compute client for V%s' % version) # Set client http_log_debug to True if verbosity level is high enough http_log_debug = utils.get_effective_log_level() <= logging.DEBUG @@ -55,10 +57,8 @@ def make_client(instance): # Remember interface only if it is set kwargs = utils.build_kwargs_dict('endpoint_type', instance._interface) - if _compute_api_version is not None: - kwargs.update({'api_version': _compute_api_version}) - - client = compute_client( + client = nova_client.Client( + version, session=instance.session, extensions=extensions, http_log_debug=http_log_debug, |
