diff options
| author | Jenkins <jenkins@review.openstack.org> | 2014-06-25 00:12:15 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2014-06-25 00:12:15 +0000 |
| commit | 2927a754c4cdf50dfb75c671dcbdc3b43faa784b (patch) | |
| tree | 59e0ab020064654018f52654638a8b308b11288e /keystoneclient/httpclient.py | |
| parent | 8e89f55aa3262167e9e9fe1a4a71dbf0c5dd0b60 (diff) | |
| parent | 11336acf8868a2709cb583af9bbd8a1c442d137f (diff) | |
| download | python-keystoneclient-2927a754c4cdf50dfb75c671dcbdc3b43faa784b.tar.gz | |
Merge "Unversioned endpoints in service catalog"
Diffstat (limited to 'keystoneclient/httpclient.py')
| -rw-r--r-- | keystoneclient/httpclient.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/keystoneclient/httpclient.py b/keystoneclient/httpclient.py index 5f0a2e8..866e493 100644 --- a/keystoneclient/httpclient.py +++ b/keystoneclient/httpclient.py @@ -56,6 +56,8 @@ request = client_session.request class HTTPClient(baseclient.Client, base.BaseAuthPlugin): + version = None + @utils.positional(enforcement=utils.positional.WARN) def __init__(self, username=None, tenant_id=None, tenant_name=None, password=None, auth_url=None, region_name=None, endpoint=None, @@ -569,11 +571,18 @@ class HTTPClient(baseclient.Client, base.BaseAuthPlugin): concatenating self.management_url and url and passing in method and any associated kwargs. """ + # NOTE(jamielennox): remember that if you use the legacy client mode + # (you create a client without a session) then this HTTPClient object + # is the auth plugin you are using. Values in the endpoint_filter may + # be ignored and you should look at get_endpoint to figure out what. interface = 'admin' if management else 'public' endpoint_filter = kwargs.setdefault('endpoint_filter', {}) endpoint_filter.setdefault('service_type', 'identity') endpoint_filter.setdefault('interface', interface) + if self.version: + endpoint_filter.setdefault('version', self.version) + if self.region_name: endpoint_filter.setdefault('region_name', self.region_name) |
