Module: check_mk
Branch: master
Commit: 41342ae432019a6d6ff94b884bd8003b795dc4e1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=41342ae432019a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Wed Apr 6 16:09:10 2016 +0200
3329 FIX Function discover_services now allows the URL parameter mode
The <tt>mode</tt> can e.g. be set to <tt>fixall</tt> in order to
remove execeeding
and add missing services. The implementation was always present, but the validation
of the request complained that <tt>mode</tt> was not a valid parameter. This
has
been fixed. Thanks to Thomas Huber.
---
.werks/3329 | 13 +++++++++++++
ChangeLog | 1 +
web/plugins/webapi/webapi.py | 2 +-
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/.werks/3329 b/.werks/3329
new file mode 100644
index 0000000..49def9e
--- /dev/null
+++ b/.werks/3329
@@ -0,0 +1,13 @@
+Title: Function discover_services now allows the URL parameter mode
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.9i1
+Date: 1459951658
+
+The <tt>mode</tt> can e.g. be set to <tt>fixall</tt> in order to
remove execeeding
+and add missing services. The implementation was always present, but the validation
+of the request complained that <tt>mode</tt> was not a valid parameter. This
has
+been fixed. Thanks to Thomas Huber.
diff --git a/ChangeLog b/ChangeLog
index 8577fb0..2ff2488 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -232,6 +232,7 @@
* 3366 FIX: Fixed renaming of hosts not updating parents configured in folders
* 3369 FIX: Printing configuration warning when host references itself as parent
* 3371 FIX: Be compatible to old site=None setting read from hosts.mk...
+ * 3329 FIX: Function discover_services now allows the URL parameter mode...
Notifications:
* 3263 Notifications: allow users to restrict by their contact groups...
diff --git a/web/plugins/webapi/webapi.py b/web/plugins/webapi/webapi.py
index bbb2ff3..d39b6d3 100644
--- a/web/plugins/webapi/webapi.py
+++ b/web/plugins/webapi/webapi.py
@@ -229,7 +229,7 @@ api_actions["delete_host"] = {
###############
def action_discover_services(request):
- validate_request_keys(request, ["hostname"])
+ validate_request_keys(request, ["hostname", "mode"])
config.need_permission("wato.services")
mode = html.var("mode") and html.var("mode") or "new"