Merge "Fix cluster-policy-list"
This commit is contained in:
commit
9cb799aaa5
@ -25,7 +25,7 @@ class TestClusterPolicy(fakes.TestClusteringv1):
|
|||||||
|
|
||||||
|
|
||||||
class TestClusterPolicyList(TestClusterPolicy):
|
class TestClusterPolicyList(TestClusterPolicy):
|
||||||
columns = ['policy_id', 'policy_name', 'policy_type', 'enabled']
|
columns = ['policy_id', 'policy_name', 'policy_type', 'is_enabled']
|
||||||
response = {"cluster_policies": [
|
response = {"cluster_policies": [
|
||||||
{
|
{
|
||||||
"cluster_id": "7d85f602-a948-4a30-afd4-e84f47471c15",
|
"cluster_id": "7d85f602-a948-4a30-afd4-e84f47471c15",
|
||||||
|
@ -1009,7 +1009,7 @@ class ShellTest(testtools.TestCase):
|
|||||||
|
|
||||||
@mock.patch.object(utils, 'print_list')
|
@mock.patch.object(utils, 'print_list')
|
||||||
def test_do_cluster_policy_list(self, mock_print):
|
def test_do_cluster_policy_list(self, mock_print):
|
||||||
fields = ['policy_id', 'policy_name', 'policy_type', 'enabled']
|
fields = ['policy_id', 'policy_name', 'policy_type', 'is_enabled']
|
||||||
service = mock.Mock()
|
service = mock.Mock()
|
||||||
args = {
|
args = {
|
||||||
'id': 'C1',
|
'id': 'C1',
|
||||||
|
@ -63,7 +63,7 @@ class ClusterPolicyList(command.Lister):
|
|||||||
self.log.debug("take_action(%s)", parsed_args)
|
self.log.debug("take_action(%s)", parsed_args)
|
||||||
senlin_client = self.app.client_manager.clustering
|
senlin_client = self.app.client_manager.clustering
|
||||||
|
|
||||||
columns = ['policy_id', 'policy_name', 'policy_type', 'enabled']
|
columns = ['policy_id', 'policy_name', 'policy_type', 'is_enabled']
|
||||||
cluster = senlin_client.get_cluster(parsed_args.cluster)
|
cluster = senlin_client.get_cluster(parsed_args.cluster)
|
||||||
queries = {
|
queries = {
|
||||||
'sort': parsed_args.sort,
|
'sort': parsed_args.sort,
|
||||||
|
@ -828,7 +828,7 @@ def do_cluster_policy_list(service, args):
|
|||||||
"""List policies from cluster."""
|
"""List policies from cluster."""
|
||||||
show_deprecated('senlin cluster-policy-list',
|
show_deprecated('senlin cluster-policy-list',
|
||||||
'openstack cluster policy binding list')
|
'openstack cluster policy binding list')
|
||||||
fields = ['policy_id', 'policy_name', 'policy_type', 'enabled']
|
fields = ['policy_id', 'policy_name', 'policy_type', 'is_enabled']
|
||||||
|
|
||||||
cluster = service.get_cluster(args.id)
|
cluster = service.get_cluster(args.id)
|
||||||
queries = {
|
queries = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user