def loadModuleOnAgentStartup(): """ when agent is restarted, load agent modules """ if os.path.exists(manifestutil.moduleRootPath('agent')): for module in manifestutil.getModules(): try: manifestutil.processModule('agent', module, True) except Exception as excep: LOG.error('Unknown error loading module (%s) - %s - %s' % (module, str(excep), traceback.format_exc(2)))
def listModules(self): """ list all the modules in the agent """ try: LOG.info('Got a list service request') modules = manifestutil.getModules() return doneResult(request, response, result = modules, controller = self) except Exception as excep: return errorResult(request, response, error = Errors.UNKNOWN_ERROR, errorMsg = 'Unknown error when listing modules %s - %s' % (str(excep), traceback.format_exc(2)), controller = self)
def listModules(self): """ list all the modules in the agent """ try: LOG.info('Got a list service request') modules = manifestutil.getModules() return doneResult(request, response, result=modules, controller=self) except Exception as excep: return errorResult( request, response, error=Errors.UNKNOWN_ERROR, errorMsg='Unknown error when listing modules %s - %s' % (str(excep), traceback.format_exc(2)), controller=self)