Fix getting action id in Location header
openstacksdk was changed to return action object with id inside for API calls that have location in response header. This change retrieves the action id from the action object returned when calling cluster delete and node delete. Depends-On: https://review.openstack.org/#/c/631362/ Change-Id: Ife9d3be5acd740f6de7721ba54aa87d44f924728 Closes-Bug: #1814171
This commit is contained in:
parent
1c9e7078f3
commit
380ebb797a
@ -358,9 +358,9 @@ class DeleteCluster(command.Command):
|
||||
result = {}
|
||||
for cid in parsed_args.cluster:
|
||||
try:
|
||||
cluster = senlin_client.delete_cluster(
|
||||
cluster_delete_action = senlin_client.delete_cluster(
|
||||
cid, False, parsed_args.force_delete)
|
||||
result[cid] = ('OK', cluster.location.split('/')[-1])
|
||||
result[cid] = ('OK', cluster_delete_action['id'])
|
||||
except Exception as ex:
|
||||
result[cid] = ('ERROR', six.text_type(ex))
|
||||
|
||||
|
@ -329,9 +329,9 @@ class DeleteNode(command.Command):
|
||||
result = {}
|
||||
for nid in parsed_args.node:
|
||||
try:
|
||||
node = senlin_client.delete_node(
|
||||
node_delete_action = senlin_client.delete_node(
|
||||
nid, False, parsed_args.force_delete)
|
||||
result[nid] = ('OK', node.location.split('/')[-1])
|
||||
result[nid] = ('OK', node_delete_action['id'])
|
||||
except Exception as ex:
|
||||
result[nid] = ('ERROR', six.text_type(ex))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user