@Override
    public ServiceInfo getServiceInfo() {
        Set<PortInfo> portInfos = new LinkedHashSet<>();
        for (int i = 0; i < portsMeta.getNumPorts(); i++) {
            portInfos.add(new PortInfo(ports.get(i), new LinkedHashSet<>(portsMeta.getTagsAt(i))));
        }
        Map<String, String> properties = new LinkedHashMap<>();
        for (Map.Entry<String, Object> prop : serviceProperties.entrySet()) {
            properties.put(prop.getKey(), prop.getValue().toString());
        }
        return new ServiceInfo(getServiceName(), getServiceType(), portInfos, properties, getConfigId(), getHostName());
    }
Computes a number that identifies the service on the given
host. The number of services of the same type (Class) is
counted and the number is returned.

@param host the host on which the service will run
@return id number for the given service.
config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java