summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-11-12 13:35:21 +0000
committerGerrit Code Review <review@openstack.org>2015-11-12 13:35:21 +0000
commit99f162b1146266a2af21f50a927a99f4e82ef351 (patch)
treecb9eaaba22986432597ccd1b54a3bde1ee40322a
parent506d6e8ffefdda4d31e1b33686008e9e610beca2 (diff)
parentce7d716ffc5867d6cb7f73cbca6bbc4470499fb9 (diff)
downloados-client-config-99f162b1146266a2af21f50a927a99f4e82ef351.tar.gz
Merge "Remove unneeded workaround for ksc"
-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 bace53e..af447f1 100644
--- a/os_client_config/cloud_config.py
+++ b/os_client_config/cloud_config.py
@@ -263,15 +263,11 @@ class CloudConfig(object):
if service_key == 'network' and version == '2':
version = '2.0'
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',