public IP.Config createIpConfig(Node node) {
        if (!node.type().isHost()) throw new IllegalArgumentException("Node " + node + " is not a host");
        int hostIndex = Integer.parseInt(node.hostname().replaceAll("^[a-z]+|-\\d+$", ""));
        var addresses = List.of("::" + hostIndex + ":0");
        var ipAddressPool = new ArrayList<String>();
        if (!behaviour(Behaviour.failDnsUpdate)) {
            nameResolver.addRecord(node.hostname(), addresses.iterator().next());
            int i = 1;
            for (HostName hostName : node.ipConfig().pool().hostnames()) {
                String ip = "::" + hostIndex + ":" + i++;
                ipAddressPool.add(ip);
                nameResolver.addRecord(hostName.value(), ip);
            }
        }
        IP.Pool pool = node.ipConfig().pool().withIpAddresses(ipAddressPool);
        return node.ipConfig().withPrimary(addresses).withPool(pool);
    }
Sets the host flavor to use to the flavor matching these resources exactly, if any.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/testutils/MockHostProvisioner.java