diff options
author | Ryan Harper <ryan.harper@canonical.com> | 2020-04-03 12:58:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 11:58:08 -0600 |
commit | 09fea85fd1f6fd944f4cdd8b97e283090178ae88 (patch) | |
tree | fc52df7d6697473a449b4759c1f66e1da5e9f6a7 /cloudinit/net/tests/test_network_state.py | |
parent | 723e2bc1ad14687a8d6846b9ca73620e4e4090b1 (diff) | |
download | vyos-cloud-init-09fea85fd1f6fd944f4cdd8b97e283090178ae88.tar.gz vyos-cloud-init-09fea85fd1f6fd944f4cdd8b97e283090178ae88.zip |
net: ignore 'renderer' key in netplan config (#306)
LP: #1870421
Diffstat (limited to 'cloudinit/net/tests/test_network_state.py')
-rw-r--r-- | cloudinit/net/tests/test_network_state.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cloudinit/net/tests/test_network_state.py b/cloudinit/net/tests/test_network_state.py index 55880852..07d726e2 100644 --- a/cloudinit/net/tests/test_network_state.py +++ b/cloudinit/net/tests/test_network_state.py @@ -45,4 +45,14 @@ class TestNetworkStateParseConfig(CiTestCase): self.assertNotEqual(None, result) +class TestNetworkStateParseConfigV2(CiTestCase): + + def test_version_2_ignores_renderer_key(self): + ncfg = {'version': 2, 'renderer': 'networkd', 'ethernets': {}} + nsi = network_state.NetworkStateInterpreter(version=ncfg['version'], + config=ncfg) + nsi.parse_config(skip_broken=False) + self.assertEqual(ncfg, nsi.as_dict()['config']) + + # vi: ts=4 expandtab |