summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2016-01-08 20:24:17 -0500
committerMonty Taylor <mordred@inaugust.com>2016-01-08 20:36:48 -0500
commit9835daf9f684556c5aed4834dc086e932788f9bc (patch)
treea9da5eea5e6f7f2a3f7395f1116553056e32bc7c
parentcab0469ec4471a5fe924d6049cbfcdf2ac0cdba4 (diff)
downloados-client-config-9835daf9f684556c5aed4834dc086e932788f9bc.tar.gz
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
-rw-r--r--os_client_config/cloud_config.py7
-rw-r--r--os_client_config/constructors.json1
-rw-r--r--os_client_config/defaults.json1
3 files changed, 7 insertions, 2 deletions
diff --git a/os_client_config/cloud_config.py b/os_client_config/cloud_config.py
index f73da04..3b9bee9 100644
--- a/os_client_config/cloud_config.py
+++ b/os_client_config/cloud_config.py
@@ -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)
diff --git a/os_client_config/constructors.json b/os_client_config/constructors.json
index be44339..89c844c 100644
--- a/os_client_config/constructors.json
+++ b/os_client_config/constructors.json
@@ -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",
diff --git a/os_client_config/defaults.json b/os_client_config/defaults.json
index 2ffb672..f501862 100644
--- a/os_client_config/defaults.json
+++ b/os_client_config/defaults.json
@@ -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",