Change action-get help to get action info by ID

This changes inprove the help for action-get in order to
indicate that you can query an action using the ID too.

Change-Id: I74900fec16f05965df6ae45b9631e73b80f5c444
Depends-On: I8ce55c0eb1cab7581ba719fbbb6be7b7dced27e0
Implements: blueprint mistral-actions-identifier
This commit is contained in:
Marcos Fermin Lobo
2016-06-06 15:29:20 +02:00
committed by hardik
parent d2f9938c60
commit 7f5eef036f

View File

@@ -83,13 +83,13 @@ class Get(command.ShowOne):
def get_parser(self, prog_name):
parser = super(Get, self).get_parser(prog_name)
parser.add_argument('name', help='Action name')
parser.add_argument('action', help='Action (name or ID)')
return parser
def take_action(self, parsed_args):
mistral_client = self.app.client_manager.workflow_engine
action = mistral_client.actions.get(parsed_args.name)
action = mistral_client.actions.get(parsed_args.action)
return format(action)