Skip to main content

DIDClient

list_dids

List all data identifiers in a scope which match a given pattern.

Arguments:

scope: The scope name.

filters: A nested dictionary of key/value pairs like [{'key1': 'value1', 'key2.lte': 'value2'}, {'key3.gte, 'value3'}]. Keypairs in the same dictionary are AND'ed together, dictionaries are OR'ed together. Keys should be suffixed like <key>.<operation>, e.g. key1 >= value1 is equivalent to {'key1.gte': value}, where <operation> belongs to one of the set {'lte', 'gte', 'gt', 'lt', 'ne' or ''}. Equivalence doesn't require an operator.

did_type: The type of the did: 'all'(container, dataset or file)|'collection'(dataset or container)|'dataset'|'container'|'file'

long: Long format option to display more information for each DID.

recursive: Recursively list DIDs content.

list_dids_extended

List all data identifiers in a scope which match a given pattern (DEPRECATED)

add_did

Add data identifier for a dataset or container.

Arguments:

scope: The scope name.

name: The data identifier name.

did_type: The data identifier type (dataset|container).

statuses: Dictionary with statuses, e.g. {'monotonic':True}.

meta: Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.

rules: Replication rules associated with the data identifier. A list of dictionaries, e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].

lifetime: DID's lifetime (in seconds).

dids: The content.

rse: The RSE name when registering replicas.

add_dids

Bulk add datasets/containers.

add_dataset

Add data identifier for a dataset.

Arguments:

scope: The scope name.

name: The data identifier name.

statuses: Dictionary with statuses, e.g.g {'monotonic':True}.

meta: Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.

rules: Replication rules associated with the data identifier. A list of dictionaries, e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].

lifetime: DID's lifetime (in seconds).

files: The content.

rse: The RSE name when registering replicas.

add_datasets

Bulk add datasets.

Arguments:

dsns: A list of datasets.

add_container

Add data identifier for a container.

Arguments:

scope: The scope name.

name: The data identifier name.

statuses: Dictionary with statuses, e.g.g {'monotonic':True}.

meta: Meta-data associated with the data identifier is represented using key/value pairs in a dictionary.

rules: Replication rules associated with the data identifier. A list of dictionaries, e.g., [{'copies': 2, 'rse_expression': 'TIERS1'}, ].

lifetime: DID's lifetime (in seconds).

add_containers

Bulk add containers.

Arguments:

cnts: A list of containers.

attach_dids

Attach data identifier.

Arguments:

scope: The scope name.

name: The data identifier name.

dids: The content.

rse: The RSE name when registering replicas.

detach_dids

Detach data identifier

Arguments:

scope: The scope name.

name: The data identifier name.

dids: The content.

attach_dids_to_dids

Add dids to dids.

Arguments:

attachments: The attachments. attachments is: [attachment, attachment, ...] attachment is: {'scope': scope, 'name': name, 'dids': dids} dids is: [{'scope': scope, 'name': name}, ...]

ignore_duplicate: If True, ignore duplicate entries.

add_files_to_datasets

Add files to datasets.

Arguments:

attachments: The attachments. attachments is: [attachment, attachment, ...] attachment is: {'scope': scope, 'name': name, 'dids': dids} dids is: [{'scope': scope, 'name': name}, ...]

ignore_duplicate: If True, ignore duplicate entries.

add_datasets_to_containers

Add datasets_to_containers.

Arguments:

attachments: The attachments. attachments is: [attachment, attachment, ...] attachment is: {'scope': scope, 'name': name, 'dids': dids} dids is: [{'scope': scope, 'name': name}, ...]

add_containers_to_containers

Add containers_to_containers.

Arguments:

attachments: The attachments. attachments is: [attachment, attachment, ...] attachment is: {'scope': scope, 'name': name, 'dids': dids} dids is: [{'scope': scope, 'name': name}, ...]

add_files_to_dataset

Add files to datasets.

Arguments:

scope: The scope name.

name: The dataset name.

files: The content.

rse: The RSE name when registering replicas.

add_files_to_archive

Add files to archive.

Arguments:

scope: The scope name.

name: The dataset name.

files: The content.

add_datasets_to_container

Add datasets to container.

Arguments:

scope: The scope name.

name: The dataset name.

dsns: The content.

add_containers_to_container

Add containers to container.

Arguments:

scope: The scope name.

name: The dataset name.

cnts: The content.

list_content

List data identifier contents.

Arguments:

scope: The scope name.

name: The data identifier name.

list_content_history

List data identifier contents history.

Arguments:

scope: The scope name.

name: The data identifier name.

list_files

List data identifier file contents.

Arguments:

scope: The scope name.

name: The data identifier name.

long: A boolean to choose if GUID is returned or not.

bulk_list_files

List data identifier file contents.

Arguments:

dids: The list of DIDs.

get_did

Retrieve a single data identifier.

Arguments:

scope: The scope name.

name: The data identifier name.

dynamic_depth: The DID type as string ('FILE'/'DATASET') at which to stop the dynamic length/bytes calculation. If not set, the size will not be computed dynamically.

dynamic: (Deprecated) same as dynamic_depth = 'FILE'

get_metadata

Get data identifier metadata

Arguments:

scope: The scope name.

name: The data identifier name.

plugin: Backend Metadata plugin the Rucio server should use to query data.

get_metadata_bulk

Bulk get data identifier metadata

Arguments:

inherit: A boolean. If set to true, the metadata of the parent are concatenated.

dids: A list of dids.

set_metadata

Set data identifier metadata

Arguments:

scope: The scope name.

name: The data identifier name.

key: the key.

value: the value.

recursive: Option to propagate the metadata change to content.

set_metadata_bulk

Set data identifier metadata in bulk.

Arguments:

scope: The scope name.

name: The data identifier name.

meta: the metadata key-values.

recursive: Option to propagate the metadata change to content.

set_dids_metadata_bulk

Set metadata to a list of data identifiers.

Arguments:

dids: A list of dids including metadata, i.e. [{'scope': scope1, 'name': name1, 'meta': {key1: value1, key2: value2}] .

recursive: Option to propagate the metadata update to content.

set_status

Set data identifier status

Arguments:

scope: The scope name.

name: The data identifier name.

kwargs: Keyword arguments of the form status_name=value.

close

close dataset/container

Arguments:

scope: The scope name.

name: The dataset/container name.

delete_metadata

Delete data identifier metadata

Arguments:

scope: The scope name.

name: The data identifier.

key: the key.

list_did_rules

List the associated rules of a data identifier.

Arguments:

scope: The scope name.

name: The data identifier name.

list_associated_rules_for_file

List the associated rules a file is affected from..

Arguments:

scope: The scope name.

name: The file name.

get_dataset_by_guid

Get the parent datasets for a given GUID.

Arguments:

guid: The GUID.

Returns:

A did

scope_list

List data identifiers in a scope.

Arguments:

scope: The scope name.

name: The data identifier name.

recursive: boolean, True or False.

list_parent_dids

List parent dataset/containers of a did.

Arguments:

scope: The scope.

name: The name.

create_did_sample

Create a sample from an input collection.

Arguments:

input_scope: The scope of the input DID.

input_name: The name of the input DID.

output_scope: The scope of the output dataset.

output_name: The name of the output dataset.

account: The account.

nbfiles: The number of files to register in the output dataset.

resurrect

Resurrect a list of dids.

Arguments:

dids: A list of dids [{'scope': scope, 'name': name}, ...]

list_archive_content

List archive contents.

Arguments:

scope: The scope name.

name: The data identifier name.