summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzdc <zdc@users.noreply.github.com>2022-09-01 13:01:11 +0300
committerGitHub <noreply@github.com>2022-09-01 13:01:11 +0300
commit87211245166ea2b4b40ed37aa42109d920372adc (patch)
treed9bce514a076bdbec0df0a3e93908b765c065491
parent45c1d42e15f4a5fe5e176e1516b2da9d21e7837a (diff)
parent244f2117df83590b06e5a1fc747fef3343562570 (diff)
downloadvyos-cloud-init-87211245166ea2b4b40ed37aa42109d920372adc.tar.gz
vyos-cloud-init-87211245166ea2b4b40ed37aa42109d920372adc.zip
Merge pull request #54 from zdc/T4407-equuleus
T4407: Applied workaround for network-config v2
-rw-r--r--cloudinit/config/cc_vyos.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index a7f75316..408a2ea9 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -502,6 +502,12 @@ def handle(name, cfg, cloud, log, _args):
else:
init_stage = Init()
(netcfg, netcfg_src) = init_stage._find_networking_config()
+ # Depending on Network-config version (and maybe something else)
+ # Cloud-init may provide output here in different formats. That
+ # is why we need to add this additional validation and conversion
+ # to what we expect to see in the end. Most likely, the reason is
+ # in: https://bugs.launchpad.net/cloud-init/+bug/1906187
+ netcfg = netcfg.get('network', netcfg)
logger.debug("Network-config: {}".format(netcfg))
logger.debug("Network-config source: {}".format(netcfg_src))
# Hostname with FQDN (if exist)