MultiVOFileMetadata

DIRAC Multi VO FileCatalog plugin class to manage file metadata for multiple VO.

class DIRAC.DataManagementSystem.DB.FileCatalogComponents.FileMetadata.MultiVOFileMetadata.MultiVOFileMetadata(database=None)

Bases: FileMetadata

Multi-VO FileCatalog plugin implementation.

__init__(database=None)
addMetadataField(pName, pType, credDict)

Add a new metadata parameter to the Metadata Database. Modified to use fully qualified metadata names.

Parameters:
  • pName (str) – parameter name

  • pType (str) – parameter type in the MySQL notation

  • credDict (dict) – client credential dictionary

Returns:

standard Dirac result object

deleteMetadataField(pName, credDict)

Remove metadata field. Table name is now fully qualified

Parameters:
  • pName (str) – parameter name

  • credDict (dict) – client credential dictionary

Returns:

standard Dirac result object

findFilesByMetadata(metaDict, path, credDict)

Find Files satisfying the given metadata

Parameters:
  • metaDict (dict) – dictionary with the metaquery parameters

  • path (str) – Path to search into

  • credDict (dict) – Dictionary with the user credentials

Returns:

S_OK/S_ERROR, Value ID:LFN dictionary of selected files

getFileMetaParameters(path, credDict)

Get meta parameters for the given file

Parameters:
  • path (str) – file name

  • credDict (dict) – client credential dictionary

Returns:

S_OK/S_ERROR, Value - dict of meta parameters

getFileMetadataFields(credDict)

Get all the defined metadata fields

Parameters:

credDict (dict) – client credential dictionary

Returns:

standard Dirac result object

getFileUserMetadata(path, credDict)

Get metadata for the given file.

Parameters:
  • path (str) – file path

  • credDict (dict) – client credential dictionary

Returns:

standard Dirac result object

removeMetadata(dPath, metaList, credDict)

Remove the specified metadata for the given directory for users own VO.

Parameters:
  • dPath (str) – directory path

  • metaList (dict) – metadata names list

  • credDict (dict) – client credential dictionary

Returns:

standard Dirac result object

setDatabase(database)
setFileMetaParameter(path, metaName, metaValue, credDict)

Set an meta parameter - metadata which is not used in the the data search operations.

Parameters:
  • path (str) – directory path

  • metaName (str) – metadata name

  • metaValue (str) – metadata value

  • credDict (dict) – client credential dictionary

Returns:

standard Dirac result object

setMetadata(dPath, metaDict, credDict)

Set the value of a given metadata field for the the given directory path

Parameters:
  • dPath (str) – directory path

  • metaDict (dict) – dictionary with the user metadata

  • credDict (dict) – client credential dictionary

Returns:

standard Dirac result object