use of org.ovirt.engine.api.v3.helpers.V3HostHelper in project ovirt-engine by oVirt.
the class V3HostsServer method list.
@GET
public V3Hosts list(@Context HttpHeaders headers, @Context UriInfo ui) {
V3Hosts hosts = adaptList(getDelegate()::list);
// In V3 the collection of hosts used to have the statistics inline, but only when the 'statistics' detail
// was explicitly provided:
Set<String> details = DetailHelper.getDetails(headers, ui);
if (details.contains("statistics")) {
hosts.getHosts().forEach(V3HostHelper::addStatistics);
}
return hosts;
}
Aggregations