From 5a39730ef2a3e7d8e3f7132dc6b4b1c41a0872d8 Mon Sep 17 00:00:00 2001 From: Filip Blaha Date: Wed, 29 Jul 2015 10:49:04 +0200 Subject: [PATCH] Attempt to fix congress client initialization After we switched to trusts as default option congress functional tests are no longer working. Change-Id: Ic2efe0073ecb3991c3030e9f5b5986a8a102eb14 Closes-bug: #1474938 --- murano/engine/client_manager.py | 7 ++----- murano/engine/system/mistralclient.py | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/murano/engine/client_manager.py b/murano/engine/client_manager.py index c3cd4102..1d3bc3be 100644 --- a/murano/engine/client_manager.py +++ b/murano/engine/client_manager.py @@ -15,6 +15,7 @@ from eventlet import semaphore import heatclient.client as hclient import keystoneclient +import keystoneclient.auth.identity.access as access import muranoclient.v1.client as muranoclient import neutronclient.v2_0.client as nclient from oslo_config import cfg @@ -100,10 +101,7 @@ class ClientManager(object): use_trusts = False def factory(keystone_client, auth_token): - auth = keystoneclient.auth.identity.v2.Token( - auth_url=cfg.CONF.keystone_authtoken.auth_uri, - tenant_name=keystone_client.tenant_name, - token=auth_token) + auth = access.AccessInfoPlugin(keystone_client.auth_ref) session = keystoneclient.session.Session(auth=auth) return congress_client.Client(session=session, service_type='policy') @@ -198,7 +196,6 @@ class ClientManager(object): endpoint_type=endpoint_type) return mistralclient.client(mistral_url=mistral_url, - auth_url=keystone_client.auth_url, project_id=keystone_client.tenant_id, endpoint_type=endpoint_type, service_type=service_type, diff --git a/murano/engine/system/mistralclient.py b/murano/engine/system/mistralclient.py index 40c922e8..a8ba3657 100644 --- a/murano/engine/system/mistralclient.py +++ b/murano/engine/system/mistralclient.py @@ -37,7 +37,7 @@ class MistralClient(murano_object.MuranoObject): def upload(self, _context, definition): mistral_client = self._clients.get_mistral_client(_context) - mistral_client.workflows.update(definition) + mistral_client.workflows.create(definition) def run(self, _context, name, timeout=600, inputs=None, params=None): mistral_client = self._clients.get_mistral_client(_context)