@Override protected VmStatic generateNewEntity() { VmStatic newVmStatic = new VmStatic(); newVmStatic.setId(Guid.newGuid()); newVmStatic.setName("New Virtual Machine"); newVmStatic.setClusterId(FixturesTool.CLUSTER); newVmStatic.setVmtGuid(FixturesTool.VM_TEMPLATE_RHEL5); newVmStatic.setOrigin(OriginType.OVIRT); newVmStatic.setQuotaId(FixturesTool.QUOTA_GENERAL); newVmStatic.setCpuProfileId(FixturesTool.CPU_PROFILE_1); newVmStatic.setSmallIconId(FixturesTool.SMALL_ICON_ID); newVmStatic.setLargeIconId(FixturesTool.LARGE_ICON_ID); newVmStatic.setConsoleDisconnectAction(ConsoleDisconnectAction.REBOOT); return newVmStatic; }
static org.ovirt.engine.core.common.businessentities.VM setUpEntityExpectations( org.ovirt.engine.core.common.businessentities.VM entity, VmStatistics statistics, int index, Guid vmId) { entity.setId(vmId); entity.setClusterId(GUIDS[2]); entity.setName(NAMES[index]); entity.setVmDescription(DESCRIPTIONS[index]); entity.setCpuPerSocket(4); entity.setNumOfSockets(2); entity.setUsageMemPercent(20); entity.getGraphicsInfos().put(GraphicsType.VNC, new GraphicsInfo()); entity.setNumOfMonitors(2); entity.setVmType(VmType.Server); entity.setRunOnVdsName(NAMES[NAMES.length - 1]); entity.setOrigin(index == 0 ? OriginType.HOSTED_ENGINE : OriginType.OVIRT); entity.setBootSequence(null); entity.getStaticData().setSmallIconId(GUIDS[2]); entity.getStaticData().setLargeIconId(GUIDS[3]); setUpStatisticalEntityExpectations(entity, statistics); return entity; }
staticVm.setConsoleDisconnectAction(entity.getConsoleDisconnectAction()); staticVm.setSmallIconId(entity.getSmallIconId()); staticVm.setLargeIconId(entity.getLargeIconId()); staticVm.setQuotaId(entity.getQuotaId()); staticVm.setBootMenuEnabled(entity.isBootMenuEnabled());
obj.setCustomProperties(instance.getCustomProperties()); obj.setSmallIconId(instance.getSmallIconId()); obj.setLargeIconId(instance.getLargeIconId()); obj.setProviderId(instance.getProviderId()); obj.setLeaseStorageDomainId(instance.getLeaseStorageDomainId());