TSCatalogClient

TSCatalogClient class represents the Transformation Manager service as a DIRAC Catalog service

class DIRAC.Resources.Catalog.TSCatalogClient.TSCatalogClient(url=None, **kwargs)

Bases: DIRAC.Resources.Catalog.FileCatalogClientBase.FileCatalogClientBase

Exposes the catalog functionality available in the DIRAC/TransformationHandler

ADMIN_METHODS = []
NO_LFN_METHODS = ['setMetadata']
READ_METHODS = ['hasAccess', 'exists', 'getPathPermissions']
WRITE_METHODS = ['addFile', 'removeFile', 'setMetadata']
__init__(url=None, **kwargs)

Constructor function.

addFile(**kwargs)
executeRPC(*parms, **kws)

This method extracts some parameters from kwargs that are used as parameter of the constructor or RPCClient. Unfortunately, only a few of all the available parameters of BaseClient are exposed.

Parameters:
  • rpc – if an RPC client is passed, use that one
  • timeout – we can change the timeout on a per call bases. Default 120 s
  • url – We can specify which url to use
exists(**kwargs)
classmethod getInterfaceMethods()

Get the methods implemented by the File Catalog client

Return tuple:( read_methods_list, write_methods_list, nolfn_methods_list )
getPathPermissions(**kwargs)
getServer()

Getter for the server url. Useful ?

hasAccess(**kwargs)
classmethod hasCatalogMethod(methodName)

Check of a method with the given name is implemented :param str methodName: the name of the method to check :return: boolean Flag True if the method is implemented

isOK(timeout=120)

Check that the service is OK

removeFile(**kwargs)
setMetadata(path, metadatadict)

Set metadata parameter for the given path :return Successful/Failed dict.

setServer(url)

Set the server URL used by default

Parameters:url – url of the service
setTimeout(timeout)

Specify the timeout of the call. Forwarded to RPCClient

Parameters:timeout – guess…