Ramesh N has uploaded a new change for review.

Change subject: gluster: change the value in RaidType to String
......................................................................

gluster: change the value in RaidType to String

  Changing the type of value in RaidType to String from
int. VDSM expects these values to be string instead of int.

Change-Id: I84d2eaf3e20a81035740e313fdc101d373029011
Bug-Url: https://bugzilla.redhat.com/1215000
Signed-off-by: Ramesh Nachimuthu <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateBrickCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/RaidType.java
2 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/42/40842/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateBrickCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateBrickCommand.java
index 403b244..400f996 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateBrickCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateBrickCommand.java
@@ -94,7 +94,7 @@
                 && !getParameters().getRaidType().equals(RaidType.Raid0)) {
             raidParams.put("type", getParameters().getRaidType().getValue()); 
//$NON-NLS-1$
             raidParams.put("pdCount", 
getParameters().getNoOfPhysicalDisksInRaidVolume()); //$NON-NLS-1$
-            raidParams.put("stripSize", getParameters().getStripeSize()); 
//$NON-NLS-1$
+            raidParams.put("stripeSize", getParameters().getStripeSize()); 
//$NON-NLS-1$
         }
 
         VDSReturnValue returnValue = runVdsCommand(
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/RaidType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/RaidType.java
index 1c9a3e1..232c6c0 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/RaidType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/RaidType.java
@@ -3,13 +3,13 @@
 import java.util.HashMap;
 
 public enum RaidType {
-    None(-1),
-    Raid0(0),
-    Raid6(6),
-    Raid10(10);
+    None("-1"),
+    Raid0("0"),
+    Raid6("6"),
+    Raid10("10");
 
-    private int intValue;
-    private static final HashMap<Integer, RaidType> mappings = new 
HashMap<Integer, RaidType>();
+    private String value;
+    private static final HashMap<String, RaidType> mappings = new 
HashMap<String, RaidType>();
 
     static {
         for (RaidType raidType : values()) {
@@ -17,15 +17,15 @@
         }
     }
 
-    private RaidType(int value) {
-        intValue = value;
+    private RaidType(String value) {
+        this.value = value;
     }
 
-    public int getValue() {
-        return intValue;
+    public String getValue() {
+        return value;
     }
 
-    public static RaidType forValue(int value) {
+    public static RaidType forValue(String value) {
         return mappings.get(value);
     }
 


-- 
To view, visit https://gerrit.ovirt.org/40842
To unsubscribe, visit https://gerrit.ovirt.org/settings

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

Reply via email to