Operation¶
mod: | Operation |
---|
Operation implementation
-
class
DIRAC.RequestManagementSystem.Client.Operation.
Operation
(fromDict=None)¶ Bases:
object
Parameters: - OperationID (long) – OperationID as read from DB backend
- RequestID (long) – parent RequestID
- Status (str) – execution status
- Type (str) – operation to perform
- Arguments (str) – additional arguments
- SourceSE (str) – source SE name
- TargetSE (str) – target SE names as comma separated list
- Catalog (str) – catalog to use as comma separated list
- Error (str) – error string if any
- parent (Request.Request) – parent Request instance
It is managed by SQLAlchemy, so the RequestID, OperationID should never be set by hand (except when constructed from JSON of course…) In principle, the _parent attribute could be totally managed by SQLAlchemy. However, it is set only when inserted into the DB, this is why I manually set it in the Request _notify
-
ALL_STATES
= ('Queued', 'Waiting', 'Scheduled', 'Assigned', 'Failed', 'Done', 'Canceled')¶
-
ATTRIBUTE_NAMES
= ['OperationID', 'RequestID', 'Type', 'Status', 'Arguments', 'Order', 'SourceSE', 'TargetSE', 'Catalog', 'Error', 'CreationTime', 'SubmitTime', 'LastUpdate']¶
-
Catalog
¶ catalog prop
-
CreationTime
¶ operation creation time prop
-
FINAL_STATES
= ('Failed', 'Done', 'Canceled')¶
-
LastUpdate
¶ last update prop
-
MAX_FILES
= 10000¶
-
Order
¶ order prop
-
Status
¶ Status prop
-
SubmitTime
¶ subrequest’s submit time prop
-
__init__
(fromDict=None)¶ c’tor
Parameters: - self – self reference
- fromDict (dict) – attributes dictionary
-
addFile
(opFile)¶ add :opFile: to operation
Warning
You cannot add a File object that has already been added to another operation. They must be different objects
-
catalogList
¶ helper property returning catalogs as list
-
fileStatusList
()¶ get list of files statuses
-
sourceSEList
¶ helper property returning source SEs as a list
-
targetSEList
¶ helper property returning target SEs as a list
-
toJSON
()¶ Returns the JSON description string of the Operation