load only required plugins

This commit is contained in:
Devaev Maxim
2019-04-28 21:01:03 +03:00
parent 26338c5acf
commit e13b5027d6
7 changed files with 22 additions and 38 deletions

View File

@@ -111,9 +111,9 @@ def _init_config(config_path: str, sections: List[str], override_options: List[s
config = make_config(raw_config, scheme)
if "kvmd" in sections:
scheme["kvmd"]["auth"]["internal"] = get_auth_service_class(config.kvmd.auth.internal_type).get_options()
scheme["kvmd"]["auth"]["internal"] = get_auth_service_class(config.kvmd.auth.internal_type).get_plugin_options()
if config.kvmd.auth.external_type:
scheme["kvmd"]["auth"]["external"] = get_auth_service_class(config.kvmd.auth.external_type).get_options()
scheme["kvmd"]["auth"]["external"] = get_auth_service_class(config.kvmd.auth.external_type).get_plugin_options()
config = make_config(raw_config, scheme)
return config