diff --git a/mistralclient/commands/v2/executions.py b/mistralclient/commands/v2/executions.py index fffb70ff..d4533a47 100644 --- a/mistralclient/commands/v2/executions.py +++ b/mistralclient/commands/v2/executions.py @@ -41,6 +41,7 @@ def format(execution=None, lister=False): 'Workflow namespace', 'Description', 'Task Execution ID', + 'Root Execution ID', 'State', 'State info', 'Created at', @@ -59,6 +60,7 @@ def format(execution=None, lister=False): execution.workflow_namespace, execution.description, execution.task_execution_id or '', + execution.root_execution_id or '', execution.state, state_info, execution.created_at, diff --git a/mistralclient/tests/unit/v2/test_cli_executions.py b/mistralclient/tests/unit/v2/test_cli_executions.py index 7bce7b26..080e2df6 100644 --- a/mistralclient/tests/unit/v2/test_cli_executions.py +++ b/mistralclient/tests/unit/v2/test_cli_executions.py @@ -33,6 +33,7 @@ EXEC = executions.Execution( 'workflow_id': '123e4567-e89b-12d3-a456-426655440000', 'workflow_name': 'some', 'workflow_namespace': '', + 'root_execution_id': '', 'description': '', 'state': 'RUNNING', 'state_info': None, @@ -49,6 +50,7 @@ SUB_WF_EXEC = executions.Execution( 'workflow_id': '123e4567-e89b-12d3-a456-426655440000', 'workflow_name': 'some_sub_wf', 'workflow_namespace': '', + 'root_execution_id': 'ROOT_EXECUTION_ID', 'description': '', 'state': 'RUNNING', 'state_info': None, @@ -65,6 +67,7 @@ EX_RESULT = ( '', '', '', + '', 'RUNNING', None, '1', @@ -78,6 +81,7 @@ SUB_WF_EX_RESULT = ( '', '', 'abc', + 'ROOT_EXECUTION_ID', 'RUNNING', None, '1', @@ -159,6 +163,7 @@ class TestCLIExecutionsV2(base.BaseCommandTest): 'workflow_id': '123e4567-e89b-12d3-a456-426655440000', 'workflow_name': 'some', 'workflow_namespace': '', + 'root_execution_id': '', 'description': '', 'state': state, 'state_info': None, @@ -169,7 +174,7 @@ class TestCLIExecutionsV2(base.BaseCommandTest): ) ex_result = list(EX_RESULT) - ex_result[6] = state + ex_result[7] = state ex_result = tuple(ex_result) result = self.call(