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.

ReqProxy options
ReqProxy
{
  Port = 9161
  # Number of request to sweep at once
  SweepSize = 10
  Authorization
  {
    Default = authenticated
  }
}
class DIRAC.RequestManagementSystem.Service.ReqProxyHandler.ReqProxyHandler(handlerInitDict, trid)

Bases: RequestHandler

class ReqProxyHandler
Parameters:
  • requestManager (RPCCLient) – a RPCClient to RequestManager

  • cacheDir (str) – os.path.join( workDir, “requestCache” )

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

get cache dir

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

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)

Dump the request in a local cache for later forwarding

Parameters:
  • self – self reference

  • requestJSON (str) – json dump of the request

static export_refreshConfiguration(fromMaster)

Force refreshing the configuration data

Parameters:

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

export_showCachedRequest(filename)

Show the request cached in the given file

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)

Initialize handler

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_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)
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 = [<class 'str'>]
types_getStatus = []
types_listCacheDir = []
types_ping = []
types_putRequest = [<class 'str'>]
types_refreshConfiguration = [<class 'bool'>]
types_showCachedRequest = [<class 'str'>]
types_whoami = []
DIRAC.RequestManagementSystem.Service.ReqProxyHandler.initializeReqProxyHandler(serviceInfo)

init RequestProxy handler

Parameters:

serviceInfo – whatever