Remove mistral from the get_deployment_failures deploy workflow

This change removes all of mistral from the get_deployment_failures function
by calling the required functions directly.

Story: 2007212
Task: 38781

Change-Id: I9d6779ff8b85132154541dd11697467aab164f93
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This commit is contained in:
Kevin Carter 2020-02-17 18:24:53 -06:00
parent aefda7f205
commit a14e145ff1
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']