Module: check_mk
Branch: master
Commit: 20c89e90bc840c64a7f3677e36a860d3bd88e543
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=20c89e90bc840c…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Mar 12 08:31:58 2019 +0100
Extract tag persistance from tag objects
* Loading and saving of tag configurations is now done by the TagConfigFile
class.
* The tags are loaded from the new configuration file tags.mk when it
exists. Otherwise the tags will be loaded from hosttags.mk and
converted from the legacy format to the dict format in memory.
* The tags.mk file is always saved in the new dict based format.
Next step is to move the legacy format conversion out of the single
objects to the TagConfigFile class.
CMK-1813
Change-Id: I3a42d3bf0efd070a60f61f87aebfd1ba8e14b18e
---
cmk/gui/config.py | 8 +--
cmk/gui/plugins/config/base.py | 9 +++-
cmk/gui/plugins/wato/builtin_attributes.py | 4 +-
cmk/gui/plugins/webapi/webapi.py | 9 ++--
cmk/gui/wato/pages/tags.py | 27 ++++++----
cmk/gui/watolib/__init__.py | 46 ++++++++--------
cmk/gui/watolib/tags.py | 84 ++++++++++++++----------------
tests/conftest.py | 1 +
tests/unit/cmk/gui/watolib/test_tags.py | 20 +++----
tests/unit/cmk_base/test_packaging.py | 3 +-
10 files changed, 114 insertions(+), 97 deletions(-)
Diff:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commitdiff;h=20c89e90bc…