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)[source]

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)[source]
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 hours).
  • 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.
delete_replication_rule(rule_id)[source]

Deletes a replication rule and all associated locks.

Parameters:rule_id – The id of the rule to be deleted
Raises:RuleNotFound, AccessDenied
get_replication_rule(rule_id)[source]

Get a replication rule.

Parameters:rule_id – The id of the rule to be retrieved.
Raises:RuleNotFound
update_lock_state(rule_id, lock_state)[source]
Parameters:
  • rule_id – The id of the rule to be retrieved.
  • lock_state – If the rule is locked, it cannot be deleted.
Raises:

RuleNotFound

Rucio logo

Previous topic

Replica Methods

Next topic

Lock Methods

This Page