Skip to content

commit

Implement the following REST endpoints.

  1. *Create a dataset.
  2. *Register files to a dataset.
  3. *Update transformation status of file replicas.
  4. Fetch active replications.
  5. Fetch upcoming replications.
  6. Fetch datasets.
  7. Fetch content of a dataset.

add_file_replicas async

Python
add_file_replicas(session, payload, test_mode=False)

Add file replicas.

attach_datasets async

Python
attach_datasets(session, payload, test_mode=False)

Attach two datasets.

create_dataset async

Python
create_dataset(session, payload, test_mode=False)

Create a dataset.

create_storage_element async

Python
create_storage_element(session, payload)

Create a storage element.

detach_datasets async

Python
detach_datasets(session, payload, test_mode=False)

Detach two datasets.

register_files async

Python
register_files(session, payload, test_mode=False)

Register files to a dataset.

scout_sync_storage_element async

Python
scout_sync_storage_element(session, name, scope, data, replicate_to)

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

Python
toggle_storage_element_state(session, name)

Toggle state of storage element.

update_deletion_policy async

Python
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

Python
update_deletion_state(replica, deletion_state)

Update the deletion state and time of the replica.

update_deletion_status_full_dataset async

Python
update_deletion_status_full_dataset(session, payload, test_mode=False)

Update the transformation status of the file replicas.

update_replication_policy async

Python
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

Python
update_replication_state(storage_map, replica, replication_state)

Update the replication state and time of the replica.

update_transformation_status async

Python
update_transformation_status(session, payload, test_mode=False)

Update the transformation status of the file replica.

validate_policies

Python
validate_policies(replication_policy, deletion_policy)

Validate policies.

Ensure that each preferred storage element has a deletion policy.