Kanagaraj M has uploaded a new change for review.

Change subject: engine: refactored GlusterServiceStatus enum
......................................................................

engine: refactored GlusterServiceStatus enum

-Removed the FAILED status as vdsm won't return this.
-Changed NOT_INSTALLED to NOT_AVAILABLE to be inline with vdsm output
-Added explantion for the enum constants

Change-Id: I671d6f162e9548bcd804572945d5e87e87eff5f6
Signed-off-by: Kanagaraj M <kmayi...@redhat.com>
---
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServiceStatus.java
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterServerServiceDaoTest.java
2 files changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/60/15360/1

diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServiceStatus.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServiceStatus.java
index 056824b..04a3c5e 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServiceStatus.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterServiceStatus.java
@@ -6,9 +6,8 @@
 public enum GlusterServiceStatus {
     RUNNING,
     STOPPED,
-    FAILED,
-    ERROR,
-    NOT_INSTALLED,
+    ERROR, // when service status command is failed in vdsm
+    NOT_AVAILABLE, // service is not installed in the host
     MIXED, // cluster-wide status, few up, few down
     UNKNOWN, // Couldn't fetch status
     ;
diff --git 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterServerServiceDaoTest.java
 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterServerServiceDaoTest.java
index be3598b..8b534b5 100644
--- 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterServerServiceDaoTest.java
+++ 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterServerServiceDaoTest.java
@@ -116,7 +116,7 @@
         service.setServerId(Guid.createGuidFromString(SERVER1_ID));
         service.setServiceId(Guid.createGuidFromString(SERVICE2_ID));
         service.setServiceType(SERVICE2_TYPE);
-        service.setStatus(GlusterServiceStatus.FAILED);
+        service.setStatus(GlusterServiceStatus.UNKNOWN);
         service.setMessage("test message");
         service.setPid(NEW_PID);
 


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

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

Reply via email to