From ce7d716ffc5867d6cb7f73cbca6bbc4470499fb9 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sun, 8 Nov 2015 18:24:24 -0500 Subject: [PATCH] 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 --- os_client_config/cloud_config.py | 6 +----- os_client_config/tests/test_cloud_config.py | 4 ++-- 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',