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:
|
key_type
|
the type of the key: all(container, dataset, file), collection(dataset or container), file, derived(compute from file for collection).
TYPE:
|
value_type
|
the type of the value, if defined.
TYPE:
|
value_regexp
|
the regular expression that values should match, if defined.
TYPE:
|
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:
|
value
|
the value.
TYPE:
|
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.
|
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:
|
regexp
|
the regular expression that values should match, if defined.
DEFAULT:
|