diff options
| author | Dean Troyer <dtroyer@gmail.com> | 2014-10-17 22:26:57 -0500 |
|---|---|---|
| committer | Dean Troyer <dtroyer@gmail.com> | 2014-10-18 00:01:45 -0500 |
| commit | 0de67016c7daa1712b568cb2e49728fac3eb57ad (patch) | |
| tree | 9a3e4f893b89983fe1d981663057922d47eb4b94 /openstackclient/compute/client.py | |
| parent | 68130fa92182760882def8d3a3a97fcde5d355a1 (diff) | |
| download | python-openstackclient-0de67016c7daa1712b568cb2e49728fac3eb57ad.tar.gz | |
Remove now-unnecessary client creation hacks
Clients that can use ksc Session don't need the old junk to
fake auth anymore:
* compute
* volume
Clients that still need to be fed credentials can pick directly
from the auth object in clientmanager. The _token attribute is
removed, the token can be retrieved from the auth object:
openstackclient/tests/common/test_clientmanager.py
This change will break any plugin that relies on getting a token
from instance._token. They should be updated to use the above, or
preferable, to use keystoneclient.session.Session to create its
HTTP interface object.
Change-Id: I877a29de97a42f85f12a14c274fc003e6fba5135
Diffstat (limited to 'openstackclient/compute/client.py')
| -rw-r--r-- | openstackclient/compute/client.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/openstackclient/compute/client.py b/openstackclient/compute/client.py index ff9ed88a..c87bbee7 100644 --- a/openstackclient/compute/client.py +++ b/openstackclient/compute/client.py @@ -43,6 +43,7 @@ def make_client(instance): http_log_debug = utils.get_effective_log_level() <= logging.DEBUG extensions = [extension.Extension('list_extensions', list_extensions)] + client = compute_client( session=instance.session, extensions=extensions, @@ -50,14 +51,6 @@ def make_client(instance): timings=instance.timing, ) - # Populate the Nova client to skip another auth query to Identity - if 'token' not in instance._auth_params: - # password flow - client.client.management_url = instance.get_endpoint_for_service_type( - API_NAME, region_name=instance._region_name) - client.client.service_catalog = instance._service_catalog - client.client.auth_token = instance.auth.get_token(instance.session) - return client |
