From 6fb1a4e496f6860c800f08e68c05b7e95be36c3b Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 9 May 2012 17:15:43 -0500 Subject: More identity client config * move auth option checking back to OpenStackShell() to keep the shell-level interaction at that level; add checking for token flow options * make identity.client.make_client() configure keystoneclient.v2_0.Client() properly for both password flow and token flow auth * eliminated ClientManager.init_token(), set _service_catalog in __init__() * compute client handles token flow Change-Id: I42481b5424489387798c4ec6d3e2a723ab1e6067 --- openstackclient/compute/client.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'openstackclient/compute') diff --git a/openstackclient/compute/client.py b/openstackclient/compute/client.py index 07f69aa1..30a724e0 100644 --- a/openstackclient/compute/client.py +++ b/openstackclient/compute/client.py @@ -28,8 +28,13 @@ def make_client(instance): ) # Populate the Nova client to skip another auth query to Identity - client.client.management_url = instance.get_endpoint_for_service_type( - 'compute') - client.client.service_catalog = instance._service_catalog + if instance._url: + # token flow + client.client.management_url = instance._url + else: + # password flow + client.client.management_url = instance.get_endpoint_for_service_type( + 'compute') + client.client.service_catalog = instance._service_catalog client.client.auth_token = instance._token return client -- cgit v1.2.1