def linkify_sd_by_s(self, hosts, services):
        to_del = []
        errors = self.configuration_errors
        warns = self.configuration_warnings
        for servicedep in self:
            try:
                s_name = servicedep.dependent_service_description
                hst_name = servicedep.dependent_host_name
                serv = services.find_srv_by_name_and_hostname(hst_name, s_name)
                if serv is None:
                    host = hosts.find_by_name(hst_name)
                    if not (host and host.is_excluded_for_sdesc(s_name)):
                        errors.append("Service %s not found for host %s" % (s_name, hst_name))
                    elif host:
                        warns.append("Service %s is excluded from host %s ; "
                                     "removing this servicedependency as it's unusuable."
                                     % (s_name, hst_name))
                    to_del.append(servicedep)
                    continue
                servicedep.dependent_service_description = serv.uuid
                s_name = servicedep.service_description
                hst_name = servicedep.host_name
                serv = services.find_srv_by_name_and_hostname(hst_name, s_name)
                if serv is None:
                    host = hosts.find_by_name(hst_name)
                    if not (host and host.is_excluded_for_sdesc(s_name)):
                        errors.append("Service %s not found for host %s" % (s_name, hst_name))
                    elif host:
                        warns.append("Service %s is excluded from host %s ; "
                                     "removing this servicedependency as it's unusuable."
                                     % (s_name, hst_name))
                    to_del.append(servicedep)
                    continue
                servicedep.service_description = serv.uuid
            except AttributeError as err:
                logger.error("[servicedependency] fail to linkify by service %s: %s",
                             servicedep, err)
                to_del.append(servicedep)
        for servicedep in to_del:
            self.remove_item(servicedep)