SiteCEMapping

The SiteCEMapping module performs the necessary CS gymnastics to resolve site and CE combinations. These manipulations are necessary in several components.

Assumes CS structure of: /Resources/Sites/<GRIDNAME>/<SITENAME>

DIRAC.Core.Utilities.SiteCEMapping.getCESiteMapping(gridName=None)

Returns a dictionary of all CEs and their associated site, e.g. {‘ce101.cern.ch’:’LCG.CERN.ch’, …]} Assumes CS structure of: /Resources/Sites/<GRIDNAME>/<SITENAME>

DIRAC.Core.Utilities.SiteCEMapping.getCEsForSite(siteName)

Given a DIRAC site name this method returns a list of corresponding CEs.

DIRAC.Core.Utilities.SiteCEMapping.getQueueInfo(ceUniqueID, diracSiteName='')

Extract information from full CE Name including associate DIRAC Site

DIRAC.Core.Utilities.SiteCEMapping.getSiteCEMapping(gridName=None)

Returns a dictionary of all sites and their CEs as a list, e.g. {‘LCG.CERN.ch’:[‘ce101.cern.ch’,…]} If gridName is specified, result is restricted to that Grid type.

DIRAC.Core.Utilities.SiteCEMapping.getSiteForCE(computingElement)

Given a Grid CE name this method returns the DIRAC site name.

WARNING: if two or more sites happen to have the same ceName/queueName, then only the first found is returned

DIRAC.Core.Utilities.SiteCEMapping.getSites(gridName=None)