diff options
| author | Jenkins <jenkins@review.openstack.org> | 2014-11-21 14:38:14 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2014-11-21 14:38:14 +0000 |
| commit | a2450d85e0dc0cb29172c6477582e6354146a496 (patch) | |
| tree | 9ec9c5981c5396872414d203eb310f0ac2d75ccc /openstackclient/identity | |
| parent | ae00019c646fc4a2c74bbf2d024e31aaccaa545b (diff) | |
| parent | 2b02beaa5182e678d9da00402a7c4f137710f813 (diff) | |
| download | python-openstackclient-a2450d85e0dc0cb29172c6477582e6354146a496.tar.gz | |
Merge "Liberalize version matching a bit"
Diffstat (limited to 'openstackclient/identity')
| -rw-r--r-- | openstackclient/identity/client.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/openstackclient/identity/client.py b/openstackclient/identity/client.py index 8050d120..daf24e12 100644 --- a/openstackclient/identity/client.py +++ b/openstackclient/identity/client.py @@ -15,23 +15,25 @@ import logging -from keystoneclient.v2_0 import client as identity_client_v2_0 +from keystoneclient.v2_0 import client as identity_client_v2 from openstackclient.api import auth from openstackclient.common import utils LOG = logging.getLogger(__name__) -DEFAULT_IDENTITY_API_VERSION = '2.0' +DEFAULT_IDENTITY_API_VERSION = '2' API_VERSION_OPTION = 'os_identity_api_version' API_NAME = 'identity' API_VERSIONS = { - '2.0': 'openstackclient.identity.client.IdentityClientv2_0', + '2.0': 'openstackclient.identity.client.IdentityClientv2', + '2': 'openstackclient.identity.client.IdentityClientv2', '3': 'keystoneclient.v3.client.Client', } # Translate our API version to auth plugin version prefix AUTH_VERSIONS = { '2.0': 'v2', + '2': 'v2', '3': 'v3', } @@ -66,7 +68,7 @@ def build_option_parser(parser): return auth.build_auth_plugins_option_parser(parser) -class IdentityClientv2_0(identity_client_v2_0.Client): +class IdentityClientv2(identity_client_v2.Client): """Tweak the earlier client class to deal with some changes""" def __getattr__(self, name): # Map v3 'projects' back to v2 'tenants' |
