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.Core.DISET.RequestHandler.RequestHandler

class FTS3ManagerHandler
exception ConnectionError(msg)

Bases: exceptions.Exception

__init__(msg)

x.__init__(…) initializes x; see help(type(x)) for signature

args
message
__init__(handlerInitDict, trid)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service
  • trid (object) – Transport to use
auth_ping = ['all']
auth_refreshConfiguration = ['CSAdministrator']
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 } }
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 = [<type 'basestring'>]
types_getActiveJobs = [(<type 'int'>, <type 'long'>), [None, <type 'basestring'>], <type 'basestring'>]
types_getNonFinishedOperations = [(<type 'int'>, <type 'long'>), <type 'basestring'>]
types_getOperation = [(<type 'int'>, <type 'long'>)]
types_getOperationsFromRMSOpID = [(<type 'int'>, <type 'long'>)]
types_persistOperation = [<type 'basestring'>]
types_ping = []
types_refreshConfiguration = [<type 'bool'>]
types_updateFileStatus = [<type 'dict'>]
types_updateJobStatus = [<type 'dict'>]