Merge "Remove mistral from the get_deployment_failures deploy workflow"

This commit is contained in:
Zuul 2020-02-22 01:07:02 +00:00 committed by Gerrit Code Review
commit 32f144f05e
1 changed files with 12 additions and 11 deletions

View File

@ -604,17 +604,18 @@ def set_deployment_status(clients, plan, status):
)
def get_deployment_failures(clients, **workflow_input):
workflow_client = clients.workflow_engine
def get_deployment_failures(clients, plan):
"""Return a list of deployment failures.
result = base.call_action(
workflow_client,
'tripleo.deployment.get_deployment_failures',
**workflow_input
)
:param clients: application client object.
:type clients: Object
message = result.get('message')
if message:
print(message)
:param plan: Name of plan to lookup.
:param plan: String
return result['failures']
:returns: Dictionary
"""
context = clients.tripleoclient.create_mistral_context()
get_failures = deployment.DeploymentFailuresAction(plan=plan)
return get_failures.run(context=context)['failures']