Skip to main content

SubscriptionClient

add_subscription

Adds a new subscription which will be verified against every new added file and dataset

Arguments:

name: Name of the subscription

account: Account identifier

filter_: 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: Replication rules to be set : Dictionary with keys copies, rse_expression, weight, rse_expression

comments: Comments for the subscription

lifetime: Subscription's lifetime (days); False if subscription has no lifetime

retroactive: Flag to know if the subscription should be applied on previous data

dry_run: Just print the subscriptions actions without actually executing them (Useful if retroactive flag is set)

priority: The priority of the subscription (3 by default)

list_subscriptions

Returns a dictionary with the subscription information :

Examples: \{'status': 'INACTIVE/ACTIVE/BROKEN', 'last_modified_date': ...\}

Arguments:

name: Name of the subscription

account: Account identifier

Raises:

``: exception.NotFound if subscription is not found

Returns:

Dictionary containing subscription parameter

update_subscription

Updates a subscription

Arguments:

name: Name of the subscription

account: Account identifier

filter_: 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: Replication rules to be set : Dictionary with keys copies, rse_expression, weight, rse_expression

comments: Comments for the subscription

lifetime: Subscription's lifetime (days); False if subscription has no lifetime

retroactive: Flag to know if the subscription should be applied on previous data

dry_run: Just print the subscriptions actions without actually executing them (Useful if retroactive flag is set)

priority: The priority of the subscription

Raises:

``: exception.NotFound if subscription is not found

list_subscription_rules

List the associated rules of a subscription.

Arguments:

account: Account of the subscription.

name: Name of the subscription.