IRODSStorageElementHandler

mod:IRODSStorageElementHandler

The following methods are available in the Service interface

getMetadata() - get file metadata listDirectory() - get directory listing remove() - remove one file removeDirectory() - remove on directory recursively removeFileList() - remove files in the list getAdminInfo() - get administration information about the SE status

The handler implements also the DISET data transfer calls toClient(), fromClient(), bulkToClient(), bulkFromClient which support single file, directory and file list upload and download

The class can be used as the basis for more advanced StorageElement implementations

class DIRAC.DataManagementSystem.Service.IRODSStorageElementHandler.IRODSStorageElementHandler(handlerInitDict, trid)

Bases: DIRAC.Core.DISET.RequestHandler.RequestHandler

class StorageElementHandler
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_createDirectory(dir_path)

Creates the directory on the storage

static export_echo(data)

This method used for testing the performance of a service

export_exists(fileID)

Check existence of the fileID

export_getDirectorySize(fileID)

Get the size occupied by the given directory

export_getMetadata(fileID)

Get metadata for the file or directory specified by fileID

export_getResourceInfo(resource=None)

Send the storage element resource information

export_listDirectory(dir_path, mode)

Return the dir_path directory listing

export_ping()
export_remove(fileID, token)

Remove fileID from the storage. token is used for access rights confirmation.

export_removeDirectory(fileID, token)

Remove the given directory from the storage

export_removeFileList(fileList, token)

Remove files in the given list

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)

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, ignoredSize, fileHelper)

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

transfer_bulkToClient(fileId, token, fileHelper)

Send directories and files specified in the fileID. The fileID string can be a single directory name or a list of colon (:) separated file/directory names. token is used for access rights confirmation.

transfer_fromClient(fileID, token, fileSize, fileHelper)

Method to receive file from clients. fileID is the local file name in the SE. fileSize can be Xbytes or -1 if unknown. token is used for access rights confirmation.

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_createDirectory = [(<type 'str'>, <type 'unicode'>)]
types_echo = [<type 'basestring'>]
types_exists = [(<type 'str'>, <type 'unicode'>)]
types_getDirectorySize = [(<type 'str'>, <type 'unicode'>)]
types_getMetadata = [(<type 'str'>, <type 'unicode'>)]
types_listDirectory = [(<type 'str'>, <type 'unicode'>), (<type 'str'>, <type 'unicode'>)]
types_ping = []
types_remove = [(<type 'str'>, <type 'unicode'>), (<type 'str'>, <type 'unicode'>)]
types_removeDirectory = [(<type 'str'>, <type 'unicode'>), (<type 'str'>, <type 'unicode'>)]
types_removeFileList = [<type 'list'>, (<type 'str'>, <type 'unicode'>)]
DIRAC.DataManagementSystem.Service.IRODSStorageElementHandler.initializeIRODSStorageElementHandler(serviceInfo)

Initialize Storage Element global settings