Storage Factory Class - creates instances of various Storage plugins from the Core DIRAC or extensions

This Class has three public methods:

getStorageName(): Resolves links in the CS to the target SE name.

getStorage(): This creates a single storage stub based on the parameters passed in a dictionary.

This dictionary must have the following keys: ‘StorageName’,’PluginName’,’Protocol’ Other optional keys are ‘Port’,’Host’,’Path’,’SpaceToken’

getStorages() This takes a DIRAC SE definition and creates storage stubs for the protocols found in the CS.

By providing an optional list of protocols it is possible to limit the created stubs.

class DIRAC.Resources.Storage.StorageFactory.StorageFactory(useProxy=False, vo=None)

Bases: object

__init__(useProxy=False, vo=None)
getStorage(parameterDict, hideExceptions=False)

This instantiates a single storage for the details provided and doesn’t check the CS.

getStorages(storageName, protocolSections=None, hideExceptions=False)

Get an instance of a Storage based on the DIRAC SE name based on the CS entries CS

  • storageName – is the DIRAC SE name i.e. ‘CERN-RAW’

  • protocolSections – is an optional list of protocols if a sub-set is desired i.e [‘SRM2’,’SRM1’]


dictionary containing storage elements and information about them