Skip to content

Commit 2cc3a2f

Browse files
Yejia XuSteve Martinelli
authored andcommitted
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
1 parent 6c5f2e3 commit 2cc3a2f

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎openstackclient/volume/client.py‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ def make_client(instance):
5252
http_log_debug=http_log_debug
5353
)
5454

55+
# Populate the Cinder client to skip another auth query to Identity
56+
if instance._url:
57+
# token flow
58+
client.client.management_url = instance._url
59+
else:
60+
# password flow
61+
client.client.management_url = instance.get_endpoint_for_service_type(
62+
API_NAME)
63+
client.client.service_catalog = instance._service_catalog
64+
client.client.auth_token = instance._token
65+
5566
return client
5667

5768

0 commit comments

Comments
 (0)