PilotManagerHandler

This is the interface to DIRAC PilotAgentsDB.

class DIRAC.WorkloadManagementSystem.Service.PilotManagerHandler.PilotManagerHandler(handlerInitDict, trid)

Bases: RequestHandler

__init__(handlerInitDict, trid)

Constructor

Parameters
  • handlerInitDict (dictionary) – Information vars for the service

  • trid (object) – Transport to use

auth_ping = ['all']
auth_refreshConfiguration = ['CSAdministrator']
auth_whoami = ['all']
classmethod export_addPilotTQReference(pilotRef, taskQueueID, ownerDN, ownerGroup, broker='Unknown', gridType='DIRAC', pilotStampDict={})

Add a new pilot job reference

classmethod export_clearPilots(interval=30, aborted_interval=7)
classmethod export_countPilots(condDict, older=None, newer=None, timeStamp='SubmissionTime')

Set the pilot agent status

classmethod export_deletePilots(pilotIDs)
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_getCounters(table, keys, condDict, newer=None, timeStamp='SubmissionTime')

Set the pilot agent status

classmethod export_getCurrentPilotCounters(attrDict={})

Get pilot counters per Status with attrDict selection. Final statuses are given for the last day.

classmethod export_getPilotInfo(pilotReference)

Get the info about a given pilot job reference

classmethod export_getPilotLoggingInfo(pilotReference)

Get the pilot logging info for the Grid job reference

classmethod export_getPilotMonitorSelectors()

Get all the distinct selector values for the Pilot Monitor web portal page

classmethod export_getPilotMonitorWeb(selectDict, sortList, startItem, maxItems)

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

static export_getPilotOutput(pilotReference)

Get the pilot job standard output and standard error files for the Grid job reference

classmethod export_getPilotStatistics(attribute, selectDict)

Get pilot statistics distribution per attribute value with a given selection

classmethod export_getPilotSummary(startdate='', enddate='')

Get summary of the status of the LCG Pilot Jobs

classmethod export_getPilotSummaryWeb(selectDict, sortList, startItem, maxItems)

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

classmethod export_getPilots(jobID)

Get pilot references and their states for : - those pilots submitted for the TQ where job is sitting - (or) the pilots executing/having executed the Job

classmethod export_killPilot(pilotRefList)

Kill the specified pilots

export_ping()
static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters

fromMaster (bool) – flag to refresh from the master configuration service

classmethod export_selectPilots(condDict)

Select pilots given the selection conditions

classmethod export_setAccountingFlag(pilotRef, mark='True')

Set the pilot AccountingSent flag

classmethod export_setJobForPilot(jobID, pilotRef, destination=None)

Report the DIRAC job ID which is executed by the given pilot job

classmethod export_setPilotBenchmark(pilotRef, mark)

Set the pilot agent benchmark

classmethod export_setPilotStatus(pilotRef, status, destination=None, reason=None, gridSite=None, queue=None)

Set the pilot agent status

classmethod export_storePilotOutput(pilotReference, output, error)

Store the pilot output and error

export_whoami()

A simple whoami, returns all credential dictionary, except certificate chain object.

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)

Initialization of DB objects

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_addPilotTQReference = [<class 'list'>, (<class 'int'>,), (<class 'str'>,), (<class 'str'>,)]
types_clearPilots = [(<class 'int'>,), (<class 'int'>,)]
types_countPilots = [<class 'dict'>]
types_deletePilots = [(<class 'list'>, <class 'int'>, <class 'str'>)]
types_echo = [(<class 'str'>,)]
types_getCounters = [(<class 'str'>,), <class 'list'>, <class 'dict'>]
types_getCurrentPilotCounters = [<class 'dict'>]
types_getPilotInfo = [(<class 'list'>, <class 'str'>)]
types_getPilotLoggingInfo = [(<class 'str'>,)]
types_getPilotMonitorSelectors = []
types_getPilotMonitorWeb = [<class 'dict'>, <class 'list'>, (<class 'int'>,), [<class 'int'>]]
types_getPilotOutput = [(<class 'str'>,)]
types_getPilotStatistics = [(<class 'str'>,), <class 'dict'>]
types_getPilotSummary = []
types_getPilotSummaryWeb = [<class 'dict'>, <class 'list'>, (<class 'int'>,), [<class 'int'>]]
types_getPilots = [(<class 'str'>, <class 'int'>)]
types_killPilot = [(<class 'str'>, <class 'list'>)]
types_ping = []
types_refreshConfiguration = [<class 'bool'>]
types_selectPilots = [<class 'dict'>]
types_setAccountingFlag = [(<class 'str'>,)]
types_setJobForPilot = [(<class 'str'>, <class 'int'>), (<class 'str'>,)]
types_setPilotBenchmark = [(<class 'str'>,), <class 'float'>]
types_setPilotStatus = [(<class 'str'>,), (<class 'str'>,)]
types_storePilotOutput = [(<class 'str'>,), (<class 'str'>,), (<class 'str'>,)]
types_whoami = []