Example #1
0
def replication_task_replicates_target_dataset(
        replication_task: ReplicationTask, dataset: str):
    return belongs_to_tree(dataset, replication_task.target_dataset,
                           replication_task.recursive, [
                               get_target_dataset(replication_task, exclude)
                               for exclude in replication_task.exclude
                           ])
Example #2
0
def replication_task_replicates_target_dataset(replication_task: ReplicationTask, dataset: str):
    return any(
        belongs_to_tree(dataset, get_target_dataset(replication_task, source_dataset), replication_task.recursive,
                        [get_target_dataset(replication_task, exclude) for exclude in replication_task.exclude])
        for source_dataset in replication_task.source_datasets
    )
Example #3
0
def replication_task_should_replicate_dataset(replication_task: ReplicationTask, dataset: str):
    return any(
        belongs_to_tree(dataset, source_dataset, replication_task.recursive,
                        replication_task.exclude)
        for source_dataset in replication_task.source_datasets
    )
Example #4
0
 def owns_dataset(self, dataset: str):
     return belongs_to_tree(dataset, self.periodic_snapshot_task.dataset, self.periodic_snapshot_task.recursive,
                            self.periodic_snapshot_task.exclude)