diff --git a/mistralclient/commands/v2/action_executions.py b/mistralclient/commands/v2/action_executions.py index e45cb19c..35660f4e 100644 --- a/mistralclient/commands/v2/action_executions.py +++ b/mistralclient/commands/v2/action_executions.py @@ -34,6 +34,8 @@ def format_list(action_ex=None): 'Task ID', 'State', 'Accepted', + 'Created at', + 'Updated at' ) if action_ex: @@ -45,6 +47,8 @@ def format_list(action_ex=None): action_ex.task_execution_id, action_ex.state, action_ex.accepted, + action_ex.created_at, + action_ex.updated_at or '' ) else: data = (tuple('' for _ in range(len(columns))),) @@ -62,6 +66,8 @@ def format(action_ex=None): 'State', 'State info', 'Accepted', + 'Created at', + 'Updated at', ) if action_ex: @@ -74,6 +80,8 @@ def format(action_ex=None): action_ex.state, action_ex.state_info, action_ex.accepted, + action_ex.created_at, + action_ex.updated_at or '' ) else: data = (tuple('' for _ in range(len(columns))),) diff --git a/mistralclient/tests/unit/v2/test_cli_action_execs.py b/mistralclient/tests/unit/v2/test_cli_action_execs.py index 6872f03c..e04d891b 100644 --- a/mistralclient/tests/unit/v2/test_cli_action_execs.py +++ b/mistralclient/tests/unit/v2/test_cli_action_execs.py @@ -30,7 +30,9 @@ ACTION_EX_DICT = { 'task_execution_id': "1-2-3-4", 'state': 'RUNNING', 'state_info': 'RUNNING somehow.', - 'accepted': True + 'accepted': True, + 'created_at': '1', + 'updated_at': '1', } ACTION_EX_RESULT = {"test": "is", "passed": "successfully"} @@ -81,7 +83,7 @@ class TestCLIActionExecutions(base.BaseCommandTest): self.assertEqual( ('123', 'some', 'thing', 'task1', '1-2-3-4', 'RUNNING', - 'RUNNING somehow.', True), + 'RUNNING somehow.', True, '1', '1'), result[1] ) @@ -95,7 +97,7 @@ class TestCLIActionExecutions(base.BaseCommandTest): self.assertEqual( ('123', 'some', 'thing', 'task1', '1-2-3-4', 'RUNNING', - 'RUNNING somehow.', True), + 'RUNNING somehow.', True, '1', '1'), result[1] ) @@ -105,7 +107,8 @@ class TestCLIActionExecutions(base.BaseCommandTest): result = self.call(action_ex_cmd.List) self.assertEqual( - [('123', 'some', 'thing', 'task1', '1-2-3-4', 'RUNNING', True)], + [('123', 'some', 'thing', 'task1', '1-2-3-4', 'RUNNING', True, + '1', '1')], result[1] ) @@ -116,7 +119,7 @@ class TestCLIActionExecutions(base.BaseCommandTest): self.assertEqual( ('123', 'some', 'thing', 'task1', '1-2-3-4', 'RUNNING', - 'RUNNING somehow.', True), result[1] + 'RUNNING somehow.', True, '1', '1'), result[1] ) def test_get_output(self):