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)

x.__init__(…) initializes x; see help(type(x)) for signature

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

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

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

Parameters:
  • seGroupList (list or string) – list of SEs to resolve or comma-separated SEs
  • allSEs (list) – if provided, list of all known SEs

:return : list of resolved SEs or [] if error

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