Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: cd66147f0e74f64c5940d326511332a3c14dc805
https://github.com/tribe29/checkmk/commit/cd66147f0e74f64c5940d326511332a3c…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-07-06 (Mon, 06 Jul 2020)
Changed paths:
M cmk/base/checking.py
M cmk/base/config.py
M cmk/base/data_sources/_data_sources.py
M cmk/base/discovery.py
M cmk/base/inventory.py
M tests-py3/unit/cmk/base/data_sources/test_host_sections.py
M tests-py3/unit/cmk/base/test_config.py
Log Message:
-----------
Make get_host_sections static
Instead of playing guess-games with default arguments in the function,
we let the caller pass the good values.
This results in code that is much simpler and further shows that
`get_host_sections` needs not be in DataSources. Indeed,
`DataSources.get_host_sections()` returns a MultiHostSections. But
MultiHostSections is but a glorified `Mapping[HostKey,
AbstractHostSections]` and the arguments to `get_host_sections()` could
be easily rewritten as `[HostKey, ...]`.
This is the way to close CMK-4838.
CMK-4838
Change-Id: Ie3eae73ad4dedce4e00bd7474ca71abb1891c200