Browse Source

[OVN] Remove OVN metadata ports from network port list

In "_check_network_internal_connectivity", all "network:" and
"compute:" ports belonging to a network are retrieved. OVN
metadata ports "network:distributed" should be filtered out because
are not a DHCP nor L3 ports.

This port type was introduced in Neutron in [1][2].

[1]https://review.opendev.org/c/openstack/neutron-lib/+/732141
[2]https://review.opendev.org/c/openstack/neutron/+/732364

Partial-Bug: #1942913
Change-Id: I7db94247c55f9ac39e3e30a4195cdcda6ed657d7
changes/81/808081/2
Rodolfo Alonso Hernandez 11 months ago
parent
commit
17655434ee
  1. 7
      tempest/scenario/test_network_basic_ops.py

7
tempest/scenario/test_network_basic_ops.py

@ -329,13 +329,16 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
floating_ip, server = self.floating_ip_tuple
# get internal ports' ips:
# get all network and compute ports in the new network
# NOTE(ralonsoh): device_owner="network:distributed" ports are OVN
# metadata ports and should be filtered out.
internal_ips = (
p['fixed_ips'][0]['ip_address'] for p in
self.os_admin.ports_client.list_ports(
project_id=server['tenant_id'],
network_id=network['id'])['ports']
if p['device_owner'].startswith('network') or
p['device_owner'].startswith('compute')
if ((p['device_owner'].startswith('network') and
not p['device_owner'] == 'network:distributed') or
p['device_owner'].startswith('compute'))
)
self._check_server_connectivity(floating_ip,

Loading…
Cancel
Save