public boolean matches(String hostname, String flavor, Optional<ClusterMembership> membership) {
        if ( ! hostnames.isEmpty() && ! hostnames.contains(hostname)) return false;
        if ( ! flavors.isEmpty() && ! flavors.contains(flavor)) return false;
        if ( ! clusterTypes.isEmpty() && ! (membership.isPresent() && clusterTypes.contains(membership.get().cluster().type()))) return false;
        if ( ! clusterIds.isEmpty() && ! (membership.isPresent() && clusterIds.contains(membership.get().cluster().id()))) return false;
        return true;
    }
Returns true if this filter matches the given host properties
config-provisioning/src/main/java/com/yahoo/config/provision/HostFilter.java