diff --git a/openstack/network/v2/port.py b/openstack/network/v2/port.py index 335e885eb..64d034aeb 100644 --- a/openstack/network/v2/port.py +++ b/openstack/network/v2/port.py @@ -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', diff --git a/openstack/tests/unit/network/v2/test_port.py b/openstack/tests/unit/network/v2/test_port.py index 23f3475e7..2fb241214 100644 --- a/openstack/tests/unit/network/v2/test_port.py +++ b/openstack/tests/unit/network/v2/test_port.py @@ -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", diff --git a/releasenotes/notes/add_support_port_binding_attrs-c70966724eb970f3.yaml b/releasenotes/notes/add_support_port_binding_attrs-c70966724eb970f3.yaml new file mode 100644 index 000000000..bcee489ca --- /dev/null +++ b/releasenotes/notes/add_support_port_binding_attrs-c70966724eb970f3.yaml @@ -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'.