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
This commit is contained in:
Monty Taylor 2015-11-08 18:24:24 -05:00
parent 13b6fbabeb
commit ce7d716ffc
2 changed files with 3 additions and 7 deletions

View File

@ -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)

View File

@ -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',