public static NodeFilter toNodeFilter(HttpRequest request, Collection<CloudAccount> nonEnclaveAccounts) {
        return NodeFilter.in(request.getProperty("state"),
                             request.getBooleanProperty("includeDeprovisioned"))
                         .matching(NodeHostFilter.from(HostFilter.from(request.getProperty("hostname"),
                                                                       request.getProperty("flavor"),
                                                                       request.getProperty("clusterType"),
                                                                       request.getProperty("clusterId")))
                                                 .and(ApplicationFilter.from(request.getProperty("application")))
                                                 .and(NodeTypeFilter.from(request.getProperty("type")))
                                                 .and(ParentHostFilter.from(request.getProperty("parentHost")))
                                                 .and(NodeOsVersionFilter.from(request.getProperty("osVersion")))
                                                 .and(CloudAccountFilter.from(nonEnclaveAccounts, request.getBooleanProperty("enclave"))));
    }
Returns true if the peer is a tenant host or node.
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/restapi/NodesV2ApiHandler.java