Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 0416afb0dced0b9fcc81ded6d4d230eba61393f5
https://github.com/tribe29/checkmk/commit/0416afb0dced0b9fcc81ded6d4d230eba…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-08-27 (Thu, 27 Aug 2020)
Changed paths:
M cmk/base/checking.py
M cmk/base/data_sources/_abstract.py
M cmk/base/data_sources/_data_sources.py
M cmk/base/discovery.py
M cmk/base/inventory.py
M tests/unit/cmk/base/data_sources/test_agent.py
M tests/unit/cmk/base/data_sources/test_host_sections.py
Log Message:
-----------
Let mhs computation return the computed host sections
Exception handling and host sections (summary) handling are done using
an implicit protocol as both are cached on the Checker class.
Originally, the data source class was also caching the exception from
the fetcher. After the split, this is not practicable anymore as the
fetcher is not in the checker anymore.
Therefore, we now need to make the error handling protocol explicit.
This requires some refactoring in the data source users such as
inventory, discovery, or check_mk (compare 🍝).
We modify `make_host_sections` so that it *returns* the host sections
to be summarized.
CMK-5275
Change-Id: Ie94fead164fd2ef3fea5ffc2374495ca7c838e19