summaryrefslogtreecommitdiff
path: root/saharaclient/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-11-12 13:25:19 +0000
committerGerrit Code Review <review@openstack.org>2015-11-12 13:25:19 +0000
commit5197d0ceee6a37a79124c8e7b7f7950f27740184 (patch)
tree1eac385a637c2170c075eb215a62be919a5c1cf5 /saharaclient/api
parente8a7f45825e3ad06e38dcf77bd4c49e3c1a66e5f (diff)
parent15cd2e3dd5ad4fd7007abde1609f415be3a31fd5 (diff)
downloadpython-saharaclient-5197d0ceee6a37a79124c8e7b7f7950f27740184.tar.gz
Merge "Fix bypass-url for CLI."
Diffstat (limited to 'saharaclient/api')
-rw-r--r--saharaclient/api/client.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/saharaclient/api/client.py b/saharaclient/api/client.py
index 3c5bfc4..6b91aec 100644
--- a/saharaclient/api/client.py
+++ b/saharaclient/api/client.py
@@ -80,10 +80,15 @@ class Client(object):
if not auth:
auth = session.auth
- service_type = self._determine_service_type(session,
- auth,
- service_type,
- endpoint_type)
+ # NOTE(Toan): bug #1512801. If sahara_url is provided, it does not
+ # matter if service_type is orthographically correct or not.
+ # Only find Sahara service_type and endpoint in Keystone catalog
+ # if sahara_url is not provided.
+ if not sahara_url:
+ service_type = self._determine_service_type(session,
+ auth,
+ service_type,
+ endpoint_type)
kwargs['user_agent'] = USER_AGENT
kwargs.setdefault('interface', endpoint_type)