diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-02-07 22:14:42 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-02-07 22:14:42 -0500 |
commit | 174bc39e6b2c1cac3f73f67f25fad87cab16fa42 (patch) | |
tree | b4782eae15b11eff4c6746a2e09135cd7f57c8b2 /tests/unittests/test_datasource/test_maas.py | |
parent | b7689728ead61366f3980272ae8212ba0b0225af (diff) | |
parent | a0f882fdd306ef7b3b90c53d5622eb5a6878cb81 (diff) | |
download | vyos-cloud-init-174bc39e6b2c1cac3f73f67f25fad87cab16fa42.tar.gz vyos-cloud-init-174bc39e6b2c1cac3f73f67f25fad87cab16fa42.zip |
DataSourceNoCloud: allow setting user-data and meta-data in config
This allows a single file to declare and activate this data source.
This could come from:
* cloud-config-url on kernel cmdline
* /etc/cloud/cloud.cfg.d
* debian preseed of 'cloud-init/local-cloud-config'
Also here is
* some tests
* a small fix to parse_cmdline_data found when writing those tests.
LP: #1115833
Diffstat (limited to 'tests/unittests/test_datasource/test_maas.py')
-rw-r--r-- | tests/unittests/test_datasource/test_maas.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py index 85e6add0..b56fea82 100644 --- a/tests/unittests/test_datasource/test_maas.py +++ b/tests/unittests/test_datasource/test_maas.py @@ -3,6 +3,7 @@ import os from cloudinit.sources import DataSourceMAAS from cloudinit import url_helper +from tests.unittests.helpers import populate_dir from mocker import MockerTestCase @@ -137,11 +138,4 @@ class TestMAASDataSource(MockerTestCase): pass -def populate_dir(seed_dir, files): - os.mkdir(seed_dir) - for (name, content) in files.iteritems(): - with open(os.path.join(seed_dir, name), "w") as fp: - fp.write(content) - fp.close() - # vi: ts=4 expandtab |