Пример #1
0
 def _save_tags_and_update_hosts(self, tag_config):
     self._tag_config_file.save(tag_config)
     config.load_config()
     watolib.Folder.invalidate_caches()
     watolib.Folder.root_folder().rewrite_hosts_files()
Пример #2
0
def _update_tag_dependencies():
    config.load_config()
    watolib.Folder.invalidate_caches()
    watolib.Folder.root_folder().rewrite_hosts_files()
Пример #3
0
def _update_host_custom_attrs():
    config.load_config()
    Folder.invalidate_caches()
    Folder.root_folder().rewrite_hosts_files()
Пример #4
0
    def _execute_sync(self) -> None:
        newest_host_labels = self._load_newest_host_labels_per_site()

        with (request_context := make_request_context()):  # pylint: disable=superfluous-parens
            load_config()
Пример #5
0
def gui_context(environ: Optional[Mapping[str, Any]] = None) -> Iterator[None]:
    with application_context(), request_context(environ):
        load_config()
        yield
Пример #6
0
def get_tag_config_from_gui():
    import cmk.gui.config as gui_config
    gui_config.load_config()
    return gui_config.tags
Пример #7
0
def initialize_gui_environment() -> None:
    load_all_plugins()
    load_config()
    set_super_user()