diff --git a/heat/engine/resources/openstack/zaqar/subscription.py b/heat/engine/resources/openstack/zaqar/subscription.py index 94cc6ea134..622df53bdf 100644 --- a/heat/engine/resources/openstack/zaqar/subscription.py +++ b/heat/engine/resources/openstack/zaqar/subscription.py @@ -193,7 +193,9 @@ class MistralTrigger(ZaqarSubscription): def _subscriber_url(self): mistral_client = self.client('mistral') - return 'trust+%s/executions' % mistral_client.http_client.base_url + manager = getattr(mistral_client.executions, 'client', + mistral_client.executions) + return 'trust+%s/executions' % manager.http_client.base_url def _subscription_options(self): params = dict(self.properties[self.PARAMS]) diff --git a/heat/tests/openstack/zaqar/test_subscription.py b/heat/tests/openstack/zaqar/test_subscription.py index 85cf09bf17..a9e93f046f 100644 --- a/heat/tests/openstack/zaqar/test_subscription.py +++ b/heat/tests/openstack/zaqar/test_subscription.py @@ -348,8 +348,10 @@ class ZaqarMistralTriggerTest(common.HeatTestCase): def client(name='zaqar'): if name == 'mistral': client = mock.Mock() - client.http_client = mock.Mock() - client.http_client.base_url = 'http://mistral.example.net:8989' + http_client = mock.Mock() + client.executions = mock.Mock(spec=['http_client']) + client.executions.http_client = http_client + http_client.base_url = 'http://mistral.example.net:8989' return client elif name == 'zaqar': return self.fc