Skip to main content

AccountClient

add_account

Sends the request to create a new account.

Arguments:

account: the name of the account.

type_: The account type

email: The Email address associated with the account.

Raises:

Duplicate: if account already exists.

Returns:

True if account was created successfully else False.

delete_account

Sends the request to disable an account.

Arguments:

account: the name of the account.

Raises:

AccountNotFound: if account doesn't exist.

Returns:

True is account was disabled successfully. False otherwise.

get_account

Sends the request to get information about a given account.

Arguments:

account: the name of the account.

Raises:

AccountNotFound: if account doesn't exist.

Returns:

a list of attributes for the account. None if failure.

update_account

Update a property of an account.

Arguments:

account: Name of the account.

key: Account property like status.

value: Property value.

list_accounts

Sends the request to list all rucio accounts.

Arguments:

type: The account type

identity: The identity key name. For example x509 DN, or a username.

filters: A dictionnary key:account attribute to use for the filtering

Raises:

AccountNotFound: if account doesn't exist.

Returns:

a list containing account info dictionary for all rucio accounts.

whoami

Get information about account whose token is used

Raises:

AccountNotFound: if account doesn't exist.

Returns:

a list of attributes for the account. None if failure.

add_identity

Adds a membership association between identity and account.

Arguments:

account: The account name.

identity: The identity key name. For example x509 DN, or a username.

authtype: The type of the authentication (x509, gss, userpass).

default: If True, the account should be used by default with the provided identity.

email: The Email address associated with the identity.

password: Password if authtype is userpass.

del_identity

Delete an identity's membership association with an account.

Arguments:

account: The account name.

identity: The identity key name. For example x509 DN, or a username.

authtype: The type of the authentication (x509, gss, userpass).

default: If True, the account should be used by default with the provided identity.

list_identities

List all identities on an account.

Arguments:

account: The account name.

list_account_rules

List the associated rules of an account.

Arguments:

account: The account name.

get_account_limits

Return the correct account limits for the given locality.

Arguments:

account: The account name.

rse_expression: Valid RSE expression

locality: The scope of the account limit. 'local' or 'global'.

get_global_account_limit

List the account limit for the specific RSE expression.

Arguments:

account: The account name.

rse_expression: The rse expression.

get_global_account_limits

List all RSE expression limits of this account.

Arguments:

account: The account name.

get_local_account_limits

List the account rse limits of this account.

Arguments:

account: The account name.

get_local_account_limit

List the account rse limits of this account for the specific rse.

Arguments:

account: The account name.

rse: The rse name.

get_local_account_usage

List the account usage for one or all rses of this account.

Arguments:

account: The account name.

rse: The rse name.

get_global_account_usage

List the account usage for one or all RSE expressions of this account.

Arguments:

account: The account name.

rse_expression: The rse expression.

get_account_usage_history

List the account usage history of this account on rse.

Arguments:

account: The account name.

rse: The rse name.

list_account_attributes

List the attributes for an account.

Arguments:

account: The account name.

add_account_attribute

Adds an attribute to an account.

Arguments:

account: The account name.

key: The attribute key.

value: The attribute value.

delete_account_attribute

Delete an attribute for an account.

Arguments:

account: The account name.

key: The attribute key.