Exemple #1
0
    def __init__(self, config):
        self.config = config
        self.url = '{protocol}://{user}:******@{host}:{port}/{database}'.format(**self.config)
        self.client = ConnectionQueue(
            self.config.pool_size, self.config.queue_build_cap, self.config.name, 'Odoo', self.url, self.add_client)

        self.update_lock = RLock()
        self.logger = getLogger(self.__class__.__name__)
Exemple #2
0
    def __init__(self, config):
        self.config = config

        self.client = ConnectionQueue(self.config.pool_size,
                                      self.config.queue_build_cap,
                                      self.config.name, 'OpenStack Swift',
                                      self.config.auth_url, self.add_client)

        self.update_lock = RLock()
        self.logger = getLogger(self.__class__.__name__)
Exemple #3
0
 def __init__(self, config):
     super(SudsSOAPWrapper, self).__init__(config)
     self.update_lock = RLock()
     self.config = config
     self.config['timeout'] = float(self.config['timeout'])
     self.config_no_sensitive = deepcopy(self.config)
     self.config_no_sensitive['password'] = '******'
     self.address = '{}{}'.format(self.config['address_host'], self.config['address_url_path'])
     self.conn_type = 'Suds SOAP'
     self.client = ConnectionQueue(
         self.config['pool_size'], self.config['queue_build_cap'], self.config['name'], self.conn_type, self.address,
         self.add_client)
Exemple #4
0
    def __init__(self, config, server):
        self.config = config
        self.server = server

        # Decrypt the password if it is encrypted. It will be in clear text when the server is starting up
        # but otherwise for connections created in run-time, it will be decrypted.
        if self.config.password.startswith(SECRETS.PREFIX):
            self.config.password = self.server.decrypt(self.config.password)

        self.url = '{protocol}://{user}:******@{host}:{port}/{database}'.format(**self.config)
        self.client = ConnectionQueue(
            self.config.pool_size, self.config.queue_build_cap, self.config.name, 'Odoo', self.url, self.add_client)

        self.update_lock = RLock()
        self.logger = getLogger(self.__class__.__name__)
Exemple #5
0
    def __init__(self, config, server):

        # Imported here because not everyone will be using SAP
        import pyrfc
        self.pyrfc = pyrfc
        self.config = config
        self.server = server
        self.url = 'rfc://{user}@{host}:{sysnr}/{client}'.format(**self.config)
        self.client = ConnectionQueue(self.config.pool_size,
                                      self.config.queue_build_cap,
                                      self.config.name, 'SAP', self.url,
                                      self.add_client)

        self.update_lock = RLock()
        self.logger = getLogger(self.__class__.__name__)