def ce_list(self): ceParser = CEBlackWhiteListParser(self.EDG_ce_white_list, self.EDG_ce_black_list, common.logger()) wl = ','.join(ceParser.whiteList()) or None bl = ','.join(ceParser.blackList()) or None return '', wl, bl
def ce_list(self): """ Returns string with requirement CE related """ ceParser = CEBlackWhiteListParser(self.EDG_ce_white_list, self.EDG_ce_black_list, common.logger()) req = '' ce_white_list = [] ce_black_list = [] if self.EDG_ce_white_list: ce_white_list = ceParser.whiteList() tmpCe = [] concString = '&&' for ce in ce_white_list: tmpCe.append('RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId)') if len(tmpCe) == 1: req += " && (" + concString.join(tmpCe) + ") " elif len(tmpCe) > 1: firstCE = 0 for reqTemp in tmpCe: if firstCE == 0: req += " && ( (" + reqTemp + ") " firstCE = 1 elif firstCE > 0: req += " || (" + reqTemp + ") " if firstCE > 0: req += ") " if self.EDG_ce_black_list: ce_black_list = ceParser.blackList() tmpCe = [] concString = '&&' for ce in ce_black_list: tmpCe.append('(!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))') if len(tmpCe): req += " && (" + concString.join(tmpCe) + ") " # requirement added to skip gliteCE # not more needed # req += '&& (!RegExp("blah", other.GlueCEUniqueId))' retWL = ','.join(ce_white_list) retBL = ','.join(ce_black_list) if not retWL: retWL = None if not retBL: retBL = None return req, retWL, retBL
def ce_list(self): """ Returns string with requirement CE related """ ceParser = CEBlackWhiteListParser(self.EDG_ce_white_list, self.EDG_ce_black_list, common.logger()) req = '' ce_white_list = [] ce_black_list = [] if self.EDG_ce_white_list: ce_white_list = ceParser.whiteList() tmpCe=[] concString = '&&' for ce in ce_white_list: tmpCe.append('RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId)') if len(tmpCe) == 1: req += " && (" + concString.join(tmpCe) + ") " elif len(tmpCe) > 1: firstCE = 0 for reqTemp in tmpCe: if firstCE == 0: req += " && ( (" + reqTemp + ") " firstCE = 1 elif firstCE > 0: req += " || (" + reqTemp + ") " if firstCE > 0: req += ") " if self.EDG_ce_black_list: ce_black_list = ceParser.blackList() tmpCe=[] concString = '&&' for ce in ce_black_list: tmpCe.append('(!RegExp("' + string.strip(ce) + '", other.GlueCEUniqueId))') if len(tmpCe): req += " && (" + concString.join(tmpCe) + ") " # requirement added to skip gliteCE # not more needed # req += '&& (!RegExp("blah", other.GlueCEUniqueId))' retWL = ','.join(ce_white_list) retBL = ','.join(ce_black_list) if not retWL: retWL = None if not retBL: retBL = None return req, retWL, retBL
def ce_list(self): ceParser = CEBlackWhiteListParser(self.EDG_ce_white_list, self.EDG_ce_black_list, common.logger()) wl = ','.join(ceParser.whiteList()) or None bl = ','.join(ceParser.blackList()) or None return '', wl, bl