summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorWesley Wiedenmeier <wesley.wiedenmeier@gmail.com>2016-12-20 10:12:24 -0600
committerScott Moser <smoser@brickies.net>2016-12-21 10:12:27 -0500
commit0b0f254a6935a1b1fff128fa177152dd519e1a3d (patch)
tree967ff205e822f6a8fac8c65ae82bcfb6d21d09c2 /cloudinit/util.py
parent93cf879ddee1e492d66b02a41965323f5a165784 (diff)
downloadvyos-cloud-init-0b0f254a6935a1b1fff128fa177152dd519e1a3d.tar.gz
vyos-cloud-init-0b0f254a6935a1b1fff128fa177152dd519e1a3d.zip
Fix config order of precedence, putting kernel command line over system.
The correct order of precedence when reading the base config: builtin config system config kernel command line provided config. This reverts commit 63501f44, which actually broke the behavior it reported to fix. It also adds some unit tests to ensure this behavior is not broken again. LP: #1582323
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index cc084719..01c396b4 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -993,6 +993,11 @@ def read_conf_with_confd(cfgfile):
return mergemanydict([confd_cfg, cfg])
+def read_conf_from_cmdline(cmdline=None):
+ # return a dictionary or config on the cmdline or None
+ return load_yaml(read_cc_from_cmdline(cmdline=cmdline))
+
+
def read_cc_from_cmdline(cmdline=None):
# this should support reading cloud-config information from
# the kernel command line. It is intended to support content of the