summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-01-26 18:43:50 +0000
committerScott Moser <smoser@ubuntu.com>2011-01-26 18:43:50 +0000
commitdc5e7116e663d3b5cad165fcac8b3141f8ffbc05 (patch)
treeb180b671e54b4fb8975b6ba2032c53d4228b39b7 /config
parent95d6fa02204799b4ea120faf3c75e216194fdd38 (diff)
downloadvyos-cloud-init-dc5e7116e663d3b5cad165fcac8b3141f8ffbc05.tar.gz
vyos-cloud-init-dc5e7116e663d3b5cad165fcac8b3141f8ffbc05.zip
rework of DataSource loading.
The DataSources that are loaded are now controlled entirely via configuration file of 'datasource_list', like: datasource_list: [ "NoCloud", "OVF", "Ec2" ] Each item in that list is a "DataSourceCollection". for each item in the list, cloudinit will attempt to load: cloudinit.DataSource<item> and, failing that, DataSource<item> The module is required to have a method named 'get_datasource_list' in it that takes a single list of "dependencies" and returns a list of python classes inside the collection that can run needing only those dependencies. The dependencies are defines in DataSource.py. Currently: DEP_FILESYSTEM = "FILESYSTEM" DEP_NETWORK = "NETWORK" When 'get_datasource_list' is called for the DataSourceOVF module with [DEP_FILESYSTEM], then DataSourceOVF returns a single item list with a reference to the 'DataSourceOVF' class. When 'get_datasource_list' is called for the DataSourceOVF module with [DEP_FILESYSTEM, DEP_NETWORK], it will return a single item list with a reference to 'DataSourceOVFNet'. cloudinit will then instanciate the class and call its 'get_data' method. if the get_data method returns 'True', then it selects this class as the selected Datasource.
Diffstat (limited to 'config')
-rw-r--r--config/cloud.cfg2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/cloud.cfg b/config/cloud.cfg
index 2aa574c7..5b5893a9 100644
--- a/config/cloud.cfg
+++ b/config/cloud.cfg
@@ -1,7 +1,7 @@
-cloud: auto
user: ubuntu
disable_root: 1
preserve_hostname: False
+# datasource_list: [ "NoCloud", "OVF", "Ec2" ]
cloud_init_modules:
- resizefs