X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fgeneric%2F__init__.py;h=fd70c3c8ff98fb0e0a63450a3d68ff6ae5bb7826;hb=052e281f8c79237b6759cbb259407f071adda1cc;hp=bd37cf4919ccc0c5ac0e1cf31adffabcacf80e4f;hpb=7eb34251548a271ae964b2f7d7e0fad7a1e41f5a;p=sfa.git diff --git a/sfa/generic/__init__.py b/sfa/generic/__init__.py index bd37cf49..fd70c3c8 100644 --- a/sfa/generic/__init__.py +++ b/sfa/generic/__init__.py @@ -6,7 +6,7 @@ from sfa.managers.managerwrapper import ManagerWrapper # a bundle is the combination of # (*) an api that reacts on the incoming requests to trigger the API methods # (*) a manager that implements the function of the service, -# either aggregate, registry, or slicemgr +# either aggregate or registry # (*) a driver that controls the underlying testbed # # @@ -58,12 +58,8 @@ class Generic: def registry_class(self): pass - def slicemgr_class(self): pass - def aggregate_class(self): pass - def component_class(self): pass - # build an API object # insert a manager instance def make_api(self, *args, **kwargs): @@ -86,7 +82,7 @@ class Generic: def make_manager(self, interface): """ - interface expected in ['registry', 'aggregate', 'slicemgr', 'component'] + interface expected in ['registry', 'aggregate'] flavour is e.g. 'pl' or 'max' or whatever """ flavour = self.flavour @@ -102,8 +98,9 @@ class Generic: # or use the module as is if it's a module # so bottom line is, don't try the constructor here return module_or_class - except: - logger.log_exc_critical(message) + except Exception: + logger.log_exc(message) + exit(1) # need interface to select the right driver def make_driver(self, api): @@ -113,13 +110,11 @@ class Generic: message = "Generic.make_driver for flavour=%s and interface=%s" % ( flavour, interface) - if interface == "component": - classname = "component_driver_class" - else: - classname = "driver_class" + classname = "driver_class" try: class_obj = getattr(self, classname)() logger.debug("%s : %s" % (message, class_obj)) return class_obj(api) - except: - logger.log_exc_critical(message) + except Exception: + logger.log_exc(message) + exit(1)