From 8b007e63664ef811671554b7c878cb552078aa99 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Mon, 4 Mar 2024 14:00:07 +0000 Subject: [PATCH] [FT] Check "Port_Binding" register exists before checking type In "test_virtual_port_host_update_upon_failover", it is needed to check if the "Port_Binding" register exists before checking the type. Closes-Bug: #2055886 Change-Id: I8a6b3498803bcba592a82dfbe43a39137dd12fa2 --- .../ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py b/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py index d58de77da28..495c77cec25 100644 --- a/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py +++ b/neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/ovsdb/test_ovsdb_monitor.py @@ -334,6 +334,8 @@ class TestNBDbMonitor(base.TestOVNFunctionalBase): def _check_port_binding_type(self, port_id, port_type): def is_port_binding_type(port_id, port_type): bp = self._find_port_binding(port_id) + if not bp: + return False return port_type == bp.type check = functools.partial(is_port_binding_type, port_id, port_type)