private void validate(ApplicationId application, ClusterSpec cluster, Capacity requested, ProvisionLogger logger) {
        if (cluster.group().isPresent()) throw new IllegalArgumentException("Node requests cannot specify a group");

        nodeRepository.nodeResourceLimits().ensureWithinAdvertisedLimits("Min", requested.minResources().nodeResources(), cluster);
        nodeRepository.nodeResourceLimits().ensureWithinAdvertisedLimits("Max", requested.maxResources().nodeResources(), cluster);

        if (!requested.minResources().nodeResources().gpuResources().equals(requested.maxResources().nodeResources().gpuResources()))
            throw new IllegalArgumentException(requested + " is invalid: GPU capacity cannot have ranges");

        logInsufficientDiskResources(cluster, requested, logger);
    }
Returns a list of nodes in the prepared or active state, matching the given constraints.
The nodes are ordered by increasing index number.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeRepositoryProvisioner.java