From 605e1eda05f845f9b6ae017bdfc0c44c99f1c9fb Mon Sep 17 00:00:00 2001 From: jeanluc Date: Wed, 24 Apr 2024 15:46:04 +0200 Subject: [PATCH] Add versionadded tags to new funcs/params --- src/saltext/vault/utils/vault/leases.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/saltext/vault/utils/vault/leases.py b/src/saltext/vault/utils/vault/leases.py index 11d34bac..74f6e1f7 100644 --- a/src/saltext/vault/utils/vault/leases.py +++ b/src/saltext/vault/utils/vault/leases.py @@ -78,6 +78,11 @@ def is_valid_for(self, valid_for=0, blur=0): @property def ttl_left(self): + """ + .. versionadded:: 1.1.0 + + Return the time in seconds until the lease expires. + """ return max(self.expire_time - round(time.time()), 0) @@ -183,18 +188,26 @@ class VaultLease(BaseLease): valid for at least this amount of time, even if the passed ``valid_for`` parameter is less. + .. versionadded:: 1.1.0 + renew_increment When renewing this lease, instead of the lease's default TTL, default to this increment. + .. versionadded:: 1.1.0 + revoke_delay When revoking this lease, instead of the default value of 60, default to this amount of time before having the Vault server revoke it. + .. versionadded:: 1.1.0 + meta Cache arbitrary metadata together with the lease. It will be included in expiry events. + + .. versionadded:: 1.1.0 """ def __init__( @@ -451,6 +464,8 @@ def get( check_server Check on the Vault server whether the lease is still active and was not revoked early. Defaults to false. + + .. versionadded:: 1.1.0 """ if renew_increment is not None and timestring_map(valid_for) > timestring_map( renew_increment @@ -543,6 +558,8 @@ def _list_cached_leases(self, match="*", flush=False): def list_info(self, match="*"): """ + .. versionadded:: 1.1.0 + List cached leases. match