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
Optional[bool]

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
Optional[list[str]]

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).

.

    :return: 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.

TYPE: str

RETURNS DESCRIPTION
Optional[bool]

True if value was created successfully.

RAISES DESCRIPTION
Duplicate

if valid already exists.

del_value
del_value(key, value)

Delete a key in the DID Metadata Conventions table.

PARAMETER DESCRIPTION
key

the name for key.

value

the value.

del_key
del_key(key)

Delete an allowed key.

PARAMETER DESCRIPTION
key

the name for key.

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

Update a key.

PARAMETER DESCRIPTION
key

the name for key.

type_

the type of the value, if defined.

DEFAULT: None

regexp

the regular expression that values should match, if defined.

DEFAULT: None

Functions