Format the nodes list in openstack overcloud delete node
The current command will output something like the following: deleting nodes [u'UUID-UUID'] from stack overcloud This change adds simple string formatting so that a raw Python list isn't displayed. Change-Id: Ibf8bc40f0c45be60e869c5ab3d99d892e24f8a94 Closes-Bug: #1633449
This commit is contained in:
parent
6a15a7728f
commit
2cc4eef660
|
@ -66,8 +66,9 @@ class DeleteNode(command.Command):
|
|||
self.log.debug("take_action(%s)" % parsed_args)
|
||||
clients = self.app.client_manager
|
||||
|
||||
print("deleting nodes {0} from stack {1}".format(parsed_args.nodes,
|
||||
parsed_args.stack))
|
||||
nodes = '\n'.join('- %s' % node for node in parsed_args.nodes)
|
||||
print("Deleting the following nodes from stack {stack}:\n{nodes}"
|
||||
.format(stack=parsed_args.stack, nodes=nodes))
|
||||
|
||||
scale.scale_down(clients, parsed_args.stack, parsed_args.nodes)
|
||||
|
||||
|
|
Loading…
Reference in New Issue