Module: check_mk
Branch: master
Commit: 91f3ab1ea28cbb3feba6fd01dc69da81c77debd4
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=91f3ab1ea28cbb…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon May 14 11:34:38 2012 +0200
Added automation_commands to make automations pluginable
---
ChangeLog | 1 +
web/htdocs/wato.py | 6 ++++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index c537cf4..193a0b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,7 @@
* Sidebar snapin: show pending changes
* New rule for configuring custom_checks - allowing to run arbitrary
active checks even if not yet formalized (like HTTP and TCP)
+ * Added automation_commands to make automations pluginable
* FIX: fix parent scan on single site installations
* FIX: fix folder visibility permission handling
* FIX: honor folder-permissions when creating, deleting
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 8e96ce8..0ab2280 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -7214,6 +7214,7 @@ def our_site_id():
return site_id
return None
+automation_commands = {}
def page_automation():
secret = html.var("secret")
@@ -7232,8 +7233,13 @@ def page_automation():
indata = mk_eval(html.var("indata"))
result = check_mk_local_automation(cmk_command, args, indata)
html.write(repr(result))
+
elif command == "push-snapshot":
html.write(repr(automation_push_snapshot()))
+
+ elif command in automation_commands:
+ html.write(repr(automation_commands[command]()))
+
else:
raise MKGeneralException(_("Invalid automation command."))