Search in sources :

Example 1 with AmendVolumeVDSCommandParameters

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());
}
Also used : VdsmImageLocationInfo(org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo) DiskImage(org.ovirt.engine.core.common.businessentities.storage.DiskImage) VDSReturnValue(org.ovirt.engine.core.common.vdscommands.VDSReturnValue) AmendVolumeVDSCommandParameters(org.ovirt.engine.core.common.vdscommands.AmendVolumeVDSCommandParameters)

Aggregations

VdsmImageLocationInfo (org.ovirt.engine.core.common.businessentities.VdsmImageLocationInfo)1 DiskImage (org.ovirt.engine.core.common.businessentities.storage.DiskImage)1 AmendVolumeVDSCommandParameters (org.ovirt.engine.core.common.vdscommands.AmendVolumeVDSCommandParameters)1 VDSReturnValue (org.ovirt.engine.core.common.vdscommands.VDSReturnValue)1