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
This commit is contained in:
tengqm
2016-01-04 01:43:24 -05:00
parent d14f733765
commit c00408632e
2 changed files with 3 additions and 3 deletions

View File

@@ -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',

View File

@@ -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']