def manage_initial_service_status_brok(self, b): data = b.data s_id = data['id'] #print "Creating Service:", s_id, data s = Service({}) self.update_element(s, data) #add instance_id to the host, so we know in which scheduler he is s.instance_id = b.instance_id s.check_period = self.get_timeperiod(s.check_period) s.notification_period = self.get_timeperiod(s.notification_period) s.contacts = self.get_contacts(s.contacts) del s.escalations #print "S:", s self.services[s_id] = s self.number_of_objects += 1
def manage_initial_service_status_brok(self, b): data = b.data s_id = data["id"] # print "Creating Service:", s_id, data s = Service({}) self.update_element(s, data) # add instance_id to the host, so we know in which scheduler he is s.instance_id = b.instance_id s.check_period = self.get_timeperiod(s.check_period) s.notification_period = self.get_timeperiod(s.notification_period) s.contacts = self.get_contacts(s.contacts) del s.escalations # print "S:", s # We need to rebuild Downtime and Comment relationship for dtc in s.downtimes + s.comments: dtc.ref = s self.services[s_id] = s self.number_of_objects += 1