Dhandapani Gopal has uploaded a new change for review.

Change subject: engine: Stop Gluster Volume Profile command
......................................................................

engine: Stop Gluster Volume Profile command

Includes following related to the command for "gluster volume profile stop"
 - New Bll Command
 - New Vds Command
 - Audit Log Messages and Severities
 - App Errors
 - VDSM Errors
 - Junit test class

Change-Id: If776bb4369a1fa77ec8a8b2cda02fea6456101ef
Signed-off-by: Dhandapani <[email protected]>
---
A 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommand.java
A 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommandTest.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/VdcBllErrors.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M 
backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
M backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/AbstractGlusterBrokerCommand.java
A 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/StopGlusterVolumeProfileVDSCommand.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/AppErrors.java
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
M 
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
21 files changed, 205 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/32/8332/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommand.java
new file mode 100644
index 0000000..f8b6d8c
--- /dev/null
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommand.java
@@ -0,0 +1,57 @@
+package org.ovirt.engine.core.bll.gluster;
+
+import org.ovirt.engine.core.bll.NonTransactiveCommandAttribute;
+import org.ovirt.engine.core.common.AuditLogType;
+import org.ovirt.engine.core.common.action.gluster.GlusterVolumeParameters;
+import org.ovirt.engine.core.common.vdscommands.VDSCommandType;
+import org.ovirt.engine.core.common.vdscommands.VDSReturnValue;
+import 
org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeVDSParameters;
+import org.ovirt.engine.core.dal.VdcBllMessages;
+
+/**
+ * BLL command to Stop Gluster Volume Profile
+ */
+@NonTransactiveCommandAttribute
+public class StopGlusterVolumeProfileCommand extends 
GlusterVolumeCommandBase<GlusterVolumeParameters> {
+
+    private static final long serialVersionUID = 8083311388300152297L;
+
+    public StopGlusterVolumeProfileCommand(GlusterVolumeParameters params) {
+        super(params);
+    }
+
+    @Override
+    protected void setActionMessageParameters() {
+        addCanDoActionMessage(VdcBllMessages.VAR__ACTION__STOP_VOLUME_PROFILE);
+        addCanDoActionMessage(VdcBllMessages.VAR__TYPE__GLUSTER_VOLUME);
+    }
+
+    @Override
+    protected boolean canDoAction() {
+        if (!super.canDoAction()) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    protected void executeCommand() {
+        VDSReturnValue returnValue =
+                runVdsCommand(VDSCommandType.StopGlusterVolumeProfile,
+                        new GlusterVolumeVDSParameters(upServer.getId(), 
getGlusterVolumeName()));
+        setSucceeded(returnValue.getSucceeded());
+        if (!getSucceeded()) {
+            handleVdsError(AuditLogType.GLUSTER_VOLUME_PROFILE_STOP_FAILED, 
returnValue.getVdsError().getMessage());
+            return;
+        }
+    }
+
+    @Override
+    public AuditLogType getAuditLogTypeValue() {
+        if (getSucceeded()) {
+            return AuditLogType.GLUSTER_VOLUME_PROFILE_STOP;
+        } else {
+            return errorType == null ? 
AuditLogType.GLUSTER_VOLUME_PROFILE_STOP_FAILED : errorType;
+        }
+    }
+}
diff --git 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommandTest.java
 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommandTest.java
new file mode 100644
index 0000000..d4921ea
--- /dev/null
+++ 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeProfileCommandTest.java
@@ -0,0 +1,85 @@
+package org.ovirt.engine.core.bll.gluster;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.ovirt.engine.core.common.action.gluster.GlusterVolumeParameters;
+import org.ovirt.engine.core.common.businessentities.VDS;
+import org.ovirt.engine.core.common.businessentities.VDSStatus;
+import org.ovirt.engine.core.common.businessentities.gluster.AccessProtocol;
+import org.ovirt.engine.core.common.businessentities.gluster.GlusterStatus;
+import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeEntity;
+import org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeType;
+import org.ovirt.engine.core.common.businessentities.gluster.TransportType;
+import org.ovirt.engine.core.compat.Guid;
+import org.ovirt.engine.core.dao.gluster.GlusterVolumeDao;
+
+@RunWith(MockitoJUnitRunner.class)
+public class StopGlusterVolumeProfileCommandTest {
+
+    @Mock
+    GlusterVolumeDao volumeDao;
+
+    private static final Guid startedVolumeId = new 
Guid("b2cb2f73-fab3-4a42-93f0-d5e4c069a43e");
+    private static final Guid stoppedVolumeId = new 
Guid("8bc6f108-c0ef-43ab-ba20-ec41107220f5");
+    private static final Guid CLUSTER_ID = new 
Guid("b399944a-81ab-4ec5-8266-e19ba7c3c9d1");
+
+    private StopGlusterVolumeProfileCommand cmd;
+
+    private void prepareMocks(StopGlusterVolumeProfileCommand command) {
+        doReturn(volumeDao).when(command).getGlusterVolumeDao();
+        doReturn(getVds(VDSStatus.Up)).when(command).getUpServer();
+        
doReturn(getGlusterVolume(stoppedVolumeId)).when(volumeDao).getById(stoppedVolumeId);
+        
doReturn(getGlusterVolume(startedVolumeId)).when(volumeDao).getById(startedVolumeId);
+        doReturn(null).when(volumeDao).getById(null);
+    }
+
+    private VDS getVds(VDSStatus status) {
+        VDS vds = new VDS();
+        vds.setId(Guid.NewGuid());
+        vds.setvds_name("server1");
+        vds.setvds_group_id(CLUSTER_ID);
+        vds.setstatus(status);
+        return vds;
+    }
+
+    private GlusterVolumeEntity getGlusterVolume(Guid volumeId) {
+        GlusterVolumeEntity volumeEntity = new GlusterVolumeEntity();
+        volumeEntity.setId(volumeId);
+        volumeEntity.setName("test-vol");
+        volumeEntity.addAccessProtocol(AccessProtocol.GLUSTER);
+        volumeEntity.addTransportType(TransportType.TCP);
+        volumeEntity.setVolumeType(GlusterVolumeType.DISTRIBUTE);
+        volumeEntity.setStatus((volumeId.equals(startedVolumeId)) ? 
GlusterStatus.UP : GlusterStatus.DOWN);
+        volumeEntity.setClusterId(CLUSTER_ID);
+        return volumeEntity;
+    }
+
+    @Test
+    public void canDoActionSucceedsOnStoppedVolume() {
+        cmd = spy(new StopGlusterVolumeProfileCommand(new 
GlusterVolumeParameters(stoppedVolumeId)));
+        prepareMocks(cmd);
+        assertTrue(cmd.canDoAction());
+    }
+
+    @Test
+    public void canDoActionSucceedsOnStartedVolume() {
+        cmd = spy(new StopGlusterVolumeProfileCommand(new 
GlusterVolumeParameters(startedVolumeId)));
+        prepareMocks(cmd);
+        assertTrue(cmd.canDoAction());
+    }
+
+    @Test
+    public void canDoActionFailsOnNull() {
+        cmd = spy(new StopGlusterVolumeProfileCommand(new 
GlusterVolumeParameters(null)));
+        prepareMocks(cmd);
+        assertFalse(cmd.canDoAction());
+    }
+
+}
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
index c2aa4cd..1bd6070 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/AuditLogType.java
@@ -204,11 +204,12 @@
     GLUSTER_VOLUME_ADD_BRICK(4019),
     GLUSTER_VOLUME_ADD_BRICK_FAILED(4020),
     GLUSTER_HOST_REMOVE_FAILED(4021),
-    GLUSTER_HOST_ADD_FAILED(4404),
-    GLUSTER_SERVERS_LIST_FAILED(4405),
     GLUSTER_VOLUME_PROFILE_START(4022),
     GLUSTER_VOLUME_PROFILE_START_FAILED(4023),
-
+    GLUSTER_VOLUME_PROFILE_STOP(4024),
+    GLUSTER_VOLUME_PROFILE_STOP_FAILED(4025),
+    GLUSTER_HOST_ADD_FAILED(4404),
+    GLUSTER_SERVERS_LIST_FAILED(4405),
 
     USER_VDS_RESTART(41),
     USER_FAILED_VDS_RESTART(107),
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java
index c30b563..db122d0 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcEventNotificationUtils.java
@@ -60,6 +60,8 @@
         AddEventNotificationEntry(EventNotificationEntity.Host, 
AuditLogType.GLUSTER_HOST_REMOVE_FAILED);
         AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, 
AuditLogType.GLUSTER_VOLUME_PROFILE_START);
         AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, 
AuditLogType.GLUSTER_VOLUME_PROFILE_START_FAILED);
+        AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, 
AuditLogType.GLUSTER_VOLUME_PROFILE_STOP);
+        AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, 
AuditLogType.GLUSTER_VOLUME_PROFILE_STOP_FAILED);
 
         // DWH
         AddEventNotificationEntry(EventNotificationEntity.DWH, 
AuditLogType.DWH_STOPPED);
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
index 365e43f..001a998 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
@@ -257,7 +257,7 @@
     ReplaceGlusterVolumeBrick(1408, ActionGroup.MANIPULATE_GLUSTER_VOLUME),
     AddBricksToGlusterVolume(1409, ActionGroup.MANIPULATE_GLUSTER_VOLUME),
     StartGlusterVolumeProfile(1410, ActionGroup.MANIPULATE_GLUSTER_VOLUME),
-
+    StopGlusterVolumeProfile(1411, ActionGroup.MANIPULATE_GLUSTER_VOLUME),
     ;
 
     private int intValue;
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 265e561..8e5e4bb 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
@@ -341,7 +341,7 @@
     GlusterAddHostFailed(4404),
     GlusterPeerListFailed(4407),
     GlusterVolumeProfileStartFailed(4158),
-
+    GlusterVolumeProfileStopFailed(4159),
 
     UnicodeArgumentException(4900),
 
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java
index 63419ba..57f63ea 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java
@@ -139,6 +139,7 @@
     GlusterHostAdd("org.ovirt.engine.core.vdsbroker.gluster"),
     GlusterServersList("org.ovirt.engine.core.vdsbroker.gluster"),
     StartGlusterVolumeProfile("org.ovirt.engine.core.vdsbroker.gluster"),
+    StopGlusterVolumeProfile("org.ovirt.engine.core.vdsbroker.gluster"),
     ;
 
     String packageName;
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
index b282a5d..a41fd4c 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
@@ -62,6 +62,7 @@
     VAR__ACTION__REBALANCE_START,
     VAR__ACTION__ASSIGN,
     VAR__ACTION__START_VOLUME_PROFILE,
+    VAR__ACTION__STOP_VOLUME_PROFILE,
 
     // Host statuses replacements
     VAR__HOST_STATUS__UP,
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
index 01ee5eb..66507fd 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
@@ -84,6 +84,8 @@
         mSeverities.put(AuditLogType.GLUSTER_SERVERS_LIST_FAILED, 
AuditLogSeverity.ERROR);
         mSeverities.put(AuditLogType.GLUSTER_VOLUME_PROFILE_START, 
AuditLogSeverity.NORMAL);
         mSeverities.put(AuditLogType.GLUSTER_VOLUME_PROFILE_START_FAILED, 
AuditLogSeverity.ERROR);
+        mSeverities.put(AuditLogType.GLUSTER_VOLUME_PROFILE_STOP, 
AuditLogSeverity.NORMAL);
+        mSeverities.put(AuditLogType.GLUSTER_VOLUME_PROFILE_STOP_FAILED, 
AuditLogSeverity.ERROR);
     }
 
     private static void initDefaultSeverities() {
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
index 8f06a42..eeecec4 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -262,6 +262,7 @@
 VAR__ACTION__ASSIGN=$action assign
 VAR__ACTION__REBALANCE_START=$action rebalance
 VAR__ACTION__START_VOLUME_PROFILE=$action volume profile
+VAR__ACTION__STOP_VOLUME_PROFILE=$action volume profile
 VAR__HOST_STATUS__UP=$hostStatus Up
 VAR__HOST_STATUS__UP_MAINTENANCE_OR_NON_OPERATIONAL=$hostStatus Up, 
Maintenance or Non operational
 
diff --git 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
index 1c69e55..a9fb27d 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -555,3 +555,5 @@
 HA_VM_RESTART_FAILED=Restart of the Highly Available VM ${VmName} failed.
 GLUSTER_VOLUME_PROFILE_START=Gluster volume ${glusterVolumeName} Profile 
started.
 GLUSTER_VOLUME_PROFILE_START_FAILED=Could not start Gluster Volume Profile on 
${glusterVolumeName}.
+GLUSTER_VOLUME_PROFILE_STOP=Gluster volume ${glusterVolumeName} Profile 
stopped.
+GLUSTER_VOLUME_PROFILE_STOP_FAILED=Could not stop Gluster Volume Profile on 
${glusterVolumeName}.
\ No newline at end of file
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 e65a0b4..2379bf3 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
@@ -321,7 +321,8 @@
 GlusterHostRemoveFailed=Gluster Server Remove Failed
 GlusterAddHostFailed=Gluster Server Add Failed
 GlusterPeerListFailed=Gluster Peer List Failed
-GlusterVolumeProfileStartFailed=Gluster Volume Profile Start Failed
+GlusterVolumeProfileStartFailed=Gluster Volume Profile Start Failed
+GlusterVolumeProfileStopFailed=Gluster Volume Profile Stop Failed
 
 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/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 91a6bd3..2402b57 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
@@ -32,6 +32,7 @@
         case GlusterAddHostFailed:
         case GlusterPeerListFailed:
         case GlusterVolumeProfileStartFailed:
+        case GlusterVolumeProfileStopFailed:
             // Capture error from gluster command and record failure
             getVDSReturnValue().setVdsError(new VDSError(returnStatus, 
getReturnStatus().mMessage));
             getVDSReturnValue().setSucceeded(false);
diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/StopGlusterVolumeProfileVDSCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/StopGlusterVolumeProfileVDSCommand.java
new file mode 100644
index 0000000..73cdbdd
--- /dev/null
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/StopGlusterVolumeProfileVDSCommand.java
@@ -0,0 +1,16 @@
+package org.ovirt.engine.core.vdsbroker.gluster;
+
+import 
org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeVDSParameters;
+
+public class StopGlusterVolumeProfileVDSCommand<P extends 
GlusterVolumeVDSParameters> extends AbstractGlusterBrokerCommand<P> {
+    public StopGlusterVolumeProfileVDSCommand(P parameters) {
+        super(parameters);
+    }
+
+    @Override
+    protected void ExecuteVdsBrokerCommand() {
+        status = 
getBroker().glusterVolumeProfileStop(getParameters().getVolumeName());
+
+        ProceedProxyReturnValue();
+    }
+}
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 92dd077..557eedb 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
@@ -238,4 +238,6 @@
 
     StatusOnlyReturnForXmlRpc glusterVolumeProfileStart(String volumeName);
 
+    StatusOnlyReturnForXmlRpc glusterVolumeProfileStop(String volumeName);
+
 }
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 924147f..15c9708 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
@@ -233,4 +233,6 @@
 
     public Map<String, Object> glusterVolumeProfileStart(String volumeName);
 
+    public Map<String, Object> glusterVolumeProfileStop(String volumeName);
+
 }
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 c6106bc..198503e 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
@@ -1158,4 +1158,13 @@
         }
     }
 
+    @Override
+    public StatusOnlyReturnForXmlRpc glusterVolumeProfileStop(String 
volumeName) {
+        try {
+            return new 
StatusOnlyReturnForXmlRpc(vdsServer.glusterVolumeProfileStop(volumeName));
+        } catch (UndeclaredThrowableException ute) {
+            throw new XmlRpcRunTimeException(ute);
+        }
+    }
+
 }
diff --git 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
index bff78b5..7ca71a0 100644
--- 
a/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
+++ 
b/frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
@@ -697,6 +697,9 @@
     @DefaultStringValue("$action volume profile")
     String VAR__ACTION__START_VOLUME_PROFILE();
 
+    @DefaultStringValue("$action volume profile")
+    String VAR__ACTION__STOP_VOLUME_PROFILE();
+
     @DefaultStringValue("$action assign")
     String VAR__ACTION__ASSIGN();
 
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 8856928..2245286 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
@@ -692,6 +692,9 @@
     @DefaultStringValue("Gluster Volume Profile Start Failed.")
     String GlusterVolumeProfileStartFailed();
 
+    @DefaultStringValue("Gluster Volume Profile Stop Failed.")
+    String GlusterVolumeProfileStopFailed();
+
     String ACTIVATE_NIC_FAILED();
 
     String DEACTIVATE_NIC_FAILED();
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
index 5ac111b..0c09635 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/LocalizedEnums.java
@@ -240,7 +240,11 @@
 
        String AuditLogType___GLUSTER_VOLUME_PROFILE_START_FAILED();
 
-       String VdcActionType___ActivateVds();
+    String AuditLogType___GLUSTER_VOLUME_PROFILE_STOP();
+
+    String AuditLogType___GLUSTER_VOLUME_PROFILE_STOP_FAILED();
+
+    String VdcActionType___ActivateVds();
 
        String VdcActionType___RecoveryStoragePool();
 
@@ -533,6 +537,8 @@
 
        String vdcActionType___StartGlusterVolumeProfile();
 
+       String vdcActionType___StopGlusterVolumeProfile();
+
        String VdcActionType___ConnectStorageToVds();
 
        String VdcObjectType___AdElements();
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
index b8c59af..ab499af 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
+++ 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
@@ -116,6 +116,8 @@
 AuditLogType___GLUSTER_HOST_REMOVE_FAILED=Failed to Remove Gluster Server
 AuditLogType___GLUSTER_VOLUME_PROFILE_START=Gluster Volume Profile started
 AuditLogType___GLUSTER_VOLUME_PROFILE_START_FAILED=Failed to start Gluster 
Volume Profile
+AuditLogType___GLUSTER_VOLUME_PROFILE_STOP=Gluster Volume Profile stopped
+AuditLogType___GLUSTER_VOLUME_PROFILE_STOP_FAILED=Failed to stop Gluster 
Volume Profile
 
 VdcActionType___ActivateVds=Activate Host
 VdcActionType___RecoveryStoragePool=Reinitialize Data Center
@@ -237,6 +239,7 @@
 VdcActionType___ReplaceGlusterVolumeBrick=Start Gluster Volume Replace Brick
 VdcActionType___GlusterHostAdd=Add Gluster server
 vdcActionType___StartGlusterVolumeProfile=Start Gluster Volume Profile
+vdcActionType___StopGlusterVolumeProfile=Stop Gluster Volume Profile
 VdcActionType___ActivateStorageDomain=Activate Storage Domain
 VdcActionType___FenceVdsManualy=Fence Host Manually
 VdcActionType___AddEmptyStoragePool=New Data Center


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

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

Reply via email to