From c00408632e754b374e0723dd311ad63a08b053c2 Mon Sep 17 00:00:00 2001 From: tengqm Date: Mon, 4 Jan 2016 01:43:24 -0500 Subject: [PATCH] Fix cluster-policy-list command After switching to SDK calls, we are not properly showing the name and type of policies bound to a cluster. This patch fixes the problem. Change-Id: Ie5549ba6c8c67943c0595469d9fc1d7094e6825b --- senlinclient/tests/unit/v1/test_shell.py | 4 ++-- senlinclient/v1/shell.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/senlinclient/tests/unit/v1/test_shell.py b/senlinclient/tests/unit/v1/test_shell.py index 38c502de..1bed2cab 100644 --- a/senlinclient/tests/unit/v1/test_shell.py +++ b/senlinclient/tests/unit/v1/test_shell.py @@ -944,8 +944,8 @@ class ShellTest(testtools.TestCase): @mock.patch.object(utils, 'print_list') def test_do_cluster_policy_list(self, mock_print): - fields = ['policy_id', 'policy', 'type', 'priority', 'level', - 'cooldown', 'enabled'] + fields = ['policy_id', 'policy_name', 'policy_type', 'priority', + 'level', 'cooldown', 'enabled'] service = mock.Mock() args = { 'id': 'C1', diff --git a/senlinclient/v1/shell.py b/senlinclient/v1/shell.py index e4fad771..dd946b62 100644 --- a/senlinclient/v1/shell.py +++ b/senlinclient/v1/shell.py @@ -716,7 +716,7 @@ def do_cluster_scale_in(service, args): help=_('Name or ID of cluster to query on.')) def do_cluster_policy_list(service, args): """List policies from cluster.""" - fields = ['policy_id', 'policy', 'type', 'priority', 'level', + fields = ['policy_id', 'policy_name', 'policy_type', 'priority', 'level', 'cooldown', 'enabled'] sort_keys = ['priority', 'level', 'cooldown', 'enabled']