Merge "Support multiple messages from create_raid_configuration"
This commit is contained in:
commit
6cd227ff71
|
@ -36,9 +36,9 @@ class TestCreateRAID(fakes.TestBaremetal):
|
|||
}
|
||||
tripleoclient = self.app.client_manager.tripleoclient
|
||||
websocket = tripleoclient.messaging_websocket()
|
||||
websocket.wait_for_message.side_effect = [
|
||||
websocket.wait_for_messages.return_value = iter([
|
||||
{'status': "SUCCESS"}
|
||||
]
|
||||
])
|
||||
self.websocket = websocket
|
||||
|
||||
self.workflow.executions.create.return_value = mock.MagicMock(
|
||||
|
|
|
@ -283,7 +283,9 @@ def create_raid_configuration(clients, **workflow_input):
|
|||
print('Creating RAID configuration for given nodes, this may take time')
|
||||
|
||||
with ooo_client.messaging_websocket(queue_name) as ws:
|
||||
payload = ws.wait_for_message(execution.id)
|
||||
for payload in base.wait_for_messages(workflow_client, ws, execution):
|
||||
if 'message' in payload:
|
||||
print(payload['message'])
|
||||
|
||||
if payload['status'] == 'SUCCESS':
|
||||
print('Success')
|
||||
|
|
Loading…
Reference in New Issue