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
This commit is contained in:
parent
ee3680a4d6
commit
538fc12dff
@ -22,6 +22,7 @@ from horizon.utils import memoized
|
|||||||
|
|
||||||
from mistralclient.api import client as mistral_client
|
from mistralclient.api import client as mistral_client
|
||||||
from mistraldashboard.handle_errors import handle_errors
|
from mistraldashboard.handle_errors import handle_errors
|
||||||
|
from openstack_dashboard.api import base
|
||||||
|
|
||||||
SERVICE_TYPE = 'workflowv2'
|
SERVICE_TYPE = 'workflowv2'
|
||||||
|
|
||||||
@ -32,10 +33,9 @@ def mistralclient(request):
|
|||||||
username=request.user.username,
|
username=request.user.username,
|
||||||
auth_token=request.user.token.id,
|
auth_token=request.user.token.id,
|
||||||
project_id=request.user.tenant_id,
|
project_id=request.user.tenant_id,
|
||||||
# Ideally, we should get it from identity endpoint, but since
|
# We can't use auth_url param in here if we config
|
||||||
# python-mistralclient is not supporting v2.0 API it might create
|
# and use keystone federation
|
||||||
# additional troubles for those who still rely on v2.0 stack-wise.
|
mistral_url=base.url_for(request, 'workflowv2'),
|
||||||
auth_url=getattr(settings, 'OPENSTACK_KEYSTONE_URL'),
|
|
||||||
# Todo: add SECONDARY_ENDPOINT_TYPE support
|
# Todo: add SECONDARY_ENDPOINT_TYPE support
|
||||||
endpoint_type=getattr(
|
endpoint_type=getattr(
|
||||||
settings,
|
settings,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user