Fix overcloud delete command

In change I6d41f74f9271c17bcae67eb3c09460051f55667f we changed the
signature of delete_deployment_plan from:
def delete_deployment_plan(workflow_client, **input_)

to:
def delete_deployment_plan(clients, **workflow_input)

In that change we did adjust tripleoclient/v1/overcloud_plan.py
but we forgot the overcloud delete.

We need to make sure we pass the clients and not the workflow_engine
itself when we invoke the function in tripleoclient.

Tested-By: Raoul Scarazzini <rscarazz@redhat.com>

Change-Id: I88642f5d60be629de90312523a3a9c5ea1e4fd63
Closes-Bug: #1776313
This commit is contained in:
Michele Baldessari
2018-06-12 09:50:24 +02:00
parent 74abcc3559
commit ec38f48761
+3 -4
View File
@@ -66,11 +66,11 @@ class DeleteOvercloud(command.Command):
"Error occurred during stack delete {}".
format(e))
def _plan_delete(self, workflow_client, stack_name):
def _plan_delete(self, clients, stack_name):
print("Deleting plan {s}...".format(s=stack_name))
try:
plan_management.delete_deployment_plan(
workflow_client,
clients,
container=stack_name)
except Exception as err:
raise oscexc.CommandError(
@@ -90,8 +90,7 @@ class DeleteOvercloud(command.Command):
raise oscexc.CommandError("Action not confirmed, exiting.")
clients = self.app.client_manager
workflow_client = clients.workflow_engine
self._stack_delete(clients, parsed_args.stack)
self._plan_delete(workflow_client, parsed_args.stack)
self._plan_delete(clients, parsed_args.stack)
print("Success.")