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).
This commit is contained in:
parent
899f24ec08
commit
29c98e07ce
@ -26,16 +26,14 @@ LOG = logging.getLogger(__name__)
|
|||||||
class DataSourceNone(sources.DataSource):
|
class DataSourceNone(sources.DataSource):
|
||||||
def __init__(self, sys_cfg, distro, paths, ud_proc=None):
|
def __init__(self, sys_cfg, distro, paths, ud_proc=None):
|
||||||
sources.DataSource.__init__(self, sys_cfg, distro, paths, ud_proc)
|
sources.DataSource.__init__(self, sys_cfg, distro, paths, ud_proc)
|
||||||
self.userdata = {}
|
|
||||||
self.metadata = {}
|
self.metadata = {}
|
||||||
self.userdata_raw = ''
|
self.userdata_raw = ''
|
||||||
|
|
||||||
def get_data(self):
|
def get_data(self):
|
||||||
# If the datasource config has any provided 'fallback'
|
# If the datasource config has any provided 'fallback'
|
||||||
# userdata or metadata, use it...
|
# userdata or metadata, use it...
|
||||||
if 'userdata' in self.ds_cfg:
|
if 'userdata_raw' in self.ds_cfg:
|
||||||
self.userdata = self.ds_cfg['userdata']
|
self.userdata_raw = self.ds_cfg['userdata_raw']
|
||||||
self.userdata_raw = util.yaml_dumps(self.userdata)
|
|
||||||
if 'metadata' in self.ds_cfg:
|
if 'metadata' in self.ds_cfg:
|
||||||
self.metadata = self.ds_cfg['metadata']
|
self.metadata = self.ds_cfg['metadata']
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user