summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_mounts.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-03-07 17:15:07 -0500
committerScott Moser <smoser@ubuntu.com>2013-03-07 17:15:07 -0500
commit973747b00af47c94ba0a719452aa823fb688e5ab (patch)
tree647bbe6715ffd164726186a1fb4dfef7e6d483d9 /cloudinit/config/cc_mounts.py
parent8013c284e82349246b2274f5475c138323fd7c55 (diff)
parent5da3984c2ca9e94b2483ab89ecdb5c93b5afb9f8 (diff)
downloadvyos-cloud-init-973747b00af47c94ba0a719452aa823fb688e5ab.tar.gz
vyos-cloud-init-973747b00af47c94ba0a719452aa823fb688e5ab.zip
support different and user-suppliable merging algorithms for cloud-config
This adds a very useful mechanism for merging cloud-config, allowing the user to append to lists (ie, just add more 'run_cmd') or other things. See doc/merging.txt for more information, it is intended to be backwards compatible by default. LP: #1023179
Diffstat (limited to 'cloudinit/config/cc_mounts.py')
-rw-r--r--cloudinit/config/cc_mounts.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py
index 9010d97f..390ba711 100644
--- a/cloudinit/config/cc_mounts.py
+++ b/cloudinit/config/cc_mounts.py
@@ -22,6 +22,7 @@ from string import whitespace # pylint: disable=W0402
import re
+from cloudinit import type_utils
from cloudinit import util
# Shortname matches 'sda', 'sda1', 'xvda', 'hda', 'sdb', xvdb, vda, vdd1, sr0
@@ -60,7 +61,7 @@ def handle(_name, cfg, cloud, log, _args):
# skip something that wasn't a list
if not isinstance(cfgmnt[i], list):
log.warn("Mount option %s not a list, got a %s instead",
- (i + 1), util.obj_name(cfgmnt[i]))
+ (i + 1), type_utils.obj_name(cfgmnt[i]))
continue
startname = str(cfgmnt[i][0])