summaryrefslogtreecommitdiff
path: root/cloudinit/DataSourceNoCloud.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-04-05 00:49:11 -0400
committerScott Moser <smoser@ubuntu.com>2012-04-05 00:49:11 -0400
commitc2a4447527d5e8b2e2999b6f1832577203a64f2a (patch)
treeaa58108146e35f5ab5d93500c1116bcad12d6ce8 /cloudinit/DataSourceNoCloud.py
parentb39abf5bbe51d62d1ef1dd1e813720eafc1ddc85 (diff)
parent6d62fe860f55faf2d7b0b6216c11305e114c5214 (diff)
downloadvyos-cloud-init-c2a4447527d5e8b2e2999b6f1832577203a64f2a.tar.gz
vyos-cloud-init-c2a4447527d5e8b2e2999b6f1832577203a64f2a.zip
Allow a url to cloud-config data to be specified on kernel config line
In order to allow an ephemeral, or otherwise pristine image to receive some configuration, cloud-init will read a url directed by the kernel command line and proceed as if its data had previously existed. For more information, see doc/kernel-cmdline.txt
Diffstat (limited to 'cloudinit/DataSourceNoCloud.py')
-rw-r--r--cloudinit/DataSourceNoCloud.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cloudinit/DataSourceNoCloud.py b/cloudinit/DataSourceNoCloud.py
index 62ecc088..e8c56b8f 100644
--- a/cloudinit/DataSourceNoCloud.py
+++ b/cloudinit/DataSourceNoCloud.py
@@ -67,6 +67,13 @@ class DataSourceNoCloud(DataSource.DataSource):
found.append(self.seeddir)
log.debug("using seeded cache data in %s" % self.seeddir)
+ # if the datasource config had a 'seedfrom' entry, then that takes
+ # precedence over a 'seedfrom' that was found in a filesystem
+ # but not over external medi
+ if 'seedfrom' in self.ds_cfg and self.ds_cfg['seedfrom']:
+ found.append("ds_config")
+ md["seedfrom"] = self.ds_cfg['seedfrom']
+
fslist = util.find_devs_with("TYPE=vfat")
fslist.extend(util.find_devs_with("TYPE=iso9660"))