コード例 #1
0
def get_cached_bi_compiler() -> BICompiler:
    if "bi_compiler" not in g:
        sites_callback = SitesCallback(cmk.gui.sites.states,
                                       bi_livestatus_query)
        g.bi_compiler = BICompiler(BIManager.bi_configuration_file(),
                                   sites_callback)
    return g.bi_compiler
コード例 #2
0
 def __init__(self):
     sites_callback = SitesCallback(cmk.gui.sites.states,
                                    bi_livestatus_query)
     self.compiler = BICompiler(self.bi_configuration_file(),
                                sites_callback)
     self.compiler.load_compiled_aggregations()
     self.status_fetcher = BIStatusFetcher(sites_callback)
     self.computer = BIComputer(self.compiler.compiled_aggregations,
                                self.status_fetcher)
コード例 #3
0
def bi_structure_fetcher():
    structure_fetcher = BIStructureFetcher(
        SitesCallback(lambda: None, lambda: None))
    yield structure_fetcher
コード例 #4
0
def bi_status_fetcher():
    status_fetcher = BIStatusFetcher(SitesCallback(lambda: None, lambda: None))
    yield status_fetcher
コード例 #5
0
def bi_searcher_with_sample_config(bi_searcher):
    structure_fetcher = BIStructureFetcher(
        SitesCallback(lambda: None, lambda: None))
    structure_fetcher.add_site_data("heute", sample_config.bi_structure_states)
    bi_searcher.set_hosts(structure_fetcher.hosts)
    yield bi_searcher
コード例 #6
0
def get_cached_bi_compiler() -> BICompiler:
    return BICompiler(
        BIManager.bi_configuration_file(), SitesCallback(cmk.gui.sites.states, bi_livestatus_query)
    )
コード例 #7
0
ファイル: conftest.py プロジェクト: LinuxHaus/checkmk
def bi_structure_fetcher():
    structure_fetcher = BIStructureFetcher(
        SitesCallback(lambda: None, mock_query_callback))
    yield structure_fetcher
コード例 #8
0
ファイル: conftest.py プロジェクト: LinuxHaus/checkmk
def bi_status_fetcher():
    status_fetcher = BIStatusFetcher(
        SitesCallback(lambda: None, mock_query_callback))
    yield status_fetcher