use of org.ovirt.engine.ui.uicommonweb.builders.vm.VmIconUnitAndVmToParameterBuilder in project ovirt-engine by oVirt.
the class VmListModel method getUpdateVmParameters.
public VmManagementParametersBase getUpdateVmParameters(boolean applyCpuChangesLater) {
UnitVmModel model = (UnitVmModel) getWindow();
VmManagementParametersBase updateVmParams = new VmManagementParametersBase(getcurrentVm());
setVmWatchdogToParams(model, updateVmParams);
updateVmParams.setSoundDeviceEnabled(model.getIsSoundcardEnabled().getEntity());
updateVmParams.setConsoleEnabled(model.getIsConsoleDeviceEnabled().getEntity());
updateVmParams.setBalloonEnabled(balloonEnabled(model));
updateVmParams.setVirtioScsiEnabled(model.getIsVirtioScsiEnabled().getEntity());
updateVmParams.setApplyChangesLater(applyCpuChangesLater);
updateVmParams.setUpdateNuma(model.isNumaChanged());
updateVmParams.setAffinityLabels(model.getLabelList().getSelectedItems());
if (model.getIsHeadlessModeEnabled().getEntity()) {
updateVmParams.getVmStaticData().setDefaultDisplayType(DisplayType.none);
}
BuilderExecutor.build(new Pair<>((UnitVmModel) getWindow(), getSelectedItem()), updateVmParams, new VmIconUnitAndVmToParameterBuilder());
setRngDeviceToParams(model, updateVmParams);
BuilderExecutor.build(model, updateVmParams, new UnitToGraphicsDeviceParamsBuilder());
return updateVmParams;
}
Aggregations