SandboxStoreHandler

SandboxHandler is the implementation of the Sandbox service in the DISET framework

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

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

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']
export_assignSandboxesToEntities(enDict, ownerName='', ownerGroup='', entitySetup=False)

Assign sandboxes to jobs. Expects a dict of { entityId : [ ( SB, SBType ), … ] }

static export_echo(data)

This method used for testing the performance of a service

export_getFreeDiskSpace()

Get the free disk space of the storage element If no size is specified, terabytes will be used by default.

export_getSandboxesAssignedToEntity(entityId, entitySetup=False)

Get the sandboxes associated to a job and the association type

export_getTotalDiskSpace()

Get the total disk space of the storage element If no size is specified, terabytes will be used by default.

export_ping()
export_unassignEntities(entitiesList, entitiesSetup=False)

Unassign a list of jobs

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)

purgeUnusedSandboxes()
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(fileId, token, _fileSize, fileHelper)

Receive files packed into a tar archive by the fileHelper logic. token is used for access rights confirmation.

transfer_bulkToClient(bulkId, token, fileHelper)
transfer_fromClient(fileId, token, fileSize, fileHelper)

Receive a file as a sandbox

transfer_listBulk(bulkId, token, fileHelper)
transfer_toClient(fileID, token, fileHelper)

Method to send files to clients. fileID is the local file name in the SE. token is used for access rights confirmation.

types_assignSandboxesToEntities = [<type 'dict'>]
types_echo = [<type 'basestring'>]
types_getFreeDiskSpace = []
types_getSandboxesAssignedToEntity = [<type 'basestring'>]
types_getTotalDiskSpace = []
types_ping = []
types_unassignEntities = [(<type 'list'>, <type 'tuple'>)]
DIRAC.WorkloadManagementSystem.Service.SandboxStoreHandler.initializeSandboxStoreHandler(serviceInfo)