use of org.ovirt.engine.core.common.vdscommands.VdsAndVmIDVDSParametersBase in project ovirt-engine by oVirt.
the class FreezeVmCommand method perform.
@Override
protected void perform() {
VDSReturnValue returnValue = runVdsCommand(VDSCommandType.Freeze, new VdsAndVmIDVDSParametersBase(getVdsId(), getVmId()));
setActionReturnValue(returnValue.getReturnValue());
setSucceeded(returnValue.getSucceeded());
}
use of org.ovirt.engine.core.common.vdscommands.VdsAndVmIDVDSParametersBase in project ovirt-engine by oVirt.
the class RebootVmCommand method perform.
@Override
protected void perform() {
if (isColdReboot()) {
ActionReturnValue returnValue = runInternalAction(ActionType.ShutdownVm, new ShutdownVmParameters(getVmId(), false));
setReturnValue(returnValue);
setSucceeded(returnValue.getSucceeded());
if (getSucceeded()) {
resourceManager.getVmManager(getVmId()).setColdReboot(true);
}
} else {
final VDSReturnValue returnValue = runVdsCommand(VDSCommandType.RebootVm, new VdsAndVmIDVDSParametersBase(getVdsId(), getVmId()));
setActionReturnValue(returnValue.getReturnValue());
setSucceeded(returnValue.getSucceeded());
}
}
use of org.ovirt.engine.core.common.vdscommands.VdsAndVmIDVDSParametersBase in project ovirt-engine by oVirt.
the class CreateSnapshotForVmCommand method freezeVm.
/**
* Freezing the VM is needed for live snapshot with Cinder disks.
*/
private void freezeVm() {
if (!shouldFreezeOrThawVm()) {
return;
}
VDSReturnValue returnValue;
try {
auditLogDirector.log(this, AuditLogType.FREEZE_VM_INITIATED);
returnValue = runVdsCommand(VDSCommandType.Freeze, new VdsAndVmIDVDSParametersBase(getVds().getId(), getVmId()));
} catch (EngineException e) {
handleFreezeVmFailure(e);
return;
}
if (returnValue.getSucceeded()) {
auditLogDirector.log(this, AuditLogType.FREEZE_VM_SUCCESS);
} else {
handleFreezeVmFailure(new EngineException(EngineError.freezeErr));
}
}
use of org.ovirt.engine.core.common.vdscommands.VdsAndVmIDVDSParametersBase in project ovirt-engine by oVirt.
the class CancelConvertVmCommand method executeVmCommand.
@Override
protected void executeVmCommand() {
VDSReturnValue retVal = runVdsCommand(VDSCommandType.CancelConvertVm, new VdsAndVmIDVDSParametersBase(getVdsId(), getVmId()));
setSucceeded(retVal.getSucceeded());
}
use of org.ovirt.engine.core.common.vdscommands.VdsAndVmIDVDSParametersBase in project ovirt-engine by oVirt.
the class ThawVmCommand method perform.
@Override
protected void perform() {
VDSReturnValue returnValue = runVdsCommand(VDSCommandType.Thaw, new VdsAndVmIDVDSParametersBase(getVdsId(), getVmId()));
setActionReturnValue(returnValue.getReturnValue());
setSucceeded(returnValue.getSucceeded());
}
Aggregations