Make sure the --heat-url option is respected

If the endpoint is passed in, make sure keystone uses it instead of
looking up the endpoint in the auth plugin.

Change-Id: I1c1c21d9533cd78f2dbfac91dcf0c6e9702b7c88
Closes-Bug: #1379933
This commit is contained in:
Jason Dunsmore 2014-10-23 15:01:28 -05:00
parent 6089d31e30
commit 9e28993ee6
1 changed files with 5 additions and 0 deletions

View File

@ -337,6 +337,11 @@ class SessionClient(HTTPClient):
# just return the redirect response. Useful for using stacks:lookup.
follow_redirects = kwargs.pop('follow_redirects', True)
# If the endpoint is passed in, make sure keystone uses it
# instead of looking up the endpoint in the auth plugin.
if self.endpoint:
kwargs['endpoint_override'] = self.endpoint
resp = self.session.request(url, method, redirect=follow_redirects,
raise_exc=False, **kwargs)