public void doBuild() { buildModel(entity, (source, destination) -> { Frontend.getInstance().runQuery(QueryType.IsBalloonEnabled, new IdQueryParameters(entity.getId()), new AsyncQuery<>( (QueryReturnValue returnValue) -> getModel().getMemoryBalloonDeviceEnabled().setEntity((Boolean) returnValue.getReturnValue()) )); getInstance().isVirtioScsiEnabledForVm(new AsyncQuery<>(returnValue -> getModel().getIsVirtioScsiEnabled().setEntity(returnValue)), entity.getId()); getInstance().getWatchdogByVmId(new AsyncQuery<QueryReturnValue>(returnValue -> { @SuppressWarnings("unchecked") Collection<VmWatchdog> watchdogs = returnValue.getReturnValue(); for (VmWatchdog watchdog : watchdogs) { getModel().getWatchdogAction().setSelectedItem(watchdog.getAction()); getModel().getWatchdogModel().setSelectedItem(watchdog.getModel()); } }), entity.getId()); Frontend.getInstance().runQuery(QueryType.GetRngDevice, new IdQueryParameters(entity.getId()), new AsyncQuery<QueryReturnValue>(returnValue -> { List<VmDevice> rngDevices = returnValue.getReturnValue(); getModel().getIsRngEnabled().setEntity(!rngDevices.isEmpty()); if (!rngDevices.isEmpty()) { VmRngDevice rngDevice = new VmRngDevice(rngDevices.get(0)); getModel().setRngDevice(rngDevice); } } )); getModel().getEmulatedMachine().setSelectedItem(entity.getCustomEmulatedMachine()); getModel().getCustomCpu().setSelectedItem(entity.getCustomCpuName()); getModel().getMigrationMode().setSelectedItem(entity.getMigrationSupport()); postBuild(); }); }
getModel().getCustomCpu().setSelectedItem(entity.getCustomCpuName()); getModel().getMigrationMode().setSelectedItem(entity.getMigrationSupport()); getModel().getCpuSharesAmount().setEntity(entity.getCpuShares());
staticVm.setCustomProperties(entity.getCustomProperties()); staticVm.setCustomEmulatedMachine(entity.getCustomEmulatedMachine()); staticVm.setCustomCpuName(entity.getCustomCpuName()); staticVm.setConsoleDisconnectAction(entity.getConsoleDisconnectAction()); staticVm.setSmallIconId(entity.getSmallIconId());
obj.setCustomEmulatedMachine(instance.getCustomEmulatedMachine()); obj.setBiosType(instance.getBiosType()); obj.setCustomCpuName(instance.getCustomCpuName()); obj.setCustomCompatibilityVersion(instance.getCustomCompatibilityVersion()); obj.setStateless(instance.isStateless());