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


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


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


Get the list of sites that are allowed to download files


Get the site at which the SE is


Get sites that can access the SE by protocol


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


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


Returns a dictionary of all sites and their localSEs as a list, e.g. {‘’:[‘CERN-RAW’,’CERN-RDST’,…]}


Get the list of known sites

getSitesForSE(storageElement, connectionLevel=None)

Get the (list of) sites for a given SE and a given connctivity


Get the list of known SEs


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


Returns the Favorite Write protocol defined in the CS, or ‘srm’ as default


Is this SE an archive SE


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

  • 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


Returns the Grid name for a site


Returns the Grid name for a site