From 9f3ba90dc0106dd4fad94ede49fb9806479c79c5 Mon Sep 17 00:00:00 2001 From: Gabes Jean Date: Tue, 18 Jan 2011 12:49:20 +0100 Subject: [PATCH] Fix : bad host group member id in NDO. --- shinken/modules/ndodb_mysql_broker/ndodb_broker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shinken/modules/ndodb_mysql_broker/ndodb_broker.py b/shinken/modules/ndodb_mysql_broker/ndodb_broker.py index e5b3904..e820912 100644 --- a/shinken/modules/ndodb_mysql_broker/ndodb_broker.py +++ b/shinken/modules/ndodb_mysql_broker/ndodb_broker.py @@ -390,8 +390,9 @@ class Ndodb_broker: #Ok, the hostgroups table is uptodate, now we add relations #between hosts and hostgroups for (h_id, h_name) in b.data['members']: + host_id = self.get_host_object_id_by_name(data['host_name']) hostgroup_members_data = {'instance_id' : data['instance_id'], 'hostgroup_id' : data['id'], - 'host_object_id' : h_id} + 'host_object_id' : host_id} q = self.db.create_insert_query('hostgroup_members', hostgroup_members_data) res.append(q) return res -- 2.11.4.GIT