From 62034999bcf7d62af3d9e95b68ba987729c5d75d Mon Sep 17 00:00:00 2001 From: Vitalii Solodilov Date: Fri, 7 Sep 2018 14:33:10 +0400 Subject: [PATCH] Can't pause a async action using cli The IDLE state was mixed up with the PAUSED state. Change-Id: I8a4d1247ac3bbece881c31e322f9e2b58819e627 Closes-Bug: 1791273 Signed-off-by: Vitalii Solodilov --- mistralclient/commands/v2/action_executions.py | 2 +- mistralclient/tests/unit/v2/test_cli_action_execs.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mistralclient/commands/v2/action_executions.py b/mistralclient/commands/v2/action_executions.py index 195cf9eb..ea754bc9 100644 --- a/mistralclient/commands/v2/action_executions.py +++ b/mistralclient/commands/v2/action_executions.py @@ -249,7 +249,7 @@ class Update(command.ShowOne): parser.add_argument( '--state', dest='state', - choices=['IDLE', 'RUNNING', 'SUCCESS', 'ERROR', 'CANCELLED'], + choices=['PAUSED', 'RUNNING', 'SUCCESS', 'ERROR', 'CANCELLED'], help='Action execution state') parser.add_argument( '--output', diff --git a/mistralclient/tests/unit/v2/test_cli_action_execs.py b/mistralclient/tests/unit/v2/test_cli_action_execs.py index fe1a1e87..786026c0 100644 --- a/mistralclient/tests/unit/v2/test_cli_action_execs.py +++ b/mistralclient/tests/unit/v2/test_cli_action_execs.py @@ -125,7 +125,7 @@ class TestCLIActionExecutions(base.BaseCommandTest): ) def test_update(self): - states = ['IDLE', 'RUNNING', 'SUCCESS', 'ERROR', 'CANCELLED'] + states = ['PAUSED', 'RUNNING', 'SUCCESS', 'ERROR', 'CANCELLED'] for state in states: action_ex_dict = copy.deepcopy(ACTION_EX_DICT) @@ -156,7 +156,7 @@ class TestCLIActionExecutions(base.BaseCommandTest): self.assertEqual(expected_result, result[1]) def test_update_invalid_state(self): - states = ['PAUSED', 'WAITING', 'DELAYED'] + states = ['IDLE', 'WAITING', 'DELAYED'] # Redirect the stderr so it doesn't show during tox _stderr = sys.stderr