diff --git a/src/spaceone/secret/connector/aws_secret_manager_connector.py b/src/spaceone/secret/connector/aws_secret_manager_connector.py index f13cacb..89793a1 100644 --- a/src/spaceone/secret/connector/aws_secret_manager_connector.py +++ b/src/spaceone/secret/connector/aws_secret_manager_connector.py @@ -11,8 +11,8 @@ class AWSSecretManagerConnector(BaseConnector): - def __init__(self, transaction, config): - super().__init__(transaction, config) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) aws_access_key_id = self.config.get('aws_access_key_id') aws_secret_access_key = self.config.get('aws_secret_access_key') diff --git a/src/spaceone/secret/connector/consul_connector.py b/src/spaceone/secret/connector/consul_connector.py index 72abe4f..8f6bfe2 100644 --- a/src/spaceone/secret/connector/consul_connector.py +++ b/src/spaceone/secret/connector/consul_connector.py @@ -12,10 +12,11 @@ class ConsulConnector(BaseConnector): """ Consul Backend """ - def __init__(self, transaction, config): - super().__init__(transaction, config) - self.config = self._validate_config(config) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self.config = self._validate_config(self.config) # No configuration if self.config == {}: diff --git a/src/spaceone/secret/connector/etcd_connector.py b/src/spaceone/secret/connector/etcd_connector.py index 4aaf883..6106778 100644 --- a/src/spaceone/secret/connector/etcd_connector.py +++ b/src/spaceone/secret/connector/etcd_connector.py @@ -3,16 +3,15 @@ import etcd3 from spaceone.core.connector import BaseConnector - __all__ = ['EtcdConnector'] _LOGGER = logging.getLogger(__name__) class EtcdConnector(BaseConnector): - def __init__(self, transaction, config): - super().__init__(transaction, config) - self.client = etcd3.client(host=config.get('host'), port=config.get('port')) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.client = etcd3.client(host=self.config.get('host'), port=self.config.get('port')) @staticmethod def _response_value(response): diff --git a/src/spaceone/secret/connector/identity_connector.py b/src/spaceone/secret/connector/identity_connector.py index 6d9053e..542cd79 100644 --- a/src/spaceone/secret/connector/identity_connector.py +++ b/src/spaceone/secret/connector/identity_connector.py @@ -7,14 +7,13 @@ from spaceone.core.utils import parse_endpoint from spaceone.core.error import * - __all__ = ['IdentityConnector'] _LOGGER = logging.getLogger(__name__) class IdentityConnector(BaseConnector): - def __init__(self, transaction, config): - super().__init__(transaction, config) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) if 'endpoint' not in self.config: raise ERROR_WRONG_CONFIGURATION(key='endpoint') diff --git a/src/spaceone/secret/connector/mongodb_connector.py b/src/spaceone/secret/connector/mongodb_connector.py index 6da41d7..b2a3e83 100644 --- a/src/spaceone/secret/connector/mongodb_connector.py +++ b/src/spaceone/secret/connector/mongodb_connector.py @@ -9,9 +9,9 @@ class MongoDBConnector(BaseConnector): - def __init__(self, transaction, config): - super().__init__(transaction, config) - client = MongoClient(**config) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + client = MongoClient(**self.config) db = client.secret_data self.secret_data = db.secret_data diff --git a/src/spaceone/secret/connector/vault_connector.py b/src/spaceone/secret/connector/vault_connector.py index 6f57301..65f752b 100644 --- a/src/spaceone/secret/connector/vault_connector.py +++ b/src/spaceone/secret/connector/vault_connector.py @@ -12,11 +12,12 @@ class VaultConnector(BaseConnector): """ Vault backend is for develop use """ - def __init__(self, transaction, config): - super().__init__(transaction, config) - vault_url = config.get('url') - token = config.get('token') + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + vault_url = self.config.get('url') + token = self.config.get('token') if vault_url and token: self.client = hvac.Client(url=vault_url) self.client.token = token