Meta-data Methods — Rucio 1.12.2 documentation

# Meta-data Methods

class `rucio.client.metaclient.` `MetaClient`(rucio_host=None, auth_host=None, account=None, ca_cert=None, auth_type=None, creds=None, timeout=None, user_agent=’rucio-clients’)

  Bases: `rucio.client.baseclient.BaseClient`

  Meta client class for working with data identifier attributes

  `META_BASEURL` = ‘meta’
  `add_key`(key, key_type, value_type=None, value_regexp=None)

    Sends the request to add a new key.

    Parameters: | key – the name for the new key. key_type – the type of the key: all(container, dataset, file), collection(dataset or container), file, derived(compute from file for collection). value_type – the type of the value, if defined. value_regexp – the regular expression that values should match, if defined.
    Returns: | True if key was created successfully.
    Raises: | Duplicate – if key already exists.

  `add_value`(key, value)

    Sends the request to add a value to a key.

    Parameters: | key – the name for key. value – the value.
    Returns: | True if value was created successfully.
    Raises: | Duplicate – if valid already exists.

  `del_key`(key)

    Delete an allowed key.

    Parameters: | key – the name for key.

  `del_value`(key, value)

    Delete a value for a key.

    Parameters: | key – the name for key. value – the value.

  `list_keys`()

    Sends the request to list all keys.

    Returns: | a list containing the names of all keys.

  `list_values`(key)

    Sends the request to list all values for a key.

    Returns: | a list containing the names of all values for a key.

  `update_key`(key, type=None, regepx=None)

    Update a key.

    Parameters: | key – the name for key. type – the type of the value, if defined. regexp – the regular expression that values should match, if defined.