summaryrefslogtreecommitdiff
path: root/cloudinit/stages.py
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2019-07-26 20:40:18 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-07-26 20:40:18 +0000
commit496aaa947ec563bd02b3148f220ff0afe1b32abb (patch)
tree447ccd21a9d67a69ba40eae215feabf8039c6383 /cloudinit/stages.py
parent1dbede64dc645b090b4047a105143b5d5090d214 (diff)
downloadvyos-cloud-init-496aaa947ec563bd02b3148f220ff0afe1b32abb.tar.gz
vyos-cloud-init-496aaa947ec563bd02b3148f220ff0afe1b32abb.zip
net/cmdline: split interfaces_by_mac and init network config determination
Previously "cmdline" network configuration could be either user-specified network-config=... configuration data, or initramfs-provided configuration data. Before data sources could modify the order in which network config sources were considered, this conflation didn't matter (and, indeed, in the default data source configuration it will continue to not matter). However, it _is_ desirable for a data source to be able to specify that its network configuration should be preferred over the initramfs-provided network configuration but still allow explicit network-config=... configuration passed to the kernel cmdline to continue to override both of those sources. (This also modifies the Oracle data source to use read_initramfs_config directly, which is effectively what it was using read_kernel_cmdline_config for previously.)
Diffstat (limited to 'cloudinit/stages.py')
-rw-r--r--cloudinit/stages.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index 6bcda2d1..50129884 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -633,6 +633,7 @@ class Init(object):
available_cfgs = {
NetworkConfigSource.cmdline: cmdline.read_kernel_cmdline_config(),
+ NetworkConfigSource.initramfs: cmdline.read_initramfs_config(),
NetworkConfigSource.ds: None,
NetworkConfigSource.system_cfg: self.cfg.get('network'),
}