use of org.ovirt.engine.core.common.action.ShutdownVmParameters 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.action.ShutdownVmParameters in project ovirt-engine by oVirt.
the class VmListModel method onShutdown.
private void onShutdown() {
final ConfirmationModel model = (ConfirmationModel) getWindow();
onPowerAction(ActionType.ShutdownVm, vm -> new ShutdownVmParameters(vm.getId(), true, model.getReason().getEntity()));
}
Aggregations