summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/volume/client.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/openstackclient/volume/client.py b/openstackclient/volume/client.py
index 2d824372..7cf828b4 100644
--- a/openstackclient/volume/client.py
+++ b/openstackclient/volume/client.py
@@ -52,6 +52,17 @@ def make_client(instance):
http_log_debug=http_log_debug
)
+ # Populate the Cinder client to skip another auth query to Identity
+ if instance._url:
+ # token flow
+ client.client.management_url = instance._url
+ else:
+ # password flow
+ client.client.management_url = instance.get_endpoint_for_service_type(
+ API_NAME)
+ client.client.service_catalog = instance._service_catalog
+ client.client.auth_token = instance._token
+
return client