diff --git a/ocs_ci/utility/kms.py b/ocs_ci/utility/kms.py index 4a561ee7375a..6f220793dbc7 100644 --- a/ocs_ci/utility/kms.py +++ b/ocs_ci/utility/kms.py @@ -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): """ @@ -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): """