From 2cc3a2fdbddb10cc26ffb49e4a7cfa114a1e9e53 Mon Sep 17 00:00:00 2001 From: Yejia Xu Date: Mon, 5 May 2014 00:11:17 +0000 Subject: [PATCH] Skip auth in cinderclient cinderclient can't work well with keystone v3 auth info. We should do it in openstackclient just like compute extension. Closes-Bug: #1315963 Change-Id: I46f794c5315f6a9fe1d9a0e5dc7b84f067d7f792 --- openstackclient/volume/client.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openstackclient/volume/client.py b/openstackclient/volume/client.py index 2d8243726..7cf828b44 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