private int nextAvailableNetworkPort() {
        int port = BASE_PORT;
        for (; port < BASE_PORT + MAX_PORTS; port++) {
            if (isFree(port)) return port;
        }
        return 0;
    }
Returns the baseport of the first available port range of length numPorts,
or 0 if there is no range of that length available.
TODO: remove this API

@param numPorts the length of the desired port range.
@return the baseport of the first available range, or 0 if no range is available.
config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java