Merge "Fix OS::Zaqar::MistralSubscription with mistralclient 3.0"
This commit is contained in:
commit
923d018274
|
@ -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])
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue