Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 183d328f7f2f92651280fe59a68b6f1770782bd4
https://github.com/tribe29/checkmk/commit/183d328f7f2f92651280fe59a68b6f177…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-08-24 (Mon, 24 Aug 2020)
Changed paths:
M tests/unit/cmk/base/data_sources/test_cmd_caching.py
Log Message:
-----------
Test with DS.check() instead of DS.run()
DataSource.run() is to be removed with the new Checker API.
CMK-5234
Change-Id: I8c5f0a66d409b3febb87a9d356c290bc7ef3a12e
Commit: 0466fde7fb2a37e880ae3180191ee298f488dcaf
https://github.com/tribe29/checkmk/commit/0466fde7fb2a37e880ae3180191ee298f…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-08-24 (Mon, 24 Aug 2020)
Changed paths:
M cmk/base/automations/check_mk.py
M cmk/base/data_sources/agent.py
M tests/unit/cmk/base/data_sources/test_cmd_caching.py
A tests/unit/cmk/base/test_automations_check_mk.py
Log Message:
-----------
automations/check_mk gets raw data from fetchers
This clarifies the intent.
This is also the first step toward removing the `run_raw()` method
from the data source.
The corresponding test was moved from `test_cmk_caching.py` to
`test_automations_check_mk.py` and completed such that the
return value of the call is actually checked.
CMK-5243
Change-Id: Id4a612b348ac8e2d45d5006b95e33bcf2dc6d5ef
Commit: 091488e17353c8a122ea4a8221cec69f56f40eb4
https://github.com/tribe29/checkmk/commit/091488e17353c8a122ea4a8221cec69f5…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-08-24 (Mon, 24 Aug 2020)
Changed paths:
M cmk/base/modes/check_mk.py
A tests/unit/cmk/base/test_modes_check_mk.py
Log Message:
-----------
modes/check_mk: get raw data from fetcher
Same transformation as automations/check_mk
Now, the responsibilities of the fetchers and checkers are clearly
separated. We can remove the last cruft out of checkers in a
next commit.
This further aids understanding the API. Indeed, we could, for example,
rename the Configurator -> Source (or DataSource) and let
```
class Source(Generic[RawData]):
def fetch() -> RawData:
with self.make_fetcher() as fetcher:
return fetcher.fetch()
def summarize(raw_data: RawData) -> ServiceCheckResult:
checker = self.make_checker()
checker.check(raw_data)
return checker.get_summary_result()
```
which would be clearer and more concise while retaining a clear
separation of concerns.
CMK-5243
Change-Id: Ic7278fffba16b26d009293eb44eb94b889cdd923
Commit: b179bf3fceb734636c0630d73713629c1ca5bde4
https://github.com/tribe29/checkmk/commit/b179bf3fceb734636c0630d73713629c1…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-08-24 (Mon, 24 Aug 2020)
Changed paths:
M cmk/base/data_sources/_abstract.py
M cmk/base/data_sources/agent.py
M cmk/base/data_sources/snmp.py
Log Message:
-----------
Clean up DataSource._run()
The method was using the boolean-parameter antipattern to let the method
return either raw data or host sections. Now, checkers should never
return raw data as this is now the responsibility of the fetchers.
Furthermore, the AgentDataSource.run_raw() does not have callers
anymore so that it is safe to remove the faulty logic.
CMK-5423
Change-Id: I4d4e5dc8e4e57ba02db7681db2f368a1c441e25c
Compare:
https://github.com/tribe29/checkmk/compare/7fdc93cb64db...b179bf3fceb7