TransferClient

This is for transfers what RPCClient is for RPC calls

class DIRAC.Core.DISET.TransferClient.TransferClient(serviceName, **kwargs)

Bases: DIRAC.Core.DISET.private.BaseClient.BaseClient

KW_DELEGATED_DN = 'delegatedDN'
KW_DELEGATED_GROUP = 'delegatedGroup'
KW_EXTRA_CREDENTIALS = 'extraCredentials'
KW_IGNORE_GATEWAYS = 'ignoreGateways'
KW_KEEP_ALIVE_LAPSE = 'keepAliveLapse'
KW_PROXY_CHAIN = 'proxyChain'
KW_PROXY_LOCATION = 'proxyLocation'
KW_PROXY_STRING = 'proxyString'
KW_SETUP = 'setup'
KW_SKIP_CA_CHECK = 'skipCACheck'
KW_TIMEOUT = 'timeout'
KW_USE_CERTIFICATES = 'useCertificates'
KW_VO = 'VO'
VAL_EXTRA_CREDENTIALS_HOST = 'hosts'
__init__(serviceName, **kwargs)
Parameters:
  • serviceName – URL of the service (proper uri or just System/Component)
  • useCertificates – If set to True, use the server certificate
  • extraCredentials
  • timeout – Timeout of the call (default 600 s)
  • setup – Specify the Setup
  • VO – Specify the VO
  • delegatedDN – Not clear what it can be used for.
  • delegatedGroup – Not clear what it can be used for.
  • ignoreGateways – Ignore the DIRAC Gatways settings
  • proxyLocation – Specify the location of the proxy
  • proxyString – Specify the proxy string
  • proxyChain – Specify the proxy chain
  • skipCACheck – Do not check the CA
  • keepAliveLapse – Duration for keepAliveLapse (heartbeat like)
getDestinationService()
getServiceName()
listBulk(bulkId, token='', compress=True)

List the contents of a bulk

:type bulkId : any :param bulkId : Identification of the bulk to list :type token : string :param token : Token for the bulk :type compress : boolean :param compress : Enable compression for the bulk. By default its True :return : S_OK/S_ERROR

receiveBulk(destDir, bulkId, token='', compress=True)

Receive a bulk of files from server

:type destDir : list of ( string / file descriptor / file object ) :param destDir : Files to receive from server :type bulkId : any :param bulkId : Identification of the files being received :type token : string :param token : Token for the bulk :type compress : boolean :param compress : Enable compression for the bulk. By default its True :return : S_OK/S_ERROR

receiveFile(filename, fileId, token='')

Receive a file from the server

:type filename : string / file descriptor / file object :param filename : File to receive from server :type fileId : any :param fileId : Identification of the file being received :type token : string :param token : Optional token for the file :return : S_OK/S_ERROR

sendBulk(fileList, bulkId, token='', compress=True, bulkSize=-1, onthefly=True)

Send a bulk of files to server

:type fileList : list of ( string / file descriptor / file object ) :param fileList : Files to send to server :type bulkId : any :param bulkId : Identification of the files being sent :type token : string :param token : Token for the bulk :type compress : boolean :param compress : Enable compression for the bulk. By default its True :type bulkSize : integer :param bulkSize : Optional size of the bulk :return : S_OK/S_ERROR

sendFile(filename, fileId, token='')

Send a file to server

:type filename : string / file descriptor / file object :param filename : File to send to server :type fileId : any :param fileId : Identification of the file being sent :type token : string :param token : Optional token for the file :return : S_OK/S_ERROR