diff --git a/tripleoclient/workflows/deployment.py b/tripleoclient/workflows/deployment.py index 93d6ae262..760cdb28d 100644 --- a/tripleoclient/workflows/deployment.py +++ b/tripleoclient/workflows/deployment.py @@ -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']