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, 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 createCache(self, serverurl = None): """ Loads the client cache and set up the server url """ ## if the server name is an CLI option if hasattr(self.options, 'server') and self.options.server is not None: self.serverurl = self.options.server ## but the server name can be cached in some cases elif hasattr(self.options, 'task') and self.options.task: 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.serverurl = self.cachedinfo['Server'] + port #TODO Save them in the cache 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 createCache(self, serverurl=None): """ Loads the client cache and set up the server url """ ## if the server name is an CLI option if hasattr(self.options, 'server') and self.options.server is not None: self.serverurl = self.options.server ## but the server name can be cached in some cases elif hasattr(self.options, 'task') and self.options.task: 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.serverurl = self.cachedinfo['Server'] + port #TODO Save them in the cache 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