private void updateProperties() { Cluster cluster = getEntity(); setName(cluster.getName()); setDescription(cluster.getDescription()); setCpuType(cluster.getCpuName()); setDataCenterName(cluster.getStoragePoolName()); setMemoryOverCommit(cluster.getMaxVdsMemoryOverCommit()); setCpuThreads(cluster.getCountThreadsAsCores()); setResiliencePolicy(cluster.getMigrateOnError()); setEmulatedMachine(cluster.getEmulatedMachine()); setCompatibilityVersion(cluster.getCompatibilityVersion().getValue()); generateClusterType(cluster.supportsGlusterService(), cluster.supportsVirtService()); AsyncDataProvider.getInstance().getNumberOfVmsInCluster(new AsyncQuery<>( (QueryReturnValue returnValue) -> setNumberOfVms((Integer) returnValue.getReturnValue())), cluster.getId()); }
private static Cluster cloneCluster(Cluster instance) { Cluster obj = new Cluster(); obj.setId(instance.getId()); obj.setName(instance.getName()); obj.setDescription(instance.getDescription()); obj.setComment(instance.getComment()); obj.setCpuName(instance.getCpuName()); obj.setClusterCompatibilityLevelUpgradeNeeded(instance.isClusterCompatibilityLevelUpgradeNeeded()); obj.setCompatibilityVersion(instance.getCompatibilityVersion()); obj.setMigrateOnError(instance.getMigrateOnError()); obj.setTransparentHugepages(instance.getTransparentHugepages()); obj.setStoragePoolId(instance.getStoragePoolId()); obj.setMaxVdsMemoryOverCommit(instance.getMaxVdsMemoryOverCommit()); obj.setCountThreadsAsCores(instance.getCountThreadsAsCores()); obj.setEmulatedMachine(instance.getEmulatedMachine()); obj.setDetectEmulatedMachine(instance.isDetectEmulatedMachine()); obj.setArchitecture(instance.getArchitecture()); obj.setSerialNumberPolicy(instance.getSerialNumberPolicy()); obj.setCustomSerialNumber(instance.getCustomSerialNumber()); obj.setFencingPolicy(new FencingPolicy(instance.getFencingPolicy())); obj.setAutoConverge(instance.getAutoConverge()); obj.setMigrateCompressed(instance.getMigrateCompressed()); return obj; }
model.setErrorHandling(map(entity.getMigrateOnError(), (ErrorHandling)null)); model.setVirtService(entity.supportsVirtService()); model.setGlusterService(entity.supportsGlusterService());
getDataCenter().setIsChangeable(selectedDataCenter == null); setMigrateOnErrorOption(getEntity().getMigrateOnError());
.addValue("compatibility_version", cluster.getCompatibilityVersion()) .addValue("migrate_on_error", cluster.getMigrateOnError()) .addValue("virt_service", cluster.supportsVirtService()) .addValue("gluster_service", cluster.supportsGlusterService())