blob: b78acaec7681348fe022580ffb752a891a07ad8f [file] [log] [blame]
Wei-Yu Chen49950b92021-11-08 19:19:18 +08001import importlib
2import logging
3
4from configuration.exceptions import LoadConfigError
5from configuration.service_configs import load_service_config
6
7# Import all mconfig-providing modules so for the protobuf symbol database
8try:
9 mconfig_modules = load_service_config('magmad').get('mconfig_modules', [])
10 for mod in mconfig_modules:
11 logging.info('Importing mconfig module %s', mod)
12 importlib.import_module(mod)
13except LoadConfigError:
14 logging.error('Could not load magmad yml config for mconfig modules')
15 importlib.import_module('orc8r.protos.mconfig.mconfigs_pb2')