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
This commit is contained in:
Yejia Xu 2014-05-05 00:11:17 +00:00 committed by Steve Martinelli
parent 6c5f2e39e2
commit 2cc3a2fdbd
1 changed files with 11 additions and 0 deletions

View File

@ -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