DMSHelpers
This module contains helper methods for accessing operational attributes or parameters of DMS objects
- class DIRAC.DataManagementSystem.Utilities.DMSHelpers.DMSHelpers(vo=False)
Bases:
object
This class is used to get information about sites, SEs and their interrelations
- __init__(vo=False)
- getAccessProtocols()
Returns the Favorite access protocol defined in the CS, or ‘srm’ as default
- getAllSEsInGroupAtSite(seGroup, site)
Get all SEs in a group or list of SEs that are present at a site
- getDownloadSitesForSE(se)
Get the list of sites that are allowed to download files
- getLocalSiteForSE(se)
Get the site at which the SE is
- getMultiHopMatrix()
Returns the multi-hop matrix described in DataManagement/MultiHopMatrixOfShame.
'Default': { 'Default': 'MultiHopSEUsedForAllTransfer', 'Dst3' : 'MultiHopFromAnySourceToDst3', } 'Src1' : { 'Default' : 'DefaultMultiHopSEFromSrc1', 'Dst1': 'MultiHopSEFromSrc1ToDst1}, 'Src2' : { 'Default' : 'DefaultMultiHopSEFromSrc2', 'Dst2': 'MultiHopSEFromSrc1ToDst2}
- Returns:
dict of dict for all the source se / dest SE defined. We user defaultdict to allow for the use of non existing source/dest.
- getProtocolSitesForSE(se)
Get sites that can access the SE by protocol
- getRegistrationProtocols()
Returns the Favorite registration protocol defined in the CS, or ‘srm’ as default
- getSEInGroupAtSite(seGroup, site)
Get the SE in a group or list of SEs that is present at a site
- getSEsAtCountry(country, connectionLevel=None)
Get all SEs at a given country
- getSEsAtSite(site)
Get local SEs
- getSEsForSite(site, connectionLevel=None)
Get all SEs accessible from a site, given a connectivity
- getShortSiteNames(withStorage=True, tier=None)
Create a directory of short site names pointing to full site names
- getSiteSEMapping()
Returns a dictionary of all sites and their localSEs as a list, e.g. {‘LCG.CERN.ch’:[‘CERN-RAW’,’CERN-RDST’,…]}
- getSites()
Get the list of known sites
- getSitesForSE(storageElement, connectionLevel=None)
Get the (list of) sites for a given SE and a given connctivity
- getStageProtocols()
Returns the Favorite staging protocol defined in the CS. There are no default
- getStorageElements()
Get the list of known SEs
- getThirdPartyProtocols()
Returns the Favorite third party protocol defined in the CS, or ‘srm’ as default
- getTiers(withStorage=False, tier=None)
Get the list of sites for a given (list of) Tier level
- getWriteProtocols()
Returns the Favorite Write protocol defined in the CS, or ‘srm’ as default
- isSEArchive(storageElement)
Is this SE an archive SE
- isSEFailover(storageElement)
Is this SE a failover SE
- isSEForJobs(storageElement, checkSE=True)
Is this SE suitable for making jobs
- isSameSiteSE(se1, se2)
Are these 2 SEs at the same site
- DIRAC.DataManagementSystem.Utilities.DMSHelpers.resolveSEGroup(seGroupList, allSEs=None)
Resolves recursively a (list of) SEs that can be groupSEs
- DIRAC.DataManagementSystem.Utilities.DMSHelpers.siteCountryName(site)
Returns the Grid name for a site
- DIRAC.DataManagementSystem.Utilities.DMSHelpers.siteGridName(site)
Returns the Grid name for a site