Module: check_mk
Branch: master
Commit: 1c2b98880814f8cdefc699c46a87ad82a12184cb
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1c2b98880814f8…
Author: Andreas <ab(a)mathias-kettner.de>
Date: Wed Jun 27 15:51:40 2018 +0200
6239 FIX WATO host diagnostic page: SNMPv3+Credentials hosts no longer report an
exception.
The diagnose page for hosts with SNMPv3+credentials always showed the following error
</tt>API Error:sequence item 14: expected string, NoneType found</tt>.
This has been fixed.
Change-Id: Ie67eb324b46b8af8542b3f9b680ba28fe0bd0928
---
.werks/6239 | 13 +++++++++++++
web/htdocs/wato.py | 6 ++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/.werks/6239 b/.werks/6239
new file mode 100644
index 0000000..4078004
--- /dev/null
+++ b/.werks/6239
@@ -0,0 +1,13 @@
+Title: WATO host diagnostic page: SNMPv3+Credentials hosts no longer report an
exception.
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1530107291
+
+The diagnose page for hosts with SNMPv3+credentials always showed the following error
</tt>API Error:sequence item 14: expected string, NoneType found</tt>.
+This has been fixed.
+
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 432d202..11b03ac 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -2870,12 +2870,14 @@ class ModeAjaxDiagHost(WatoWebApiMode):
}.get(request.get("snmpv3_use"))
args[7] = snmpv3_use
if snmpv3_use != "noAuthNoPriv":
- snmpv3_auth_proto = { "0": "md5", "1":
"sha" }.get(request.get("snmpv3_auth_proto"))
+ snmpv3_auth_proto = { DropdownChoice.option_id("md5"):
"md5",
+ DropdownChoice.option_id("sha"):
"sha" }.get(request.get("snmpv3_auth_proto"))
args[8] = snmpv3_auth_proto
args[9] = request.get("snmpv3_security_name")
args[10] = request.get("snmpv3_security_password")
if snmpv3_use == "authPriv":
- snmpv3_privacy_proto = { "0": "DES",
"1": "AES" }.get(request.get("snmpv3_privacy_proto"))
+ snmpv3_privacy_proto = { DropdownChoice.option_id("DES"):
"DES",
+ DropdownChoice.option_id("AES"):
"AES" }.get(request.get("snmpv3_privacy_proto"))
args[11] = snmpv3_privacy_proto
args[12] = request.get("snmpv3_privacy_password")
else: