@Test public void getClusterWithVm() { final VM v = new VM(); v.setClusterId(GUID); b.setVm(v); final Cluster g = b.getCluster(); assertEquals(GUID, g.getId()); }
@BeforeEach @Override public void setUp() throws Exception { super.setUp(); existingVm = dao.get(FixturesTool.VM_RHEL5_POOL_57); existingVm.setStatus(VMStatus.Up); VM newVm = new VM(); newVm.setId(Guid.newGuid()); newVm.setClusterId(FixturesTool.CLUSTER_RHEL6_ISCSI); newVm.setVmtGuid(FixturesTool.VM_TEMPLATE_RHEL5); VmStatic newVmStatic = new VmStatic(); newVmStatic.setName("New Virtual Machine"); newVmStatic.setClusterId(FixturesTool.CLUSTER_RHEL6_ISCSI); newVmStatic.setVmtGuid(FixturesTool.VM_TEMPLATE_RHEL5); }
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; }
realOrFakeVm = new VM(); realOrFakeVm.setId(null); realOrFakeVm.setClusterId(parentModel.getUnitVmModel().getSelectedCluster().getId()); realOrFakeVm.setStoragePoolId(parentModel.getUnitVmModel().getSelectedDataCenter().getId()); realOrFakeVm.setClusterCompatibilityVersion(compatibilityVersion);
vm.setClusterId(parentModel.getUnitVmModel().getSelectedCluster().getId()); vm.setStoragePoolId(parentModel.getUnitVmModel().getSelectedDataCenter().getId()); vm.setClusterCompatibilityVersion(parentModel.getUnitVmModel().getSelectedCluster().getCompatibilityVersion());
vm.setUtcDiff(instance.getUtcDiff()); vm.setClusterCompatibilityVersion(instance.getClusterCompatibilityVersion()); vm.setClusterId(instance.getClusterId()); vm.setClusterName(instance.getClusterName()); vm.setVmCreationDate(instance.getVmCreationDate());