Branch: refs/heads/1.6.0
Home:
https://github.com/tribe29/checkmk
Commit: a060191d6a258195f17cc96478760c560ee5d425
https://github.com/tribe29/checkmk/commit/a060191d6a258195f17cc96478760c560…
Author: Sven Panne <sven.panne(a)tribe29.com>
Date: 2019-09-11 (Wed, 11 Sep 2019)
Changed paths:
M cmk_base/core_config.py
M cmk_base/core_nagios.py
Log Message:
-----------
Refactoring: Move funny special cases to the call sites.
Structurally, this is inversion of control, a.k.a. the Hollywood Principle:
"Don't call us, we call you!" If we had classes here at hand (which we
really should), this refactoring would be:
https://refactoring.com/catalog/replaceConditionalWithPolymorphism.html
We already *have* a MonitoringCore class where the additional three methods
should live, but threading through the right instance is currently a bit
tricky because of several layers of "interesting" code in between. Without
an instance at hand, we simulate it by passing three functions, i.e. we use
"poor man's OO" for now. :-)
Change-Id: I245b373220e60ae24977af020c4db928e5486f77