diff --git a/kayobe/cli/commands.py b/kayobe/cli/commands.py index 170a5698f1f63de3d5c1ecb7516b659ff17cef2e..19ff2ed0873a618c27ac7c73f718ea014915344d 100644 --- a/kayobe/cli/commands.py +++ b/kayobe/cli/commands.py @@ -731,7 +731,8 @@ class SeedServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, playbooks = _build_playbook_list( "seed-manage-containers") extra_vars = {"kayobe_action": "deploy"} - self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars) + self.run_kayobe_playbooks(parsed_args, playbooks, + extra_vars=extra_vars) self.generate_kolla_ansible_config(parsed_args, service_config=False, bifrost_config=True) @@ -740,10 +741,12 @@ class SeedServiceDeploy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, "seed-credentials", "seed-introspection-rules", "dell-switch-bmp") - self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars) + self.run_kayobe_playbooks(parsed_args, playbooks, + extra_vars=extra_vars) + class SeedServiceDestroy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, - Command): + Command): """Destroy the seed services. * Destroys user defined containers @@ -762,13 +765,15 @@ class SeedServiceDestroy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, self.generate_kolla_ansible_config(parsed_args, service_config=False, bifrost_config=False) extra_args = ["--yes-i-really-really-mean-it"] - self.run_kolla_ansible_seed(parsed_args, "destroy", extra_args=extra_args) + self.run_kolla_ansible_seed(parsed_args, "destroy", + extra_args=extra_args) extra_vars = {"kayobe_action": "destroy"} playbooks = _build_playbook_list( "seed-manage-containers", "docker-registry") - self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars) + self.run_kayobe_playbooks(parsed_args, playbooks, + extra_vars=extra_vars) def get_parser(self, prog_name): parser = super(SeedServiceDestroy, self).get_parser(prog_name) @@ -779,6 +784,7 @@ class SeedServiceDestroy(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, "permanently destroy all services and data.") return parser + class SeedServiceUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, Command): """Upgrade the seed services. @@ -800,7 +806,8 @@ class SeedServiceUpgrade(KollaAnsibleMixin, KayobeAnsibleMixin, VaultMixin, playbooks = _build_playbook_list( "seed-manage-containers") extra_vars = {"kayobe_action": "deploy"} - self.run_kayobe_playbooks(parsed_args, playbooks, extra_vars=extra_vars) + self.run_kayobe_playbooks(parsed_args, playbooks, + extra_vars=extra_vars) self.generate_kolla_ansible_config(parsed_args, service_config=False, bifrost_config=True) @@ -1896,6 +1903,7 @@ class NetworkConnectivityCheck(KayobeAnsibleMixin, VaultMixin, Command): playbooks = _build_playbook_list("network-connectivity") self.run_kayobe_playbooks(parsed_args, playbooks) + class BaremetalComputeRegister(KayobeAnsibleMixin, VaultMixin, Command): """Register baremetal compute nodes in Ironic.""" @@ -1915,7 +1923,8 @@ class BaremetalComputeInspect(KayobeAnsibleMixin, VaultMixin, Command): self.run_kayobe_playbooks(parsed_args, playbooks) -class BaremetalComputeIntrospectionDataSave(KayobeAnsibleMixin, VaultMixin, Command): +class BaremetalComputeIntrospectionDataSave(KayobeAnsibleMixin, VaultMixin, + Command): """Save hardware introspection data for the baremetal compute nodes. Save hardware introspection data from the overcloud's ironic inspector diff --git a/kayobe/plugins/filter/networks.py b/kayobe/plugins/filter/networks.py index bdf591c31d9581aba01d2a25652107f73861b70f..51b63ddba1bdcdb92ed99f43d729aa15bf6db522 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 c09d937a5c579f75ccde97dbf108355131da60a1..283049ea60e851d6f3b6d85f7f92fa8cbb473984 100644 --- a/kayobe/tests/unit/plugins/filter/test_networks.py +++ b/kayobe/tests/unit/plugins/filter/test_networks.py @@ -205,7 +205,8 @@ class TestNetworks(BaseNetworksTest): 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 @@ class TestNetworks(BaseNetworksTest): 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 88fb96da3b478c23adf411d49120129d59e5697f..34f92a83a6f4375bb78a2a65a94fa318514d0426 100644 --- a/kayobe/tests/unit/test_utils.py +++ b/kayobe/tests/unit/test_utils.py @@ -54,7 +54,7 @@ class TestCase(unittest.TestCase): "/path/to/collections", "--requirements-file", "/path/to/collection/file"], - env=env) + env=env) @mock.patch.object(utils, "run_command") @mock.patch.object(utils, "read_yaml_file") @@ -85,7 +85,7 @@ class TestCase(unittest.TestCase): "/path/to/collections", "--requirements-file", "/path/to/collection/file"], - env=env) + 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 ab115dda675e20a8e5770fa17cd8f7aec7699656..a09d68e5f480b837f6ed4d9e68a289125b3c88d8 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: @@ -28,11 +29,6 @@ - kayobe-seed-vm-ubuntu-jammy - kayobe-infra-vm-rocky9 - kayobe-infra-vm-ubuntu-jammy - - openstack-tox-py39 - - openstack-tox-py310 - - openstack-tox-py311 - - openstack-tox-py312: - voting: false gate: jobs: - kayobe-tox-ansible-syntax