Ravi Nori has uploaded a new change for review.

Change subject: tools: engine-config cleanup 2.2 SupportGetDevicesVisibility
......................................................................

tools: engine-config cleanup 2.2 SupportGetDevicesVisibility

Remove deprecated config values for version 2.2 from engine-config

Removed SupportGetDevicesVisibility key and the code surrounding the
logic.

Change-Id: Ibf3e6e580b672721ef175a226a2693adba5e0d42
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=859045
Signed-off-by: Ravi Nori <[email protected]>
---
M backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectAllHostsToLunCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
3 files changed, 5 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/89/9489/1

diff --git a/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql 
b/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
index ada476f..8aec096 100644
--- a/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
+++ b/backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
@@ -451,10 +451,6 @@
 select fn_db_add_config_value('SupportedStorageFormats','0,2,3','3.1');
 select fn_db_add_config_value('SupportedStorageFormats','0,2,3','3.2');
 select fn_db_add_config_value('SupportedVDSMVersions','4.5,4.9','general');
-select fn_db_add_config_value('SupportGetDevicesVisibility','false','2.2');
-select fn_db_add_config_value('SupportGetDevicesVisibility','true','3.0');
-select fn_db_add_config_value('SupportGetDevicesVisibility','true','3.1');
-select fn_db_add_config_value('SupportGetDevicesVisibility','true','3.2');
 select fn_db_add_config_value('SupportStorageFormat','false','2.2');
 select fn_db_add_config_value('SupportStorageFormat','true','3.0');
 select fn_db_add_config_value('SupportStorageFormat','true','3.1');
@@ -662,6 +658,10 @@
 select fn_db_delete_config_value('SupportCustomProperties','3.0');
 select fn_db_delete_config_value('SupportCustomProperties','3.1');
 select fn_db_delete_config_value('SupportCustomProperties','3.2');
+select fn_db_delete_config_value('SupportGetDevicesVisibility','2.2');
+select fn_db_delete_config_value('SupportGetDevicesVisibility','3.0');
+select fn_db_delete_config_value('SupportGetDevicesVisibility','3.1');
+select fn_db_delete_config_value('SupportGetDevicesVisibility','3.2');
 
------------------------------------------------------------------------------------
 --                  Split config section
 -- The purpose of this section is to treat config option that was once
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectAllHostsToLunCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectAllHostsToLunCommand.java
index 0de4941..a0c9ce8 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectAllHostsToLunCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ConnectAllHostsToLunCommand.java
@@ -2,10 +2,8 @@
 
 import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.ovirt.engine.core.bll.Backend;
 import org.ovirt.engine.core.common.AuditLogType;
@@ -14,8 +12,6 @@
 import org.ovirt.engine.core.common.businessentities.LUNs;
 import org.ovirt.engine.core.common.businessentities.VDS;
 import org.ovirt.engine.core.common.businessentities.VdsSpmStatus;
-import org.ovirt.engine.core.common.config.Config;
-import org.ovirt.engine.core.common.config.ConfigValues;
 import org.ovirt.engine.core.common.errors.VdcBLLException;
 import org.ovirt.engine.core.common.utils.Pair;
 import 
org.ovirt.engine.core.common.vdscommands.GetDeviceListVDSCommandParameters;
@@ -143,19 +139,7 @@
                 }
             }
             // Refresh all connected luns to host
-            if (!Config.<Boolean> 
GetValue(ConfigValues.SupportGetDevicesVisibility,
-                    vds.getvds_group_compatibility_version().getValue())) {
-                Set<String> hostsLunsIds = new HashSet<String>();
-                List<LUNs> hostLuns = getHostLuns(vds);
-                for (LUNs lun : hostLuns) {
-                    hostsLunsIds.add(lun.getLUN_id());
-                }
-                for (LUNs lun : luns) {
-                    if (!hostsLunsIds.contains(lun.getLUN_id())) {
-                        return new Pair<Boolean, Map<String, 
List<Guid>>>(Boolean.FALSE, resultMap);
-                    }
-                }
-            } else if (!validateConnectedLuns(vds, 
getParameters().getLunIds())) {
+            if (!validateConnectedLuns(vds, getParameters().getLunIds())) {
                 return new Pair<Boolean, Map<String, 
List<Guid>>>(Boolean.FALSE, resultMap);
             }
         }
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
index f06696c..a824ed4 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
@@ -998,11 +998,6 @@
     LDAPQueryTimeout(292),
 
     @Reloadable
-    @TypeConverterAttribute(Boolean.class)
-    @DefaultValueAttribute("false")
-    SupportGetDevicesVisibility(293),
-
-    @Reloadable
     @TypeConverterAttribute(String.class)
     @DefaultValueAttribute("default,ich6")
     DesktopAudioDeviceType(294),


--
To view, visit http://gerrit.ovirt.org/9489
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf3e6e580b672721ef175a226a2693adba5e0d42
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to