示例#1
0
def eventd_configuration():
    global cached_config
    if cached_config and cached_config[0] is html:
        return cached_config[1]

    settings = ec.settings('', Path(cmk.utils.paths.omd_root),
                           Path(cmk.utils.paths.default_config_dir), [''])
    cfg = ec.load_config(settings)
    cached_config = (html, cfg)
    return cfg
示例#2
0
def eventd_configuration() -> ec.ConfigFromWATO:
    global cached_config
    # TODO: Huh??? Why do we use html simply as a tag here???
    if cached_config and cached_config[0] is html:
        return cached_config[1]

    settings = ec.settings('', Path(cmk.utils.paths.omd_root),
                           Path(cmk.utils.paths.default_config_dir), [''])
    cfg = ec.load_config(settings)
    cached_config = (html, cfg)
    return cfg
示例#3
0
def _eventd_configuration() -> ec.ConfigFromWATO:
    return ec.load_config(
        ec.settings(
            "", Path(cmk.utils.paths.omd_root), Path(cmk.utils.paths.default_config_dir), [""]
        )
    )