Lifetimeclient
LifetimeClient(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)
¶
Lifetime client class for working with Lifetime Model exceptions
Constructor of the BaseClient.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
rucio_host
|
Optional[str]
|
The address of the rucio server, if None it is read from the config file. |
None
|
rucio_port
|
The port of the rucio server, if None it is read from the config file. |
required | |
auth_host
|
Optional[str]
|
The address of the rucio authentication server, if None it is read from the config file. |
None
|
auth_port
|
The port of the rucio authentication server, if None it is read from the config file. |
required | |
account
|
Optional[str]
|
The account to authenticate to rucio. |
None
|
use_ssl
|
Enable or disable ssl for commucation. Default is enabled. |
required | |
ca_cert
|
Optional[str]
|
The path to the rucio server certificate. |
None
|
auth_type
|
Optional[str]
|
The type of authentication (e.g.: 'userpass', 'kerberos' ...) |
None
|
creds
|
Optional[dict[str, Any]]
|
Dictionary with credentials needed for authentication. |
None
|
user_agent
|
Optional[str]
|
Indicates the client. |
'rucio-clients'
|
vo
|
Optional[str]
|
The VO to authenticate into. |
None
|
logger
|
Logger
|
Logger object to use. If None, use the default LOG created by the module |
LOG
|
list_exceptions(exception_id=None, states=None)
¶
List exceptions to Lifetime Model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
The id of the exception |
required | |
states
|
Optional[Sequence[LifetimeExceptionsState]]
|
The states to filter |
None
|
add_exception(dids, account, pattern, comments, expires_at)
¶
Add exceptions to Lifetime Model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dids
|
list[dict[str, Any]]
|
The list of dids |
required |
account
|
str
|
The account of the requester. |
required |
pattern
|
str
|
The account. |
required |
comments
|
str
|
The comments associated to the exception. |
required |
expires_at
|
datetime
|
The expiration date of the exception. returns: The id of the exception. |
required |