ReqProxyHandler

mod:RequestProxyHandler

Careful with that axe, Eugene! Some ‘transfer’ requests are using local fs and they never should be forwarded to the central RequestManager.

class DIRAC.RequestManagementSystem.Service.ReqProxyHandler.ReqProxyHandler(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

class ReqProxyHandler
Parameters:
  • requestManager (RPCCLient) – a RPCClient to RequestManager
  • cacheDir (str) – os.path.join( workDir, “requestCache” )
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 cacheDir()

get cache dir

static export_echo(data)

This method used for testing the performance of a service

export_getStatus()

get number of requests in cache

export_listCacheDir()

List the content of the Cache directory :returns: list of file

export_ping()
export_putRequest(requestJSON)

forward request from local RequestDB to central RequestManager

Parameters:
  • self – self reference
  • requestType (str) – request type
export_showCachedRequest(filename)

Show the request cached in the given file

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()

service initialization

Parameters:self – self reference
classmethod requestManager()

get request manager

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)
classmethod sweeper()

move cached request to the central request manager

Parameters:self – self reference
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_echo = [<type 'basestring'>]
types_getStatus = []
types_listCacheDir = []
types_ping = []
types_putRequest = [(<type 'str'>, <type 'unicode'>)]
types_showCachedRequest = [(<type 'str'>, <type 'unicode'>)]
DIRAC.RequestManagementSystem.Service.ReqProxyHandler.initializeReqProxyHandler(serviceInfo)

init RequestProxy handler

Parameters:serviceInfo – whatever