commit
Implement the following REST endpoints.
- *Create a dataset.
- *Register files to a dataset.
- *Update transformation status of file replicas.
- Fetch active replications.
- Fetch upcoming replications.
- Fetch datasets.
- Fetch content of a dataset.
add_file_replicas
async
¶
Add file replicas.
attach_datasets
async
¶
Attach two datasets.
create_storage_element
async
¶
Create a storage element.
detach_datasets
async
¶
Detach two datasets.
register_files
async
¶
Register files to a dataset.
scout_sync_storage_element
async
¶
Scout sync creates replicas for existing files missing in Datatrail.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
PSQL Session
|
Postgres session. |
required |
name
|
str
|
Dataset name. |
required |
scope
|
str
|
Dataset scope. |
required |
data
|
Dict[str, str]
|
Dictionary containing the file name and md5sum at se. |
required |
Raises:
Type | Description |
---|---|
DatasetNotFoundError
|
If the dataset is not found in the database. |
Returns:
Name | Type | Description |
---|---|---|
None |
None
|
None. |
toggle_storage_element_state
async
¶
Toggle state of storage element.
update_deletion_policy
async
¶
update_deletion_policy(session, scope, name, deletion_policy, test_mode=False, propagate_policy=True)
Update the deletion policy of a dataset.
update_deletion_state
async
¶
Update the deletion state and time of the replica.
update_deletion_status_full_dataset
async
¶
Update the transformation status of the file replicas.
update_replication_policy
async
¶
update_replication_policy(session, scope, name, replication_policy, test_mode=False, propagate_policy=True)
Update the replication policy of a dataset.
update_replication_state
async
¶
Update the replication state and time of the replica.
update_transformation_status
async
¶
Update the transformation status of the file replica.
validate_policies
¶
Validate policies.
Ensure that each preferred storage element has a deletion policy.