summaryrefslogtreecommitdiff
path: root/cloudinit/cloud.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/cloud.py')
-rw-r--r--cloudinit/cloud.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/cloudinit/cloud.py b/cloudinit/cloud.py
index 95e0cfb2..3e6be203 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.reporting import events
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 = events.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