summaryrefslogtreecommitdiff
path: root/cloudinit/handlers
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-20 23:40:00 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-20 23:40:00 -0700
commit95e0fa29af3656c1011c41ab0f35dc4e9317269c (patch)
treedd36e2a58478639733d114f452bf36f0af780803 /cloudinit/handlers
parentd0ff82b71e315d49f49cbbd8e6a7740036973a4a (diff)
downloadvyos-cloud-init-95e0fa29af3656c1011c41ab0f35dc4e9317269c.tar.gz
vyos-cloud-init-95e0fa29af3656c1011c41ab0f35dc4e9317269c.zip
1. Add an importer function that will search for a given module in a set of search module 'prefixes'
that also has a potential set of required attributes. 2. Use this new importer to find the distro class, the userdata handler modules, the config modules and the datasource modules, if none can be found error out accordingly.
Diffstat (limited to 'cloudinit/handlers')
-rw-r--r--cloudinit/handlers/__init__.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/cloudinit/handlers/__init__.py b/cloudinit/handlers/__init__.py
index d52b1cba..0f7432e5 100644
--- a/cloudinit/handlers/__init__.py
+++ b/cloudinit/handlers/__init__.py
@@ -202,20 +202,12 @@ def walk(msg, callback, data):
def fixup_handler(mod, def_freq=PER_INSTANCE):
if not hasattr(mod, "handler_version"):
setattr(mod, "handler_version", 1)
- if not hasattr(mod, 'list_types'):
- def empty_types():
- return []
- setattr(mod, 'list_types', empty_types)
if not hasattr(mod, 'frequency'):
setattr(mod, 'frequency', def_freq)
else:
freq = mod.frequency
if freq and freq not in FREQUENCIES:
LOG.warn("Handler %s has an unknown frequency %s", mod, freq)
- if not hasattr(mod, 'handle_part'):
- def empty_handler(_data, _ctype, _filename, _payload):
- pass
- setattr(mod, 'handle_part', empty_handler)
return mod