@Override protected void build(VmBase source, VmBase destination) { destination.setDedicatedVmForVdsList(source.getDedicatedVmForVdsList()); } }
private void readDedicatedHostsList(XmlNode content) { vmBase.setDedicatedVmForVdsList(new LinkedList<>()); // initialize to empty list for (XmlNode hostNode : selectNodes(content, DEDICATED_VM_FOR_VDS)) { if (hostNode != null && StringUtils.isNotEmpty(hostNode.innerText)) { vmBase.getDedicatedVmForVdsList().add(Guid.createGuidFromString(hostNode.innerText)); } } }
public void setupWindowFromVmBase(VmBase from) { doChangeDefaultHost(from.getDedicatedVmForVdsList()); getModel().getCustomPropertySheet().deserialize(from.getCustomProperties()); setupWindowModelFrom(from); }
/** * Verifies {@link org.ovirt.engine.ui.uicommonweb.builders.vm.FullUnitToVmBaseBuilder} */ protected void verifyBuiltVmBase(VmBase vm) { verifyBuiltCommonVm(vm); verifyBuiltKernelOptions(vm); verifyBuiltMigrationOptions(vm); assertEquals(HOST_ID, vm.getDedicatedVmForVdsList().get(0)); assertEquals(VM_NAME, vm.getName()); assertEquals(USB_POLICY, vm.getUsbPolicy()); }
vmBase.getDedicatedVmForVdsList().forEach(d -> _writer.writeElement(DEDICATED_VM_FOR_VDS, String.valueOf(d)));
private static VmStatic doMapVmBaseHwPartToVmStatic(VmBase entity, VmStatic staticVm, Version version) { staticVm.setMemSizeMb(entity.getMemSizeMb()); staticVm.setMaxMemorySizeMb(entity.getMaxMemorySizeMb()); staticVm.setAutoStartup(entity.isAutoStartup()); staticVm.setSmartcardEnabled(entity.isSmartcardEnabled()); staticVm.setDefaultBootSequence(entity.getDefaultBootSequence()); staticVm.setDefaultDisplayType(entity.getDefaultDisplayType()); staticVm.setNumOfSockets(entity.getNumOfSockets()); staticVm.setCpuPerSocket(entity.getCpuPerSocket()); staticVm.setThreadsPerCpu(entity.getThreadsPerCpu()); staticVm.setNumOfMonitors(entity.getNumOfMonitors()); staticVm.setSingleQxlPci(entity.getSingleQxlPci()); staticVm.setPriority(entity.getPriority()); staticVm.setUsbPolicy(entity.getUsbPolicy()); staticVm.setTunnelMigration(entity.getTunnelMigration()); staticVm.setMigrationSupport(entity.getMigrationSupport()); staticVm.setMigrationDowntime(entity.getMigrationDowntime()); staticVm.setDedicatedVmForVdsList(entity.getDedicatedVmForVdsList()); staticVm.setMinAllocatedMem(entity.getMinAllocatedMem()); staticVm.setNumOfIoThreads(entity.getNumOfIoThreads()); return staticVm; }
model.getPlacementPolicy().setAffinity(vmAffinity); if (!entity.getDedicatedVmForVdsList().isEmpty()) { Hosts hostsList = new Hosts(); for (Guid hostGuid : entity.getDedicatedVmForVdsList()) { Host newHost = new Host(); newHost.setId(hostGuid.toString());
.addValue("quota_id", entity.getQuotaId()) .addValue("migration_support", entity.getMigrationSupport().getValue()) .addValue("dedicated_vm_for_vds", entity.getDedicatedVmForVdsList().isEmpty() ? null : StringUtils.join(entity.getDedicatedVmForVdsList(), BaseDao.SEPARATOR)) .addValue("min_allocated_mem", entity.getMinAllocatedMem()) .addValue("is_run_and_pause", entity.isRunAndPause())
vmBase.getMigrationSupport(), vmBase.isAllowConsoleReconnect(), vmBase.getDedicatedVmForVdsList(), vmBase.getDefaultDisplayType(), vmBase.getMigrationDowntime(),