diff --git a/kayobe/plugins/filter/networks.py b/kayobe/plugins/filter/networks.py index bdf591c31..51b63ddba 100644 --- a/kayobe/plugins/filter/networks.py +++ b/kayobe/plugins/filter/networks.py @@ -748,6 +748,7 @@ def net_ovs_veths(context, names, inventory_hostname=None): for veth in veths ] + @jinja2.pass_context def net_physical_interface(context, name, inventory_hostname=None): """Return a list of bridge ports, bond slaves or a direct interface name @@ -757,11 +758,12 @@ def net_physical_interface(context, name, inventory_hostname=None): """ if _net_interface_type(context, name, inventory_hostname) == 'bridge': return net_bridge_ports(context, name, inventory_hostname) - elif _net_interface_type(context, name, inventory_hostname) == 'bond': + elif _net_interface_type(context, name, inventory_hostname) == 'bond': return net_bond_slaves(context, name, inventory_hostname) else: return [net_attr(context, name, 'interface', inventory_hostname)] + def get_filters(): return { 'net_attr': net_attr, diff --git a/kayobe/tests/unit/plugins/filter/test_networks.py b/kayobe/tests/unit/plugins/filter/test_networks.py index c09d937a5..283049ea6 100644 --- a/kayobe/tests/unit/plugins/filter/test_networks.py +++ b/kayobe/tests/unit/plugins/filter/test_networks.py @@ -205,7 +205,8 @@ def test_ensure_bridge_ports_is_list(self): self.context, "net3") def test_physical_interface_bond(self): - self._update_context({"net6_interface": "bond0", "net6_bond_slaves": ["eth3", "eth4"]}) + self._update_context({"net6_interface": "bond0", + "net6_bond_slaves": ["eth3", "eth4"]}) interface = networks.net_physical_interface(self.context, "net6") expected = ['eth3', 'eth4'] self.assertEqual(expected, interface) @@ -219,4 +220,3 @@ def test_physical_interface_direct(self): interface = networks.net_physical_interface(self.context, "net1") expected = ['eth0'] self.assertEqual(expected, interface) - diff --git a/kayobe/tests/unit/test_utils.py b/kayobe/tests/unit/test_utils.py index dbd057486..32068c290 100644 --- a/kayobe/tests/unit/test_utils.py +++ b/kayobe/tests/unit/test_utils.py @@ -52,7 +52,8 @@ def test_galaxy_collection_install(self, mock_read, mock_run): "install", "--collections-path", "/path/to/collections", "--requirements-file", - "/path/to/collection/file"]) + "/path/to/collection/file"], + env=env) @mock.patch.object(utils, "run_command") @mock.patch.object(utils, "read_yaml_file") @@ -81,7 +82,8 @@ def test_galaxy_collection_no_collections(self, mock_read, mock_run): "install", "--collections-path", "/path/to/collections", "--requirements-file", - "/path/to/collection/file"]) + "/path/to/collection/file"], + env=env) @mock.patch.object(utils, "run_command") @mock.patch.object(utils, "read_yaml_file") diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index a30f82c10..edaf18ec9 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -3,6 +3,7 @@ queue: kayobe templates: - openstack-cover-jobs + - openstack-python3-jobs - publish-openstack-docs-pti - release-notes-jobs-python3 check: @@ -36,10 +37,6 @@ - kayobe-seed-vm-ubuntu-jammy-efi - kayobe-infra-vm-rocky9 - kayobe-infra-vm-ubuntu-jammy - - openstack-tox-pep8 - - openstack-tox-py39 - - openstack-tox-py310 - - openstack-tox-py311 gate: jobs: - kayobe-tox-ansible-syntax