MCPcopy Create free account
hub / github.com/StackStorm/st2 / main

Function main

tools/config_gen.py:220–238  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

218
219
220def main(args):
221 print(INIT_COMMENT)
222 print("")
223 opt_groups = {}
224 for config in CONFIGS:
225 mod = _import_config(config)
226 mod.register_opts(ignore_errors=True)
227 _read_current_config(opt_groups)
228 _clear_config()
229 if config == "st2auth.config":
230 from st2auth import (
231 backends as auth_backends,
232 ) # late import to let config get set up first.
233
234 available_backends = auth_backends.get_available_backends()
235 assert (
236 len(available_backends) == 3
237 ), f"Expected 3 available auth backends, got {len(available_backends)}: {available_backends}"
238 _read_groups(opt_groups)
239
240
241if __name__ == "__main__":

Callers 1

config_gen.pyFile · 0.70

Calls 4

_import_configFunction · 0.85
_read_current_configFunction · 0.85
_clear_configFunction · 0.85
_read_groupsFunction · 0.85

Tested by

no test coverage detected