Subscription Methods¶
- 
class 
rucio.client.subscriptionclient.SubscriptionClient(rucio_host=None, auth_host=None, account=None, ca_cert=None, auth_type=None, creds=None, timeout=600, user_agent='rucio-clients', vo=None)¶ Bases:
rucio.client.baseclient.BaseClientSubscriptionClient class for working with subscriptions
- 
SUB_BASEURL= 'subscriptions'¶ 
- 
add_subscription(name, account, filter, replication_rules, comments, lifetime, retroactive, dry_run, priority=3)¶ Adds a new subscription which will be verified against every new added file and dataset
- Parameters
 name – Name of the subscription
account (String) – Account identifier
filter (Dict) – Dictionary of attributes by which the input data should be filtered Example:
{'dsn': 'data11_hi*.express_express.*,data11_hi*physics_MinBiasOverlay*', 'account': 'tzero'}replication_rules (Dict) – Replication rules to be set : Dictionary with keys copies, rse_expression, weight, rse_expression
comments (String) – Comments for the subscription
lifetime (Integer or False) – Subscription’s lifetime (days); False if subscription has no lifetime
retroactive (Boolean) – Flag to know if the subscription should be applied on previous data
dry_run (Boolean) – Just print the subscriptions actions without actually executing them (Useful if retroactive flag is set)
priority (Integer) – The priority of the subscription (3 by default)
- Type
 String
- 
list_subscription_rules(account, name)¶ List the associated rules of a subscription.
- Parameters
 account – Account of the subscription.
name – Name of the subscription.
- 
list_subscriptions(name=None, account=None)¶ Returns a dictionary with the subscription information : Examples:
{'status': 'INACTIVE/ACTIVE/BROKEN', 'last_modified_date': ...}- Parameters
 name – Name of the subscription
account (String) – Account identifier
- Type
 String
- Returns
 Dictionary containing subscription parameter
- Return type
 Dict
- Raises
 exception.NotFound if subscription is not found
- 
update_subscription(name, account=None, filter=None, replication_rules=None, comments=None, lifetime=None, retroactive=None, dry_run=None, priority=None)¶ Updates a subscription
- Parameters
 name – Name of the subscription
account (String) – Account identifier
filter (Dict) – Dictionary of attributes by which the input data should be filtered Example:
{'dsn': 'data11_hi*.express_express.*,data11_hi*physics_MinBiasOverlay*', 'account': 'tzero'}replication_rules (Dict) – Replication rules to be set : Dictionary with keys copies, rse_expression, weight, rse_expression
comments (String) – Comments for the subscription
lifetime (Integer or False) – Subscription’s lifetime (days); False if subscription has no lifetime
retroactive (Boolean) – Flag to know if the subscription should be applied on previous data
dry_run (Boolean) – Just print the subscriptions actions without actually executing them (Useful if retroactive flag is set)
priority (Integer) – The priority of the subscription
- Type
 String
- Raises
 exception.NotFound if subscription is not found
-