def loadLocalCache(self, proxyOptsSetPlace): """ Loads the client cache and set up the server url """ self.requestarea, self.requestname = getWorkArea(self.options.projdir) try: self.cachedinfo, self.logfile = loadCache(self.requestarea, self.logger) port = ':' + self.cachedinfo['Port'] if self.cachedinfo['Port'] else '' self.instance = self.cachedinfo['instance'] self.serverurl = self.cachedinfo['Server'] + port msgadd = [] if self.cmdconf['requiresProxyVOOptions'] and self.options.voGroup is None: self.voGroup = self.cachedinfo['voGroup'] proxyOptsSetPlace['set_in']['group'] = "cache" msgadd.append("VO group '%s'" % (self.voGroup)) if self.cmdconf['requiresProxyVOOptions'] and self.options.voRole is None: self.voRole = self.cachedinfo['voRole'] proxyOptsSetPlace['set_in']['role'] = "cache" msgadd.append("VO role '%s'" % (self.voRole)) if msgadd: msg = "Using %s as written in the request cache file for this task." % (" and ".join(msgadd)) self.logger.debug(msg) except CachefileNotFoundException as ex: if self.cmdconf['requiresLocalCache']: raise ex
def loadLocalCache(self, serverurl = None): """ Loads the client cache and set up the server url """ self.requestarea, self.requestname = getWorkArea( self.options.task ) self.cachedinfo, self.logfile = loadCache(self.requestarea, self.logger) port = ':' + self.cachedinfo['Port'] if self.cachedinfo['Port'] else '' self.instance = self.cachedinfo['instance'] self.serverurl = self.cachedinfo['Server'] + port self.voRole = self.cachedinfo['voRole'] #if not self.options.voRole else self.options.voRole self.voGroup = self.cachedinfo['voGroup'] #if not self.options.voGroup else self.options.voGroup
def loadLocalCache(self): """ Loads the client cache and set up the server url """ self.requestarea, self.requestname = getWorkArea(self.options.projdir) try: self.cachedinfo, self.logfile = loadCache(self.requestarea, self.logger) port = ':' + self.cachedinfo['Port'] if self.cachedinfo['Port'] else '' self.instance = self.cachedinfo['instance'] self.serverurl = self.cachedinfo['Server'] + port except CachefileNotFoundException as ex: if self.cmdconf['requiresLocalCache']: raise ex
def loadLocalCache(self, serverurl=None): """ Loads the client cache and set up the server url """ self.requestarea, self.requestname = getWorkArea(self.options.task) self.cachedinfo, self.logfile = loadCache(self.requestarea, self.logger) port = ':' + self.cachedinfo['Port'] if self.cachedinfo['Port'] else '' self.instance = self.cachedinfo['instance'] self.serverurl = self.cachedinfo['Server'] + port self.voRole = self.cachedinfo[ 'voRole'] #if not self.options.voRole else self.options.voRole self.voGroup = self.cachedinfo[ 'voGroup'] #if not self.options.voGroup else self.options.voGroup
def loadLocalCache(self): """ Loads the client cache and set up the server url """ self.requestarea, self.requestname = getWorkArea(self.options.projdir) try: self.cachedinfo, self.logfile = loadCache(self.requestarea, self.logger) port = ':' + self.cachedinfo['Port'] if self.cachedinfo[ 'Port'] else '' self.instance = self.cachedinfo['instance'] self.serverurl = self.cachedinfo['Server'] + port except CachefileNotFoundException as ex: if self.cmdconf['requiresLocalCache']: raise ex