Stabilize test_z99_reboot_controller_galera_main_vip

This test tried to obtain the ports associated to a VM instance using:
ports = neutron.list_ports(device_id=vm['id'])

In order to make this test stable, the following filter should be used
instead:
ports = neutron.list_ports(device_id=vm['id'],
                           device_owner="compute:nova")

Change-Id: Iadcd7586b324ed1ce05b6130bb274182ab402014
This commit is contained in:
Eduardo Olivares 2023-08-10 14:46:05 +02:00
parent 483dcf22f0
commit 6640a995e7

View File

@ -360,7 +360,8 @@ def check_no_duplicate_ips(vms_detailed_info, ports_before_stack_creation):
# try to obtain the port associated to a VM from neutron if the VM # try to obtain the port associated to a VM from neutron if the VM
# exists but vms_detailed_info does not show the port # exists but vms_detailed_info does not show the port
if not addresses and vm is not None: if not addresses and vm is not None:
ports = neutron.list_ports(device_id=vm['id']) ports = neutron.list_ports(device_id=vm['id'],
device_owner="compute:nova")
test_case.assertLess(len(ports), 2) test_case.assertLess(len(ports), 2)
for port in ports: for port in ports:
addresses[port['network_id']] = port['fixed_ips'] addresses[port['network_id']] = port['fixed_ips']