Skip to content

Metaconventionsclient

Classes

MetaConventionClient

MetaConventionClient(
    rucio_host=None,
    auth_host=None,
    account=None,
    ca_cert=None,
    auth_type=None,
    creds=None,
    timeout=600,
    user_agent="rucio-clients",
    vo=None,
    logger=LOG,
)

Metadata client class for working with data identifier attributes

Functions

add_key
add_key(key, key_type, value_type=None, value_regexp=None)

Sends the request to add an allowed key for DID metadata (update the DID Metadata Conventions table with a new key).

PARAMETER DESCRIPTION
key

The name for the new key.

TYPE: str

key_type

The type of the key: all(container, dataset, file), collection(dataset or container), file, derived(compute from file for collection).

TYPE: Union[KeyType, str]

value_type

The type of the value, if defined.

TYPE: Optional[str] DEFAULT: None

value_regexp

The regular expression that values should match, if defined.

TYPE: Optional[str] DEFAULT: None

RETURNS DESCRIPTION
True if key was created successfully.
RAISES DESCRIPTION
Duplicate

If key already exists..

list_keys
list_keys()

Sends the request to list all keys for DID Metadata Conventions.

RETURNS DESCRIPTION
A list containing the names of all keys.
list_values
list_values(key)

Sends the request to lists all allowed values for a DID key (all values for a key in DID Metadata Conventions).

RETURNS DESCRIPTION
A list containing the names of all values for a key
add_value
add_value(key, value)

Sends the request to add a value for a key in DID Metadata Convention.

PARAMETER DESCRIPTION
key

The name for key.

TYPE: str

value

The value to be added.

TYPE: str

RETURNS DESCRIPTION
True if value was created successfully.
RAISES DESCRIPTION
Duplicate

If value already exists.

del_value
del_value(key, value)

Delete a key in the DID Metadata Conventions table.

PARAMETER DESCRIPTION
key

The name for the key

value

The value

del_key
del_key(key)

Delete an allowed key.

PARAMETER DESCRIPTION
key

The name for the key.

update_key
update_key(key, type_=None, regexp=None)

Update a key.

PARAMETER DESCRIPTION
key

The name for the key.

type_

The type of the value, if defined.

DEFAULT: None

regexp

The regular expression that values should match, if defined.

DEFAULT: None

Functions