Module: check_mk
Branch: master
Commit: 96477b46a3b6f5c48ed6a643287324c910c1c4c8
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=96477b46a3b6f5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri May 25 11:38:02 2012 +0200
Allow list of aux tags to be missing in host tag definitions.
---
ChangeLog | 2 ++
web/htdocs/wato.py | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index fe36100..6d6b939 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -23,6 +23,8 @@
* Keep track of changes made by other users before activating changes,
let user confirm this, new permission can be used to prevent a user
from activating foreign changes.
+ * Allow list of aux tags to be missing in host tag definitions. This
+ makes migration from older version easier.
Multisite:
* New display type 'boxes-omit-root' for BI views
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 68d395b..938f247 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -8828,6 +8828,12 @@ def load_hosttags():
"wato_host_tags" : [],
"wato_aux_tags" : []}
execfile(filename, vars, vars)
+ # Convert manually crafted host tags tags WATO-style. This
+ # makes the migration easier
+ for taggroup in vars["wato_host_tags"]:
+ for nr, entry in enumerate(taggroup[2]):
+ if len(entry) <= 2:
+ taggroup[2][nr] = entry + ([],)
return vars["wato_host_tags"], vars["wato_aux_tags"]
except Exception, e: