summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzdc <zdc@users.noreply.github.com>2021-02-14 20:11:15 +0200
committerGitHub <noreply@github.com>2021-02-14 20:11:15 +0200
commit1078248cc645f801d732fcc4800dcae592ccc47e (patch)
tree9705d3069fd32bc019595ee86530d7c5b617c0c4
parent3b0c82a46e655ff2980957be582220cfba3eb6fc (diff)
parenta3e1b519dfce76c3df612bc5513101246ac281f6 (diff)
downloadvyos-cloud-init-1078248cc645f801d732fcc4800dcae592ccc47e.tar.gz
vyos-cloud-init-1078248cc645f801d732fcc4800dcae592ccc47e.zip
Merge pull request #32 from zdc/T2403-sagitta
network-config: T2403: Fixed missed network-config
-rw-r--r--cloudinit/config/cc_vyos.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index e472a1cd..338f5507 100644
--- a/cloudinit/config/cc_vyos.py
+++ b/cloudinit/config/cc_vyos.py
@@ -454,8 +454,12 @@ def handle(name, cfg, cloud, log, _args):
vendordata = cloud.datasource.vendordata
logger.debug("Vendor-Data: {}".format(vendordata))
# Network-config
- init_stage = Init()
- (netcfg, netcfg_src) = init_stage._find_networking_config()
+ netcfg = cloud.datasource.network_config
+ if netcfg:
+ netcfg_src = dsname
+ else:
+ init_stage = Init()
+ (netcfg, netcfg_src) = init_stage._find_networking_config()
logger.debug("Network-config: {}".format(netcfg))
logger.debug("Network-config source: {}".format(netcfg_src))
# Hostname with FQDN (if exist)