summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-02-25 14:32:14 -0500
committerScott Moser <smoser@ubuntu.com>2016-02-25 14:32:14 -0500
commitb20191f04c586147165a304b88a2b89c89f79225 (patch)
tree9c24cac1a87d53d599d5f247d5652b724efbf9db /cloudinit
parent2f2bd4232b3f51f571f76c30b715c215e5815703 (diff)
downloadvyos-cloud-init-b20191f04c586147165a304b88a2b89c89f79225.tar.gz
vyos-cloud-init-b20191f04c586147165a304b88a2b89c89f79225.zip
minor cleanups
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_lxd.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/cloudinit/config/cc_lxd.py b/cloudinit/config/cc_lxd.py
index c9cf8704..aaafb643 100644
--- a/cloudinit/config/cc_lxd.py
+++ b/cloudinit/config/cc_lxd.py
@@ -47,18 +47,20 @@ def handle(name, cfg, cloud, log, args):
try:
cloud.distro.install_packages(("lxd",))
except util.ProcessExecutionError as e:
- log.warn("no lxd executable and could not install lxd: '%s'" % e)
+ log.warn("no lxd executable and could not install lxd:", e)
return
# Set up lxd if init config is given
+ init_keys = (
+ 'network_address', 'network_port', 'storage_backend',
+ 'storage_create_device', 'storage_create_loop',
+ 'storage_pool', 'trust_password')
init_cfg = lxd_cfg.get('init')
if init_cfg:
if not isinstance(init_cfg, dict):
- log.warn("lxd init config must be a dict of flag: val pairs")
+ log.warn("lxd/init config must be a dictionary. found a '%s'",
+ type(f))
return
- init_keys = ('network_address', 'network_port', 'storage_backend',
- 'storage_create_device', 'storage_create_loop',
- 'storage_pool', 'trust_password')
cmd = ['lxd', 'init', '--auto']
for k in init_keys:
if init_cfg.get(k):