Module: check_mk
Branch: master
Commit: 7ea5a47aed7d35dfa6b41cd13019e181836e3e50
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7ea5a47aed7d35…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Jan 31 14:53:13 2018 +0100
Do not filter inventory plugins at the moment
Change-Id: I95df5ba565aa397dcb4609f836e44de1cba15a86
---
cmk_base/discovery.py | 5 ++++-
cmk_base/inventory.py | 5 +++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/cmk_base/discovery.py b/cmk_base/discovery.py
index b29bcbd..0086fa1 100644
--- a/cmk_base/discovery.py
+++ b/cmk_base/discovery.py
@@ -842,7 +842,10 @@ def snmp_scan(hostname, ipaddress, on_error="ignore",
for_inv=False, do_snmp_sca
if default_found:
_output_snmp_check_plugins("SNMP without scan function",
default_found)
- filtered = _filter_by_management_board(hostname, found, for_mgmt_board)
+ if for_inv:
+ filtered = found
+ else:
+ filtered = _filter_by_management_board(hostname, found, for_mgmt_board)
snmp.write_single_oid_cache(hostname)
return sorted(filtered)
diff --git a/cmk_base/inventory.py b/cmk_base/inventory.py
index 19dd099..857c68e 100644
--- a/cmk_base/inventory.py
+++ b/cmk_base/inventory.py
@@ -260,8 +260,9 @@ def _do_inv_for_realhost(hostname, ipaddress, inventory_tree,
status_data_tree):
console.verbose(";")
-def _gather_snmp_check_plugin_names_inventory(hostname, ipaddress, on_error,
do_snmp_scan):
- return discovery.gather_snmp_check_plugin_names(hostname, ipaddress, on_error,
do_snmp_scan, for_inventory=True)
+def _gather_snmp_check_plugin_names_inventory(hostname, ipaddress, on_error,
do_snmp_scan, for_mgmt_board=False):
+ return discovery.gather_snmp_check_plugin_names(hostname, ipaddress, on_error,
do_snmp_scan,
+ for_inventory=True,
for_mgmt_board=for_mgmt_board)
def _get_inv_params(hostname, section_name):