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:
parent
fcd5be224c
commit
975cabbdd8
@ -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.
|
||||
|
@ -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)
|
||||
|
@ -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.
|
Loading…
Reference in New Issue
Block a user