def __init__(self, threadMgr, packageUri, packageloc, path=None, category=None, skipProp=True): # cat = 'DC_DowloadThread' + str(datetime.now()) AgentThread.__init__(self, threadMgr, cat=category, name='download_thread') self.__path = pylons.config['repo_root'] if path is not None: self.__path = path # check to see if the package path exists if (not os.path.isdir(self.__path)): msg = 'Package path(%s) does not exist' % self.__path LOG.error(msg) raise AgentException(Errors.PACKAGE_PATH_ERROR, msg) self.__uriDict = PackageUtil.parseUri(packageUri, self.__path, packageloc) self.__prop = {} self.__error = None self.__progress = 0.0 self.__timeouts = None self.__skipProp = skipProp
def __init__(self, threadMgr, service, manifest): """ Constructor """ from agent.controllers.service import ServiceController AgentThread.__init__(self, threadMgr, cat = [ServiceController.serviceCat(service)], name = 'delete_manifest') self.service = service self.manifest = manifest
def __init__(self, threadMgr, service, manifest, name = 'agent_thread', parentId = None): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [manifestutil.serviceCat(service)], name = name, parentId = parentId) self.__manifest = manifest self.__service = service contextutils.injectcontext(self, {'service':service}) self._LOG = manifestutil.getServiceLogger(self, logging.getLogger(__name__))
def __init__(self, threadMgr, uuid): """ Constructor """ AgentThread.__init__(self, threadMgr, cat=[uuid], name='cancel_agentthread') self.__uuid = uuid
def __init__(self, threadMgr, wisbVersion, wisbSource = None): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [AgentUpdate.CAT], name = AgentUpdate.THREAD_NAME) self.__wisbVersion = wisbVersion self.__wisbSource = wisbSource self.__packages = [] self.__service = 'agent' self.__manifest = ('agent_selfupdate-%s' % self.__wisbVersion)
def __init__(self, threadMgr, service, path): """ Constructor """ AgentThread.__init__(self, threadMgr, cat=[manifestutil.serviceCat(service)], name='delete_service') self.__path = path self.service = service
def __init__(self, threadMgr, module): """ Constructor """ AgentThread.__init__(self, threadMgr, cat=[manifestutil.serviceCat('agent')], name='delete_module') self.__module = module self.__service = 'agent'
def __init__(self, threadMgr, stopOnly=False): """ Constructor """ AgentThread.__init__(self, threadMgr, cat=[ServicesCleanup.CAT], name='cleanup_service') self.__killTimeout = configutil.getConfigAsInt( 'agent_thread_timeout') #kill -9 should take no time self.__stopOnly = stopOnly
def __init__(self, threadMgr, service, manifest, name = 'agent_thread'): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [manifestutil.serviceCat(service)], name = name) self.__manifest = manifest self.__service = service injectcontext(self, {'service':service}) # maintain a stack that has all the recovery script paths # this stack is protected self._stack = []
def __init__(self, threadMgr, service, manifest): """ Constructor """ from agent.controllers.service import ServiceController AgentThread.__init__(self, threadMgr, cat=[ServiceController.serviceCat(service)], name='delete_manifest') self.service = service self.manifest = manifest
def __init__(self, threadMgr, wisbVersion, wisbSource=None, skipProp=True): """ Constructor """ AgentThread.__init__(self, threadMgr, cat=[AgentUpdate.CAT], name=AgentUpdate.THREAD_NAME) self.__wisbVersion = wisbVersion self.__wisbSource = wisbSource self.__packages = [] self.__service = 'agent' self.__manifest = ('agent_selfupdate-%s' % self.__wisbVersion) self.__skipProp = skipProp
def __init__(self, threadMgr, service, manifest, name='agent_thread'): """ Constructor """ AgentThread.__init__(self, threadMgr, cat=[manifestutil.serviceCat(service)], name=name) self.__manifest = manifest self.__service = service injectcontext(self, {'service': service}) # maintain a stack that has all the recovery script paths # this stack is protected self._stack = []
def __init__(self, threadMgr, packageUri, packageloc, path = None, category = None, skipProp = True): # cat = 'DC_DowloadThread' + str(datetime.now()) AgentThread.__init__(self, threadMgr, cat = category, name = 'download_thread') self.__path = pylons.config['repo_root'] if path is not None: self.__path = path # check to see if the package path exists if (not os.path.isdir(self.__path)): msg = 'Package path(%s) does not exist' % self.__path LOG.error(msg) raise AgentException(Errors.PACKAGE_PATH_ERROR, msg) self.__uriDict = PackageUtil.parseUri(packageUri, self.__path, packageloc) self.__prop = {} self.__error = None self.__progress = 0.0 self.__timeouts = None self.__skipProp = skipProp
def __init__(self, threadMgr, packageUri, packageloc, path = None, category = None, parentId = None): AgentThread.__init__(self, threadMgr, cat = category, name = 'download_thread', parentId = parentId) self._mergeOnFound = True self.__path = pylons.config['repo_root'] if path is not None: self.__path = path # check to see if the package path exists if (not os.path.isdir(self.__path)): msg = 'Package path(%s) does not exist' % self.__path LOG.error(msg) raise AgentException(Errors.PACKAGE_PATH_ERROR, msg) self.__uriDict = PackageUtil.parseUri(packageUri, self.__path, packageloc) self.__prop = {} self.__error = None self.__progress = 0.0 self.__timeouts = None self.__skipProp = configutil.getConfigAsBool('download_skip_prop')
def __init__(self, threadMgr, cmd, cat = None, parentId = None): """ Constructor. @param threadMgr - the thread Mgr object @param cmd - cmd list @param timeout - amount of time we give to this thread """ AgentThread.__init__(self, threadMgr, cat, name = 'exec_thread', parentId = parentId) self.__cmd = cmd # default timeouts configuration self._timeout = int(config['exec_thread_timeout']) self._progressTimeout = int(config['exec_thread_progress_timeout']) self.__service = None self.__cmdProcess = None self.__response = {} self.__partial_response = None self.__partial = '' self.__outputlines = [] self.__injectctx = True self.__logLevel = 'info' self.__LOG = None
def __init__(self, threadMgr, cmd, cat = None): """ Constructor. @param threadMgr - the thread Mgr object @param cmd - cmd list @param timeout - amount of time we give to this thread """ if threadMgr is None: threadMgr = NullThreadMgr() AgentThread.__init__(self, threadMgr, cat, name = 'exec_thread') self.__cmd = cmd # default timeouts configuration self._timeout = int(config['exec_thread_timeout']) self._progressTimeout = int(config['exec_thread_progress_timeout']) self.__cmdProcess = None self.__response = {} self.__partial_response = None self.__partial = '' self.__logLevel = 'info' service = 'agent' self.__LOG = manifestutil.getServiceLogger(self, logging.getLogger(__name__), service)
def __init__(self, threadMgr): """ Constructor """ AgentThread.__init__(self, threadMgr, cat=[SafeShutdown.CAT], name=SafeShutdown.THREAD_NAME)
def __init__(self, threadMgr, cat=['service/test']): AgentThread.__init__(self, threadMgr, cat=cat)
def __init__(self, threadMgr, cat = None, name = 'agent_thread'): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = cat, name = name)
def __init__(self, threadMgr, cat=None): AgentThread.__init__(self, threadMgr, cat)
def __init__(self, threadMgr, progress_queue): AgentThread.__init__(self, threadMgr, cat=['Service/test_status']) self.progress_queue = progress_queue
def __init__(self, threadMgr, cat = None, name = 'agent_thread', parentId = None): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = cat, name = name, parentId = parentId)
def __init__(self, threadMgr, uuid): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [uuid], name = 'cancel_agentthread') self.__uuid = uuid
def __init__(self, threadMgr): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [SafeShutdown.CAT], name = SafeShutdown.THREAD_NAME)
def __init__(self, threadMgr, package, parentId = None): """ Constructor """ AgentThread.__init__(self, threadMgr, name = 'validate_package', parentId = parentId) self.__package = package
def __init__(self, threadMgr, cat = ['service/test']): AgentThread.__init__(self, threadMgr, cat = cat)
def __init__(self, threadMgr, stopOnly=False): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [ServicesCleanup.CAT], name = 'cleanup_service') self.__killTimeout = configutil.getConfigAsInt('agent_thread_timeout') #kill -9 should take no time self.__stopOnly = stopOnly
def __init__(self, threadMgr, cat = None): AgentThread.__init__(self, threadMgr, cat)
def __init__(self, threadMgr, service, path): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [manifestutil.serviceCat(service)], name = 'delete_service') self.__path = path self.service = service
def __init__(self, threadMgr, module, parentId = None): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [manifestutil.serviceCat('agent')], name = 'delete_module', parentId = parentId) self.__module = module self.__service = 'agent'
def __init__(self, threadMgr, package): """ Constructor """ AgentThread.__init__(self, threadMgr, name='validate_package') self.__package = package
def __init__(self, threadMgr, service, manifest, parentId = None): """ Constructor """ AgentThread.__init__(self, threadMgr, cat = [manifestutil.serviceCat(service)], name = 'delete_manifest', parentId = parentId) self.service = service self.manifest = manifest