mirror of
https://github.com/netbox-community/netbox-docker.git
synced 2024-11-27 02:14:14 +01:00
7694fd320a
Co-authored-by: Christian Mäder <cimnine@users.noreply.github.com>
22 lines
489 B
Python
22 lines
489 B
Python
from .configuration import read_configurations
|
|
|
|
_loaded_configurations = read_configurations(
|
|
config_dir = '/etc/netbox/config/ldap/',
|
|
config_module = 'netbox.configuration.ldap',
|
|
main_config = 'ldap_config')
|
|
|
|
|
|
def __getattr__(name):
|
|
for config in _loaded_configurations:
|
|
try:
|
|
return getattr(config, name)
|
|
except:
|
|
pass
|
|
raise AttributeError
|
|
|
|
def __dir__():
|
|
names = []
|
|
for config in _loaded_configurations:
|
|
names.extend(config.__dir__())
|
|
return names
|