summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig/cc_landscape.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/CloudConfig/cc_landscape.py')
-rw-r--r--cloudinit/CloudConfig/cc_landscape.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/cloudinit/CloudConfig/cc_landscape.py b/cloudinit/CloudConfig/cc_landscape.py
index 22a90665..f228d2cf 100644
--- a/cloudinit/CloudConfig/cc_landscape.py
+++ b/cloudinit/CloudConfig/cc_landscape.py
@@ -23,7 +23,7 @@ frequency = per_instance
lsc_client_cfg_file = "/etc/landscape/client.conf"
# defaults taken from stock client.conf in landscape-client 11.07.1.1-0ubuntu2
-lsc_builtincfg = {
+lsc_builtincfg = {
'client': {
'log_level': "info",
'url': "https://landscape.canonical.com/message-system",
@@ -32,14 +32,15 @@ lsc_builtincfg = {
}
}
-def handle(_name,cfg,_cloud,log,_args):
+
+def handle(_name, cfg, _cloud, log, _args):
"""
Basically turn a top level 'landscape' entry with a 'client' dict
and render it to ConfigObj format under '[client]' section in
/etc/landscape/client.conf
"""
- ls_cloudcfg = cfg.get("landscape", { })
+ ls_cloudcfg = cfg.get("landscape", {})
if not isinstance(ls_cloudcfg, dict):
raise(Exception("'landscape' existed in config, but not a dict"))
@@ -51,6 +52,7 @@ def handle(_name,cfg,_cloud,log,_args):
log.debug("updated %s" % lsc_client_cfg_file)
+
def mergeTogether(objs):
"""
merge together ConfigObj objects or things that ConfigObj() will take in