summaryrefslogtreecommitdiffstats
path: root/nova/utils.py
diff options
context:
space:
mode:
authorZed Shaw <zedshaw@zedshaw.com>2011-07-26 16:29:50 -0700
committerZed Shaw <zedshaw@zedshaw.com>2011-07-26 16:29:50 -0700
commit534b8c3c5b2f6eb3d4c3545c3d5dc2d15061cf6e (patch)
tree1d3466e70042795742c37986504fd987e5cc39d7 /nova/utils.py
parent4a52d4984e9349115f37d34e47e4d1141a8cf6fc (diff)
downloadnova-534b8c3c5b2f6eb3d4c3545c3d5dc2d15061cf6e.tar.gz
nova-534b8c3c5b2f6eb3d4c3545c3d5dc2d15061cf6e.tar.xz
nova-534b8c3c5b2f6eb3d4c3545c3d5dc2d15061cf6e.zip
Implements a simplified messaging abstraction with the least amount of impact to the code base.
Diffstat (limited to 'nova/utils.py')
-rw-r--r--nova/utils.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py
index 8784a227d..ad31f88bd 100644
--- a/nova/utils.py
+++ b/nova/utils.py
@@ -809,3 +809,14 @@ class Bootstrapper(object):
for key in FLAGS:
value = FLAGS.get(key, None)
logging.audit(_("%(key)s : %(value)s" % locals()))
+
+
+def load_module(name):
+ mod = __import__(name)
+
+ components = name.split('.')
+
+ for comp in components[1:]:
+ mod = getattr(mod, comp)
+
+ return mod