Support port binding extended attributes for querying port
Currently Port class does not have port binding extended attributes for QueryParameters, so there is no way to filter using those properties. Add those properties to QueryParameters to pass query validation so that user can query using port binding attributes. Change-Id: I48e4a2efce88f6e2c68ae63337a2cf5bb7303013
This commit is contained in:
parent
25e45570ef
commit
5267c5bfed
@ -30,6 +30,8 @@ class Port(resource.Resource, tag.TagMixin):
|
||||
|
||||
# NOTE: we skip query on list or datetime fields for now
|
||||
_query_mapping = resource.QueryParameters(
|
||||
'binding:host_id', 'binding:profile', 'binding:vif_details',
|
||||
'binding:vif_type', 'binding:vnic_type',
|
||||
'description', 'device_id', 'device_owner', 'fixed_ips', 'ip_address',
|
||||
'mac_address', 'name', 'network_id', 'status', 'subnet_id',
|
||||
is_admin_state_up='admin_state_up',
|
||||
|
@ -68,7 +68,12 @@ class TestPort(base.TestCase):
|
||||
self.assertTrue(sot.allow_delete)
|
||||
self.assertTrue(sot.allow_list)
|
||||
|
||||
self.assertDictEqual({"description": "description",
|
||||
self.assertDictEqual({"binding:host_id": "binding:host_id",
|
||||
"binding:profile": "binding:profile",
|
||||
"binding:vif_details": "binding:vif_details",
|
||||
"binding:vif_type": "binding:vif_type",
|
||||
"binding:vnic_type": "binding:vnic_type",
|
||||
"description": "description",
|
||||
"device_id": "device_id",
|
||||
"device_owner": "device_owner",
|
||||
"fixed_ips": "fixed_ips",
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- Add support for query of port binding extended attributes including
|
||||
'binding:host_id', 'binding:vnic_type', 'binding:vif_type',
|
||||
'binding:vif_details', and 'binding:profile'.
|
Loading…
Reference in New Issue
Block a user