2020-10-26 14:43:11 +01:00
|
|
|
from .configuration import read_configurations
|
2018-02-22 14:49:38 +01:00
|
|
|
|
2020-10-26 14:43:11 +01:00
|
|
|
_loaded_configurations = read_configurations(
|
|
|
|
config_dir = '/etc/netbox/config/ldap/',
|
|
|
|
config_module = 'netbox.configuration.ldap',
|
|
|
|
main_config = 'ldap_config')
|
2020-10-18 02:34:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
def __getattr__(name):
|
|
|
|
for config in _loaded_configurations:
|
|
|
|
try:
|
|
|
|
return getattr(config, name)
|
|
|
|
except:
|
|
|
|
pass
|
|
|
|
raise AttributeError
|