private NodeList updatePortsFrom(Collection<HostSpec> hosts, NodeList nodes) {
        List<Node> updated = new ArrayList<>();
        for (Node node : nodes) {
            HostSpec hostSpec = getHost(node.hostname(), hosts);
            Allocation allocation = node.allocation().get();
            if (hostSpec.networkPorts().isPresent()) {
                allocation = allocation.withNetworkPorts(hostSpec.networkPorts().get());
                node = node.with(allocation);
            }
            updated.add(node);
        }
        return NodeList.copyOf(updated);
    }
Returns the input nodes with any port allocations from the hosts
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/Activator.java