From 4d6ae07f5e449fcdb42e97385356a7135529a5f1 Mon Sep 17 00:00:00 2001 From: Roman Safronov Date: Tue, 31 Oct 2023 17:49:35 +0200 Subject: [PATCH] Check device_owner with actual availability zone test_floatingip_port_details was checking device_owner port field against a hard-coded default value of 'compute:nova'. This was causing a MismatchError in case custom availability zones were configured on openstack environment. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2247268 Change-Id: Ibdb8bf6f90818c74f1198cd89d24778c74739f50 --- neutron_tempest_plugin/scenario/test_floatingip.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neutron_tempest_plugin/scenario/test_floatingip.py b/neutron_tempest_plugin/scenario/test_floatingip.py index a5f6486b..77a1e4ae 100644 --- a/neutron_tempest_plugin/scenario/test_floatingip.py +++ b/neutron_tempest_plugin/scenario/test_floatingip.py @@ -243,9 +243,13 @@ class FloatingIPPortDetailsTest(FloatingIpTestCasesMixin, self.os_primary.interfaces_client, server['server']['id'], port['id'], lib_constants.PORT_STATUS_ACTIVE) fip = self.client.show_floatingip(fip['id'])['floatingip'] + server_data = self.os_admin.servers_client.show_server( + server['server']['id'])['server'] + zone = 'compute:' + server_data['OS-EXT-AZ:availability_zone'] self._check_port_details( fip, port, status=lib_constants.PORT_STATUS_ACTIVE, - device_id=server['server']['id'], device_owner='compute:nova') + device_id=server['server']['id'], + device_owner=zone) LOG.debug('Port check for server %s and FIP %s finished, ' 'lets detach port %s from server!', server['server']['id'], fip['id'], port['id'])