Scopeclient
Classes¶
ScopeClient ¶
ScopeClient(
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,
)
Scope client class for working with rucio scopes
Functions¶
add_scope ¶
add_scope(account, scope)
Sends the request to add a new scope.
| PARAMETER | DESCRIPTION |
|---|---|
account
|
The name of the account to add the scope to.
TYPE:
|
scope
|
The name of the new scope.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
True if scope was created successfully.
|
|
| RAISES | DESCRIPTION |
|---|---|
Duplicate
|
If scope already exists. |
AccountNotFound
|
If account doesn't exist. |
list_scopes ¶
list_scopes()
Sends the request to list all scopes.
| RETURNS | DESCRIPTION |
|---|---|
A list containing the names of all scopes.
|
|
update_scope_ownership ¶
update_scope_ownership(account, scope)
Change the ownership of a scope
| PARAMETER | DESCRIPTION |
|---|---|
account
|
New account to assign as scope owner
TYPE:
|
scope
|
Scope to change ownership of
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the operation was successful |
| RAISES | DESCRIPTION |
|---|---|
AccountNotFound
|
If account doesn't exist. |
ScopeNotFound
|
If scope doesn't exist. |
(CannotAuthenticate, AccessDenied)
|
Insufficient permission/incorrect credentials to change ownership. |
list_scopes_for_account ¶
list_scopes_for_account(account)
Sends the request to list all scopes for a rucio account.
| PARAMETER | DESCRIPTION |
|---|---|
account
|
The rucio account to list scopes for.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
A list containing the names of all scopes for a rucio account.
|
|
| RAISES | DESCRIPTION |
|---|---|
AccountNotFound
|
If account doesn't exist. |
ScopeNotFound
|
If no scopes exist for account. |