ReqManagerHandler

mod:ReqManagerHandler
class DIRAC.RequestManagementSystem.Service.ReqManagerHandler.ReqManagerHandler(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

class ReqManagerHandler

RequestDB interface in the DISET framework.

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']
classmethod export_cancelRequest(requestID)

Cancel a request

classmethod export_deleteRequest(requestID)

Delete the request with the supplied ID

static export_echo(data)

This method used for testing the performance of a service

classmethod export_getBulkRequests(numberOfRequest, assigned)

Get a request of given type from the database :param numberOfRequest : size of the bulk (default 10)

:return S_OK( {Failed : message, Successful : list of Request.toJSON()} )

classmethod export_getDBSummary()

Get the summary of requests in the Request DB

classmethod export_getDigest(requestID)

get digest for a request given its id

Parameters:requestID (str) – request’s id
Returns:S_OK( json_str )
classmethod export_getDistinctValuesWeb(attribute)

Get distinct values for a given request attribute. ‘Type’ is interpreted as the operation type

classmethod export_getRequest(requestID=0)

Get a request of given type from the database

classmethod export_getRequestCountersWeb(groupingAttribute, selectDict)

For the web portal. Returns a dictionary {value : counts} for a given key. The key can be any field from the RequestTable. or “Type”, which will be interpreted as ‘Operation.Type’

:param groupingAttribute : attribute used for grouping :param selectDict : selection criteria

classmethod export_getRequestFileStatus(requestID, lfnList)

get request file status for a given LFNs list and requestID

classmethod export_getRequestIDForName(requestName)

get requestID for given :requestName:

classmethod export_getRequestIDsForJobs(jobIDs)

Select the request IDs for supplied jobIDs

classmethod export_getRequestIDsList(statusList=None, limit=None, since=None, until=None, getJobID=False)

get requests’ IDs with status in :statusList:

classmethod export_getRequestInfo(requestID)

get request info for a given requestID

classmethod export_getRequestStatus(requestID)

get request status given its id

classmethod export_getRequestSummaryWeb(selectDict, sortList, startItem, maxItems)

Returns a list of Request for the web portal

Parameters:
  • selectDict (dict) – parameter on which to restrain the query {key : Value} key can be any of the Request columns, ‘Type’ (interpreted as Operation.Type) and ‘FromData’ and ‘ToData’ are matched against the LastUpdate field
  • sortList (list) – [sorting column, ASC/DESC]
  • startItem (int) – start item (for pagination)
  • maxItems (int) – max items (for pagination)
classmethod export_getScheduledRequest(operationID)

read scheduled request given operationID

classmethod export_peekRequest(requestID=0)

peek request given its id

export_ping()
export_putRequest(requestJSON)

put a new request into RequestDB

Parameters:
  • cls – class ref
  • requestJSON (str) – request serialized to JSON format
classmethod export_readRequestsForJobs(jobIDs)

read requests for jobs given list of jobIDs

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_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_cancelRequest = [(<type 'int'>, <type 'long'>)]
types_deleteRequest = [(<type 'int'>, <type 'long'>)]
types_echo = [<type 'basestring'>]
types_getBulkRequests = [<type 'int'>, <type 'bool'>]
types_getDBSummary = []
types_getDigest = [(<type 'int'>, <type 'long'>)]
types_getDistinctValuesWeb = [<type 'basestring'>]
types_getRequest = [(<type 'long'>, <type 'int'>)]
types_getRequestCountersWeb = [<type 'basestring'>, <type 'dict'>]
types_getRequestFileStatus = [[<type 'int'>, <type 'long'>], [<type 'basestring'>, <type 'list'>]]
types_getRequestIDForName = [<type 'basestring'>]
types_getRequestIDsForJobs = [<type 'list'>]
types_getRequestIDsList = [<type 'list'>, <type 'int'>, <type 'basestring'>]
types_getRequestInfo = [[<type 'int'>, <type 'long'>]]
types_getRequestStatus = [(<type 'int'>, <type 'long'>)]
types_getRequestSummaryWeb = [<type 'dict'>, <type 'list'>, <type 'int'>, <type 'int'>]
types_getScheduledRequest = [(<type 'int'>, <type 'long'>)]
types_peekRequest = [(<type 'long'>, <type 'int'>)]
types_ping = []
types_putRequest = [<type 'basestring'>]
types_readRequestsForJobs = [<type 'list'>]
classmethod validate(request)

request validation