Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: df84c88bc3afe3117049393f12baefb496cad47f
https://github.com/tribe29/checkmk/commit/df84c88bc3afe3117049393f12baefb49…
Author: Mathias Laurin <mathias.laurin(a)tribe29.com>
Date: 2020-06-29 (Mon, 29 Jun 2020)
Changed paths:
M cmk/base/automations/check_mk.py
M cmk/base/checking.py
M cmk/base/data_sources/__init__.py
A cmk/base/data_sources/_cache.py
A cmk/base/data_sources/_data_sources.py
A cmk/base/data_sources/_utils.py
M cmk/base/data_sources/abstract.py
A cmk/base/data_sources/agent.py
M cmk/base/data_sources/host_sections.py
M cmk/base/data_sources/ipmi.py
M cmk/base/data_sources/piggyback.py
M cmk/base/data_sources/programs.py
M cmk/base/data_sources/snmp.py
M cmk/base/data_sources/tcp.py
M cmk/base/discovery.py
M cmk/base/inventory.py
M cmk/base/modes/check_mk.py
R tests-py3/unit/cmk/base/data_sources/test_abstract_data_source.py
A tests-py3/unit/cmk/base/data_sources/test_agent.py
M tests-py3/unit/cmk/base/data_sources/test_host_sections.py
M tests-py3/unit/cmk/base/data_sources/test_ipmi_management_board_data_source.py
M tests-py3/unit/cmk/base/data_sources/test_snmp_data_source.py
M tests-py3/unit/cmk/base/data_sources/test_tcp_data_source.py
M tests-py3/unit/cmk/base/test_data_sources_cmd_caching.py
Log Message:
-----------
Reorganize data source modules
`DataSource` and `HostSections` classes work in pair. We make that
clear by grouping:
- AgentHostSections and AgentDataSource (was CheckMKAgentDataSource)
- SNMPHostSections and ABCSNMPDataSource (were already together)
- AbstractHostSections and DataSource (moved together to a new abstract
module)
We now obtain better symmetry and split modules by abstraction level.
This better underlines the structure of the code.
We move concrete classes and free functions out of `abstract`. The name
of the module really *implies* that it contains abstract classes and
interfaces.
- Utility classes needed for caching move to `_cache`
- Utility free functions move to `_utils`
We empty `__init__.py`. It is difficult to avoid circular dependencies
with code in `__init__`. Now that DataSources is in its own module, we
have full control on the names at package scope.
The callers can now use module names as namesapce, which is rather
common and expected in Python.
CMK-4726
Change-Id: Ic993887df194552f6c5fdfdc4c2bb56d76b72ae0