-
Notifications
You must be signed in to change notification settings - Fork 176
Dirac v6r11
chaen edited this page Jan 15, 2014
·
19 revisions
The main point of this version is to remove the uselessly complex ReplicaManager class, and implement the RFC #17
The calls to the ReplicaManager class have to be replaced by calls :
- to the FileCatalog, if the method acts only on the FileCatalog. It is the case for all methods of the ReplicaManager which contains "Catalog" (eg. getCatalogReplicaStatus, removeCatalogReplica, etc).
- to the StorageElement if the method acts only on the StorageElement. It is the case for all methods of the ReplicaManager which contains "Storage" (eg. getStorageFileMetadata, prestageStorageFile, etc).
- to the new DataManager class if it implies both the StorageElement and the FileCatalog.
The SingleFile and SingleDir parameters are deprecated as well. The enforced return type convention is the successful/failed dictionaries. However, a utility function is provided to mock the deprecated arguments :
res = ReplicaManager().doSomething(arg1, arg2, singleFile = True )
becomes
from DIRAC.Resources.Utilities import Utils
res = Utils.executeSingleFileOrDirWrapper(DataManager().doSomething(arg1, arg2 ))
The catalogs parameter of the ReplicaManager is also removed. It allowed you to specify on which catalogs your method should act. This information should be now given in the constructor of the DataManager or the FileCatalog itself, and all the methods called with these instances will act only on the given catalogs.