Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 3615a35b74881d9f6f2ede8c52aa8e780b19ba77
https://github.com/tribe29/checkmk/commit/3615a35b74881d9f6f2ede8c52aa8e780…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2022-11-29 (Tue, 29 Nov 2022)
Changed paths:
M cmk/base/agent_based/checking/_checking.py
M cmk/base/agent_based/checking/active.py
M cmk/base/agent_based/checking/commandline.py
M cmk/base/agent_based/discovery/_discovery.py
M cmk/base/agent_based/discovery/_host_labels.py
M cmk/base/agent_based/discovery/active.py
M cmk/base/agent_based/discovery/autodiscovery.py
M cmk/base/agent_based/discovery/commandline.py
M cmk/base/agent_based/discovery/preview.py
M cmk/base/agent_based/inventory/_autoinventory.py
M cmk/base/agent_based/inventory/_inventory.py
M cmk/base/agent_based/inventory/active.py
M cmk/base/agent_based/inventory/commandline.py
M cmk/base/automations/check_mk.py
M cmk/base/config.py
M cmk/base/modes/check_mk.py
M tests/integration/bin/test_mkbackup.py
M tests/unit/cmk/base/agent_based/discovery/test_discovery.py
M tests/unit/cmk/base/agent_based/test_base_inventory.py
Log Message:
-----------
Pass ConfigCache as arg
The goal is to pass the subset of options that checking, discovery, and
inventory require instead of the global config.
This patch already brings a lot of possibilities to clean up the
configuration handling:
* Now that we pass the configuration as an argument instead of conjuring
it in and out of the global namespace, we can get rid of the caching
without sacrificing efficiency.
* Passing the configuration should let us simplify the tests and get rid
of many usages of the `testlib.Scenario`.
* Now, the configuration is obtained at the same place as the
FileCacheGlobals global variables and we should therefore be able to
change the global variables into local ones.
* Those smaller, specific configurations will let us severe the
dependency between `agent_based/*` and `cmk.base.config`.
CMK-11598
Change-Id: Ic459dac33cbb554af0ac814e6290f434c1ade627