Sahina Bose has uploaded a new change for review.

Change subject: gluster:Gluster async task entities
......................................................................

gluster:Gluster async task entities

Added entity classes related to gluster
async tasks

Change-Id: I28307efec5b08340b3a0415f75364d722ee2e677
Signed-off-by: Sahina Bose <[email protected]>
---
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterAsyncTask.java
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskStatus.java
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskType.java
3 files changed, 112 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/71/15971/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterAsyncTask.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterAsyncTask.java
new file mode 100644
index 0000000..fbb05b8
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterAsyncTask.java
@@ -0,0 +1,43 @@
+package org.ovirt.engine.core.common.asynctasks.gluster;
+
+import java.io.Serializable;
+
+import org.ovirt.engine.core.compat.Guid;
+
+public class GlusterAsyncTask implements Serializable{
+
+    private static final long serialVersionUID = 5165089908032934194L;
+
+    private Guid taskId;
+    private GlusterTaskStatus status;
+    private GlusterTaskType type;
+
+    private String message;
+
+    public Guid getTaskId() {
+        return taskId;
+    }
+    public void setTaskId(Guid taskId) {
+        this.taskId = taskId;
+    }
+    public GlusterTaskStatus getStatus() {
+        return status;
+    }
+    public void setStatus(GlusterTaskStatus status) {
+        this.status = status;
+    }
+    public String getMessage() {
+        return message;
+    }
+    public void setMessage(String message) {
+        this.message = message;
+    }
+    public GlusterTaskType getType() {
+        return type;
+    }
+    public void setType(GlusterTaskType type) {
+        this.type = type;
+    }
+
+
+}
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskStatus.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskStatus.java
new file mode 100644
index 0000000..6e95895
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskStatus.java
@@ -0,0 +1,36 @@
+package org.ovirt.engine.core.common.asynctasks.gluster;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public enum GlusterTaskStatus {
+    RUNNING(0),
+    FAILED(1),
+    COMPLETED(2),
+    ABORTED(3),
+    PAUSED(4);
+
+
+    private int intValue;
+
+    private static Map<Integer, GlusterTaskStatus> mappings;
+
+    static {
+        mappings = new HashMap<Integer, GlusterTaskStatus>();
+        for (GlusterTaskStatus value : values()) {
+            mappings.put(value.getValue(), value);
+        }
+    }
+
+    private GlusterTaskStatus(int value) {
+        intValue = value;
+    }
+
+    public int getValue() {
+        return intValue;
+    }
+
+    public static GlusterTaskStatus forValue(int value) {
+        return mappings.get(value);
+    }
+}
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskType.java
new file mode 100644
index 0000000..5bc9499
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/asynctasks/gluster/GlusterTaskType.java
@@ -0,0 +1,33 @@
+package org.ovirt.engine.core.common.asynctasks.gluster;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.ovirt.engine.core.common.action.VdcActionType;
+
+public enum GlusterTaskType {
+    REPLACE_BRICK(VdcActionType.ReplaceGlusterVolumeBrick);
+   // REMOVE_BRICK(VdcActionType.DeleteGlusterVolume);
+
+    private VdcActionType vdcActionType;
+    private static Map<VdcActionType, GlusterTaskType> mappings;
+
+    static {
+        mappings = new HashMap<VdcActionType, GlusterTaskType>();
+        for (GlusterTaskType value : values()) {
+            mappings.put(value.getActionType(), value);
+        }
+    }
+
+    private GlusterTaskType(VdcActionType actionType) {
+        vdcActionType = actionType;
+    }
+
+    public VdcActionType getActionType() {
+        return vdcActionType;
+    }
+
+     public static GlusterTaskType forValue(VdcActionType value) {
+        return mappings.get(value);
+    }
+}


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

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

Reply via email to