diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-08-22 17:07:11 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-08-22 17:07:11 -0400 |
commit | 56979d20b9c56c45bfbcaf93bc5f93fa505ece50 (patch) | |
tree | b7085edef3e0673eacba1154d269a22e2d74814e /cloudinit | |
parent | 7b715270f0720c565af50e102d761cd83cb3569b (diff) | |
parent | 3e3e9e90c7eefe2e0a14f9055d23856939aea269 (diff) | |
download | vyos-cloud-init-56979d20b9c56c45bfbcaf93bc5f93fa505ece50.tar.gz vyos-cloud-init-56979d20b9c56c45bfbcaf93bc5f93fa505ece50.zip |
Fix the userdata population in DataSourceNone
Fix the userdata being populated to a dict (incorrect)
and let it instead be populated by the userdata processor
with the raw userdata (either empty or datasource config
provided).
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/sources/DataSourceNone.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cloudinit/sources/DataSourceNone.py b/cloudinit/sources/DataSourceNone.py index b186113c..c2125bee 100644 --- a/cloudinit/sources/DataSourceNone.py +++ b/cloudinit/sources/DataSourceNone.py @@ -26,16 +26,14 @@ LOG = logging.getLogger(__name__) 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 |