Skip to content

Commit

Permalink
Make various checks happy
Browse files Browse the repository at this point in the history
* Fix missing TOC entry for cloudcix.rst
* Sort .github-cla-signers correctly
* Fix mypy complaints
  • Loading branch information
jgrassler committed Aug 30, 2024
1 parent aed1ada commit 5ebac09
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cloudinit/sources/DataSourceCloudCIX.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import json
import logging
from typing import Optional
from typing import Any, Dict, Optional

from cloudinit import dmi, net, sources, url_helper, util
from cloudinit.net.dhcp import NoDHCPLeaseError
Expand Down Expand Up @@ -130,7 +130,7 @@ def network_config(self):
return self._net_cfg

def _generate_net_cfg(self, metadata):
netcfg = {"version": 2, "ethernets": {}}
netcfg: Dict[str, Any] = {"version": 2, "ethernets": {}}
macs_to_nics = net.get_interfaces_by_mac()

for iface in metadata["network"]["interfaces"]:
Expand Down
1 change: 1 addition & 0 deletions doc/rtd/reference/datasources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ The following is a list of documentation for each supported datasource:
datasources/altcloud.rst
datasources/ec2.rst
datasources/azure.rst
datasources/cloudcix.rst
datasources/cloudsigma.rst
datasources/cloudstack.rst
datasources/configdrive.rst
Expand Down
5 changes: 4 additions & 1 deletion tests/unittests/sources/test_cloudcix.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json

import responses
from unittest import mock

from cloudinit import distros, helpers, sources
from cloudinit import url_helper as uh
Expand Down Expand Up @@ -60,12 +61,14 @@ class TestDataSourceCloudCIX(ResponsesTestCase):
"""
Test reading the meta-data
"""
allowed_subp = True

def setUp(self):
super(TestDataSourceCloudCIX, self).setUp()
self.paths = helpers.Paths({"run_dir": self.tmp_dir()})
self.datasource = self._get_ds()
self.allowed_subp = True
self.m_read_dmi_data = mock.MagicMock()

self.add_patch(
"cloudinit.dmi.read_dmi_data",
"m_read_dmi_data",
Expand Down
2 changes: 1 addition & 1 deletion tools/.github-cla-signers
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ berolinux
bin456789
bipinbachhao
BirknerAlex
BrinKe-dev
bmhughes
brianphaley
BrinKe-dev
CalvoM
candlerb
CarlosNihelton
Expand Down

0 comments on commit 5ebac09

Please sign in to comment.