Add barbicanclient support

barbicanclient is a lovely client library, so we should add support
for make_legacy_client to doing the right things constructing a Client
object.

Change-Id: Idf015b1119ef76b951c195a6498cbb7a928d6e44
This commit is contained in:
Monty Taylor 2016-01-08 20:24:17 -05:00
parent cab0469ec4
commit 9835daf9f6
3 changed files with 7 additions and 2 deletions

View File

@ -305,7 +305,7 @@ class CloudConfig(object):
endpoint_override = self.get_endpoint(service_key)
if not interface_key:
if service_key == 'image':
if service_key in ('image', 'key-manager'):
interface_key = 'interface'
else:
interface_key = 'endpoint_type'
@ -348,7 +348,10 @@ class CloudConfig(object):
if 'endpoint' not in constructor_kwargs:
endpoint = self.get_session_endpoint('identity')
constructor_kwargs['endpoint'] = endpoint
constructor_args.append(version)
if service_key == 'key-manager':
constructor_kwargs['version'] = version
else:
constructor_args.append(version)
return client_class(*constructor_args, **constructor_kwargs)

View File

@ -3,6 +3,7 @@
"database": "troveclient.client.Client",
"identity": "keystoneclient.client.Client",
"image": "glanceclient.Client",
"key-manager": "barbicanclient.client.Client",
"metering": "ceilometerclient.client.Client",
"network": "neutronclient.neutron.client.Client",
"object-store": "swiftclient.client.Connection",

View File

@ -12,6 +12,7 @@
"image_api_use_tasks": false,
"image_api_version": "2",
"image_format": "qcow2",
"key_manager_api_version": "v1",
"metering_api_version": "2",
"network_api_version": "2",
"object_store_api_version": "1",