SiteSEMapping
The SiteSEMapping module performs the necessary CS gymnastics to resolve site and SE combinations. These manipulations are necessary in several components.
Assumes CS structure of: /Resources/Sites/<GRIDNAME>/<SITENAME>
- DIRAC.Core.Utilities.SiteSEMapping.getSEHosts(seName)
Get StorageElement host names (can be more than one depending on the protocol)
- Parameters:
seName (str) – name of the storage element
- Returns:
S_OK() with list of hosts or S_ERROR
- DIRAC.Core.Utilities.SiteSEMapping.getSEParameters(seName)
get all the SE parameters in a list
- Parameters:
seName (str) – name of the Storage Element
- Returns:
S_OK() with list of dict with parameters
- DIRAC.Core.Utilities.SiteSEMapping.getSESiteMapping(gridName='', withSiteLocalSEMapping=False)
Returns a dictionary of all SEs and their associated site(s), e.g. {‘CERN-RAW’:’LCG.CERN.ch’,’CERN-RDST’:’LCG.CERN.ch’,…]} Although normally one site exists for a given SE, it is possible over all Grid types to have multiple entries. If gridName is specified, result is restricted to that Grid type. Assumes CS structure of: /Resources/Sites/<GRIDNAME>/<SITENAME>
- DIRAC.Core.Utilities.SiteSEMapping.getSEsForCountry(country)
Determines the associated SEs from the country code
- DIRAC.Core.Utilities.SiteSEMapping.getSEsForSite(siteName, withSiteLocalSEMapping=False)
Given a DIRAC site name this method returns a list of corresponding SEs.
- DIRAC.Core.Utilities.SiteSEMapping.getSiteSEMapping(gridName='', withSiteLocalSEMapping=False)
Returns a dictionary of all sites and their localSEs as a list, e.g. {‘LCG.CERN.ch’:[‘CERN-RAW’,’CERN-RDST’,…]} If gridName is specified, result is restricted to that Grid type.
- DIRAC.Core.Utilities.SiteSEMapping.getSitesForSE(storageElement, gridName='', withSiteLocalSEMapping=False)
Given a DIRAC SE name this method returns a list of corresponding sites. Optionally restrict to Grid specified by name.
- DIRAC.Core.Utilities.SiteSEMapping.getStorageElementsHosts(seNames=None)
Get StorageElement host names
- DIRAC.Core.Utilities.SiteSEMapping.isSameSiteSE(se1, se2)
Check if the 2 SEs are at the same site