No keystone Endpoint now gives a valid Error Message

When no valid keystone endpoint exist, EndpointNotFound exception
is raised with an error message

Change-Id: I75b00cb73b18bc19261c061e0ae217ef251f8853
Closes-Bug: #1208991
This commit is contained in:
rajiv
2015-02-12 16:38:12 +05:30
committed by Steve Martinelli
parent dc658842ed
commit 1d17c70315

View File

@@ -326,7 +326,10 @@ class Session(object):
base_url = self.get_endpoint(auth, **endpoint_filter)
if not base_url:
raise exceptions.EndpointNotFound()
service_type = (endpoint_filter or {}).get('service_type',
'unknown')
msg = _('Endpoint for %s service') % service_type
raise exceptions.EndpointNotFound(msg)
url = '%s/%s' % (base_url.rstrip('/'), url.lstrip('/'))