From 538fc12dff4c6e1171c28e6b49fddbe5371db315 Mon Sep 17 00:00:00 2001 From: Bo Tran Date: Wed, 18 Sep 2019 23:00:14 +0700 Subject: [PATCH] Fix error when use keystone federation If we config keystone federation, we was received a error when we change to region other. Change-Id: Ie475b8ab5b40d5b365eeb9f63ecb34b13a810f8c --- mistraldashboard/api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mistraldashboard/api.py b/mistraldashboard/api.py index 393eff8..01125ce 100644 --- a/mistraldashboard/api.py +++ b/mistraldashboard/api.py @@ -22,6 +22,7 @@ from horizon.utils import memoized from mistralclient.api import client as mistral_client from mistraldashboard.handle_errors import handle_errors +from openstack_dashboard.api import base SERVICE_TYPE = 'workflowv2' @@ -32,10 +33,9 @@ def mistralclient(request): username=request.user.username, auth_token=request.user.token.id, project_id=request.user.tenant_id, - # Ideally, we should get it from identity endpoint, but since - # python-mistralclient is not supporting v2.0 API it might create - # additional troubles for those who still rely on v2.0 stack-wise. - auth_url=getattr(settings, 'OPENSTACK_KEYSTONE_URL'), + # We can't use auth_url param in here if we config + # and use keystone federation + mistral_url=base.url_for(request, 'workflowv2'), # Todo: add SECONDARY_ENDPOINT_TYPE support endpoint_type=getattr( settings,