Module: check_mk
Branch: master
Commit: 2375aa6d25dd01b4969c3103111e1f95b2dface9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2375aa6d25dd01…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Feb 11 10:04:49 2016 +0100
Fixed attributes shadowing method names - should be cleaned up more
---
web/plugins/wato/bi.py | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/web/plugins/wato/bi.py b/web/plugins/wato/bi.py
index c1cde4a..1129311 100644
--- a/web/plugins/wato/bi.py
+++ b/web/plugins/wato/bi.py
@@ -359,11 +359,12 @@ class ModeBI(WatoMode):
# | Valuespecs |
# '--------------------------------------------------------------------'
+ # FIXME TODO self._vs_call_rule etc. refactor to properties
def _create_valuespecs(self):
- self._vs_call_rule = self._vs_call_rule()
- self._vs_host_re = self._vs_host_re()
- self._vs_node = self._vs_node()
- self._vs_aggregation = self._vs_aggregation()
+ self._vs_call_rule = self._get_vs_call_rule()
+ self._vs_host_re = self._get_vs_host_re()
+ self._vs_node = self._get_vs_node()
+ self._vs_aggregation = self._get_vs_aggregation()
def _allowed_rule_choices(self):
@@ -408,7 +409,7 @@ class ModeBI(WatoMode):
(len(rule_params), ', '.join(rule_params),
len(arguments)))
- def _vs_call_rule(self):
+ def _get_vs_call_rule(self):
return Tuple(
elements = [
DropdownChoice(
@@ -426,7 +427,7 @@ class ModeBI(WatoMode):
)
- def _vs_host_re(self):
+ def _get_vs_host_re(self):
host_re_help = _("Either an exact host name or a regular expression exactly
matching the host "
"name. Example: <tt>srv.*p</tt> will match
<tt>srv4711p</tt> but not <tt>xsrv4711p2</tt>. ")
return TextUnicode(
@@ -541,7 +542,7 @@ class ModeBI(WatoMode):
]
- def _vs_node(self):
+ def _get_vs_node(self):
# Configuration of leaf nodes
vs_node_simplechoices = [
( "host", _("State of a host"),
@@ -592,7 +593,7 @@ class ModeBI(WatoMode):
return choices
- def _vs_aggregation(self):
+ def _get_vs_aggregation(self):
return Dictionary(
title = _("Aggregation Properties"),
optional_keys = False,