Privileges

Privileges that can be granted by user to tasks and pools

class qarnot.privileges.Privileges(exportCredentialsInEnv: bool = False)[source]

Bases: object

Represents task privileges.

__init__(exportCredentialsInEnv: bool = False)[source]

Create a new Privileges.

Parameters

exportCredentialsInEnv (bool) – if the task should export its api and storage credentials to its environment. Default is False.

classmethod from_json(json: Dict[str, bool])[source]

Create the privileges from json.

Parameters

json (dict) – Dictionary representing the privileges

Returns

The created Privileges

to_json() Dict[str, bool][source]

Get a dict ready to be json packed.

Returns

the json elements of the class.

Return type

dict