From 1d6199bac18809ae7b8fe2fb1ca82fb7491063e3 Mon Sep 17 00:00:00 2001 From: miaohb Date: Tue, 20 Sep 2016 10:46:23 +0800 Subject: [PATCH] Fix error in action list Related-Bug: 1625419 Action list can not display the "target" column Change-Id: I45e6f28475da953fa9d84ba05149fb8c2c8106ca --- senlinclient/tests/unit/v1/test_action.py | 2 +- senlinclient/tests/unit/v1/test_shell.py | 2 +- senlinclient/v1/action.py | 2 +- senlinclient/v1/shell.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/senlinclient/tests/unit/v1/test_action.py b/senlinclient/tests/unit/v1/test_action.py index 9fe82377..80b4d762 100644 --- a/senlinclient/tests/unit/v1/test_action.py +++ b/senlinclient/tests/unit/v1/test_action.py @@ -28,7 +28,7 @@ class TestAction(fakes.TestClusteringv1): class TestActionList(TestAction): - columns = ['id', 'name', 'action', 'status', 'target', 'depends_on', + columns = ['id', 'name', 'action', 'status', 'target_id', 'depends_on', 'depended_by', 'created_at'] response = {"actions": [ { diff --git a/senlinclient/tests/unit/v1/test_shell.py b/senlinclient/tests/unit/v1/test_shell.py index a924828b..2b518002 100644 --- a/senlinclient/tests/unit/v1/test_shell.py +++ b/senlinclient/tests/unit/v1/test_shell.py @@ -1599,7 +1599,7 @@ class ShellTest(testtools.TestCase): @mock.patch.object(utils, 'print_list') def test_do_action_list(self, mock_print): service = mock.Mock() - fields = ['id', 'name', 'action', 'status', 'target', 'depends_on', + fields = ['id', 'name', 'action', 'status', 'target_id', 'depends_on', 'depended_by', 'created_at'] args = { 'sort': 'status', diff --git a/senlinclient/v1/action.py b/senlinclient/v1/action.py index 359d42d7..ee8b865b 100644 --- a/senlinclient/v1/action.py +++ b/senlinclient/v1/action.py @@ -71,7 +71,7 @@ class ListAction(command.Lister): senlin_client = self.app.client_manager.clustering - columns = ['id', 'name', 'action', 'status', 'target', 'depends_on', + columns = ['id', 'name', 'action', 'status', 'target_id', 'depends_on', 'depended_by', 'created_at'] queries = { diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index ff93e254..6c9ea768 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -1500,7 +1500,7 @@ def do_event_show(service, args): def do_action_list(service, args): """List actions.""" show_deprecated('senlin action-list', 'openstack cluster action list') - fields = ['id', 'name', 'action', 'status', 'target', 'depends_on', + fields = ['id', 'name', 'action', 'status', 'target_id', 'depends_on', 'depended_by', 'created_at'] queries = {