Skip to content

Commit

Permalink
CI: Return to openstack-python3-jobs, fix pep8 failures
Browse files Browse the repository at this point in the history
Since I8f5338b7eee31f1b8bc3e783d10666e3092a6540 we have not been running
pep8 jobs in CI.

This change fixes the issues introduced since then, returning to use the
openstack-python3-jobs template, which includes openstack-tox-pep8.

Change-Id: Ie15019f91b9e7b7f8cf97b628886f6b0beeb24fa
  • Loading branch information
markgoddard authored and grzegorzkoper committed Sep 6, 2024
1 parent 816992a commit ce389a8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 3 additions & 1 deletion kayobe/plugins/filter/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions kayobe/tests/unit/plugins/filter/test_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -219,4 +220,3 @@ def test_physical_interface_direct(self):
interface = networks.net_physical_interface(self.context, "net1")
expected = ['eth0']
self.assertEqual(expected, interface)

6 changes: 4 additions & 2 deletions kayobe/tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down
5 changes: 1 addition & 4 deletions zuul.d/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
queue: kayobe
templates:
- openstack-cover-jobs
- openstack-python3-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
check:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ce389a8

Please sign in to comment.