Sergey Gotliv has uploaded a new change for review.

Change subject: engine: Remove StorageType.ALL value
......................................................................

engine: Remove StorageType.ALL value

This value is used only GetVGListVDSCommand, but the fact we are talking
about VG means that this is a block storage - ISCSI or FCP so in case we
can't determine its exact type the UNKNOWN option is probably more
correct than ALL.

Change-Id: I761d322f88304353bb11fceeed39305dd6698045
Signed-off-by: Sergey Gotliv <sgot...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageType.java
M 
backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/StorageTypeTest.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/GetVGListVDSCommand.java
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/21315/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageType.java
index 2067c6d..7b3c86a 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageType.java
@@ -3,7 +3,6 @@
 import java.util.HashMap;
 
 public enum StorageType implements Identifiable {
-    ALL(-1),
     UNKNOWN(0),
     NFS(1),
     FCP(2),
diff --git 
a/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/StorageTypeTest.java
 
b/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/StorageTypeTest.java
index 7ca27a2..ed477e8 100644
--- 
a/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/StorageTypeTest.java
+++ 
b/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/StorageTypeTest.java
@@ -30,6 +30,7 @@
 
     @Test
     public void testNewStorageTypes() {
-        Assert.assertTrue("A storage type was added/removed. Update this test, 
and the isFileDomain/isBlockDomain method accordingly", 
StorageType.values().length == 9);
+        Assert.assertTrue("A storage type was added/removed. Update this test, 
and the isFileDomain/isBlockDomain " +
+                "method accordingly", StorageType.values().length == 8);
     }
 }
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/GetVGListVDSCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/GetVGListVDSCommand.java
index a1c92cc..d4b679f 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/GetVGListVDSCommand.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/GetVGListVDSCommand.java
@@ -54,7 +54,7 @@
             if (vg.containsKey("vgtype")) {
                 sDomain.setStorageType(EnumUtils.valueOf(StorageType.class, 
vg.get("vgtype").toString(), true));
             } else {
-                sDomain.setStorageType(StorageType.ALL);
+                sDomain.setStorageType(StorageType.UNKNOWN);
             }
             result.add(sDomain);
         }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I761d322f88304353bb11fceeed39305dd6698045
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgot...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to