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
add_scope(account, scope)
¶
Sends the request to add a new scope.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
account
|
str
|
the name of the account to add the scope to. |
required |
scope
|
str
|
the name of the new scope. |
required |
Returns:
Type | Description |
---|---|
bool
|
True if scope was created successfully. |
Raises:
Type | Description |
---|---|
Duplicate
|
if scope already exists. |
AccountNotFound
|
if account doesn't exist. |
list_scopes()
¶
Sends the request to list all scopes.
Returns:
Type | Description |
---|---|
list[str]
|
a list containing the names of all scopes. |
list_scopes_for_account(account)
¶
Sends the request to list all scopes for a rucio account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
account
|
str
|
the rucio account to list scopes for. |
required |
Returns:
Type | Description |
---|---|
list[str]
|
a list containing the names of all scopes for a rucio account. |
Raises:
Type | Description |
---|---|
AccountNotFound
|
if account doesn't exist. |
ScopeNotFound
|
if no scopes exist for account. |