Ruleclient
Classes¶
RuleClient ¶
RuleClient(
rucio_host=None,
auth_host=None,
account=None,
ca_cert=None,
auth_type=None,
creds=None,
timeout=600,
user_agent="rucio-clients",
vo=None,
logger=LOG,
)
RuleClient class for working with replication rules
Functions¶
add_replication_rule ¶
add_replication_rule(
dids,
copies,
rse_expression,
priority=3,
lifetime=None,
grouping="DATASET",
notify="N",
source_replica_expression=None,
activity=None,
account=None,
meta=None,
ignore_availability=False,
purge_replicas=False,
ask_approval=False,
asynchronous=False,
locked=False,
delay_injection=None,
comment=None,
weight=None,
)
PARAMETER | DESCRIPTION |
---|---|
dids
|
The data identifier set.
TYPE:
|
copies
|
The number of replicas.
TYPE:
|
rse_expression
|
Boolean string expression to give the list of RSEs.
TYPE:
|
priority
|
Priority of the transfers.
TYPE:
|
lifetime
|
The lifetime of the replication rules (in seconds).
TYPE:
|
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.
TYPE:
|
notify
|
Notification setting for the rule (Y, N, C).
TYPE:
|
source_replica_expression
|
RSE Expression for RSEs to be considered for source replicas.
TYPE:
|
activity
|
Transfer Activity to be passed to FTS.
TYPE:
|
account
|
The account owning the rule.
TYPE:
|
meta
|
Metadata, as dictionary.
TYPE:
|
ignore_availability
|
Option to ignore the availability of RSEs.
TYPE:
|
purge_replicas
|
When the rule gets deleted purge the associated replicas immediately.
TYPE:
|
ask_approval
|
Ask for approval of this replication rule.
TYPE:
|
asynchronous
|
Create rule asynchronously by judge-injector.
TYPE:
|
locked
|
If the rule is locked, it cannot be deleted.
TYPE:
|
delay_injection
|
TYPE:
|
comment
|
Comment about the rule.
TYPE:
|
weight
|
If the weighting option of the replication rule is used, the choice of RSEs takes their weight into account.
TYPE:
|
delete_replication_rule ¶
delete_replication_rule(rule_id, purge_replicas=None)
Deletes a replication rule and all associated locks.
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
The id of the rule to be deleted
TYPE:
|
purge_replicas
|
Immediately delete the replicas.
TYPE:
|
get_replication_rule ¶
get_replication_rule(rule_id)
Get a replication rule.
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
The id of the rule to be retrieved.
TYPE:
|
update_replication_rule ¶
update_replication_rule(rule_id, options)
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
The id of the rule to be retrieved.
TYPE:
|
options
|
Options dictionary.
TYPE:
|
reduce_replication_rule ¶
reduce_replication_rule(
rule_id, copies, exclude_expression=None
)
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
Rule to be reduced.
TYPE:
|
copies
|
Number of copies of the new rule.
TYPE:
|
exclude_expression
|
RSE Expression of RSEs to exclude.
TYPE:
|
move_replication_rule ¶
move_replication_rule(rule_id, rse_expression, override)
Move a replication rule to another RSE and, once done, delete the original one.
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
Rule to be moved.
TYPE:
|
rse_expression
|
RSE expression of the new rule.
TYPE:
|
override
|
Configurations to update for the new rule.
TYPE:
|
approve_replication_rule ¶
approve_replication_rule(rule_id)
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
Rule to be approved.
TYPE:
|
deny_replication_rule ¶
deny_replication_rule(rule_id, reason=None)
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
Rule to be denied.
TYPE:
|
reason
|
Reason for denying the rule.
TYPE:
|
list_replication_rule_full_history ¶
list_replication_rule_full_history(scope, name)
List the rule history of a DID.
PARAMETER | DESCRIPTION |
---|---|
scope
|
The scope of the DID.
TYPE:
|
name
|
The name of the DID.
TYPE:
|
examine_replication_rule ¶
examine_replication_rule(rule_id)
Examine a replication rule for errors during transfer.
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
Rule to be denied.
TYPE:
|
list_replica_locks ¶
list_replica_locks(rule_id)
List details of all replica locks for a rule.
PARAMETER | DESCRIPTION |
---|---|
rule_id
|
Rule to be denied.
TYPE:
|
list_replication_rules ¶
list_replication_rules(filters=None)
List all replication rules which match a filter
PARAMETER | DESCRIPTION |
---|---|
filters
|
dictionary of attributes by which the rules should be filtered
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Iterator[dict[str, Any]]
|
True if successful, otherwise false. |