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/CreateGlusterVolumeSnapshotCommand.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/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 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 15 files changed, 63 insertions(+), 58 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/98/38498/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/CreateGlusterVolumeSnapshotCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeSnapshotCommand.java index e6c7fe5..f992b94 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeSnapshotCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeSnapshotCommand.java @@ -104,7 +104,7 @@ slaveVolumeSnapshot.setSnapshotId((Guid) snapCreationRetVal.getReturnValue()); slaveVolumeSnapshot.setSnapshotName(snapshot.getSnapshotName()); slaveVolumeSnapshot.setDescription(snapshot.getDescription()); - slaveVolumeSnapshot.setStatus(GlusterSnapshotStatus.STARTED); + slaveVolumeSnapshot.setStatus(GlusterSnapshotStatus.ACTIVATED); slaveVolumeSnapshot.setCreatedAt(new Date()); getDbFacade().getGlusterVolumeSnapshotDao().save(slaveVolumeSnapshot); } @@ -147,7 +147,7 @@ } else { GlusterVolumeSnapshotEntity createdSnapshot = getParameters().getSnapshot(); createdSnapshot.setSnapshotId((Guid) retVal.getReturnValue()); - createdSnapshot.setStatus(GlusterSnapshotStatus.STARTED); + createdSnapshot.setStatus(GlusterSnapshotStatus.ACTIVATED); createdSnapshot.setCreatedAt(new Date()); getDbFacade().getGlusterVolumeSnapshotDao().save(createdSnapshot); } 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 29c3951..a35bb28 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 b4bd05b..9b88650 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 @@ -412,14 +412,15 @@ GlusterVolumeGeoRepStatusDetailFailed(4600), GlusterVolumeGeoRepSyncFailed(4601), 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 faa7f0f..3b9ead3 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties @@ -384,14 +384,14 @@ GlusterVolumeGeoRepSessionStopFailed=Failed to stop geo-replication session 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=Gluster volume snapshot configuration failed +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 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 d83700b..150be2f 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 @@ -80,13 +80,14 @@ case GlusterVolumeGeoRepSessionStopFailed: 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/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..4f71669 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 @@ -1,8 +1,7 @@ package org.ovirt.engine.core.vdsbroker.gluster; -import java.text.DateFormat; -import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.Map; @@ -23,10 +22,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 +61,14 @@ 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; +d newSnapshot.setCreatedAt(new Date(millis)); } 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 4976f1e..a2677ea 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 @@ -1658,8 +1658,7 @@ @Override public GlusterVolumeSnapshotConfigReturnForXmlRpc glusterVolumeSnapshotConfigGet(Guid clusterId, String volumeName) { 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); } @@ -1718,7 +1717,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 = @@ -1730,8 +1729,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(); @@ -1741,8 +1740,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/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 c02fb69..fa42226 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 @@ -852,9 +852,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(); @@ -870,6 +867,12 @@ @DefaultStringValue("Failed to create snapshot for gluster volume") String GlusterSnapshotCreateFailedException(); - @DefaultStringValue("Failed to set the Gluster snapshot configuration") + @DefaultStringValue("Gluster volume snapshot configuration failed") 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..8ce4807 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=Gluster volume snapshot configuration failed +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/38498 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ief9bcdf7d05f5d4e0bb54a3163ec27c57ccf81e0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches