Vault
- Canonical Telco
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/edge | 89 | 31 Jan 2024 | |
latest/edge | 9 | 27 Jan 2023 | |
1.16/stable | 280 | 04 Oct 2024 | |
1.16/candidate | 280 | 04 Oct 2024 | |
1.16/beta | 280 | 04 Oct 2024 | |
1.16/edge | 291 | 19 Nov 2024 | |
1.15/stable | 248 | 24 Jul 2024 | |
1.15/candidate | 248 | 24 Jul 2024 | |
1.15/beta | 248 | 24 Jul 2024 | |
1.15/edge | 248 | 10 Jul 2024 |
juju deploy vault-k8s --channel 1.16/stable
Deploy Kubernetes operators easily with Juju, the Universal Operator Lifecycle Manager. Need a Kubernetes cluster? Install MicroK8s to create a full CNCF-certified Kubernetes system in under 60 seconds.
Platform:
charms.vault_k8s.v0.juju_facade
-
- Last updated 19 Nov 2024
- Revision Library version 0.1
This library provides a wrapper of the Juju API.
Index
class FacadeError
Description
Base class for custom errors raised by this library. None
class TransientJujuError
Description
Exception raised for transient Juju errors like ModelError. None
class SecretValidationError
Description
Exception raised for secret validation errors. None
class NoSuchSecretError
Description
Exception raised when a secret does not exist. None
class SecretRemovedError
Description
Exception raised when a secret does not exist anymore. None
class NoSuchRelationError
Description
Exception raised when a relation does not exist. None
class InvalidRelationDataError
Description
Exception raised when relation data is invalid. None
class NotLeaderError
Description
Exception raised when the unit is not leader. None
class NoSuchStorageError
Description
Exception raised when a storage does not exist. None
class SecretAccessDeniedError
Description
Exception raised if the charm does not have permission to access the secret. None
class JujuFacade
Description
Juju API wrapper class. None
Methods
JujuFacade. __init__( self , charm: CharmBase )
JujuFacade. get_secret( self , label: str , id )
Retrieve a secret and handles error.
JujuFacade. secret_exists( self , label: str , id )
Check if the secret exists.
Description
Raises: TransientJujuError
JujuFacade. secret_exists_with_fields( self , fields , label: str , id )
Check if the secret exists and has the required fields.
Description
Args: fields: The requested fields label: The secret label id: The secret id
Returns: True if the secret exists and has the required fields, False otherwise
Raises: TransientJujuError
JujuFacade. get_current_secret_content( self , label: str , id )
Get secret content if the secret exists and return currently tracked revision.
Description
Raises: TransientJujuError NoSuchSecretError SecretRemovedError
JujuFacade. get_latest_secret_content( self , label: str , id )
Get secret content if the secret exists and return latest revision.
Description
Raises: TransientJujuError NoSuchSecretError SecretRemovedError
JujuFacade. get_secret_content_values( self )
Get secret content values by keys.
Description
Args: keys: Keys of the requested values label: The secret label id: The secret id
Returns: tuple[str | None, ...]: The secret content values, if a key is not found, None is returned for its value
Raises: TransientJujuError NoSuchSecretError SecretRemovedError
JujuFacade. set_app_secret_content( self , content , label: str , id )
Set the secret content if the secret exists.
Description
Creates new secret revision if secret exists, otherwise creates a new secret.
Raises: TransientJujuError SecretValidationError
JujuFacade. set_unit_secret_content( self , content , label: str , id )
Set the secret content if the secret exists.
Description
Creates new secret revision if secret exists, otherwise creates a new secret.
Raises: TransientJujuError SecretValidationError
JujuFacade. set_secret_label( self , new_label: str , label: str , id )
Set a new label for the secret if the secret exists.
Description
Raises: TransientJujuError
JujuFacade. set_secret_expiry( self , expiry: datetime , label: str , id )
Set a new expiry date for the secret if the secret exists.
Description
Raises: TransientJujuError
JujuFacade. get_relation_by_id( self , relation_name: str , relation_id: int )
Get the relation object by name and id.
Returns
The relation object
JujuFacade. get_relations( self , relation_name: str )
Get all relation objects with the given name.
Returns
A list of relation objects, the list is empty if no relations are found
JujuFacade. relation_exists( self , relation_name: str )
Description
Check if there are any relations with the given name. None
JujuFacade. get_app_relation_data( self , relation_name: str , relation_id: int )
Get relation data from the caller's application databag.
Returns
The relation data as a dict
JujuFacade. get_remote_app_relation_data( self , relation_name: str , relation_id: int )
Get relation data from the remote application databag.
Returns
The relation data as a dict
JujuFacade. get_unit_relation_data( self , relation_name: str , relation_id: int )
Get relation data from the remote unit databag.
JujuFacade. get_remote_units_relation_data( self , relation_name: str , relation_id: int )
Get relation data from the remote units databags.
JujuFacade. set_app_relation_data( self , data , relation_name: str , relation_id: int )
Set relation data in the caller's application databag.
JujuFacade. set_unit_relation_data( self , data , relation_name: str , relation_id: int )
Set relation data in the caller's unit databag.
JujuFacade. get_string_config( self , key: str )
Description
Get a string config value. None
JujuFacade. get_int_config( self , key: str )
Description
Get an integer config value. None
JujuFacade. get_bool_config( self , key: str )
Description
Get a boolean config value. None
JujuFacade. get_storage_location( self , storage_name: str )
Description
Get the storage location. None
JujuFacade. model_name( self )
Description
Get the model name. None
JujuFacade. app_name( self )
Description
Get the application name. None
JujuFacade. unit_name( self )
Description
Get the unit name. None
JujuFacade. model_storage_names( self )
Description
Get the model storage names. None
JujuFacade. is_leader( self )
Description
Check if the unit is leader. None