from abc import abstractmethod from frostfs_testlib.plugins import load_plugin from frostfs_testlib.storage.cluster import ClusterNode class S3CredentialsProvider(object): stash: dict def __init__(self, stash: dict) -> None: self.stash = stash @abstractmethod def provide(self, cluster_node: ClusterNode) -> tuple[str, str]: raise NotImplementedError("Directly called abstract class?") class CredentialsProvider(object): stash: dict S3: S3CredentialsProvider def __init__(self, s3_plugin_name: str) -> None: self.stash = {} s3cls = load_plugin("frostfs.testlib.credentials_providers", s3_plugin_name) self.S3 = s3cls(self.stash)