FTS3ManagerHandler

Service handler for FTS3DB using DISET

FTS3Manager options
FTS3Manager
{
  Port = 9193
  Authorization
  {
    Default = authenticated
  }
}
class DIRAC.DataManagementSystem.Service.FTS3ManagerHandler.FTS3ManagerHandler(handlerInitDict, trid)

Bases: DIRAC.DataManagementSystem.Service.FTS3ManagerHandler.FTS3ManagerHandlerMixin, DIRAC.Core.DISET.RequestHandler.RequestHandler

DISET handler for FTS3Manager

__init__(handlerInitDict, trid)

Constructor

Parameters
  • handlerInitDict (dictionary) – Information vars for the service

  • trid (object) – Transport to use

auth_ping = ['all']
auth_refreshConfiguration = ['CSAdministrator']
auth_whoami = ['all']
static export_echo(data)

This method is used for testing performance of the service

Parameters

data (str) – data to be sent back to the caller

Returns

S_OK, Value is the input data

classmethod export_getActiveJobs(limit, lastMonitor, jobAssignmentTag)

Get all the FTSJobs that are not in a final state

Parameters
  • limit – max number of jobs to retrieve

  • jobAssignmentTag – tag to put in the DB

  • lastMonitor – jobs monitored earlier than the given date

Returns

json list of FTS3Job

classmethod export_getNonFinishedOperations(limit, operationAssignmentTag)

Get all the FTS3Operations that are missing a callback, i.e. in ‘Processed’ state

Parameters

limit – max number of operations to retrieve

Returns

json list of FTS3Operation

classmethod export_getOperation(operationID)

Get the FTS3Operation from the database

Parameters

operationID – ID of the operation

Returns

the FTS3Operation JSON string matching

classmethod export_getOperationsFromRMSOpID(rmsOpID)

Get the FTS3Operation associated to a given rmsOpID

Parameters

rmsOpID – ID of the operation in the RMS

Returns

JSON encoded list of FTS3Operations

export_persistOperation(opJSON)

update or insert request into db

Parameters

opJSON – json string representing the operation

Returns

OperationID

export_ping()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters

fromMaster (bool) – flag to refresh from the master configuration service

classmethod export_updateFileStatus(fileStatusDict, ftsGUID)

Update the file ftsStatus and error

Parameters
  • fileStatusDict – { fileID : { status , error } }

  • ftsGUID – (not mandatory) If specified, only update the rows where the ftsGUID matches this value.

classmethod export_updateJobStatus(jobStatusDict)

Update the job Status and error

Parameters

jobStatusDict – { jobID : { status , error } }

export_whoami()

A simple whoami, returns all credential dictionary, except certificate chain object.

fts3db = None
classmethod getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns

Value for serviceSection/optionName in the CS being defaultValue the default

getRemoteAddress()

Get the address of the remote peer.

Returns

Address of remote peer.

getRemoteCredentials()

Get the credentials of the remote peer.

Returns

Credentials dictionary of remote peer.

initialize()

Initialize this instance of the handler (to be overwritten)

classmethod initializeHandler(serviceInfoDict)

initialize handler

srv_disconnect(trid=None)
classmethod srv_disconnectClient(trid)
srv_getActionTuple()
classmethod srv_getCSOption(optionName, defaultValue=False)

Get an option from the CS section of the services

Returns

Value for serviceSection/optionName in the CS being defaultValue the default

srv_getClientSetup()
srv_getClientVO()
srv_getClientVersion()
srv_getFormattedRemoteCredentials()
classmethod srv_getMonitor()
srv_getRemoteAddress()

Get the address of the remote peer.

Returns

Address of remote peer.

srv_getRemoteCredentials()

Get the credentials of the remote peer.

Returns

Credentials dictionary of remote peer.

classmethod srv_getServiceName()
srv_getTransportID()
classmethod srv_getURL()
classmethod srv_msgCreate(msgName)
srv_msgReply(msgObj)
classmethod srv_msgSend(trid, msgObj)
transfer_bulkFromClient(bulkId, token, bulkSize, fileHelper)
transfer_bulkToClient(bulkId, token, fileHelper)
transfer_fromClient(fileId, token, fileSize, fileHelper)
transfer_listBulk(bulkId, token, fileHelper)
transfer_toClient(fileId, token, fileHelper)
types_echo = [(<class 'str'>,)]
types_getActiveJobs = [(<class 'int'>,), [<class 'NoneType'>, (<class 'str'>,)], (<class 'str'>,)]
types_getNonFinishedOperations = [(<class 'int'>,), (<class 'str'>,)]
types_getOperation = [(<class 'int'>,)]
types_getOperationsFromRMSOpID = [(<class 'int'>,)]
types_persistOperation = [(<class 'str'>,)]
types_ping = []
types_refreshConfiguration = [<class 'bool'>]
types_updateFileStatus = [<class 'dict'>]
types_updateJobStatus = [<class 'dict'>]
types_whoami = []
class DIRAC.DataManagementSystem.Service.FTS3ManagerHandler.FTS3ManagerHandlerMixin

Bases: object

class FTS3ManagerHandlerMixin
classmethod export_getActiveJobs(limit, lastMonitor, jobAssignmentTag)

Get all the FTSJobs that are not in a final state

Parameters
  • limit – max number of jobs to retrieve

  • jobAssignmentTag – tag to put in the DB

  • lastMonitor – jobs monitored earlier than the given date

Returns

json list of FTS3Job

classmethod export_getNonFinishedOperations(limit, operationAssignmentTag)

Get all the FTS3Operations that are missing a callback, i.e. in ‘Processed’ state

Parameters

limit – max number of operations to retrieve

Returns

json list of FTS3Operation

classmethod export_getOperation(operationID)

Get the FTS3Operation from the database

Parameters

operationID – ID of the operation

Returns

the FTS3Operation JSON string matching

classmethod export_getOperationsFromRMSOpID(rmsOpID)

Get the FTS3Operation associated to a given rmsOpID

Parameters

rmsOpID – ID of the operation in the RMS

Returns

JSON encoded list of FTS3Operations

export_persistOperation(opJSON)

update or insert request into db

Parameters

opJSON – json string representing the operation

Returns

OperationID

classmethod export_updateFileStatus(fileStatusDict, ftsGUID)

Update the file ftsStatus and error

Parameters
  • fileStatusDict – { fileID : { status , error } }

  • ftsGUID – (not mandatory) If specified, only update the rows where the ftsGUID matches this value.

classmethod export_updateJobStatus(jobStatusDict)

Update the job Status and error

Parameters

jobStatusDict – { jobID : { status , error } }

fts3db = None
classmethod initializeHandler(serviceInfoDict)

initialize handler

types_getActiveJobs = [(<class 'int'>,), [<class 'NoneType'>, (<class 'str'>,)], (<class 'str'>,)]
types_getNonFinishedOperations = [(<class 'int'>,), (<class 'str'>,)]
types_getOperation = [(<class 'int'>,)]
types_getOperationsFromRMSOpID = [(<class 'int'>,)]
types_persistOperation = [(<class 'str'>,)]
types_updateFileStatus = [<class 'dict'>]
types_updateJobStatus = [<class 'dict'>]