ReplicateAndRegister

mod:

ReplicateAndRegister


synopsis:

ReplicateAndRegister operation handler

ReplicateAndRegister operation handler

class DIRAC.DataManagementSystem.Agent.RequestOperations.ReplicateAndRegister.ReplicateAndRegister(operation=None, csPath=None)

Bases: DMSRequestOperationsBase

class ReplicateAndRegister

ReplicateAndRegister operation handler

__init__(operation=None, csPath=None)

c’tor

Parameters:
  • self – self reference

  • operation (Operation) – Operation instance

  • csPath (str) – CS path for this handler

checkSEsRSS(checkSEs=None, access='WriteAccess', failIfBanned=True)

check SEs. By default, we check the SEs for WriteAccess, but it is configurable

createRMSRecord(status, nbObject)

This method is used to create a record given some parameters for sending it to the ES backend. It is used inside DMS/Agent/RequestOperations and this method is designed particularly for file type of objects.

Parameters:
  • status – This can be one of these i.e. Attempted, Failed, or Successful.

  • nbObject – This is number of objects in question.

Returns:

a dictionary.

dmTransfer(fromFTS=False)

replicate and register using dataManager

fts3Transfer()

replicate and register using FTS3

getProxyForLFN(lfn)

get proxy for lfn

Parameters:

lfn (str) – LFN

Returns:

S_ERROR or S_OK( “/path/to/proxy/file” )

getRegisterOperation(opFile, targetSE, type='RegisterFile', catalog=None)

add RegisterReplica operation for file

Parameters:
  • opFile (File) – operation file

  • targetSE (str) – target SE

getWaitingFilesList()

prepare waiting files list, update Attempt, filter out MaxAttempt

makeProperty(name, value, readOnly=False)

Add property :name: to class

This also creates a private :_name: attribute If you want to make read only property, set :readOnly: flag to True :warn: could raise AttributeError if :name: of :_name: is already defined as an attribute

classmethod rssClient()

ResourceStatusClient getter

rssSEStatus(se, status, retries=2)

check SE :se: for status :status:

Parameters:
  • se (str) – SE name

  • status (str) – RSS status

setOperation(operation)

operation and request setter

Parameters:

operation (Operation) – operation instance

Raises:

TypeError – if operation is not an instance of Operation

property shifter
DIRAC.DataManagementSystem.Agent.RequestOperations.ReplicateAndRegister.filterReplicas(opFile, logger=None, dataManager=None, opSources=None, activeReplicas=None)

filter out banned/invalid source SEs

Parameters:
  • opSources (list) – list of SE names to which limit the possible sources

  • activeReplicas (dict) – the result of dm.getActiveReplicas(*)[“Value”]. Used as a cache

Returns:

Valid list of SEs valid as source