Removes insecure parameter from barbican client
This removes the parameter insecure in the client creation as this no longer exists in the client. It also changes the client class to be called as other clients in openstack using sessions Change-Id: I3cb7ed4255f8996b8bfd9a3e1edba6de50f4e492 Closes-Bug: #1800819
This commit is contained in:
parent
c15a0770cf
commit
eb59216281
@ -20,7 +20,6 @@ from oslo_utils import importutils
|
||||
|
||||
from keystoneauth1 import session as ks_session
|
||||
from keystoneauth1.token_endpoint import Token
|
||||
from keystoneclient.auth import identity
|
||||
from keystoneclient import httpclient
|
||||
|
||||
from mistral.actions.openstack import base
|
||||
@ -574,6 +573,7 @@ class ZaqarAction(base.OpenStackAction):
|
||||
|
||||
|
||||
class BarbicanAction(base.OpenStackAction):
|
||||
_service_type = 'key-manager'
|
||||
|
||||
@classmethod
|
||||
def _get_client_class(cls):
|
||||
@ -583,21 +583,12 @@ class BarbicanAction(base.OpenStackAction):
|
||||
|
||||
LOG.debug("Barbican action security context: %s", context)
|
||||
|
||||
barbican_endpoint = keystone_utils.get_endpoint_for_project('barbican')
|
||||
keystone_endpoint = keystone_utils.get_keystone_endpoint()
|
||||
|
||||
auth = identity.v3.Token(
|
||||
auth_url=keystone_endpoint.url,
|
||||
project_name=context.user_name,
|
||||
token=context.auth_token,
|
||||
project_id=context.project_id
|
||||
)
|
||||
barbican_endpoint = self.get_service_endpoint()
|
||||
session_and_auth = self.get_session_and_auth(context)
|
||||
|
||||
return self._get_client_class()(
|
||||
project_id=context.project_id,
|
||||
endpoint=barbican_endpoint.url,
|
||||
auth=auth,
|
||||
insecure=context.insecure
|
||||
session=session_and_auth['session']
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
Loading…
Reference in New Issue
Block a user