summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-19 16:35:49 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-19 16:35:49 -0700
commitb492cedaa5a4e66f4f4c589fc73f53afade7b904 (patch)
treea228eb33c1e1e29529345fdfefaf83e8123a4252 /cloudinit
parentf71f1d0a80b79f99fbe3795d250c656efd2eace4 (diff)
downloadvyos-cloud-init-b492cedaa5a4e66f4f4c589fc73f53afade7b904.tar.gz
vyos-cloud-init-b492cedaa5a4e66f4f4c589fc73f53afade7b904.zip
Use the given module as the root module for the given mod to be used from.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/transforms/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/transforms/__init__.py b/cloudinit/transforms/__init__.py
index 925cf569..5cd08575 100644
--- a/cloudinit/transforms/__init__.py
+++ b/cloudinit/transforms/__init__.py
@@ -29,7 +29,7 @@ LOG = logging.getLogger(__name__)
TRANSFORM_PREFIX = '' # "cc_"
-def form_transform_name(name):
+def form_transform_name(name, mod=__name__):
canon_name = name.replace("-", "_")
if canon_name.lower().endswith(".py"):
canon_name = canon_name[0:(len(canon_name) - 3)]
@@ -38,7 +38,7 @@ def form_transform_name(name):
return None
if not canon_name.startswith(TRANSFORM_PREFIX):
canon_name = '%s%s' % (TRANSFORM_PREFIX, canon_name)
- return canon_name
+ return ".".join([str(mod), str(canon_name)])
def fixup_transform(mod, def_freq=PER_INSTANCE):