DatasetManager

DIRAC FileCatalog plug-in class to manage dynamic datasets defined by a metadata query

class DIRAC.DataManagementSystem.DB.FileCatalogComponents.DatasetManager.DatasetManager(database=None)

Bases: object

__init__(database=None)

x.__init__(…) initializes x; see help(type(x)) for signature

addDataset(datasets, credDict)
Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure

addDatasetAnnotation(datasets, credDict)

Add annotation to the given dataset

checkDataset(datasets, credDict)

Check that the dataset parameters correspond to the actual state

Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure

freezeDataset(datasets, credDict)

Freeze the contents of datasets

Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure

getDatasetAnnotation(datasets, credDict={})

Get annotations for the given datasets

getDatasetFiles(datasets, credDict)

Get dataset file contents

Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure

getDatasetParameters(datasets, credDict)

Get dataset definitions

Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure

getDatasetStatus(datasetName, credDict)

Get status of the given dataset

getDatasets(datasets, credDict)

Get dataset definitions

Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure

getDatasetsInDirectory(dirID, verbose=False, connection=False)

Get datasets in the given directory

releaseDataset(datasets, credDict)

Unfreeze datasets

Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure

removeDataset(datasets, credDict)

Remove the requested datasets

Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure

setDatabase(database)
setDatasetStatus(datasetName, status)

Set the given dataset status

updateDataset(datasets, credDict)
Parameters:
  • datasets (dict) – dictionary describing dataset definitions
  • credDict – dictionary of the caller credentials
Returns:

S_OK/S_ERROR bulk return structure