'Create a new service based on a host_name and service instance.
:param hosts:       The hosts items instance.
:type hosts:        shinken.objects.host.Hosts
:param host_name:   The host_name to create a new service.
:param service:     The service to be used as template.
:type service:      Service
:return:            The new service created.
:rtype:             Service'

def _local_create_service(self, hosts, host_name, service):

    h = hosts.find_by_name(host_name.strip())
    if h.is_excluded_for(service):
        return
    new_s = service.copy()
    new_s.host_name = host_name
    new_s.register = 1
    if new_s.is_duplicate():
        self.add_item(new_s, index=False)
    else:
        self.add_item(new_s)
    return new_s
