diff --git a/cloudinit/sources/DataSourceCloudCIX.py b/cloudinit/sources/DataSourceCloudCIX.py index a1759be24c2..af10dfccba2 100644 --- a/cloudinit/sources/DataSourceCloudCIX.py +++ b/cloudinit/sources/DataSourceCloudCIX.py @@ -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 @@ -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"]: diff --git a/doc/rtd/reference/datasources.rst b/doc/rtd/reference/datasources.rst index 9826fa56314..d195b9b75dd 100644 --- a/doc/rtd/reference/datasources.rst +++ b/doc/rtd/reference/datasources.rst @@ -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 diff --git a/tests/unittests/sources/test_cloudcix.py b/tests/unittests/sources/test_cloudcix.py index 01c39dd4257..d573744db71 100644 --- a/tests/unittests/sources/test_cloudcix.py +++ b/tests/unittests/sources/test_cloudcix.py @@ -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 @@ -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", diff --git a/tools/.github-cla-signers b/tools/.github-cla-signers index 720d5924c7e..bd29dcb562a 100644 --- a/tools/.github-cla-signers +++ b/tools/.github-cla-signers @@ -27,9 +27,9 @@ berolinux bin456789 bipinbachhao BirknerAlex -BrinKe-dev bmhughes brianphaley +BrinKe-dev CalvoM candlerb CarlosNihelton