HostRestRep host = parent.hosts().get(hostId);
URI clusterId = (host != null) ? id(host.getCluster()) : null;
ResourceFilter<ExportGroupRestRep> filter;
if (virtualArrayId == null) {
filter = new ExportHostOrClusterFilter(hostId, clusterId);
}
else {
filter = new ExportHostOrClusterFilter(hostId, clusterId).and(new ExportVirtualArrayFilter(virtualArrayId));
}
return findByProject(projectId, filter);
}