← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~harlowja/cloud-init/ds-ud-fix into lp:cloud-init

 

Joshua Harlow has proposed merging lp:~harlowja/cloud-init/ds-ud-fix into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~harlowja/cloud-init/ds-ud-fix/+merge/120839

Fix for http://paste.ubuntu.com/1160945/ when userdata should be a message and not a dict (oops).
-- 
https://code.launchpad.net/~harlowja/cloud-init/ds-ud-fix/+merge/120839
Your team cloud init development team is requested to review the proposed merge of lp:~harlowja/cloud-init/ds-ud-fix into lp:cloud-init.
=== modified file 'cloudinit/sources/DataSourceNone.py'
--- cloudinit/sources/DataSourceNone.py	2012-08-20 19:20:26 +0000
+++ cloudinit/sources/DataSourceNone.py	2012-08-22 17:38:33 +0000
@@ -26,16 +26,14 @@
 class DataSourceNone(sources.DataSource):
     def __init__(self, sys_cfg, distro, paths, ud_proc=None):
         sources.DataSource.__init__(self, sys_cfg, distro, paths, ud_proc)
-        self.userdata = {}
         self.metadata = {}
         self.userdata_raw = ''
 
     def get_data(self):
         # If the datasource config has any provided 'fallback'
         # userdata or metadata, use it...
-        if 'userdata' in self.ds_cfg:
-            self.userdata = self.ds_cfg['userdata']
-            self.userdata_raw = util.yaml_dumps(self.userdata)
+        if 'userdata_raw' in self.ds_cfg:
+            self.userdata_raw = self.ds_cfg['userdata_raw']
         if 'metadata' in self.ds_cfg:
             self.metadata = self.ds_cfg['metadata']
         return True


Follow ups