Skip to content

Commit

Permalink
Fixed StackStorm#4739. st2 cli now prints action ref for various comm…
Browse files Browse the repository at this point in the history
…ands
  • Loading branch information
nmaludy committed Jul 12, 2019
1 parent c0458f1 commit 7f8a651
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -15,6 +15,10 @@ Fixed
Contributed by Nick Maludy (@nmaludy Encore Technologies)
* Fix the workflow execution cancelation to proceed even if the workflow execution is not found or
completed. (bug fix) #4735
* Fixed ``st2 execution get`` and ``st2 run`` not printing the ``action.ref``
for non-workflow actions. (bug fix) #4739

Contributed by Nick Maludy (@nmaludy Encore Technologies)

3.1.0 - June 27, 2019
---------------------
Expand Down
8 changes: 4 additions & 4 deletions st2client/st2client/commands/action.py
Expand Up @@ -296,7 +296,7 @@ def _add_common_options(self):

detail_arg_grp = execution_details_arg_grp.add_mutually_exclusive_group()
detail_arg_grp.add_argument('--attr', nargs='+',
default=['id', 'status', 'parameters', 'result'],
default=self.display_attributes,
help=('List of attributes to include in the '
'output. "all" or unspecified will '
'return all attributes.'))
Expand Down Expand Up @@ -1167,7 +1167,7 @@ def run_and_print(self, args, **kwargs):

class ActionExecutionGetCommand(ActionRunCommandMixin, ResourceViewCommand):
display_attributes = ['id', 'action.ref', 'context.user', 'parameters', 'status',
'start_timestamp', 'end_timestamp', 'result', 'liveaction']
'start_timestamp', 'end_timestamp', 'result']
include_attributes = ['action.ref', 'action.runner_type', 'start_timestamp',
'end_timestamp']

Expand Down Expand Up @@ -1321,7 +1321,7 @@ def run(self, args, **kwargs):

class ActionExecutionPauseCommand(ActionRunCommandMixin, ResourceViewCommand):
display_attributes = ['id', 'action.ref', 'context.user', 'parameters', 'status',
'start_timestamp', 'end_timestamp', 'result', 'liveaction']
'start_timestamp', 'end_timestamp', 'result']

def __init__(self, resource, *args, **kwargs):
super(ActionExecutionPauseCommand, self).__init__(
Expand Down Expand Up @@ -1364,7 +1364,7 @@ def _print_result(self, args, execution_id, execution, **kwargs):

class ActionExecutionResumeCommand(ActionRunCommandMixin, ResourceViewCommand):
display_attributes = ['id', 'action.ref', 'context.user', 'parameters', 'status',
'start_timestamp', 'end_timestamp', 'result', 'liveaction']
'start_timestamp', 'end_timestamp', 'result']

def __init__(self, resource, *args, **kwargs):
super(ActionExecutionResumeCommand, self).__init__(
Expand Down

0 comments on commit 7f8a651

Please sign in to comment.