Merge "Support port binding extended attributes for querying port"

This commit is contained in:
Zuul
2018-06-20 13:47:04 +00:00
committed by Gerrit Code Review
3 changed files with 13 additions and 1 deletions

View File

@@ -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',

View File

@@ -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",

View File

@@ -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'.