Description of problem: Type error occurs on attempt to load StatelessSecGroupDualStackDHCPv6StatelessTest, see below The issue is a regression comparing to RHOS-17.1-RHEL-9-20231102.n.1 Failed to import test module: neutron_tempest_plugin.scenario.test_security_groups Traceback (most recent call last): File "/usr/lib64/python3.9/unittest/loader.py", line 436, in _find_test_path module = self._get_module_from_name(name) File "/usr/lib64/python3.9/unittest/loader.py", line 377, in _get_module_from_name __import__(name) File "/usr/lib/python3.9/site-packages/neutron_tempest_plugin/scenario/test_security_groups.py", line 1191, in <module> class StatelessSecGroupDualStackDHCPv6StatelessTest( TypeError: function() argument 'code' must be code, not str Version-Release number of selected component (if applicable): RHOS-17.1-RHEL-9-20231110.n.1 python3-neutron-tests-tempest-2.1.0-17.1.20230906160844.021ce91.el9ost.noarch How reproducible: always, when tempest.conf contains firewall_driver = openvswitch under neutron_plugin_options Steps to Reproduce: 1. Deploy ovs environment. Note the issue is related to environment with openvswitch firewall driver but it's not mandatory to have neutron with this firewall driver in order to reproduce the issue, see steps below. 2. Install tempest and upstream neutron-tempest-plugin (python3-neutron-tests-tempest rpm) and create tempest workspace (e.g. in ~/tempest-dir ) 3. Configure tempest, make sure that tempest conf contains firewall_driver = openvswitch 4. Try to run test under StatelessSecGroupDualStackDHCPv6StatelessTest, e.g. python3 -m testtools.run neutron_tempest_plugin.scenario.test_security_groups.StatelessSecGroupDualStackDHCPv6StatelessTest or just execute 'stestr list' in ~/tempest-dir in order to list all available tempest tests Actual results: Importing of test module: neutron_tempest_plugin.scenario.test_security_groups fails because of StatelessSecGroupDualStackDHCPv6StatelessTest (see traceback above) Expected results: No type error when importing class StatelessSecGroupDualStackDHCPv6StatelessTest , it's possible to run tests Additional info:
a possible solution https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/900772
Adding PM ack since this was already approved by TRAC
Verified on RHOS-17.1-RHEL-9-20240320.n.1 with python3-neutron-tests-tempest-2.1.0-17.1.20230906160845.el9ost.noarch Verified that the issue does not occur