def _insert_service_to_hosts(self, service: GenericService): service_host = service.get_host_name() if service_host not in self.new_hosts: self.new_hosts[service_host] = GenericHost() self.new_hosts[service_host].name = service_host self.new_hosts[service_host].services[service.name] = service
def _insert_service_to_hosts(self, service: GenericService): """ We want to create hosts for faulty services as GenericService requires that logic. """ service_host = service.get_host_name() if service_host not in self.new_hosts: self.new_hosts[service_host] = GenericHost() self.new_hosts[service_host].name = service_host self.new_hosts[service_host].site = service.site self.new_hosts[service_host].services[service.name] = service