private static Allocation fromHostname(Context context, HostName hostname, IpAddresses.Stack stack, List<String> unusedIps) {
            Optional<String> ipv4Address = resolveAndVerify(context, hostname, stack, IP.Version.v4, unusedIps);
            Optional<String> ipv6Address = resolveAndVerify(context, hostname, stack, IP.Version.v6, unusedIps);
            return new Allocation(hostname.value(), ipv4Address, ipv6Address);
        }
Allocate an IPv4 address. A successful allocation is guaranteed to have an IPv4 address.

@param ipAddress Unassigned IPv4 address
@param resolver DNS name resolver to use
@return An allocation containing 1 IPv4 address.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/IP.java