From 8821deebe96c37ca535dd996919a7e5beb3811d7 Mon Sep 17 00:00:00 2001 From: Renat Akhmerov Date: Mon, 11 Apr 2016 13:39:19 +0700 Subject: [PATCH] Fixing failing functional tests for Cinder and Heat actions Change-Id: Ia8acb0786009fc66f7a68a2dfae9f37d7ef61506 --- mistral/actions/openstack/actions.py | 10 ++++++++-- mistral/actions/openstack/base.py | 9 +++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/mistral/actions/openstack/actions.py b/mistral/actions/openstack/actions.py index 9f94d043..71dcb174 100644 --- a/mistral/actions/openstack/actions.py +++ b/mistral/actions/openstack/actions.py @@ -179,7 +179,10 @@ class HeatAction(base.OpenStackAction): endpoint_url = keystone_utils.format_url( heat_endpoint.url, - {'tenant_id': ctx.project_id} + { + 'tenant_id': ctx.project_id, + 'project_id': ctx.project_id + } ) return self._client_class( @@ -226,7 +229,10 @@ class CinderAction(base.OpenStackAction): cinder_url = keystone_utils.format_url( cinder_endpoint.url, - {'tenant_id': ctx.project_id} + { + 'tenant_id': ctx.project_id, + 'project_id': ctx.project_id + } ) client = self._client_class( diff --git a/mistral/actions/openstack/base.py b/mistral/actions/openstack/base.py index ae091379..7a55b003 100644 --- a/mistral/actions/openstack/base.py +++ b/mistral/actions/openstack/base.py @@ -14,10 +14,15 @@ import abc import inspect +import traceback + +from oslo_log import log from mistral.actions import base from mistral import exceptions as exc +LOG = log.getLogger(__name__) + class OpenStackAction(base.Action): """OpenStack Action. @@ -77,6 +82,10 @@ class OpenStackAction(base.Action): return result except Exception as e: + # Print the traceback for the last exception so that we can see + # where the issue comes from. + LOG.warning(traceback.format_exc()) + e_str = '%s: %s' % (type(e), e.message) raise exc.ActionException(