TransformationManagerHandler

DISET request handler base class for the TransformationDB.

class DIRAC.TransformationSystem.Service.TransformationManagerHandler.TransformationManagerHandler(*args, **kargs)

Bases: DIRAC.TransformationSystem.Service.TransformationManagerHandler.TransformationManagerHandlerBase

exception ConnectionError(msg)

Bases: exceptions.Exception

__init__(msg)

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

args
message
__init__(*args, **kargs)

Constructor

Parameters:
  • handlerInitDict (dictionary) – Information vars for the service
  • trid (object) – Transport to use
auth_ping = ['all']
export_addDirectory(path, force=False)
export_addFile(fileDicts, force=False)

Interface provides { LFN1 : { PFN1, SE1, … }, LFN2 : { PFN2, SE2, … } }

export_addFilesToTransformation(transName, lfns)
export_addTaskForTransformation(transName, lfns=[], se='Unknown')
export_addTransformation(transName, description, longDescription, transType, plugin, agentType, fileMask, transformationGroup='General', groupSize=1, inheritedFrom=0, body='', maxTasks=0, eventsPerTask=0, addFiles=True)
export_cleanTransformation(transName)
export_createTransformationInputDataQuery(transName, queryDict)
export_deleteTasks(transName, taskMin, taskMax)
export_deleteTransformation(transName)
export_deleteTransformationInputDataQuery(transName)
export_deleteTransformationParameter(transName, paramName)
static export_echo(data)

This method used for testing the performance of a service

export_exists(lfns)
export_extendTransformation(transName, nTasks)
export_getAdditionalParameters(transName)
export_getCounters(table, attrList, condDict, older=None, newer=None, timeStamp=None)
export_getDistinctAttributeValues(attribute, selectDict)
export_getFileSummary(lfns)
export_getTabbedSummaryWeb(table, requestedTables, selectDict, sortList, startItem, maxItems)
export_getTableDistinctAttributeValues(table, attributes, selectDict)
export_getTasksToSubmit(transName, numTasks, site='')

Get information necessary for submission for a given number of tasks for a given transformation

export_getTransformation(transName, extraParams=False)
export_getTransformationFiles(condDict=None, older=None, newer=None, timeStamp='LastUpdate', orderAttribute=None, limit=None, offset=None)
export_getTransformationFilesCount(transName, field, selection={})
export_getTransformationFilesSummaryWeb(selectDict, sortList, startItem, maxItems)
export_getTransformationInputDataQuery(transName)
export_getTransformationLogging(transName)
export_getTransformationParameters(transName, parameters)
export_getTransformationStats(transName)
export_getTransformationStatusCounters()
export_getTransformationSummary()

Get the summary of the currently existing transformations

export_getTransformationSummaryWeb(selectDict, sortList, startItem, maxItems)

Get the summary of the transformation information for a given page in the generic format

export_getTransformationTaskStats(transName)
export_getTransformationTasks(condDict=None, older=None, newer=None, timeStamp='CreationTime', orderAttribute=None, limit=None, inputVector=False, offset=None)
export_getTransformationTasksSummaryWeb(selectDict, sortList, startItem, maxItems)
export_getTransformationWithStatus(status)
export_getTransformations(condDict=None, older=None, newer=None, timeStamp='CreationDate', orderAttribute=None, limit=None, extraParams=False, offset=None)
export_getTransformationsSummaryWeb(selectDict, sortList, startItem, maxItems)
export_ping()
export_removeFile(lfns)

Interface provides [ LFN1, LFN2, … ]

export_setFileStatusForTransformation(transName, dictOfNewFilesStatus)

Sets the file status for the transformation.

The dictOfNewFilesStatus is a dictionary with the form: {12345: (‘StatusA’, errorA), 6789: (‘StatusB’,errorB), … } where the keys are fileIDs The tuple may be a string with only the status if the client was from an older version

export_setMetadata(path, querydict)

Set metadata to a file or to a directory (path)

export_setTaskStatus(transName, taskID, status)
export_setTaskStatusAndWmsID(transName, taskID, status, taskWmsID)
export_setTransformationParameter(transName, paramName, paramValue)
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)

setDatabase(oDatabase)
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_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_addDirectory = [<type 'basestring'>]
types_addFile = [[<type 'list'>, <type 'dict'>, <type 'basestring'>]]
types_addFilesToTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'list'>, <type 'tuple'>]]
types_addTaskForTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_addTransformation = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>]
types_cleanTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_createTransformationInputDataQuery = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'dict'>]
types_deleteTasks = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'long'>, <type 'int'>], [<type 'long'>, <type 'int'>]]
types_deleteTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_deleteTransformationInputDataQuery = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_deleteTransformationParameter = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_echo = [<type 'basestring'>]
types_exists = [<type 'list'>]
types_extendTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'long'>, <type 'int'>]]
types_getAdditionalParameters = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getCounters = [<type 'basestring'>, <type 'list'>, <type 'dict'>]
types_getDistinctAttributeValues = [<type 'basestring'>, <type 'dict'>]
types_getFileSummary = [<type 'list'>]
types_getTabbedSummaryWeb = [<type 'basestring'>, <type 'dict'>, <type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getTableDistinctAttributeValues = [<type 'basestring'>, <type 'list'>, <type 'dict'>]
types_getTasksToSubmit = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'long'>, <type 'int'>]]
types_getTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationFiles = []
types_getTransformationFilesCount = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_getTransformationFilesSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getTransformationInputDataQuery = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationLogging = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationParameters = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'basestring'>, <type 'list'>, <type 'tuple'>]]
types_getTransformationStats = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationStatusCounters = []
types_getTransformationSummary = []
types_getTransformationSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getTransformationTaskStats = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationTasks = []
types_getTransformationTasksSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getTransformationWithStatus = [[<type 'basestring'>, <type 'list'>, <type 'tuple'>]]
types_getTransformations = []
types_getTransformationsSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_ping = []
types_removeFile = [[<type 'list'>, <type 'dict'>]]
types_setFileStatusForTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'dict'>]
types_setMetadata = [<type 'basestring'>, <type 'dict'>]
types_setTaskStatus = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'list'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_setTaskStatusAndWmsID = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'long'>, <type 'int'>], <type 'basestring'>, <type 'basestring'>]
types_setTransformationParameter = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
class DIRAC.TransformationSystem.Service.TransformationManagerHandler.TransformationManagerHandlerBase(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

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']
export_addDirectory(path, force=False)
export_addFile(fileDicts, force=False)

Interface provides { LFN1 : { PFN1, SE1, … }, LFN2 : { PFN2, SE2, … } }

export_addFilesToTransformation(transName, lfns)
export_addTaskForTransformation(transName, lfns=[], se='Unknown')
export_addTransformation(transName, description, longDescription, transType, plugin, agentType, fileMask, transformationGroup='General', groupSize=1, inheritedFrom=0, body='', maxTasks=0, eventsPerTask=0, addFiles=True)
export_cleanTransformation(transName)
export_createTransformationInputDataQuery(transName, queryDict)
export_deleteTasks(transName, taskMin, taskMax)
export_deleteTransformation(transName)
export_deleteTransformationInputDataQuery(transName)
export_deleteTransformationParameter(transName, paramName)
static export_echo(data)

This method used for testing the performance of a service

export_exists(lfns)
export_extendTransformation(transName, nTasks)
export_getAdditionalParameters(transName)
export_getCounters(table, attrList, condDict, older=None, newer=None, timeStamp=None)
export_getDistinctAttributeValues(attribute, selectDict)
export_getFileSummary(lfns)
export_getTabbedSummaryWeb(table, requestedTables, selectDict, sortList, startItem, maxItems)
export_getTableDistinctAttributeValues(table, attributes, selectDict)
export_getTasksToSubmit(transName, numTasks, site='')

Get information necessary for submission for a given number of tasks for a given transformation

export_getTransformation(transName, extraParams=False)
export_getTransformationFiles(condDict=None, older=None, newer=None, timeStamp='LastUpdate', orderAttribute=None, limit=None, offset=None)
export_getTransformationFilesCount(transName, field, selection={})
export_getTransformationFilesSummaryWeb(selectDict, sortList, startItem, maxItems)
export_getTransformationInputDataQuery(transName)
export_getTransformationLogging(transName)
export_getTransformationParameters(transName, parameters)
export_getTransformationStats(transName)
export_getTransformationStatusCounters()
export_getTransformationSummary()

Get the summary of the currently existing transformations

export_getTransformationSummaryWeb(selectDict, sortList, startItem, maxItems)

Get the summary of the transformation information for a given page in the generic format

export_getTransformationTaskStats(transName)
export_getTransformationTasks(condDict=None, older=None, newer=None, timeStamp='CreationTime', orderAttribute=None, limit=None, inputVector=False, offset=None)
export_getTransformationTasksSummaryWeb(selectDict, sortList, startItem, maxItems)
export_getTransformationWithStatus(status)
export_getTransformations(condDict=None, older=None, newer=None, timeStamp='CreationDate', orderAttribute=None, limit=None, extraParams=False, offset=None)
export_getTransformationsSummaryWeb(selectDict, sortList, startItem, maxItems)
export_ping()
export_removeFile(lfns)

Interface provides [ LFN1, LFN2, … ]

export_setFileStatusForTransformation(transName, dictOfNewFilesStatus)

Sets the file status for the transformation.

The dictOfNewFilesStatus is a dictionary with the form: {12345: (‘StatusA’, errorA), 6789: (‘StatusB’,errorB), … } where the keys are fileIDs The tuple may be a string with only the status if the client was from an older version

export_setMetadata(path, querydict)

Set metadata to a file or to a directory (path)

export_setTaskStatus(transName, taskID, status)
export_setTaskStatusAndWmsID(transName, taskID, status, taskWmsID)
export_setTransformationParameter(transName, paramName, paramValue)
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)

setDatabase(oDatabase)
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_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_addDirectory = [<type 'basestring'>]
types_addFile = [[<type 'list'>, <type 'dict'>, <type 'basestring'>]]
types_addFilesToTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'list'>, <type 'tuple'>]]
types_addTaskForTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_addTransformation = [<type 'basestring'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>, <type 'basestring'>]
types_cleanTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_createTransformationInputDataQuery = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'dict'>]
types_deleteTasks = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'long'>, <type 'int'>], [<type 'long'>, <type 'int'>]]
types_deleteTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_deleteTransformationInputDataQuery = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_deleteTransformationParameter = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_echo = [<type 'basestring'>]
types_exists = [<type 'list'>]
types_extendTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'long'>, <type 'int'>]]
types_getAdditionalParameters = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getCounters = [<type 'basestring'>, <type 'list'>, <type 'dict'>]
types_getDistinctAttributeValues = [<type 'basestring'>, <type 'dict'>]
types_getFileSummary = [<type 'list'>]
types_getTabbedSummaryWeb = [<type 'basestring'>, <type 'dict'>, <type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getTableDistinctAttributeValues = [<type 'basestring'>, <type 'list'>, <type 'dict'>]
types_getTasksToSubmit = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'long'>, <type 'int'>]]
types_getTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationFiles = []
types_getTransformationFilesCount = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_getTransformationFilesSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getTransformationInputDataQuery = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationLogging = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationParameters = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'basestring'>, <type 'list'>, <type 'tuple'>]]
types_getTransformationStats = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationStatusCounters = []
types_getTransformationSummary = []
types_getTransformationSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getTransformationTaskStats = [[<type 'basestring'>, <type 'int'>, <type 'long'>]]
types_getTransformationTasks = []
types_getTransformationTasksSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getTransformationWithStatus = [[<type 'basestring'>, <type 'list'>, <type 'tuple'>]]
types_getTransformations = []
types_getTransformationsSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_ping = []
types_removeFile = [[<type 'list'>, <type 'dict'>]]
types_setFileStatusForTransformation = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'dict'>]
types_setMetadata = [<type 'basestring'>, <type 'dict'>]
types_setTaskStatus = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'list'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
types_setTaskStatusAndWmsID = [[<type 'basestring'>, <type 'int'>, <type 'long'>], [<type 'long'>, <type 'int'>], <type 'basestring'>, <type 'basestring'>]
types_setTransformationParameter = [[<type 'basestring'>, <type 'int'>, <type 'long'>], <type 'basestring'>]
DIRAC.TransformationSystem.Service.TransformationManagerHandler.initializeTransformationManagerHandler(serviceInfo)