Shubhendu Tripathi has uploaded a new change for review.

Change subject: gluster: Corrected VDS commands as per latest VDSM verbs
......................................................................

gluster: Corrected VDS commands as per latest VDSM verbs

Corrected error codes, parameters etc for VDS commands as per
latest VDSM verbs changes.

Change-Id: Ief9bcdf7d05f5d4e0bb54a3163ec27c57ccf81e0
Signed-off-by: Shubhendu Tripathi <shtri...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ActivateGlusterVolumeSnapshotCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/DeactivateGlusterVolumeSnapshotCommand.java
M 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotSyncJobTest.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterSnapshotStatus.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java
M backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterVolumeSnapshotDaoTest.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AbstractGlusterBrokerCommand.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GetGlusterVolumeSnapshotConfigInfoVDSCommand.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotConfigReturnForXmlRpc.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotInfoReturnForXmlRpc.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/IVdsServer.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerConnector.java
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerWrapper.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/GlusterVolumeSnapshotStatusCell.java
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
18 files changed, 74 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/54/39354/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ActivateGlusterVolumeSnapshotCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ActivateGlusterVolumeSnapshotCommand.java
index 9e646dd..0ac3217 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ActivateGlusterVolumeSnapshotCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ActivateGlusterVolumeSnapshotCommand.java
@@ -31,7 +31,7 @@
         if (!getSucceeded()) {
             
handleVdsError(AuditLogType.GLUSTER_VOLUME_SNAPSHOT_ACTIVATE_FAILED, 
retVal.getVdsError().getMessage());
         } else {
-            
getGlusterVolumeSnapshotDao().updateSnapshotStatus(getSnapshot().getId(), 
GlusterSnapshotStatus.STARTED);
+            
getGlusterVolumeSnapshotDao().updateSnapshotStatus(getSnapshot().getId(), 
GlusterSnapshotStatus.ACTIVATED);
         }
     }
 
@@ -41,7 +41,7 @@
             return false;
         }
 
-        if (getSnapshot().getStatus() == GlusterSnapshotStatus.STARTED) {
+        if (getSnapshot().getStatus() == GlusterSnapshotStatus.ACTIVATED) {
             
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_ALREADY_ACTIVATED,
                     getSnapshot().getSnapshotName());
         }
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/DeactivateGlusterVolumeSnapshotCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/DeactivateGlusterVolumeSnapshotCommand.java
index 008b987..eee667b 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/DeactivateGlusterVolumeSnapshotCommand.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/DeactivateGlusterVolumeSnapshotCommand.java
@@ -30,7 +30,7 @@
         if (!getSucceeded()) {
             
handleVdsError(AuditLogType.GLUSTER_VOLUME_SNAPSHOT_DEACTIVATE_FAILED, 
retVal.getVdsError().getMessage());
         } else {
-            
getGlusterVolumeSnapshotDao().updateSnapshotStatus(getSnapshot().getId(), 
GlusterSnapshotStatus.STOPPED);
+            
getGlusterVolumeSnapshotDao().updateSnapshotStatus(getSnapshot().getId(), 
GlusterSnapshotStatus.DEACTIVATED);
         }
     }
 
@@ -40,7 +40,7 @@
             return false;
         }
 
-        if (getSnapshot().getStatus() == GlusterSnapshotStatus.STOPPED) {
+        if (getSnapshot().getStatus() == GlusterSnapshotStatus.DEACTIVATED) {
             
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_SNAPSHOT_ALREADY_DEACTIVATED,
                     getSnapshot().getSnapshotName());
         }
diff --git 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotSyncJobTest.java
 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotSyncJobTest.java
index bcefc69..223d3b3 100644
--- 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotSyncJobTest.java
+++ 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterSnapshotSyncJobTest.java
@@ -239,7 +239,7 @@
         snap1.setCreatedAt(existingSnapsCreateDate);
         snap1.setDescription("");
         snap1.setSnapshotName(existingSnapshotNames[0]);
-        snap1.setStatus(GlusterSnapshotStatus.STARTED);
+        snap1.setStatus(GlusterSnapshotStatus.ACTIVATED);
         snap1.setVolumeId(VOLUME_ID_1);
         snapsList.add(snap1);
 
@@ -249,7 +249,7 @@
         snap2.setCreatedAt(existingSnapsCreateDate);
         snap2.setDescription("");
         snap2.setSnapshotName(existingSnapshotNames[1]);
-        snap2.setStatus(GlusterSnapshotStatus.STARTED);
+        snap2.setStatus(GlusterSnapshotStatus.ACTIVATED);
         snap2.setVolumeId(VOLUME_ID_1);
         snapsList.add(snap2);
 
@@ -306,7 +306,7 @@
         snap1.setDescription("");
         snap1.setId(existingSnapshotIds[0]);
         snap1.setSnapshotName(existingSnapshotNames[0]);
-        snap1.setStatus(GlusterSnapshotStatus.STOPPED);
+        snap1.setStatus(GlusterSnapshotStatus.DEACTIVATED);
         snap1.setVolumeId(VOLUME_ID_1);
         snapshots.add(snap1);
 
@@ -316,7 +316,7 @@
         snap2.setDescription("");
         snap2.setId(newSnapshotId);
         snap2.setSnapshotName(newSnapshotName);
-        snap2.setStatus(GlusterSnapshotStatus.STARTED);
+        snap2.setStatus(GlusterSnapshotStatus.ACTIVATED);
         snap2.setVolumeId(VOLUME_ID_1);
         snapshots.add(snap2);
 
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterSnapshotStatus.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterSnapshotStatus.java
index 3a171dc..2219b42 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterSnapshotStatus.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/gluster/GlusterSnapshotStatus.java
@@ -1,8 +1,8 @@
 package org.ovirt.engine.core.common.businessentities.gluster;
 
 public enum GlusterSnapshotStatus {
-    STARTED,
-    STOPPED,
+    ACTIVATED,
+    DEACTIVATED,
     UNKNOWN;
 
     public static GlusterSnapshotStatus from(String status) {
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java
index 86dc606..7374be3 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java
@@ -400,14 +400,15 @@
     GlfsInitException(4572),
     GlfsFiniException(4573),
     GlusterSnapshotException(4700),
-    GlusterSnapshotDeleteVolumeFailedException(4702),
-    GlusterSnapshotDeleteFailedException(4703),
-    GlusterSnapshotActivateFailedException(4704),
-    GlusterSnapshotDeactivateFailedException(4705),
-    GlusterSnapshotRestoreFailedException(4706),
-    GlusterSnapshotConfigFailedException(4708),
-    GlusterSnapshotInfoFailedException(4710),
     GlusterSnapshotCreateFailedException(4701),
+    GlusterSnapshotDeleteFailedException(4702),
+    GlusterSnapshotActivateFailedException(4703),
+    GlusterSnapshotDeactivateFailedException(4704),
+    GlusterSnapshotRestoreFailedException(4705),
+    GlusterSnapshotConfigFailedException(4706),
+    GlusterSnapshotConfigSetFailedException(4707),
+    GlusterSnapshotConfigGetFailedException(4708),
+    GlusterSnapshotInfoFailedException(4709),
 
     UnicodeArgumentException(4900),
 
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties 
b/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
index 7134943..de40153 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
@@ -374,14 +374,15 @@
 GlfsFiniException=Command failed while unmounting gluster volume
 GlusterSnapshotException=Error in executing gluster snapshot command
 GlusterSnapshotInfoFailedException=Gluster snapshot info failed
-GlusterSnapshotDeleteVolumeFailedException=Failed to delete the snapshots for 
the gluster volume
 GlusterSnapshotDeleteFailedException=Failed to delete gluster volume snapshot
 GlusterSnapshotActivateFailedException=Failed to activate gluster volume 
snapshot
 GlusterSnapshotDeactivateFailedException=Failed to de-activate gluster volume 
snapshot
 GlusterSnapshotRestoreFailedException=Failed to restore the gluster volume 
snapshot
 GlusterSnapshotCreateFailedException=Failed to create snapshot for gluster 
volume
-GlusterSnapshotConfigFailedException=Failed to set the Gluster snapshot 
configuration
-
+GlusterSnapshotConfigFailedException=Failed to configure gluster volume 
snapshot
+GlusterSnapshotConfigSetFailedException=Failed to set the gluster volume 
snapshot configuration
+GlusterSnapshotConfigGetFailedException=Failed to get the gluster volume 
snapshot configuration
+GlusterGeoRepConfigFailed=Failed to modify geo-replication config
 CANT_RECONSTRUCT_WHEN_A_DOMAIN_IN_POOL_IS_LOCKED=Can't reconstruct the Master 
Domain when the Data Center contains Domains in Locked state.\nPlease wait 
until the operation for these Domains ends before trying to reconstruct the 
Master Domain again.
 NO_IMPLEMENTATION=Not implemented
 FailedToPlugDisk=Failed to hot-plug disk
diff --git 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterVolumeSnapshotDaoTest.java
 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterVolumeSnapshotDaoTest.java
index 4dbfedd..ad3b33f 100644
--- 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterVolumeSnapshotDaoTest.java
+++ 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/gluster/GlusterVolumeSnapshotDaoTest.java
@@ -150,13 +150,13 @@
 
     @Test
     public void testUpdateSnapshotStatus() {
-        dao.updateSnapshotStatus(existingSnapshot.getSnapshotId(), 
GlusterSnapshotStatus.STOPPED);
+        dao.updateSnapshotStatus(existingSnapshot.getSnapshotId(), 
GlusterSnapshotStatus.DEACTIVATED);
         GlusterVolumeSnapshotEntity snapshot = 
dao.getById(existingSnapshot.getSnapshotId());
 
         assertNotNull(snapshot);
 
         assertFalse(snapshot.equals(existingSnapshot));
-        existingSnapshot.setStatus(GlusterSnapshotStatus.STOPPED);
+        existingSnapshot.setStatus(GlusterSnapshotStatus.DEACTIVATED);
         assertEquals(existingSnapshot, snapshot);
     }
 
@@ -164,13 +164,13 @@
     public void testUpdateSnapshotStatusByName() {
         dao.updateSnapshotStatusByName(existingSnapshot.getVolumeId(),
                 existingSnapshot.getSnapshotName(),
-                GlusterSnapshotStatus.STOPPED);
+                GlusterSnapshotStatus.DEACTIVATED);
         GlusterVolumeSnapshotEntity snapshot = 
dao.getById(existingSnapshot.getSnapshotId());
 
         assertNotNull(snapshot);
 
         assertFalse(snapshot.equals(existingSnapshot));
-        existingSnapshot.setStatus(GlusterSnapshotStatus.STOPPED);
+        existingSnapshot.setStatus(GlusterSnapshotStatus.DEACTIVATED);
         assertEquals(existingSnapshot, snapshot);
     }
 
@@ -179,8 +179,8 @@
         existingSnapshot = dao.getById(EXISTING_SNAPSHOT_ID);
         existingSnapshot1 = dao.getById(EXISTING_SNAPSHOT_ID_1);
 
-        existingSnapshot.setStatus(GlusterSnapshotStatus.STOPPED);
-        existingSnapshot1.setStatus(GlusterSnapshotStatus.STOPPED);
+        existingSnapshot.setStatus(GlusterSnapshotStatus.DEACTIVATED);
+        existingSnapshot1.setStatus(GlusterSnapshotStatus.DEACTIVATED);
 
         List<GlusterVolumeSnapshotEntity> snapshots = new ArrayList<>();
         snapshots.add(existingSnapshot);
@@ -191,8 +191,8 @@
         GlusterVolumeSnapshotEntity tmpSnapshot = 
dao.getById(EXISTING_SNAPSHOT_ID);
         GlusterVolumeSnapshotEntity tmpSnapshot1 = 
dao.getById(EXISTING_SNAPSHOT_ID_1);
 
-        assertEquals(tmpSnapshot.getStatus(), GlusterSnapshotStatus.STOPPED);
-        assertEquals(tmpSnapshot1.getStatus(), GlusterSnapshotStatus.STOPPED);
+        assertEquals(tmpSnapshot.getStatus(), 
GlusterSnapshotStatus.DEACTIVATED);
+        assertEquals(tmpSnapshot1.getStatus(), 
GlusterSnapshotStatus.DEACTIVATED);
     }
 
     private GlusterVolumeSnapshotEntity insertTestSnapshot() {
@@ -204,7 +204,7 @@
         snapshot.setSnapshotName(NEW_SNAPSHOT_NAME);
         snapshot.setVolumeId(VOLUME_ID);
         snapshot.setDescription("test-description");
-        snapshot.setStatus(GlusterSnapshotStatus.STARTED);
+        snapshot.setStatus(GlusterSnapshotStatus.ACTIVATED);
         snapshot.setCreatedAt(new Date());
 
         dao.save(snapshot);
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AbstractGlusterBrokerCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AbstractGlusterBrokerCommand.java
index 2fe810c..59384be 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AbstractGlusterBrokerCommand.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AbstractGlusterBrokerCommand.java
@@ -72,13 +72,14 @@
         case GlfsFiniException:
         case GlusterSnapshotException:
         case GlusterSnapshotInfoFailedException:
-        case GlusterSnapshotDeleteVolumeFailedException:
         case GlusterSnapshotDeleteFailedException:
         case GlusterSnapshotActivateFailedException:
         case GlusterSnapshotDeactivateFailedException:
         case GlusterSnapshotRestoreFailedException:
         case GlusterSnapshotCreateFailedException:
         case GlusterSnapshotConfigFailedException:
+        case GlusterSnapshotConfigSetFailedException:
+        case GlusterSnapshotConfigGetFailedException:
 
             // Capture error from gluster command and record failure
             getVDSReturnValue().setVdsError(new VDSError(returnStatus, 
getReturnStatus().mMessage));
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GetGlusterVolumeSnapshotConfigInfoVDSCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GetGlusterVolumeSnapshotConfigInfoVDSCommand.java
index fdcbf21..38f08a50 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GetGlusterVolumeSnapshotConfigInfoVDSCommand.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GetGlusterVolumeSnapshotConfigInfoVDSCommand.java
@@ -19,8 +19,7 @@
     @Override
     protected void executeVdsBrokerCommand() {
         Guid clusterId = getParameters().getClusterId();
-        String volumeName = getParameters().getVolumeName();
-        infoReturn = getBroker().glusterVolumeSnapshotConfigGet(clusterId, 
volumeName);
+        infoReturn = getBroker().glusterSnapshotConfigList(clusterId);
         proceedProxyReturnValue();
 
         if (getVDSReturnValue().getSucceeded()) {
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotConfigReturnForXmlRpc.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotConfigReturnForXmlRpc.java
index f632f77..20e4a88 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotConfigReturnForXmlRpc.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotConfigReturnForXmlRpc.java
@@ -11,8 +11,8 @@
 public class GlusterVolumeSnapshotConfigReturnForXmlRpc extends 
StatusReturnForXmlRpc {
     private static final String STATUS = "status";
     private static final String SNAPSHOT_CONFIG = "snapshotConfig";
-    private static final String SYSTEM_CONFIG = "systemConfig";
-    private static final String VOLUME_CONFIG = "volumeConfig";
+    private static final String SYSTEM_CONFIG = "system";
+    private static final String VOLUME_CONFIG = "volume";
 
     private StatusForXmlRpc status;
     private GlusterSnapshotConfigInfo glusterSnapshotConfigInfo = new 
GlusterSnapshotConfigInfo();
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotInfoReturnForXmlRpc.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotInfoReturnForXmlRpc.java
index ee6f3c9..c6f409f 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotInfoReturnForXmlRpc.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeSnapshotInfoReturnForXmlRpc.java
@@ -3,8 +3,10 @@
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
+import java.util.TimeZone;
 
 import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterSnapshotStatus;
 import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity;
@@ -23,10 +25,10 @@
     private static final String SNAPSHOT_LIST = "snapshotList";
     private static final String SNAPSHOTS = "snapshots";
     private static final String NAME = "name";
-    private static final String DESCRIPTION = "snapDescription";
+    private static final String DESCRIPTION = "description";
     private static final String CREATETIME = "createTime";
-    private static final String SNAPSHOT_UUID = "snapshotUuid";
-    private static final String SNAPSHOT_NAME = "snapshotName";
+    private static final String EPOCH_TIME = "epochTime";
+    private static final String SNAPSHOT_ID = "id";
     private static final String SNAP_VOLUME_STATUS = "snapVolumeStatus";
 
     private StatusForXmlRpc status;
@@ -62,13 +64,19 @@
                 GlusterVolumeSnapshotEntity newSnapshot = new 
GlusterVolumeSnapshotEntity();
                 newSnapshot.setClusterId(clusterId);
                 newSnapshot.setVolumeId(volumeEntity.getId());
-                newSnapshot.setSnapshotId(Guid.createGuidFromString((String) 
individualSnapshot.get(SNAPSHOT_UUID)));
-                newSnapshot.setSnapshotName((String) 
individualSnapshot.get(SNAPSHOT_NAME));
+                newSnapshot.setSnapshotId(Guid.createGuidFromString((String) 
individualSnapshot.get(SNAPSHOT_ID)));
+                newSnapshot.setSnapshotName((String) 
individualSnapshot.get(NAME));
                 newSnapshot.setDescription((String) 
individualSnapshot.get(DESCRIPTION));
                 newSnapshot.setStatus(GlusterSnapshotStatus.from((String) 
individualSnapshot.get(SNAP_VOLUME_STATUS)));
                 try {
-                    DateFormat df = new SimpleDateFormat("yyyy-MM-dd 
HH:mm:ss");
-                    newSnapshot.setCreatedAt(df.parse((String) 
individualSnapshot.get(CREATETIME)));
+                    Map<String, Object> createTimeDetail = (Map<String, 
Object>) individualSnapshot.get(CREATETIME);
+                    long millis = ((Integer) 
createTimeDetail.get(EPOCH_TIME)).intValue() * 1000L;
+                    Date createDate = new Date(millis);
+                    // Convert to UTC
+                    DateFormat format = new SimpleDateFormat("MM/dd/yyyy 
HH:mm:ss");
+                    format.setTimeZone(TimeZone.getTimeZone("Etc/UTC"));
+                    String formattedCreateDate = format.format(createDate);
+                    newSnapshot.setCreatedAt(new Date(formattedCreateDate));
                 } catch (Exception e) {
                     log.info("Could not populate creation time for snapshot 
'{}' of volume '{}' on cluster '{}': {}",
                             (String) snapshotInfo.get(NAME),
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
index 1874166..1c1df26 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/jsonrpc/JsonRpcVdsServer.java
@@ -1494,10 +1494,9 @@
     }
 
     @Override
-    public GlusterVolumeSnapshotConfigReturnForXmlRpc 
glusterVolumeSnapshotConfigGet(Guid clusterId, String volumeName) {
+    public GlusterVolumeSnapshotConfigReturnForXmlRpc 
glusterSnapshotConfigList(Guid clusterId) {
         JsonRpcRequest request =
-                new 
RequestBuilder("GlusterSnapshot.configList").withOptionalParameter("volumeName",
 volumeName)
-                        .build();
+                new RequestBuilder("GlusterSnapshot.configList").build();
         Map<String, Object> response = new FutureMap(this.client, 
request).withIgnoreResponseKey();
         return new GlusterVolumeSnapshotConfigReturnForXmlRpc(clusterId, 
response);
     }
@@ -1556,7 +1555,7 @@
         JsonRpcRequest request =
                 new 
RequestBuilder("GlusterVolume.snapshotCreate").withParameter("volumeName", 
volumeName)
                         .withParameter("snapName", snapshotName)
-                        .withOptionalParameter("description", description)
+                        .withOptionalParameter("snapDescription", description)
                         .withParameter("force", force)
                         .build();
         Map<String, Object> response =
@@ -1568,8 +1567,8 @@
     public StatusOnlyReturnForXmlRpc glusterVolumeSnapshotConfigSet(String 
volumeName, String configName, String configValue) {
         JsonRpcRequest request =
                 new 
RequestBuilder("GlusterVolume.snapshotConfigSet").withParameter("volumeName", 
volumeName)
-                        .withParameter("option", configName)
-                        .withParameter("value", configValue)
+                        .withParameter("optionName", configName)
+                        .withParameter("optionValue", configValue)
                         .build();
 
         Map<String, Object> response = new FutureMap(this.client, 
request).withIgnoreResponseKey();
@@ -1579,8 +1578,8 @@
     @Override
     public StatusOnlyReturnForXmlRpc glusterSnapshotConfigSet(String 
configName, String configValue) {
         JsonRpcRequest request =
-                new 
RequestBuilder("GlusterSnapshot.configSet").withParameter("option", configName)
-                        .withParameter("value", configValue)
+                new 
RequestBuilder("GlusterSnapshot.configSet").withParameter("optionName", 
configName)
+                        .withParameter("optionValue", configValue)
                         .build();
 
         Map<String, Object> response = new FutureMap(this.client, 
request).withIgnoreResponseKey();
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/IVdsServer.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/IVdsServer.java
index 4a92a68..d40aeb2 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/IVdsServer.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/IVdsServer.java
@@ -316,7 +316,7 @@
 
     GlusterVolumeSnapshotInfoReturnForXmlRpc glusterSnapshotInfo(Guid 
clusterId, String volumeName);
 
-    GlusterVolumeSnapshotConfigReturnForXmlRpc 
glusterVolumeSnapshotConfigGet(Guid clusterId, String volumeName);
+    GlusterVolumeSnapshotConfigReturnForXmlRpc glusterSnapshotConfigList(Guid 
clusterId);
 
     StatusOnlyReturnForXmlRpc glusterSnapshotDelete(String snapshotName);
 
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerConnector.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerConnector.java
index a4d9dcb..61219be 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerConnector.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerConnector.java
@@ -297,7 +297,7 @@
 
     public Map<String, Object> glusterSnapshotInfo(String snapshotName, String 
volumeName);
 
-    public Map<String, Object> glusterSnapshotConfigGet(String volumeName);
+    public Map<String, Object> glusterSnapshotConfigList();
 
     public Map<String, Object> glusterSnapshotDelete(String snapshotName);
 
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerWrapper.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerWrapper.java
index 6b94255..5c8258f 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerWrapper.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsServerWrapper.java
@@ -1454,15 +1454,10 @@
     }
 
     @Override
-    public GlusterVolumeSnapshotConfigReturnForXmlRpc 
glusterVolumeSnapshotConfigGet(Guid clusterId, String volumeName) {
+    public GlusterVolumeSnapshotConfigReturnForXmlRpc 
glusterSnapshotConfigList(Guid clusterId) {
         try {
             Map<String, Object> xmlRpcReturnValue;
-            if (volumeName == null) {
-                xmlRpcReturnValue = vdsServer.glusterSnapshotConfigGet("");
-            } else {
-                xmlRpcReturnValue = 
vdsServer.glusterSnapshotConfigGet(volumeName);
-            }
-
+            xmlRpcReturnValue = vdsServer.glusterSnapshotConfigList();
             GlusterVolumeSnapshotConfigReturnForXmlRpc wrapper =
                     new GlusterVolumeSnapshotConfigReturnForXmlRpc(clusterId, 
xmlRpcReturnValue);
             return wrapper;
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
index 75693e4..4375b1f 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
@@ -828,9 +828,6 @@
     @DefaultStringValue("Gluster snapshot info failed")
     String GlusterSnapshotInfoFailedException();
 
-    @DefaultStringValue("Failed to delete the snapshots for the gluster 
volume")
-    String GlusterSnapshotDeleteVolumeFailedException();
-
     @DefaultStringValue("Failed to delete gluster volume snapshot")
     String GlusterSnapshotDeleteFailedException();
 
@@ -846,6 +843,12 @@
     @DefaultStringValue("Failed to create snapshot for gluster volume")
     String GlusterSnapshotCreateFailedException();
 
-    @DefaultStringValue("Failed to set the Gluster snapshot configuration")
+    @DefaultStringValue("Failed to configure gluster volume snapshot")
     String GlusterSnapshotConfigFailedException();
+
+    @DefaultStringValue("Failed to set the gluster volume snapshot 
configuration")
+    String GlusterSnapshotConfigSetFailedException();
+
+    @DefaultStringValue("Failed to get the gluster volume snapshot 
configuration")
+    String GlusterSnapshotConfigGetFailedException();
 }
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/GlusterVolumeSnapshotStatusCell.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/GlusterVolumeSnapshotStatusCell.java
index 1560a3c..b86e13e 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/GlusterVolumeSnapshotStatusCell.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/GlusterVolumeSnapshotStatusCell.java
@@ -35,11 +35,11 @@
         String tooltip;
 
         switch (status) {
-        case STARTED:
+        case ACTIVATED:
             statusImage = resources.upImage();
             tooltip = constants.up();
             break;
-        case STOPPED:
+        case DEACTIVATED:
             statusImage = resources.downImage();
             tooltip = constants.down();
             break;
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
index 1338527..aabb6fe 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
+++ 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
@@ -383,10 +383,11 @@
 GlusterVolumeRemoveBrickStatusFailed=Failed to get status of gluster volume 
remove bricks
 GlusterSnapshotException=Error in executing gluster snapshot command
 GlusterSnapshotInfoFailedException=Gluster snapshot info failed
-GlusterSnapshotDeleteVolumeFailedException=Failed to delete the snapshots for 
the gluster volume
 GlusterSnapshotDeleteFailedException=Failed to delete gluster volume snapshot
 GlusterSnapshotActivateFailedException=Failed to activate gluster volume 
snapshot
 GlusterSnapshotDeactivateFailedException=Failed to de-activate gluster volume 
snapshot
 GlusterSnapshotRestoreFailedException=Failed to restore the gluster volume 
snapshot
 GlusterSnapshotCreateFailedException=Failed to create snapshot for gluster 
volume
-GlusterSnapshotConfigSetFailedException=Gluster snapshot configuration set 
failed
+GlusterSnapshotConfigFailedException=Failed to configure gluster volume 
snapshot
+GlusterSnapshotConfigSetFailedException=Failed to set the gluster volume 
snapshot configuration
+GlusterSnapshotConfigGetFailedException=Failed to get the gluster volume 
snapshot configuration


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief9bcdf7d05f5d4e0bb54a3163ec27c57ccf81e0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5-gluster
Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to