Replication Rule Methods — Rucio 0.3.8 documentation

# Replication Rule Methods

class `rucio.client.ruleclient.` `RuleClient`(rucio_host=None, auth_host=None, account=None, ca_cert=None, auth_type=None, creds=None, timeout=None, dq2_wrapper=False)

  Bases: `rucio.client.baseclient.BaseClient`

  RuleClient class for working with replication rules

  `RULE_BASEURL` = 'rules'
  `add_replication_rule`(dids, copies, rse_expression, weight=None, lifetime=None, grouping='DATASET', account=None, locked=False, source_replica_expression=None, activity=None, notify='N', purge_replicas=False, ignore_availability=False, comment=None)

    Parameters: | dids – The data identifier set. copies – The number of replicas. rse_expression – Boolean string expression to give the list of RSEs. weight – If the weighting option of the replication rule is used, the choice of RSEs takes their weight into account. lifetime – The lifetime of the replication rules (in seconds). grouping – ALL - All files will be replicated to the same RSE. DATASET - All files in the same dataset will be replicated to the same RSE. NONE - Files will be completely spread over all allowed RSEs without any grouping considerations at all. account – The account owning the rule. locked – If the rule is locked, it cannot be deleted. source_replica_expression – RSE Expression for RSEs to be considered for source replicas. activity – Transfer Activity to be passed to FTS. notify – Notification setting for the rule (Y, N, C). purge_replicas – When the rule gets deleted purge the associated replicas immediately. ignore_availability – Option to ignore the availability of RSEs. comment – Comment about the rule.

  `delete_replication_rule`(rule_id, purge_replicas=None)

    Deletes a replication rule and all associated locks.

    Parameters: | rule_id – The id of the rule to be deleted purge_replicas – Immediately delete the replicas.
    Raises: | RuleNotFound, AccessDenied

  `get_replication_rule`(rule_id)

    Get a replication rule.

    Parameters: | rule_id – The id of the rule to be retrieved.
    Raises: | RuleNotFound

  `reduce_replication_rule`(rule_id, copies, exclude_expression=None)

    Parameters: | rule_id – Rule to be reduced. copies – Number of copies of the new rule. exclude_expression – RSE Expression of RSEs to exclude. issuer – The issuing account of this operation
    Raises: | RuleReplaceFailed, RuleNotFound

  `update_replication_rule`(rule_id, options)

    Parameters: | rule_id – The id of the rule to be retrieved. options – Options dictionary.
    Raises: | RuleNotFound