diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-09-08 14:26:30 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-09-08 14:26:30 -0400 |
commit | 3c39c3f7638245e9581a2e1f4faae2dc2680f0c7 (patch) | |
tree | 3c057d8c3a397d0505d60e2531fc7d12dc329aa1 | |
parent | f5de3d5c481377d4f6fc7a6ca7986ed2b5966da4 (diff) | |
download | vyos-cloud-init-3c39c3f7638245e9581a2e1f4faae2dc2680f0c7.tar.gz vyos-cloud-init-3c39c3f7638245e9581a2e1f4faae2dc2680f0c7.zip |
NoCloud: fix consumption of vendor-data
the content of vendordata was was being assigned to vendordata,
rather than vendordata_raw. The result was that it is not processed
for includes or part handlers or other things as it is in other
datasources.
LP: #1493453
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | cloudinit/sources/DataSourceNoCloud.py | 2 | ||||
-rw-r--r-- | tests/unittests/test_datasource/test_nocloud.py | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -60,6 +60,7 @@ - rsyslog: add additional configuration mode (LP: #1478103) - status_wrapper in main: fix use of print_exc when handling exception - reporting: add reporting module for web hook or logging of events. + - NoCloud: fix consumption of vendordata (LP: #1493453) 0.7.6: - open 0.7.6 - Enable vendordata on CloudSigma datasource (LP: #1303986) diff --git a/cloudinit/sources/DataSourceNoCloud.py b/cloudinit/sources/DataSourceNoCloud.py index 6a861af3..4dffe6e6 100644 --- a/cloudinit/sources/DataSourceNoCloud.py +++ b/cloudinit/sources/DataSourceNoCloud.py @@ -190,7 +190,7 @@ class DataSourceNoCloud(sources.DataSource): self.seed = ",".join(found) self.metadata = mydata['meta-data'] self.userdata_raw = mydata['user-data'] - self.vendordata = mydata['vendor-data'] + self.vendordata_raw = mydata['vendor-data'] return True LOG.debug("%s: not claiming datasource, dsmode=%s", self, diff --git a/tests/unittests/test_datasource/test_nocloud.py b/tests/unittests/test_datasource/test_nocloud.py index 85b4c25a..2d5fc37c 100644 --- a/tests/unittests/test_datasource/test_nocloud.py +++ b/tests/unittests/test_datasource/test_nocloud.py @@ -121,7 +121,7 @@ class TestNoCloudDataSource(TestCase): ret = dsrc.get_data() self.assertEqual(dsrc.userdata_raw, ud) self.assertEqual(dsrc.metadata, md) - self.assertEqual(dsrc.vendordata, vd) + self.assertEqual(dsrc.vendordata_raw, vd) self.assertTrue(ret) def test_nocloud_no_vendordata(self): |