FileCatalogClientBase

FileCatalogClientBase is a base class for the clients of file catalog-like services built within the DIRAC framework.

The class contains variables defining lists of implemented catalog methods READ_METHODS WRITE_METHODS NO_LFN_METHODS ADMIN_METHODS

Those lists must be complemented in the derived classes to include specific implemented methods.

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

Bases: DIRAC.Core.Base.Client.Client

Client code to the DIRAC File Catalogue

ADMIN_METHODS = []
NO_LFN_METHODS = []
READ_METHODS = ['hasAccess', 'exists', 'getPathPermissions']
WRITE_METHODS = []
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

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…