@Override public Object convert(String value, Class<?> clazz) { return MigrationSupport.valueOf(value); }
private void initMigrationMode() { getMigrationMode().setItems(Arrays.asList(MigrationSupport.values())); }
entity.setSpiceFileTransferEnabled(rs.getBoolean("is_spice_file_transfer_enabled")); entity.setSpiceCopyPasteEnabled(rs.getBoolean("is_spice_copy_paste_enabled")); entity.setMigrationSupport(MigrationSupport.forValue(rs.getInt("migration_support"))); entity.setDedicatedVmForVdsList(Guid.createGuidListFromString(rs.getString("dedicated_vm_for_vds"))); entity.setMinAllocatedMem(rs.getInt("min_allocated_mem"));
_writer.writeElement(MIGRATION_SUPPORT, String.valueOf(vmBase.getMigrationSupport().getValue()));
consumeReadProperty(content, MIGRATION_SUPPORT, val -> vmBase.setMigrationSupport(MigrationSupport.forValue(Integer.parseInt(val))));
.addValue("kernel_params", entity.getKernelParams()) .addValue("quota_id", entity.getQuotaId()) .addValue("migration_support", entity.getMigrationSupport().getValue()) .addValue("dedicated_vm_for_vds", entity.getDedicatedVmForVdsList().isEmpty() ? null : StringUtils.join(entity.getDedicatedVmForVdsList(), BaseDao.SEPARATOR))
private void updateMigrationOptions() { DataCenterWithCluster dataCenterWithCluster = getDataCenterWithClustersList().getSelectedItem(); if (dataCenterWithCluster == null) { return; } Cluster cluster = dataCenterWithCluster.getCluster(); Version version = getCompatibilityVersion(); // test migration support for VM/cluster level along with the cluster architecture Boolean isMigrationSupported = AsyncDataProvider.getInstance().isMigrationSupported(cluster.getArchitecture(), version); if (isMigrationSupported) { getMigrationMode().setItems(Arrays.asList(MigrationSupport.values())); } else { getMigrationMode().setItems(Arrays.asList(MigrationSupport.PINNED_TO_HOST)); } autoConverge.setIsChangeable(true); migrateCompressed.setIsChangeable(true); }