diff --git a/openstack/cluster/v1/cluster_policy.py b/openstack/cluster/v1/cluster_policy.py index 13291cf62..bac40d362 100644 --- a/openstack/cluster/v1/cluster_policy.py +++ b/openstack/cluster/v1/cluster_policy.py @@ -24,7 +24,8 @@ class ClusterPolicy(resource.Resource): allow_list = True allow_get = True - _query_mapping = resource.QueryParameters(is_enabled='enabled') + _query_mapping = resource.QueryParameters( + 'policy_name', 'policy_type', is_enabled='enabled') # Properties #: ID of the policy object. diff --git a/openstack/tests/unit/cluster/v1/test_cluster_policy.py b/openstack/tests/unit/cluster/v1/test_cluster_policy.py index 8ec3f1139..43adfabfe 100644 --- a/openstack/tests/unit/cluster/v1/test_cluster_policy.py +++ b/openstack/tests/unit/cluster/v1/test_cluster_policy.py @@ -41,6 +41,13 @@ class TestClusterPolicy(testtools.TestCase): self.assertTrue(sot.allow_get) self.assertTrue(sot.allow_list) + self.assertDictEqual({"policy_name": "policy_name", + "policy_type": "policy_type", + "is_enabled": "enabled", + "limit": "limit", + "marker": "marker"}, + sot._query_mapping._mapping) + def test_instantiate(self): sot = cluster_policy.ClusterPolicy(**FAKE) self.assertEqual(FAKE['policy_id'], sot.id)