use of org.ovirt.engine.core.common.vdscommands.GetVolumeInfoVDSCommandParameters in project ovirt-engine by oVirt.
the class CreateOvaCommand method fillDiskApparentSize.
private void fillDiskApparentSize(Collection<DiskImage> disks) {
disks.forEach(destination -> {
VDSReturnValue vdsReturnValue = vdsCommandsHelper.runVdsCommandWithFailover(VDSCommandType.GetVolumeInfo, new GetVolumeInfoVDSCommandParameters(destination.getStoragePoolId(), destination.getStorageIds().get(0), destination.getId(), destination.getImageId()), destination.getStoragePoolId(), null);
if (vdsReturnValue != null && vdsReturnValue.getSucceeded()) {
DiskImage fromVdsm = (DiskImage) vdsReturnValue.getReturnValue();
destination.setActualSizeInBytes(fromVdsm.getApparentSizeInBytes());
}
});
}
Aggregations