public boolean isOvirtVintageNode() { return getVdsType() == VDSType.oVirtVintageNode; }
public boolean isOvirNode() { return getVdsType() == VDSType.oVirtNode; }
/** * Ensures that all of the right instances for the given types. */ @Test public void testGetAllOfTypes() { List<VDS> result = dao.getAllOfTypes(new VDSType[] { VDSType.VDS }); assertNotNull(result); assertFalse(result.isEmpty()); for (VDS vds : result) { assertEquals(VDSType.VDS, vds.getVdsType()); } }
/** * Ensures that all of the right instances for the given type. */ @Test public void testGetAllOfType() { List<VDS> result = dao.getAllOfType(VDSType.VDS); assertNotNull(result); assertFalse(result.isEmpty()); for (VDS vds : result) { assertEquals(VDSType.VDS, vds.getVdsType()); } }
private static Object cloneVDS(VDS instance) { VDS obj = new VDS(); obj.setHostName(instance.getHostName()); obj.setSshKeyFingerprint(instance.getSshKeyFingerprint()); obj.setSshPort(instance.getSshPort()); obj.setSshUsername(instance.getSshUsername()); obj.setFenceAgents(cloneAgents(instance.getFenceAgents())); obj.setDisablePowerManagementPolicy(instance.isDisablePowerManagementPolicy()); obj.setPmKdumpDetection(instance.isPmKdumpDetection()); obj.setPort(instance.getPort()); obj.setServerSslEnabled(instance.isServerSslEnabled()); obj.setClusterId(instance.getClusterId()); obj.setId(instance.getId()); obj.setVdsName(instance.getName()); obj.setVdsStrength(instance.getVdsStrength()); obj.setVdsType(instance.getVdsType()); obj.setUniqueId(instance.getUniqueId()); obj.setVdsSpmPriority(instance.getVdsSpmPriority()); obj.setCurrentKernelCmdline(instance.getCurrentKernelCmdline()); obj.setKernelCmdlineParsable(instance.isKernelCmdlineParsable()); obj.setLastStoredKernelCmdline(instance.getLastStoredKernelCmdline()); obj.setKernelCmdlineBlacklistNouveau(instance.isKernelCmdlineBlacklistNouveau()); obj.setKernelCmdlineIommu(instance.isKernelCmdlineIommu()); obj.setKernelCmdlineKvmNested(instance.isKernelCmdlineKvmNested()); obj.setKernelCmdlinePciRealloc(instance.isKernelCmdlinePciRealloc()); obj.setKernelCmdlineFips(instance.isKernelCmdlineFips()); obj.setKernelCmdlineUnsafeInterrupts(instance.isKernelCmdlineUnsafeInterrupts()); return obj; }
vmSummary.setTotal(entity.getVmCount()); model.setSummary(vmSummary); if (entity.getVdsType() != null) { HostType type = map(entity.getVdsType(), null); model.setType(type);