summaryrefslogtreecommitdiff
path: root/saharaclient
diff options
context:
space:
mode:
authorKhanh-Toan Tran <khanh-toan.tran@cloudwatt.com>2015-11-05 12:18:55 +0100
committerKhanh-Toan Tran <khanh-toan.tran@cloudwatt.com>2015-11-05 15:11:50 +0100
commit15cd2e3dd5ad4fd7007abde1609f415be3a31fd5 (patch)
treedd27a412925ebee86ecef25e0cad4f5a37bc7f8e /saharaclient
parent1919f56c9f8dc26b84dec08eeb76214fddbc07a9 (diff)
downloadpython-saharaclient-15cd2e3dd5ad4fd7007abde1609f415be3a31fd5.tar.gz
Fix bypass-url for CLI.
Change-Id: Ib82e1844bda474c4fcb1bdfbbf3878a2d1c5f3c0 Closes-Bug: #1512801
Diffstat (limited to 'saharaclient')
-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)