use of org.ovirt.engine.api.v3.helpers.V3VmHelper in project ovirt-engine by oVirt.
the class V3VmsServer method list.
@GET
public V3VMs list(@Context HttpHeaders headers, @Context UriInfo ui) {
// Transform the data:
V3VMs vms = adaptList(getDelegate()::list);
// Add the link to the disks collection:
vms.getVMs().forEach(V3VmHelper::addDisksLink);
// Add the requested inline details:
Set<String> details = DetailHelper.getDetails(headers, ui);
if (details != null && !details.isEmpty()) {
vms.getVMs().forEach(vm -> {
V3VmServer server = getVmResource(vm.getId());
V3VmHelper.addInlineDetails(vm, server, details);
});
}
// Add the guest IP address:
vms.getVMs().forEach(V3VmHelper::addGuestIp);
return vms;
}
Aggregations