Support multiple messages from deploy_plan

This updates the workflow wrapper to use the multiple message interface.

Change-Id: I09b4cbfb32fca59c4b055a61f20c33f2c893c96b
Partial-Bug: #1646887
This commit is contained in:
Dougal Matthews 2017-03-16 09:44:31 +00:00
parent ad0aae9cff
commit aa59391787
2 changed files with 6 additions and 4 deletions

View File

@ -340,9 +340,10 @@ class TestOvercloudDeployPlan(utils.TestCommand):
# No existing stack, this is a new deploy.
self.orch.stacks.get.return_value = None
self.websocket.wait_for_message.return_value = {
self.websocket.wait_for_messages.return_value = iter([{
'execution': {'id': 'IDID'},
'status': 'SUCCESS'
}
}])
mock_for_stack_ready.return_value = True

View File

@ -40,8 +40,9 @@ def deploy(clients, **workflow_input):
# The deploy workflow ends once the Heat create/update starts. This
# means that is shouldn't take very long. Wait for six minutes for
# messages from the workflow.
message = ws.wait_for_message(execution.id, 360) # 6 * 60 seconds
assert message['status'] == "SUCCESS", pprint.pformat(message)
for payload in base.wait_for_messages(workflow_client, ws, execution,
360):
assert payload['status'] == "SUCCESS", pprint.pformat(payload)
def deploy_and_wait(log, clients, stack, plan_name, verbose_level,