Skip to content

Commit

Permalink
Removing static function with just normal class function that updates…
Browse files Browse the repository at this point in the history
… token value

Signed-off-by: Shivam Durgbuns <[email protected]>
  • Loading branch information
shivamdurgbuns committed Dec 5, 2024
1 parent 331f2a3 commit ac0e253
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ocs_ci/utility/kms.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ def __init__(self):
self.vault_kube_auth_namespace = None
self.vault_cwd_kms_sa_name = constants.VAULT_CWD_KMS_SA_NAME

@staticmethod
def set_vault_token(self):
def get_vault_token(self):
"""
This is a static method that will set the token value.
Get the Vault token value. Generate it first if it does not already exist.
Returns:
str: Vault token
"""
if self.vault_path_token is None:
self.vault_path_token = self.generate_vault_token()
Expand Down Expand Up @@ -593,7 +594,7 @@ def vault_create_policy(self, policy_name=None):
raise VaultOperationError(
f"Failed to create policy f{self.vault_policy_name}"
)
self.vault_path_token = self.set_vault_token(self)
self.vault_path_token = self.get_vault_token(self)

def generate_vault_token(self):
"""
Expand Down

0 comments on commit ac0e253

Please sign in to comment.