public void setDedicatedVmForVdsList(Guid value) { vmStatic.setDedicatedVmForVdsList(value); }
@JsonIgnore public void setDedicatedVmForVdsList(List<Guid> value) { vmStatic.setDedicatedVmForVdsList(value); }
@Override protected void updateExistingEntity() { existingEntity.setDescription("updated"); existingEntity.setCpuProfileId(FixturesTool.CPU_PROFILE_2); existingEntity.setProviderId(null); List<Guid> hostGuidsList = Arrays.asList(HOST_GUIDS); existingEntity.setDedicatedVmForVdsList(hostGuidsList); }
@Test public void testUpdateHostPinningPolicy() { final VmStatic vmTemplate = new VmStatic(); vmTemplate.setDedicatedVmForVdsList(Guid.newGuid()); final Vm vm = new Vm(); vm.setPlacementPolicy(createPlacementPolicy(Guid.newGuid(), Guid.newGuid())); final VmStatic mappedVm = VmMapper.map(vm, vmTemplate); final List<Guid> hosts = new ArrayList<>(); for (Host host : vm.getPlacementPolicy().getHosts().getHosts()){ hosts.add(Guid.createGuidFromString(host.getId())); } assertEquals(new HashSet(hosts), new HashSet(mappedVm.getDedicatedVmForVdsList())); }
staticVm.setDedicatedVmForVdsList(new LinkedList<>(hostGuidsSet)); } else { vm.setPlacementPolicy(null);
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; }
obj.setThreadsPerCpu(instance.getThreadsPerCpu()); obj.setCreationDate(instance.getCreationDate()); obj.setDedicatedVmForVdsList(instance.getDedicatedVmForVdsList()); obj.setDescription(instance.getDescription()); obj.setComment(instance.getComment());