private Node createNode(Inspector inspector) {
        var ipAddresses = new ArrayList<String>();
        inspector.field("ipAddresses").traverse((ArrayTraverser) (i, item) -> ipAddresses.add(item.asString()));
        var ipAddressPool = new ArrayList<String>();
        inspector.field("additionalIpAddresses").traverse((ArrayTraverser) (i, item) -> ipAddressPool.add(item.asString()));

        List<HostName> hostnames = new ArrayList<>();
        inspector.field("additionalHostnames").traverse((ArrayTraverser) (i, item) ->
                hostnames.add(HostName.of(item.asString())));

        Node.Builder builder = Node.create(inspector.field("id").asString(),
                                           IP.Config.of(ipAddresses, ipAddressPool, hostnames),
                                           inspector.field("hostname").asString(),
                                           flavorFromSlime(inspector),
                                           nodeTypeFromSlime(inspector.field("type")))
                                   .cloudAccount(nodeRepository.zone().cloud().account());
        optionalString(inspector.field("extraId")).ifPresent(builder::extraId);
        optionalString(inspector.field("parentHostname")).ifPresent(builder::parentHostname);
        optionalString(inspector.field("modelName")).ifPresent(builder::modelName);
        optionalString(inspector.field("reservedTo")).map(TenantName::from).ifPresent(builder::reservedTo);
        optionalString(inspector.field("provisionedFor")).map(ApplicationId::fromSerializedForm).ifPresent(builder::provisionedForApplicationId);
        optionalString(inspector.field("exclusiveTo")).map(ApplicationId::fromSerializedForm).ifPresent(builder::exclusiveToApplicationId);
        optionalString(inspector.field("switchHostname")).ifPresent(builder::switchHostname);
        return builder.build();
    }
Returns true if the peer is a tenant host or node.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiHandler.java