diff options
| author | Scott Moser <smoser@ubuntu.com> | 2015-08-07 14:45:01 -0500 | 
|---|---|---|
| committer | Scott Moser <smoser@ubuntu.com> | 2015-08-07 14:45:01 -0500 | 
| commit | 9975e06338bb646dbefe0749f7a8f88974d44d24 (patch) | |
| tree | 17b072271f8faa303bbfdde1ff33496cc320ecec /cloudinit/cloud.py | |
| parent | 328cc7fbaf4d60b51193fb8c14e52d8c6f3273f2 (diff) | |
| parent | 95bfe5d5150e2bf0a26dd1b97578c4fd04152365 (diff) | |
| download | vyos-cloud-init-9975e06338bb646dbefe0749f7a8f88974d44d24.tar.gz vyos-cloud-init-9975e06338bb646dbefe0749f7a8f88974d44d24.zip | |
Add initial reporting module and events
Diffstat (limited to 'cloudinit/cloud.py')
| -rw-r--r-- | cloudinit/cloud.py | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/cloudinit/cloud.py b/cloudinit/cloud.py index 95e0cfb2..edee3887 100644 --- a/cloudinit/cloud.py +++ b/cloudinit/cloud.py @@ -24,6 +24,7 @@ import copy  import os  from cloudinit import log as logging +from cloudinit import reporting  LOG = logging.getLogger(__name__) @@ -40,12 +41,18 @@ LOG = logging.getLogger(__name__)  class Cloud(object): -    def __init__(self, datasource, paths, cfg, distro, runners): +    def __init__(self, datasource, paths, cfg, distro, runners, reporter=None):          self.datasource = datasource          self.paths = paths          self.distro = distro          self._cfg = cfg          self._runners = runners +        if reporter is None: +            reporter = reporting.ReportEventStack( +                name="unnamed-cloud-reporter", +                description="unnamed-cloud-reporter", +                reporting_enabled=False) +        self.reporter = reporter      # If a 'user' manipulates logging or logging services      # it is typically useful to cause the logging to be | 
