cloud-init-dev team mailing list archive
-
cloud-init-dev team
-
Mailing list archive
-
Message #06472
Re: [Merge] ~chad.smith/cloud-init:feature/azure-to-network-v2 into cloud-init:master
Diff comments:
> diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py
> index 0ca576b..c0c415d 100644
> --- a/cloudinit/net/network_state.py
> +++ b/cloudinit/net/network_state.py
> @@ -596,6 +596,7 @@ class NetworkStateInterpreter(object):
> eno1:
> match:
> macaddress: 00:11:22:33:44:55
> + driver: hv_netsvc
ohh was just a docstring addition, wanted a more complete reference.
> wakeonlan: true
> dhcp4: true
> dhcp6: false
> diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py
> index 2de2aea..3ed9e4e 100644
> --- a/tests/unittests/test_datasource/test_azure.py
> +++ b/tests/unittests/test_datasource/test_azure.py
> @@ -997,7 +997,7 @@ scbus-1 on xpt0 bus 0
> netconfig = dsrc.network_config
> self.assertEqual(netconfig, fallback_config)
> mock_fallback.assert_called_with(blacklist_drivers=['mlx4_core'],
> - config_driver=True)
> + config_driver=True, network_version=2)
oops. that should have failed/
>
> @mock.patch('cloudinit.net.get_interface_mac')
> @mock.patch('cloudinit.net.get_devicelist')
> diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py
> index 1840ade..4f7e420 100644
> --- a/tests/unittests/test_net.py
> +++ b/tests/unittests/test_net.py
> @@ -2156,7 +2156,7 @@ DEFAULT_DEV_ATTRS = {
> "carrier": False,
> "dormant": False,
> "operstate": "down",
> - "address": "07-1C-C6-75-A4-BE",
> + "address": "07-1c-c6-75-a4-be",
only because out netplan we generate in other cases was lowercase. I don't have to, just wanted it to the the same case for !fallback
> "device/driver": None,
> "device/device": None,
> "name_assign_type": "4",
> @@ -3342,13 +3375,13 @@ class TestNetplanNetRendering(CiTestCase):
>
> expected = """
> network:
> - version: 2
> ethernets:
> eth1000:
> dhcp4: true
> match:
> macaddress: 07-1c-c6-75-a4-be
> set-name: eth1000
> + version: 2
Because we are rendering directly from network v2 using yaml dump without ordering rules instead of converting from v1 to v2 with a helper function which intentionally ordered the output with version key first.
> """
> self.assertEqual(expected.lstrip(), contents.lstrip())
> self.assertEqual(1, mock_clean_default.call_count)
--
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/370970
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:feature/azure-to-network-v2 into cloud-init:master.
References