diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-07-30 18:06:01 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-07-30 18:06:01 -0400 |
commit | b5574a9925b29417a1b351e7b38c54bc7d144dba (patch) | |
tree | ffb5e9ce10b5832e6a5f41df5e5dc02b127729d0 /cloudinit/stages.py | |
parent | c33b3becebfa7bf3f6e2ee67ea7bc3def6feeb8c (diff) | |
download | vyos-cloud-init-b5574a9925b29417a1b351e7b38c54bc7d144dba.tar.gz vyos-cloud-init-b5574a9925b29417a1b351e7b38c54bc7d144dba.zip |
tests pass
Diffstat (limited to 'cloudinit/stages.py')
-rw-r--r-- | cloudinit/stages.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py index d28e765b..dbcdbece 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -46,6 +46,7 @@ from cloudinit import log as logging from cloudinit import sources from cloudinit import type_utils from cloudinit import util +from cloudinit import reporting LOG = logging.getLogger(__name__) @@ -53,7 +54,7 @@ NULL_DATA_SOURCE = None class Init(object): - def __init__(self, ds_deps=None): + def __init__(self, reporter=None, ds_deps=None): if ds_deps is not None: self.ds_deps = ds_deps else: @@ -65,6 +66,11 @@ class Init(object): # Changed only when a fetch occurs self.datasource = NULL_DATA_SOURCE + if reporter is None: + reporter = reporting.ReportStack( + name="init-reporter", description="init-desc", reporting=False) + self.reporter = reporter + def _reset(self, reset_ds=False): # Recreated on access self._cfg = None @@ -246,7 +252,7 @@ class Init(object): self.paths, copy.deepcopy(self.ds_deps), cfg_list, - pkg_list) + pkg_list, self.reporter) LOG.info("Loaded datasource %s - %s", dsname, ds) self.datasource = ds # Ensure we adjust our path members datasource |