Transformation

A generic client for creating and managing transformations.

See the information about transformation parameters below.

class DIRAC.TransformationSystem.Client.Transformation.Transformation(transID=0, transClient=None)

Bases: DIRAC.Core.Base.API.API

__init__(transID=0, transClient=None)

c’tor

addFilesToTransformation(lfns, printOutput=False)
addTaskForTransformation(lfns=[], se='Unknown', printOutput=False)
addTransformation(addFiles=True, printOutput=False)

Add transformation to the transformation system.

Sets all parameters currently assigned to the transformation.

Parameters:
  • addFiles (bool) – if True, immediately perform input data query
  • printOutput (bool) – if True, print information about transformation
cleanTransformation(printOutput=False)
deleteTasks(taskMin, taskMax, printOutput=False)
deleteTransformation(printOutput=False)
extendTransformation(nTasks, printOutput=False)
getAuthorDNfromProxy()

gets the AuthorDN and username of the transformation from the uploaded proxy

getServer()
getSummaryTransformations(transID=[])

Show the summary for a list of Transformations

Fields starting with ‘F’ (‘J’) refers to files (jobs). Proc. stand for processed.

getTransformation(printOutput=False)
getTransformationFiles(fileStatus=[], lfns=[], outputFields=['FileID', 'LFN', 'Status', 'TaskID', 'TargetSE', 'UsedSE', 'ErrorCount', 'InsertedTime', 'LastUpdate'], orderBy='FileID', printOutput=False)
getTransformationLogging(printOutput=False)
getTransformationStats(printOutput=False)
getTransformationTaskStats(printOutput=False)
getTransformationTasks(taskStatus=[], taskIDs=[], outputFields=['TransformationID', 'TaskID', 'ExternalStatus', 'ExternalID', 'TargetSE', 'CreationTime', 'LastUpdateTime'], orderBy='TaskID', printOutput=False)
getTransformations(transID=[], transStatus=[], outputFields=['TransformationID', 'Status', 'AgentType', 'TransformationName', 'CreationDate'], orderBy='TransformationID', printOutput=False)
getTransformationsByUser(authorDN='', userName='', transID=[], transStatus=[], outputFields=['TransformationID', 'Status', 'AgentType', 'TransformationName', 'CreationDate', 'AuthorDN'], orderBy='TransformationID', printOutput=False)
reset(transID=0)
setBody(body)

check that the body is a string, or using the proper syntax for multiple operations

Parameters:

body (string or list of tuples (or lists) of string and dictionaries) –

transformation body, for example

body = [ ( “ReplicateAndRegister”, { “SourceSE”:”FOO-SRM”, “TargetSE”:”BAR-SRM” }),
         ( “RemoveReplica”, { “TargetSE”:”FOO-SRM” } ),
       ]

Raises:
  • TypeError – If the structure is not as expected
  • ValueError – If unknown attribute for the Operation is used
Returns:

S_OK, S_ERROR

setFileStatusForTransformation(status, lfns, printOutput=False)
setInputMetaQuery(query)

Set the input meta query.

Parameters:query (dict) – dictionary to use for input meta query
setOutputMetaQuery(query)

Set the output meta query.

Parameters:query (dict) – dictionary to use for output meta query
setSourceSE(seList)
setTargetSE(seList)
setTaskStatus(taskID, status, printOutput=False)

Transformation Parameters

Any parameter with ParameterName can be set for a transformation with a call to setParameterName(parameterValue).

The following parameters have a special meaning

AgentType:
Default value: ‘Manual’
Body:
Default value: ‘’
Description:
Default value: ‘’
EventsPerTask:
Default value: 0
FileMask:
Default value: ‘’
GroupSize:
Default value: 1
InheritedFrom:
Default value: 0
LongDescription:
Default value: ‘’
MaxNumberOfTasks:
Default value: 0
Plugin:
Default value: ‘Standard’
Status:
Default value: ‘New’
TransformationGroup:
Default value: ‘General’
TransformationID:
Default value: 0
TransformationName:
Default value: ‘’
Type:
Default value: ‘’