2020-02-19 06:59:54 +00:00
|
|
|
import os
|
|
|
|
|
2020-02-20 08:57:32 +00:00
|
|
|
from ungleich_common.ldap.ldap_manager import LdapManager
|
|
|
|
from ungleich_common.std.configparser import StrictConfigParser
|
|
|
|
from ungleich_common.etcd.etcd_wrapper import EtcdWrapper
|
2020-02-20 09:04:53 +00:00
|
|
|
|
2020-02-19 06:59:54 +00:00
|
|
|
config_file = os.environ.get('meow-pay-config-file', default='pay.conf')
|
|
|
|
|
2020-02-19 19:12:11 +00:00
|
|
|
config = StrictConfigParser(allow_no_value=True)
|
|
|
|
config.read(config_file)
|
2020-01-20 07:30:12 +00:00
|
|
|
|
2020-02-19 19:12:11 +00:00
|
|
|
etcd_client = EtcdWrapper(
|
|
|
|
host=config.get('etcd', 'host'), port=config.get('etcd', 'port'),
|
|
|
|
ca_cert=config.get('etcd', 'ca_cert'), cert_key=config.get('etcd', 'cert_key'),
|
|
|
|
cert_cert=config.get('etcd', 'cert_cert')
|
|
|
|
)
|
2020-02-19 06:59:54 +00:00
|
|
|
|
2020-02-19 19:12:11 +00:00
|
|
|
ldap_manager = LdapManager(
|
|
|
|
server=config.get('ldap', 'server'), admin_dn=config.get('ldap', 'admin_dn'),
|
|
|
|
admin_password=config.get('ldap', 'admin_password')
|
|
|
|
)
|