def print_classicSE(cp): """ Emit the relevant GLUE entities for a ClassicSE. """ if not cp_getBoolean(cp, "classic_se", "advertise_se", True): log.info("Not advertising a classic SE.") return else: log.info("Advertising a classic SE.") #if cp_getBoolean(cp, "se", "shares_fs_with_ce", False): # log.info("Not advertising a classic SE because the SE shares a FS.") # return status = cp_get(cp, "classic_se", "status", "Production") version = cp_get(cp, "classic_se", "version", "UNKNOWN") try: used, available, total = getClassicSESpace(cp, total=True, gb=True) except Exception, e: log.error("Unable to get SE space: %s" % str(e)) used, available, total = 0, 0, 0
"nearlineTotal": nt, "onlineUsed": used, "nearlineUsed": nu, "architecture": arch, "free": available, "total": total, "bdii": cp_get(cp, "bdii", "endpoint", "Unknown"), "siteUniqueID": siteUniqueID, "arch": arch, } seTemplate = getTemplate("GlueSE", "GlueSEUniqueID") printTemplate(seTemplate, info) vos = voListStorage(cp) try: used, available, total = getClassicSESpace(cp, total=True) except Exception, e: used = 0 available = 0 total = 0 acbr = [] for vo in vos: acbr.append("GlueSAAccessControlBaseRule: VO:%s" % vo) acbr = '\n'.join(acbr) path = cp_get(cp, "osg_dirs", "data", "/UNKNOWN") info = { "saLocalID": seUniqueID, "seUniqueID": seUniqueID, "root": "/", "path": path, "filetype": "permanent",
"nearlineTotal" : nt, "onlineUsed" : used, "nearlineUsed" : nu, "architecture" : arch, "free" : available, "total" : total, "bdii" : cp_get(cp, "bdii", "endpoint", "Unknown"), "siteUniqueID" : siteUniqueID, "arch" : arch, } seTemplate = getTemplate("GlueSE", "GlueSEUniqueID") printTemplate(seTemplate, info) vos = voListStorage(cp) try: used, available, total = getClassicSESpace(cp, total=True) except Exception, e: used = 0 available = 0 total = 0 acbr = [] for vo in vos: acbr.append("GlueSAAccessControlBaseRule: VO:%s" % vo) acbr = '\n'.join(acbr) path = cp_get(cp, "osg_dirs", "data", "/UNKNOWN") info = {"saLocalID" : seUniqueID, "seUniqueID" : seUniqueID, "root" : "/", "path" : path, "filetype" : "permanent", "saName" : seUniqueID,