Add QoS rule type filtering keys

Added "all_rules" and "all_supported" to ``QoSRuleType`` class
query mapping. These parameters are used for filtering the list
command.

Depends-On: https://review.opendev.org/c/openstack/neutron/+/827683

Related-Bug: #1959749
Change-Id: I72a44b9e9ceaf66cda3e529ac45d7717467491d9
This commit is contained in:
Rodolfo Alonso Hernandez 2022-02-02 19:45:11 +00:00
parent fcd5be224c
commit 975cabbdd8
3 changed files with 17 additions and 1 deletions

View File

@ -27,7 +27,8 @@ class QoSRuleType(resource.Resource):
allow_delete = False
allow_list = True
_query_mapping = resource.QueryParameters('type', 'drivers')
_query_mapping = resource.QueryParameters(
'type', 'drivers', 'all_rules', 'all_supported')
# Properties
#: QoS rule type name.

View File

@ -47,6 +47,14 @@ class TestQoSRuleType(base.TestCase):
self.assertFalse(sot.allow_commit)
self.assertFalse(sot.allow_delete)
self.assertTrue(sot.allow_list)
self.assertEqual({'type': 'type',
'drivers': 'drivers',
'all_rules': 'all_rules',
'all_supported': 'all_supported',
'limit': 'limit',
'marker': 'marker',
},
sot._query_mapping._mapping)
def test_make_it(self):
sot = qos_rule_type.QoSRuleType(**EXAMPLE)

View File

@ -0,0 +1,7 @@
---
features:
- |
Added two filtering keys to ``QoSRuleType`` class query mapping, used for
filtering the "list" command: "all_rules", to list all network QoS rule
types implemented in Neutron, and "all_supported", to list all network QoS
rule types supported by at least one networking mechanism driver.