summaryrefslogtreecommitdiff
path: root/keystoneclient/adapter.py
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@redhat.com>2014-10-28 13:25:18 +0100
committerJamie Lennox <jamielennox@redhat.com>2014-12-07 23:08:31 +0000
commit6b0fd667ce8ab213c7748e8e9e91b2f0c32b41f2 (patch)
treee5e40c1ad7a65d21d09a39470c02365c324bade6 /keystoneclient/adapter.py
parent28ea0a8e36e56f5420314e38eb980c4d9b38dfe5 (diff)
downloadpython-keystoneclient-6b0fd667ce8ab213c7748e8e9e91b2f0c32b41f2.tar.gz
get_endpoint should return the override
If your adapter has an endpoint_override set then this value will be consumed by session and used in preference to whatever you give to endpoint_filter. This means that if you ask the adapter for the endpoint it is going to use to query a URL you expect to get back the override because this is where it will be sent. Closes-Bug: #1400174 Change-Id: I707e549a4fa349d0e9a0bdac61a2573aa2e5b434
Diffstat (limited to 'keystoneclient/adapter.py')
-rw-r--r--keystoneclient/adapter.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/keystoneclient/adapter.py b/keystoneclient/adapter.py
index 3cb4dc4..ea0d342 100644
--- a/keystoneclient/adapter.py
+++ b/keystoneclient/adapter.py
@@ -116,6 +116,9 @@ class Adapter(object):
:returns: An endpoint if available or None.
:rtype: string
"""
+ if self.endpoint_override:
+ return self.endpoint_override
+
self._set_endpoint_filter_kwargs(kwargs)
return self.session.get_endpoint(auth or self.auth, **kwargs)