Add queens support
This patch adds initial support for queens.
Change-Id: Icc6022115bbc6ab1d2422a18b3708394a649cbba
Related-Prod: PROD-20387
diff --git a/_modules/barbicanv1/acl.py b/_modules/barbicanv1/acl.py
index 8f3c024..82792ea 100644
--- a/_modules/barbicanv1/acl.py
+++ b/_modules/barbicanv1/acl.py
@@ -5,14 +5,14 @@
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('get')
def secret_acl_get(secret_uuid, **kwargs):
- url = '/v1/secrets/{}/acl'.format(secret_uuid)
+ url = '/secrets/{}/acl'.format(secret_uuid)
return url, {}
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('put')
def secret_acl_put(secret_uuid, **kwargs):
- url = '/v1/secrets/{}/acl'.format(secret_uuid)
+ url = '/secrets/{}/acl'.format(secret_uuid)
json = {
'read': kwargs,
}
@@ -22,7 +22,7 @@
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('patch')
def secret_acl_patch(secret_uuid, **kwargs):
- url = 'v1/secrets/{}/acl'.format(secret_uuid)
+ url = '/secrets/{}/acl'.format(secret_uuid)
json = {
'read': kwargs,
}
@@ -32,5 +32,5 @@
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('delete')
def secret_acl_delete(secret_uuid, **kwargs):
- url = 'v1/secrets/{}/acl'.format(secret_uuid)
+ url = '/secrets/{}/acl'.format(secret_uuid)
return url, {}
diff --git a/_modules/barbicanv1/common.py b/_modules/barbicanv1/common.py
index dd32025..83fd6ff 100644
--- a/_modules/barbicanv1/common.py
+++ b/_modules/barbicanv1/common.py
@@ -48,12 +48,15 @@
def _get_raw_client(cloud_name):
service_type = 'key-manager'
- adapter = os_client_config.make_rest_client(service_type,
- cloud=cloud_name)
+ config = os_client_config.OpenStackConfig()
+ cloud = config.get_one_cloud(cloud_name)
+ adapter = cloud.get_session_client(service_type)
+ adapter.version = '1'
try:
access_info = adapter.session.auth.get_access(adapter.session)
endpoints = access_info.service_catalog.get_endpoints()
- except (AttributeError, ValueError):
+ except (AttributeError, ValueError) as exc:
+ log.exception('%s' % exc)
e = NoAuthPluginConfigured()
log.exception('%s' % e)
raise e
diff --git a/_modules/barbicanv1/secrets.py b/_modules/barbicanv1/secrets.py
index eda7382..d85c08a 100644
--- a/_modules/barbicanv1/secrets.py
+++ b/_modules/barbicanv1/secrets.py
@@ -10,27 +10,27 @@
@send('get')
def secret_list(**kwargs):
- url = '/v1/secrets?{}'.format(urlencode(kwargs))
+ url = '/secrets?{}'.format(urlencode(kwargs))
return url, {}
@send('post')
def secret_create(**kwargs):
- url = '/v1/secrets'
+ url = '/secrets'
return url, {'json': kwargs}
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('get')
def secret_get_details(secret_uuid, **kwargs):
- url = '/v1/secrets/{}'.format(secret_uuid)
+ url = '/secrets/{}'.format(secret_uuid)
return url, {}
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('delete')
def secret_delete(secret_uuid, **kwargs):
- url = '/v1/secrets/{}'.format(secret_uuid)
+ url = '/secrets/{}'.format(secret_uuid)
return url, {}
# NOTE::
@@ -41,7 +41,7 @@
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('put')
def secret_payload_set(secret_uuid, payload, **kwargs):
- url = '/v1/secrets/{}'.format(secret_uuid)
+ url = '/secrets/{}'.format(secret_uuid)
# Work around content headers
content_type = 'payload_content_type'
content_encoding = 'payload_content_encoding'
@@ -57,5 +57,5 @@
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('get')
def secret_payload_get(secret_uuid, **kwargs):
- url = '/v1/secrets/{}/payload'.format(secret_uuid)
+ url = '/secrets/{}/payload'.format(secret_uuid)
return url, {}