1 def import_manager(kind, type):
3 kind expected in ['registry', 'aggregate', 'slice', 'component']
4 type is e.g. 'pl' or 'max' or whatever
6 basepath = 'sfa.managers'
7 qualified = "%s.%s_manager_%s"%(basepath,kind,type)
8 generic = "%s.%s_manager"%(basepath,kind)
10 manager = __import__(qualified, fromlist=[basepath])
13 manager = __import__ (generic, fromlist=[basepath])
15 logger.warn ("Using generic manager for %s with type=%s"%(kind,type))