FTSClient

mod:FTSClient
synopsis:FTS client

FTS client

class DIRAC.DataManagementSystem.Client.FTSClient.FTSClient(url=None, useCertificates=False, **kwargs)

Bases: DIRAC.Core.Base.Client.Client

class FTSClient
__init__(url=None, useCertificates=False, **kwargs)

c’tor

Parameters:
  • self – self reference
  • useCertificates (bool) – flag to enable/disable certificates
deleteFTSFiles(operationID, opFileIDList=None)

delete FTSFiles for rescheduling

Parameters:
  • operationID (int) – ReqDB.Operation.OperationID
  • opFileIDList (list) – [ ReqDB.File.FileID, … ]
deleteFTSJob(ftsJobID)

delete FTSJob into FTSDB

Parameters:ftsJob (int) – FTSJobID
executeRPC(*parms, **kws)

This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.

Parameters:
  • rpc – if an RPC client is passed, use that one
  • timeout – we can change the timeout on a per call bases. Default 120 s
  • url – We can specify which url to use
ftsSchedule(requestID, operationID, opFileList)

schedule lfn for FTS job

Parameters:
  • requestID (int) – RequestDB.Request.RequestID
  • operationID (int) – RequestDB.Operation.OperationID
  • opFileList (list) – list of tuples ( File.toJSON()[‘Value’], sourcesList, targetList )
getAllFTSFilesForRequest(requestID)

read FTSFiles for a given :requestID:

Parameters:requestID (int) – ReqDB.Request.RequestID
getDBSummary()

get FTDB summary

getFTSFile(ftsFileID=None)

get FTSFile

Parameters:ftsFileID (int) – FTSFileID
getFTSFileIDs(statusList=None)

get list of FTSFileIDs for a given status list

getFTSFileList(statusList=None, limit=None)

get list of FTSFiles with status in statusList

getFTSFilesForRequest(requestID, statusList=None)

read FTSFiles for a given :requestID:

Parameters:
  • requestID (int) – ReqDB.Request.RequestID
  • statusList (list) – List of statuses (default: Waiting)
getFTSHistory()

get FTS history snapshot

getFTSJob(ftsJobID)

get FTS job, change its status to ‘Assigned’

Parameters:ftsJobID (int) – FTSJobID
getFTSJobIDs(statusList=None)

get list of FTSJobIDs for a given status list

getFTSJobList(statusList=None, limit=None)

get FTSJobs wit statues in :statusList:

getFTSJobsForRequest(requestID, statusList=None)

get list of FTSJobs with statues in :statusList: given requestID

Parameters:
  • requestID (int) – ReqDB.Request.RequestID
  • statusList (list) – list with FTSJob statuses
Returns:

[ FTSJob, FTSJob, … ]

getServer()

Getter for the server url. Useful ?

peekFTSJob(ftsJobID)

just peek FTSJob

Parameters:ftsJobID (int) – FTSJobID
putFTSJob(ftsJob)

put FTSJob into FTSDB

Parameters:ftsJob (FTSJob.FTSJob) – FTSJob instance
setFTSFilesWaiting(operationID, sourceSE, opFileIDList=None)

update status for waiting FTSFiles from ‘Waiting#SourceSE’ to ‘Waiting’

Parameters:
  • operationID (int) – ReqDB.Operation.OperationID
  • sourceSE (str) – source SE name
  • opFileIDList – [ ReqDB.File.FileID, … ]
setServer(url)

Set the server URL used by default

Parameters:url – url of the service
setTimeout(timeout)

Specify the timeout of the call. Forwarded to RPCClient

Parameters:timeout – guess…