From 6066a75dbe52afdd69d026ae501fa53234a84882 Mon Sep 17 00:00:00 2001 From: Winson Chan Date: Thu, 5 Mar 2015 01:28:14 +0000 Subject: [PATCH] Rename execution_id to workflow_execution_id The field execution_id is renamed in the task object to workflow_execution_id. References in the mistralclient are changed accordingly. Change-Id: Id4deeba546b1fadd4c18585ca177d74bdf08f6dd Closes-Bug: #1428374 --- mistralclient/api/v2/tasks.py | 6 +++--- mistralclient/commands/v2/tasks.py | 2 +- mistralclient/tests/unit/v2/test_cli_tasks.py | 2 +- mistralclient/tests/unit/v2/test_tasks.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mistralclient/api/v2/tasks.py b/mistralclient/api/v2/tasks.py index 95d18315..ba632a6e 100644 --- a/mistralclient/api/v2/tasks.py +++ b/mistralclient/api/v2/tasks.py @@ -31,11 +31,11 @@ class TaskManager(base.ResourceManager): return self._update('/tasks/%s' % id, data) - def list(self, execution_id=None): + def list(self, workflow_execution_id=None): url = '/tasks' - if execution_id: - url = '/executions/%s/tasks' % execution_id + if workflow_execution_id: + url = '/executions/%s/tasks' % workflow_execution_id return self._list(url, response_key='tasks') diff --git a/mistralclient/commands/v2/tasks.py b/mistralclient/commands/v2/tasks.py index 8af50e40..cbe8f3e7 100644 --- a/mistralclient/commands/v2/tasks.py +++ b/mistralclient/commands/v2/tasks.py @@ -40,7 +40,7 @@ def format(task=None): task.id, task.name, task.workflow_name, - task.execution_id, + task.workflow_execution_id, task.state, ) else: diff --git a/mistralclient/tests/unit/v2/test_cli_tasks.py b/mistralclient/tests/unit/v2/test_cli_tasks.py index dd2f1759..387e7cb5 100644 --- a/mistralclient/tests/unit/v2/test_cli_tasks.py +++ b/mistralclient/tests/unit/v2/test_cli_tasks.py @@ -26,7 +26,7 @@ TASK_DICT = { 'id': '123', 'name': 'some', 'workflow_name': 'thing', - 'execution_id': '321', + 'workflow_execution_id': '321', 'state': 'RUNNING', } diff --git a/mistralclient/tests/unit/v2/test_tasks.py b/mistralclient/tests/unit/v2/test_tasks.py index 43b40df7..06ccd745 100644 --- a/mistralclient/tests/unit/v2/test_tasks.py +++ b/mistralclient/tests/unit/v2/test_tasks.py @@ -21,7 +21,7 @@ from mistralclient.tests.unit.v2 import base TASK = { 'id': "1", - 'execution_id': '123', + 'workflow_execution_id': '123', 'name': 'my_task', 'workflow_name': 'my_wf', 'state': 'RUNNING',