use of org.ovirt.engine.core.common.vdscommands.AmendVolumeVDSCommandParameters in project ovirt-engine by oVirt.
the class AmendVolumeCommand method executeCommand.
@Override
protected void executeCommand() {
VdsmImageLocationInfo info = (VdsmImageLocationInfo) getParameters().getVolInfo();
DiskImage image = imagesHandler.getVolumeInfoFromVdsm(getParameters().getStoragePoolId(), info.getStorageDomainId(), info.getImageGroupId(), info.getImageId());
info.setGeneration(image.getImage().getGeneration());
persistCommandIfNeeded();
VDSReturnValue vdsReturnValue = vdsCommandsHelper.runVdsCommandWithFailover(VDSCommandType.AmendVolume, new AmendVolumeVDSCommandParameters(getParameters().getStorageJobId(), info.getStorageDomainId(), info.getImageGroupId(), info.getImageId(), info.getGeneration(), getParameters().getQcowCompat()), getParameters().getStoragePoolId(), this);
if (!vdsReturnValue.getSucceeded()) {
setCommandStatus(CommandStatus.FAILED);
}
setSucceeded(vdsReturnValue.getSucceeded());
}
Aggregations