diff --git a/senlinclient/v1/cluster.py b/senlinclient/v1/cluster.py index 1d748449..d276aa4d 100644 --- a/senlinclient/v1/cluster.py +++ b/senlinclient/v1/cluster.py @@ -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)) diff --git a/senlinclient/v1/node.py b/senlinclient/v1/node.py index 473964ae..8a2fafe3 100644 --- a/senlinclient/v1/node.py +++ b/senlinclient/v1/node.py @@ -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))