Merge "Fixed issues while using --bypass-url"

This commit is contained in:
Jenkins 2015-03-09 23:30:47 +00:00 committed by Gerrit Code Review
commit 776d691402
1 changed files with 1 additions and 9 deletions

View File

@ -79,7 +79,7 @@ class HTTPClient(TroveClientMixin):
http_log_debug=False, cacert=None, bypass_url=None,
auth_system='keystone', auth_plugin=None):
if auth_system != 'keystone' and not auth_plugin:
if auth_system and auth_system != 'keystone' and not auth_plugin:
raise exceptions.AuthSystemNotFound(auth_system)
if not auth_url and auth_system and auth_system != 'keystone':
@ -92,14 +92,6 @@ class HTTPClient(TroveClientMixin):
self.projectid = projectid
self.tenant_id = tenant_id
if auth_system and auth_system != 'keystone' and not auth_plugin:
raise exceptions.AuthSystemNotFound(auth_system)
if not auth_url and auth_system and auth_system != 'keystone':
auth_url = auth_plugin.get_auth_url()
if not auth_url:
raise exceptions.EndpointNotFound()
self.auth_url = auth_url.rstrip('/') if auth_url else auth_url
self.version = 'v1'
self.region_name = region_name