[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
Gerhard Lausser
gerhard.lausser at consol.de
Tue Feb 28 22:16:29 UTC 2012
The following commit has been merged in the debian/master branch:
commit beacb6b02c3d40bc1a87b2cbab6b2a9b9e7d5cf1
Author: Gerhard Lausser <gerhard.lausser at consol.de>
Date: Fri Jan 27 00:43:09 2012 +0100
Fix a bug in contactgroup livestatus mapping and set defaults for bool attributes too
diff --git a/shinken/modules/livestatus_broker/mapping.py b/shinken/modules/livestatus_broker/mapping.py
index b3f48f8..04fd1f0 100644
--- a/shinken/modules/livestatus_broker/mapping.py
+++ b/shinken/modules/livestatus_broker/mapping.py
@@ -260,7 +260,7 @@ livestatus_attribute_map = {
},
'contact_groups': {
'description': 'A list of all contact groups this host is in',
- 'function': lambda item, req: [x.get_name() for x in item.contact_groups], # CONTROLME2
+ 'function': lambda item, req: [x for x in item.contact_groups], # CONTROLME2
'datatype': list,
},
'criticity': {
@@ -4462,6 +4462,8 @@ for objtype in ['Host', 'Service', 'Contact', 'Command', 'Timeperiod', 'Downtime
getattr(cls, 'lsm_'+attribute).im_func.default = ''
elif getattr(cls, 'lsm_'+attribute).im_func.datatype == list:
getattr(cls, 'lsm_'+attribute).im_func.default = []
+ elif getattr(cls, 'lsm_'+attribute).im_func.datatype == bool:
+ getattr(cls, 'lsm_'+attribute).im_func.default = False
for objtype in ['Host', 'Service', 'Contact', 'Command', 'Timeperiod', 'Downtime', 'Comment', 'Hostgroup', 'Servicegroup', 'Contactgroup', 'SchedulerLink', 'PollerLink', 'ReactionnerLink', 'BrokerLink', 'Problem', 'Logline', 'Config']:
cls = [t[1] for t in table_class_map.values() if t[0] == objtype][0]
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list