Maor Lipchuk has uploaded a new change for review.

Change subject: core: Introduce volume classification enum
......................................................................

core: Introduce volume classification enum

Introduce volume classification enum to determined if a Cinder disk is
volume or snapshot when deleting it.

Change-Id: I6f74be35f5ea89c1073fac5769d95bc2befe58c3
Bug-Url: https://bugzilla.redhat.com/1185826
Signed-off-by: Maor Lipchuk <[email protected]>
---
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/VolumeClassification.java
1 file changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/53/42053/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/VolumeClassification.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/VolumeClassification.java
new file mode 100644
index 0000000..54aaa02
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/storage/VolumeClassification.java
@@ -0,0 +1,32 @@
+package org.ovirt.engine.core.common.businessentities.storage;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum VolumeClassification {
+    Volume(0),
+    Snapshot(1),
+    Invalid(2);
+
+    private int intValue;
+    private static Map<Integer, VolumeClassification> mappings;
+
+    static {
+        mappings = new HashMap<Integer, VolumeClassification>();
+        for (VolumeClassification error : values()) {
+            mappings.put(error.getValue(), error);
+        }
+    }
+
+    private VolumeClassification(int value) {
+        intValue = value;
+    }
+
+    public int getValue() {
+        return intValue;
+    }
+
+    public static VolumeClassification forValue(int value) {
+        return mappings.get(value);
+    }
+}


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

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

Reply via email to