summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2015-11-08 18:24:24 -0500
committerMonty Taylor <mordred@inaugust.com>2015-11-08 18:48:24 -0500
commitce7d716ffc5867d6cb7f73cbca6bbc4470499fb9 (patch)
treea151775e6511771b1496e0487a53332913ea5e01
parent13b6fbabeb27a346c91a9fb3a1fb86c7adbd2779 (diff)
downloados-client-config-ce7d716ffc5867d6cb7f73cbca6bbc4470499fb9.tar.gz
Remove unneeded workaround for ksc
It turns out keystoneclient can take string input and does the same transform we're doing here, it's just not documented. Remove the workaround on our side as it's unneccesary. Change-Id: Ie46945f7d96e3d65004cd19823b3be989e1d18a7
-rw-r--r--os_client_config/cloud_config.py6
-rw-r--r--os_client_config/tests/test_cloud_config.py4
2 files changed, 3 insertions, 7 deletions
diff --git a/os_client_config/cloud_config.py b/os_client_config/cloud_config.py
index 37029f1..30dc27f 100644
--- a/os_client_config/cloud_config.py
+++ b/os_client_config/cloud_config.py
@@ -259,15 +259,11 @@ class CloudConfig(object):
if pass_version_arg:
version = self.get_api_version(service_key)
if service_key == 'identity':
- # keystoneclient takes version as a tuple.
- version = tuple(str(float(version)).split('.'))
- constructor_kwargs['version'] = version
# Workaround for bug#1513839
if 'endpoint' not in constructor_kwargs:
endpoint = self.get_session_endpoint('identity')
constructor_kwargs['endpoint'] = endpoint
- else:
- constructor_args.append(version)
+ constructor_args.append(version)
return client_class(*constructor_args, **constructor_kwargs)
diff --git a/os_client_config/tests/test_cloud_config.py b/os_client_config/tests/test_cloud_config.py
index deaec4d..1b98b8a 100644
--- a/os_client_config/tests/test_cloud_config.py
+++ b/os_client_config/tests/test_cloud_config.py
@@ -289,7 +289,7 @@ class TestCloudConfig(base.TestCase):
"test1", "region-al", config_dict, auth_plugin=mock.Mock())
cc.get_legacy_client('identity', mock_client)
mock_client.assert_called_with(
- version=('2', '0'),
+ '2.0',
endpoint='http://example.com/v2',
endpoint_type='admin',
region_name='region-al',
@@ -308,7 +308,7 @@ class TestCloudConfig(base.TestCase):
"test1", "region-al", config_dict, auth_plugin=mock.Mock())
cc.get_legacy_client('identity', mock_client)
mock_client.assert_called_with(
- version=('3', '0'),
+ '3',
endpoint='http://example.com',
endpoint_type='admin',
region_name='region-al',