private static void requireUniqueInstanceIds(Context context, List<DeploymentInstanceSpec> instances) {
        Set<InstanceName> instanceNames = new HashSet<>();
        for (var instance : instances) {
            if ( ! instanceNames.add(instance.name()))
                context.illegal("Duplicate instance name '" + instance.name() + "' specified in deployment.xml.");
        }
    }
Validate deployment spec (deployment.xml).

@author hmusum
@author bratseth
config-model/src/main/java/com/yahoo/vespa/model/application/validation/DeploymentSpecValidator.java