Skip to content

Commit

Permalink
Updating class method to static
Browse files Browse the repository at this point in the history
Signed-off-by: Shivam Durgbuns <[email protected]>
  • Loading branch information
shivamdurgbuns committed Nov 29, 2024
1 parent 93ccdac commit be44ef2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ocs_ci/utility/kms.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ def __init__(self):
self.vault_kube_auth_namespace = None
self.vault_cwd_kms_sa_name = constants.VAULT_CWD_KMS_SA_NAME

@classmethod
def set_vault_token(cls):
@staticmethod
def set_vault_token(self):
"""
This is a class method that will set the token value.
This is a static method that will set the token value.
"""
if cls.vault_path_token is None:
cls.vault_path_token = cls.generate_vault_token()
return cls.vault_path_token
if self.vault_path_token is None:
self.vault_path_token = self.generate_vault_token()
return self.vault_path_token

def deploy(self):
"""
Expand Down Expand Up @@ -590,7 +590,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.vault_path_token = self.set_vault_token(self)

def generate_vault_token(self):
"""
Expand Down

0 comments on commit be44ef2

Please sign in to comment.