Hello Shireesh Anjal,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/14831

to review the following change.

Change subject: gluster: start/stop gluster service
......................................................................

gluster: start/stop gluster service

Change-Id: Ifcab38866c49c6f5d43e3b33006c428ec9304501
Signed-off-by: Shireesh Anjal <[email protected]>
---
A 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java
A 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommandTest.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/EventNotificationEntity.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/VdcObjectType.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterServiceParameters.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.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
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/GlusterServiceVDSParameters.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/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/PermitType.java
M 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/PermitMapper.java
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/ManageGlusterServiceVDSCommand.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/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.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/Enums.properties
M 
frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/LocalizedEnums.properties
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
31 files changed, 509 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/31/14831/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java
new file mode 100644
index 0000000..ee631da
--- /dev/null
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java
@@ -0,0 +1,216 @@
+package org.ovirt.engine.core.bll.gluster;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.ovirt.engine.core.bll.LockMessagesMatchUtil;
+import org.ovirt.engine.core.bll.utils.PermissionSubject;
+import org.ovirt.engine.core.common.AuditLogType;
+import org.ovirt.engine.core.common.VdcObjectType;
+import org.ovirt.engine.core.common.action.gluster.GlusterServiceParameters;
+import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService;
+import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterServiceStatus;
+import org.ovirt.engine.core.common.constants.gluster.GlusterConstants;
+import org.ovirt.engine.core.common.locks.LockingGroup;
+import org.ovirt.engine.core.common.utils.Pair;
+import org.ovirt.engine.core.common.vdscommands.VDSCommandType;
+import org.ovirt.engine.core.common.vdscommands.VDSReturnValue;
+import 
org.ovirt.engine.core.common.vdscommands.gluster.GlusterServiceVDSParameters;
+import org.ovirt.engine.core.dal.VdcBllMessages;
+import org.ovirt.engine.core.dal.dbbroker.DbFacade;
+import org.ovirt.engine.core.dao.gluster.GlusterServerServiceDao;
+
+public class ManageGlusterServiceCommand extends 
GlusterCommandBase<GlusterServiceParameters> {
+
+    protected GlusterServerService serverService;
+
+    public static final String MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START = 
"start";
+    public static final String MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP = 
"stop";
+
+    private static final Map<String, ManageActionDetail> 
manageActionDetailsMap =
+            new HashMap<String, ManageActionDetail>();
+
+    static {
+        manageActionDetailsMap.put(MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START,
+                new ManageActionDetail(VdcBllMessages.VAR__ACTION__START,
+                        GlusterServiceStatus.RUNNING,
+                        
VdcBllMessages.ACTION_TYPE_FAILED_SERVICE_ALREADY_RUNNING,
+                        VDSCommandType.ManageGlusterService,
+                        AuditLogType.GLUSTER_SERVICE_STARTED,
+                        AuditLogType.GLUSTER_SERVICE_START_FAILED));
+        manageActionDetailsMap.put(MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP,
+                new ManageActionDetail(VdcBllMessages.VAR__ACTION__STOP,
+                        GlusterServiceStatus.STOPPED,
+                        
VdcBllMessages.ACTION_TYEPE_FAILED_SERVICE_ALREADY_STOPPED,
+                        VDSCommandType.ManageGlusterService,
+                        AuditLogType.GLUSTER_SERVICE_STOPPED,
+                        AuditLogType.GLUSTER_SERVICE_STOP_FAILED));
+    }
+
+    public ManageGlusterServiceCommand(GlusterServiceParameters params) {
+        super(params);
+    }
+
+    @Override
+    protected void setActionMessageParameters() {
+        
addCanDoActionMessage(manageActionDetailsMap.get(getParameters().getActionType()).getCanDoActionMsg());
+        addCanDoActionMessage(VdcBllMessages.VAR__TYPE__GLUSTER_SERVICE);
+    }
+
+    @Override
+    protected boolean canDoAction() {
+        serverService = 
getGlusterServerServiceDao().get(getParameters().getServerServiceId());
+
+        if (serverService == null) {
+            return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_SERVER_SERVICE_NOT_FOUND);
+        }
+
+        /**
+         * Required in future when start and stop for all the services is 
enabled
+         */
+        /**
+         * if (getParameters().getServerId() == null && 
getParameters().getClusterId() == null) {
+            return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_SERVER_AND_CLUSTER_DETAILS_NULL);
+        }*/
+
+        /**
+         *  TODO: Later this code may not be required for the case when all 
the services for a server / cluster
+         * to be started / stopped
+         */
+        if (serverService.getStatus() == 
manageActionDetailsMap.get(getParameters().getActionType()).getStatus()) {
+            
addCanDoActionMessage(manageActionDetailsMap.get(getParameters().getActionType()).getStatusMsg());
+            addCanDoActionMessage(String.format("$server %1$s", 
serverService.getHostName()));
+            addCanDoActionMessage(String.format("$service %1$s", 
serverService.getServiceName()));
+
+            return false;
+        }
+
+        return true;
+    }
+
+    @Override
+    protected void executeCommand() {
+        VDSReturnValue returnValue =
+                
runVdsCommand(manageActionDetailsMap.get(getParameters().getActionType()).getVdsCmdType(),
+                        new 
GlusterServiceVDSParameters(serverService.getServerId(), 
getParameters().getActionType(), serverService.getServiceName()));
+        setSucceeded(returnValue.getSucceeded());
+        if (getSucceeded()) {
+            
serverService.setStatus(manageActionDetailsMap.get(getParameters().getActionType()).getStatus());
+            getGlusterServerServiceDao().update(serverService);
+        } else {
+            
handleVdsError(manageActionDetailsMap.get(getParameters().getActionType()).getActionFailedActionLog(),
 returnValue.getVdsError().getMessage());
+        }
+    }
+
+    @Override
+    public AuditLogType getAuditLogTypeValue() {
+        if (getSucceeded()) {
+            return 
manageActionDetailsMap.get(getParameters().getActionType()).getActionPerformedActionLog();
+        } else {
+            return 
manageActionDetailsMap.get(getParameters().getActionType()).getActionFailedActionLog();
+        }
+    }
+
+    @Override
+    public Map<String, String> getCustomValues() {
+        if (serverService != null) {
+            addCustomValue(GlusterConstants.SERVER, 
serverService.getHostName());
+            addCustomValue(GlusterConstants.SERVICE, 
serverService.getServiceName());
+        }
+        return super.getCustomValues();
+    }
+
+    protected GlusterServerServiceDao getGlusterServerServiceDao() {
+        return DbFacade.getInstance().getGlusterServerServiceDao();
+    }
+
+    @Override
+    public List<PermissionSubject> getPermissionCheckSubjects() {
+        return Collections.singletonList(new 
PermissionSubject(getParameters().getServerServiceId(),
+                VdcObjectType.GlusterService,
+                getActionType().getActionGroup()));
+    }
+
+    @Override
+    protected Map<String, Pair<String, String>> getExclusiveLocks() {
+        return 
Collections.singletonMap(getParameters().getServerServiceId().toString(),
+                LockMessagesMatchUtil.makeLockingPair(LockingGroup.GLUSTER,
+                        VdcBllMessages.ACTION_TYPE_FAILED_OBJECT_LOCKED));
+    }
+}
+
+/**
+ * An instance of this class holds various details about the managed actions
+ */
+class ManageActionDetail {
+    private VdcBllMessages canDoActionMsg;
+    private GlusterServiceStatus status;
+    private VdcBllMessages statusMsg;
+    private VDSCommandType vdsCmdType;
+    private AuditLogType actionPerformedActionLog;
+    private AuditLogType actionFailedActionLog;
+
+    public ManageActionDetail(VdcBllMessages canDoActionMsg,
+            GlusterServiceStatus status,
+            VdcBllMessages statusMsg,
+            VDSCommandType vdsCmdType,
+            AuditLogType actionPerformedActionLog,
+            AuditLogType actionFailedActionLog) {
+        this.canDoActionMsg = canDoActionMsg;
+        this.status = status;
+        this.statusMsg = statusMsg;
+        this.vdsCmdType = vdsCmdType;
+        this.actionPerformedActionLog = actionPerformedActionLog;
+        this.actionFailedActionLog = actionFailedActionLog;
+    }
+
+    public VdcBllMessages getCanDoActionMsg() {
+        return canDoActionMsg;
+    }
+
+    public void setCanDoActionMsg(VdcBllMessages canDoActionMsg) {
+        this.canDoActionMsg = canDoActionMsg;
+    }
+
+    public GlusterServiceStatus getStatus() {
+        return status;
+    }
+
+    public void setStatus(GlusterServiceStatus status) {
+        this.status = status;
+    }
+
+    public VdcBllMessages getStatusMsg() {
+        return statusMsg;
+    }
+
+    public void setStatusMsg(VdcBllMessages statusMsg) {
+        this.statusMsg = statusMsg;
+    }
+
+    public VDSCommandType getVdsCmdType() {
+        return vdsCmdType;
+    }
+
+    public void setVdsCmdType(VDSCommandType vdsCmdType) {
+        this.vdsCmdType = vdsCmdType;
+    }
+
+    public AuditLogType getActionPerformedActionLog() {
+        return actionPerformedActionLog;
+    }
+
+    public void setActionPerformedActionLog(AuditLogType 
actionPerformedActionLog) {
+        this.actionPerformedActionLog = actionPerformedActionLog;
+    }
+
+    public AuditLogType getActionFailedActionLog() {
+        return actionFailedActionLog;
+    }
+
+    public void setActionFailedActionLog(AuditLogType actionFailedActionLog) {
+        this.actionFailedActionLog = actionFailedActionLog;
+    }
+}
diff --git 
a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommandTest.java
 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommandTest.java
new file mode 100644
index 0000000..14e42ab
--- /dev/null
+++ 
b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommandTest.java
@@ -0,0 +1,90 @@
+package org.ovirt.engine.core.bll.gluster;
+
+import static org.junit.Assert.assertFalse;
+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.GlusterServiceParameters;
+import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterServerService;
+import 
org.ovirt.engine.core.common.businessentities.gluster.GlusterServiceStatus;
+import org.ovirt.engine.core.common.businessentities.gluster.ServiceType;
+import org.ovirt.engine.core.compat.Guid;
+import org.ovirt.engine.core.dao.gluster.GlusterServerServiceDao;
+
+@RunWith(MockitoJUnitRunner.class)
+public class ManageGlusterServiceCommandTest {
+    @Mock
+    GlusterServerServiceDao serviceDao;
+
+    private final Guid startedServiceId1 = Guid.NewGuid();
+    private final Guid startedServiceId2 = Guid.NewGuid();
+    private final Guid stoppedServiceId1 = Guid.NewGuid();
+    private final Guid stoppedServiceId2 = Guid.NewGuid();
+    private final Guid serverId = Guid.NewGuid();
+
+    ManageGlusterServiceCommand cmd;
+
+    private void prepareMocks(ManageGlusterServiceCommand command) {
+        doReturn(serviceDao).when(command).getGlusterServerServiceDao();
+        doReturn(getServerService(startedServiceId1, 
GlusterServiceStatus.RUNNING)).when(serviceDao)
+                .get(startedServiceId1);
+        doReturn(getServerService(startedServiceId2, 
GlusterServiceStatus.STOPPED)).when(serviceDao)
+                .get(startedServiceId2);
+        doReturn(getServerService(stoppedServiceId1, 
GlusterServiceStatus.STOPPED)).when(serviceDao)
+                .get(stoppedServiceId1);
+        doReturn(getServerService(stoppedServiceId2, 
GlusterServiceStatus.RUNNING)).when(serviceDao)
+                .get(stoppedServiceId2);
+        doReturn(null).when(serviceDao).get(null);
+    }
+
+    private GlusterServerService getServerService(Guid serviceId, 
GlusterServiceStatus status) {
+        GlusterServerService serverService = new GlusterServerService();
+        serverService.setMessage("test-msg");
+        serverService.setPid(new Integer("10000"));
+        serverService.setPort(new Integer("2020"));
+        serverService.setServerId(serverId);
+        serverService.setServiceId(serviceId);
+        serverService.setServiceName("test-srvc");
+        serverService.setServiceType(ServiceType.GLUSTER);
+        serverService.setStatus(status);
+
+        return serverService;
+    }
+
+    @Test
+    public void canDoActionSucceeds() {
+        GlusterServiceParameters params = new GlusterServiceParameters();
+        params.setServerServiceId(Guid.NewGuid());
+        
params.setActionType(ManageGlusterServiceCommand.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START);
+        cmd = spy(new ManageGlusterServiceCommand(params));
+        prepareMocks(cmd);
+        assertFalse(cmd.canDoAction());
+        
params.setActionType(ManageGlusterServiceCommand.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP);
+        assertFalse(cmd.canDoAction());
+    }
+
+    @Test
+    public void canDoActionFails() {
+        GlusterServiceParameters params = new GlusterServiceParameters();
+        params.setServerServiceId(Guid.NewGuid());
+        
params.setActionType(ManageGlusterServiceCommand.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START);
+        cmd = spy(new ManageGlusterServiceCommand(params));
+        prepareMocks(cmd);
+        assertFalse(cmd.canDoAction());
+        
params.setActionType(ManageGlusterServiceCommand.MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP);
+        assertFalse(cmd.canDoAction());
+    }
+
+    @Test
+    public void canDoActionFailsOnNull() {
+        GlusterServiceParameters params = new GlusterServiceParameters();
+        params.setServerServiceId(null);
+        cmd = spy(new ManageGlusterServiceCommand(params));
+        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 bd6792b..25e721f 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
@@ -250,6 +250,10 @@
     GLUSTER_HOOK_ADDED(4050),
     GLUSTER_HOOK_REMOVED(4051),
     GLUSTER_VOLUME_OPTION_MODIFIED(4052),
+    GLUSTER_SERVICE_STARTED(4052),
+    GLUSTER_SERVICE_START_FAILED(4053),
+    GLUSTER_SERVICE_STOPPED(4054),
+    GLUSTER_SERVICE_STOP_FAILED(4055),
 
     USER_VDS_RESTART(41),
     USER_FAILED_VDS_RESTART(107),
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/EventNotificationEntity.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/EventNotificationEntity.java
index b09ea4a..97da35b 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/EventNotificationEntity.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/EventNotificationEntity.java
@@ -11,6 +11,7 @@
     Engine(ApplicationMode.AllModes),
     GlusterVolume(ApplicationMode.GlusterOnly),
     GlusterHook(ApplicationMode.GlusterOnly),
+    GlusterService(ApplicationMode.GlusterOnly),
     DWH(ApplicationMode.VirtOnly);
 
 
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 a2a7389..da483a8 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
@@ -84,6 +84,10 @@
         AddEventNotificationEntry(EventNotificationEntity.GlusterHook, 
AuditLogType.GLUSTER_HOOK_DISABLE_FAILED);
         AddEventNotificationEntry(EventNotificationEntity.GlusterHook, 
AuditLogType.GLUSTER_HOOK_ADDED);
         AddEventNotificationEntry(EventNotificationEntity.GlusterHook, 
AuditLogType.GLUSTER_HOOK_CONFLICT_DETECTED);
+        AddEventNotificationEntry(EventNotificationEntity.GlusterService, 
AuditLogType.GLUSTER_SERVICE_STARTED);
+        AddEventNotificationEntry(EventNotificationEntity.GlusterService, 
AuditLogType.GLUSTER_SERVICE_START_FAILED);
+        AddEventNotificationEntry(EventNotificationEntity.GlusterService, 
AuditLogType.GLUSTER_SERVICE_STOPPED);
+        AddEventNotificationEntry(EventNotificationEntity.GlusterService, 
AuditLogType.GLUSTER_SERVICE_STOP_FAILED);
 
         // DWH
         AddEventNotificationEntry(EventNotificationEntity.DWH, 
AuditLogType.DWH_STOPPED);
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcObjectType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcObjectType.java
index e1e9644..ffe9ce5 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcObjectType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcObjectType.java
@@ -30,7 +30,9 @@
     Network(20, "Network"),
     Snapshot(21, "Snapshot"),
     Event(22, "Event"),
-    GlusterHook(23, "GlusterHook");
+    GlusterHook(23, "GlusterHook"),
+    GlusterService(24, "GlusterService"),
+    ;
 
     private int value;
     private String vdcObjectTranslationVal;
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 7fa88f5..d0e6706 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
@@ -235,6 +235,7 @@
     AddGlusterFsStorageDomain(1413, ActionGroup.CREATE_STORAGE_DOMAIN, 
QuotaDependency.NONE),
     EnableGlusterHook(1414, ActionGroup.MANIPULATE_GLUSTER_HOOK, 
QuotaDependency.NONE),
     DisableGlusterHook(1415, ActionGroup.MANIPULATE_GLUSTER_HOOK, 
QuotaDependency.NONE),
+    ManageGlusterService(1416, ActionGroup.MANIPULATE_GLUSTER_SERVICE, 
QuotaDependency.NONE),
 
     // External events
     AddExternalEvent(1500, ActionGroup.INJECT_EXTERNAL_EVENTS, 
QuotaDependency.NONE),
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterServiceParameters.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterServiceParameters.java
new file mode 100644
index 0000000..03fccb9
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterServiceParameters.java
@@ -0,0 +1,52 @@
+package org.ovirt.engine.core.common.action.gluster;
+
+import javax.validation.constraints.NotNull;
+
+import org.ovirt.engine.core.common.action.VdcActionParametersBase;
+import org.ovirt.engine.core.compat.Guid;
+
+public class GlusterServiceParameters extends VdcActionParametersBase {
+
+    private static final long serialVersionUID = 8706812640906006229L;
+
+    private String actionType;
+    @NotNull(message = "VALIDATION.GLUSTER.SERVER.SERVICE.ID.NOT_NULL")
+    private Guid serverServiceId;
+
+    // TODO: Enable the commented code once mass start / stop for services of
+    // a server or cluster enabled
+    //private Guid serverId;
+    //private Guid clusterId;
+
+    public String getActionType() {
+        return actionType;
+    }
+
+    public void setActionType(String actionType) {
+        this.actionType = actionType;
+    }
+
+    /*public Guid getServerId() {
+        return serverId;
+    }
+
+    public void setServerId(Guid serverId) {
+        this.serverId = serverId;
+    }
+
+    public Guid getClusterId() {
+        return clusterId;
+    }
+
+    public void setClusterId(Guid clusterId) {
+        this.clusterId = clusterId;
+    }*/
+
+    public Guid getServerServiceId() {
+        return serverServiceId;
+    }
+
+    public void setServerServiceId(Guid serverServiceId) {
+        this.serverServiceId = serverServiceId;
+    }
+}
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java
index 8711769..5298add 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/ActionGroup.java
@@ -94,6 +94,7 @@
     MANIPULATE_GLUSTER_VOLUME(1001, RoleType.ADMIN, 
VdcObjectType.GlusterVolume, true, ApplicationMode.GlusterOnly),
     DELETE_GLUSTER_VOLUME(1002, RoleType.ADMIN, VdcObjectType.GlusterVolume, 
true, ApplicationMode.GlusterOnly),
     MANIPULATE_GLUSTER_HOOK(1003, RoleType.ADMIN, VdcObjectType.GlusterHook, 
true, ApplicationMode.GlusterOnly),
+    MANIPULATE_GLUSTER_SERVICE(1004, RoleType.ADMIN, 
VdcObjectType.GlusterService, true, ApplicationMode.GlusterOnly),
 
     // Disks action groups
     CREATE_DISK(1100, RoleType.USER, VdcObjectType.Disk, false, 
ApplicationMode.VirtOnly),
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java
index 781f913..035b154 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java
@@ -22,6 +22,8 @@
     public static final String OPTION_VALUE = "value";
     public static final String OPTION_OLD_VALUE = "oldvalue";
     public static final String OPTION_NEW_VALUE = "newvalue";
+    public static final String SERVER = "server";
+    public static final String SERVICE = "service";
 
     public static final String HOOK_NAME = "glusterhookname";
     public static final String FAILURE_MESSAGE = "failuremessage";
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 3c3bda0..509b064 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
@@ -369,6 +369,7 @@
     GlusterPeerListFailed(4407),
     GlusterHostUUIDNotFound(4408),
     GlusterServicesListFailed(4409),
+    GlusterServicesManageFailed(4410),
     GlusterHookFailed(4500),
     GlusterHookListException(4501),
     GlusterHookEnableFailed(4502),
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 8a40a1b..ef8f246 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
@@ -143,6 +143,7 @@
     GetGlusterHostUUID("org.ovirt.engine.core.vdsbroker.gluster"),
     GlusterServicesList("org.ovirt.engine.core.vdsbroker.gluster"),
     GetGlusterHookContent("org.ovirt.engine.core.vdsbroker.gluster"),
+    ManageGlusterService("org.ovirt.engine.core.vdsbroker.gluster"),
     ;
 
     String packageName;
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/GlusterServiceVDSParameters.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/GlusterServiceVDSParameters.java
new file mode 100644
index 0000000..521fe9a
--- /dev/null
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/gluster/GlusterServiceVDSParameters.java
@@ -0,0 +1,31 @@
+package org.ovirt.engine.core.common.vdscommands.gluster;
+
+import org.ovirt.engine.core.common.vdscommands.VdsIdVDSCommandParametersBase;
+import org.ovirt.engine.core.compat.Guid;
+
+public class GlusterServiceVDSParameters extends VdsIdVDSCommandParametersBase 
{
+    private String actionType;
+    private String serviceName;
+
+    public GlusterServiceVDSParameters(Guid serverId, String actionType, 
String serviceName) {
+        super(serverId);
+        this.actionType = actionType;
+        this.serviceName = serviceName;
+    }
+
+    public String getActionType() {
+        return actionType;
+    }
+
+    public void setActionType(String actionType) {
+        this.actionType = actionType;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+
+    public void setServiceName(String serviceName) {
+        this.serviceName = serviceName;
+    }
+}
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 871d56e..dd8b003 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
@@ -31,6 +31,7 @@
     VAR__TYPE__GLUSTER_BRICK,
     VAR__TYPE__GLUSTER_SERVER,
     VAR__TYPE__GLUSTER_HOOK,
+    VAR__TYPE__GLUSTER_SERVICE,
 
     // External Event
     VAR__TYPE__EXTERNAL_EVENT,
@@ -719,6 +720,9 @@
     SSH_AUTHENTICATION_FAILED,
     GLUSTER_NOT_SUPPORTED,
     ACTION_TYPE_FAILED_SERVER_PART_OF_ANOTHER_CLUSTER,
+    ACTION_TYPE_FAILED_SERVER_SERVICE_NOT_FOUND,
+    ACTION_TYPE_FAILED_SERVICE_ALREADY_RUNNING,
+    ACTION_TYEPE_FAILED_SERVICE_ALREADY_STOPPED,
 
     VM_INTERFACE_NOT_EXIST,
     ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_DEVICE,
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 4764883..78c2d6d 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
@@ -111,6 +111,10 @@
         severities.put(AuditLogType.GLUSTER_HOOK_CONFLICT_DETECTED, 
AuditLogSeverity.WARNING);
         severities.put(AuditLogType.GLUSTER_HOOK_ADDED, 
AuditLogSeverity.NORMAL);
         severities.put(AuditLogType.GLUSTER_HOOK_REMOVED, 
AuditLogSeverity.NORMAL);
+        severities.put(AuditLogType.GLUSTER_SERVICE_STARTED, 
AuditLogSeverity.NORMAL);
+        severities.put(AuditLogType.GLUSTER_SERVICE_START_FAILED, 
AuditLogSeverity.ERROR);
+        severities.put(AuditLogType.GLUSTER_SERVICE_STOPPED, 
AuditLogSeverity.NORMAL);
+        severities.put(AuditLogType.GLUSTER_SERVICE_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 83e0762..8b3d224 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
@@ -780,6 +780,7 @@
 VAR__TYPE__GLUSTER_BRICK=$type Gluster Brick
 VAR__TYPE__GLUSTER_SERVER=$type Gluster Server
 VAR__TYPE__GLUSTER_HOOK=$type Gluster Hook
+VAR__TYPE__GLUSTER_SERVICE=$type Service
 VALIDATION.GLUSTER.VOLUME.ID.NOT_NULL=Volume ID is required.
 VALIDATION.GLUSTER.VOLUME.CLUSTER_ID.NOT_NULL=Cluster ID is required.
 VALIDATION.GLUSTER.VOLUME.NAME.NOT_NULL=Volume Name is required.
@@ -851,6 +852,9 @@
 SSH_AUTHENTICATION_FAILED=SSH Authentication failed. Please make sure password 
is correct.
 GLUSTER_NOT_SUPPORTED=Cannot ${action} ${type}. Gluster service is not 
supported in compatibility version ${compatibilityVersion}.
 ACTION_TYPE_FAILED_SERVER_PART_OF_ANOTHER_CLUSTER=Cannot ${action} ${type}. 
Server ${server} is already part of another cluster.
+ACTION_TYPE_FAILED_SERVER_SERVICE_NOT_FOUND=Cannot ${action} ${type}. Service 
not found.
+ACTION_TYPE_FAILED_SERVICE_ALREADY_RUNNING=Cannot ${action} ${type}. Service 
${service} is already running on server ${server}.
+ACTION_TYEPE_FAILED_SERVICE_ALREADY_STOPPED=Cannot ${action} ${type}. Service 
${service} already stopped on Server ${server}.
 
 # External Events Errors Messages
 VAR__TYPE__EXTERNAL_EVENT=$type External Event
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 d252d53..bfe11a2 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties
@@ -603,4 +603,7 @@
 GLUSTER_HOOK_CONFLICT_DETECTED=Detected conflict in hook ${HookName} of 
Cluster ${VdsGroupName}.
 GLUSTER_HOOK_ADDED=Detected new hook ${HookName} in Cluster ${VdsGroupName}.
 GLUSTER_HOOK_REMOVED=Detected removal of hook ${HookName} in Cluster 
${VdsGroupName}.
-
+GLUSTER_SERVICE_STARTED=Service ${Service} started on server ${Server}.
+GLUSTER_SERVICE_START_FAILED=Could not start service ${Service} on server 
${Server}.  
+GLUSTER_SERVICE_STOPPED=Service ${service} stopped on Server ${server}.
+GLUSTER_SERVICE_STOP_FAILED=Could not stop Service ${service} on Server 
${server}.
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 d9520da..0a1aabe 100644
--- 
a/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
+++ 
b/backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
@@ -352,6 +352,8 @@
 GlusterHookListException=Failed to get gluster hook list
 GlusterHostUUIDNotFound=Gluster host UUID not found
 GlusterHookConflict=Found conflicting hooks
+GlusterServicesListFailed=Get service status failed
+GlusterServicesManageFailed=Manage (start/stop/restart) service 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/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/PermitType.java
 
b/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/PermitType.java
index 090870d..26ab4bc 100644
--- 
a/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/PermitType.java
+++ 
b/backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/model/PermitType.java
@@ -86,6 +86,7 @@
     MANIPULATE_GLUSTER_VOLUME,
     DELETE_GLUSTER_VOLUME,
     MANIPULATE_GLUSTER_HOOK,
+    MANIPULATE_GLUSTER_SERVICE,
 
     // Disks action groups
     CREATE_DISK,
diff --git 
a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/PermitMapper.java
 
b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/PermitMapper.java
index 1b16303..42a42cf 100644
--- 
a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/PermitMapper.java
+++ 
b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/PermitMapper.java
@@ -166,6 +166,8 @@
             return PermitType.LOGIN;
         case INJECT_EXTERNAL_EVENTS:
             return PermitType.INJECT_EXTERNAL_EVENTS;
+        case MANIPULATE_GLUSTER_SERVICE:
+            return PermitType.MANIPULATE_GLUSTER_SERVICE;
         default:
             return null;
         }
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 390e2e2..6499ca9 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
@@ -51,6 +51,7 @@
         case GlusterHostUUIDNotFound:
         case GlusterHookConflict:
         case GlusterServicesListFailed:
+        case GlusterServicesManageFailed:
             // 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/ManageGlusterServiceVDSCommand.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/ManageGlusterServiceVDSCommand.java
new file mode 100644
index 0000000..ad77b87
--- /dev/null
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/ManageGlusterServiceVDSCommand.java
@@ -0,0 +1,29 @@
+package org.ovirt.engine.core.vdsbroker.gluster;
+
+import 
org.ovirt.engine.core.common.vdscommands.gluster.GlusterServiceVDSParameters;
+import org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc;
+
+public class ManageGlusterServiceVDSCommand extends 
AbstractGlusterBrokerCommand<GlusterServiceVDSParameters> {
+
+    protected GlusterServicesReturnForXmlRpc returnValue;
+
+    public ManageGlusterServiceVDSCommand(GlusterServiceVDSParameters 
parameters) {
+        super(parameters);
+    }
+
+    @Override
+    protected StatusForXmlRpc getReturnStatus() {
+        return returnValue.mStatus;
+    }
+
+    @Override
+    protected void ExecuteVdsBrokerCommand() {
+        returnValue =
+                getBroker().glusterServicesManage(getParameters().getVdsId(),
+                        new String[] { getParameters().getServiceName() },
+                        getParameters().getActionType(),
+                        true);
+
+        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 09fc156..03159d7 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
@@ -251,4 +251,6 @@
     GlusterServicesReturnForXmlRpc glusterServicesList(Guid serverId, String[] 
serviceNames);
 
     GlusterHookContentInfoReturnForXmlRpc glusterHookRead(String 
glusterCommand, String stage, String hookName);
+
+    GlusterServicesReturnForXmlRpc glusterServicesManage(Guid serverId, 
String[] serviceNames, String action, boolean failOnError);
 }
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 50028b8..f9b4d14 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
@@ -238,4 +238,6 @@
     public Map<String, Object> glusterServicesGet(String[] serviceNames);
 
     public Map<String, Object> glusterHookRead(String glusterCommand, String 
stage, String hookName);
+
+    public Map<String, Object> glusterServicesManage(String[] serviceNames, 
String action, boolean failOnError);
 }
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 6721327..ff85cf9 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
@@ -1225,4 +1225,15 @@
             throw new XmlRpcRunTimeException(ute);
         }
     }
+
+    @Override
+    public GlusterServicesReturnForXmlRpc glusterServicesManage(Guid serverId, 
String[] serviceNames, String action, boolean failOnError) {
+        try {
+            Map<String, Object> xmlRpcReturnValue = 
vdsServer.glusterServicesManage(serviceNames, action, false);
+            GlusterServicesReturnForXmlRpc wrapper = new 
GlusterServicesReturnForXmlRpc(serverId, xmlRpcReturnValue);
+            return wrapper;
+        } 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 6486b9e..8441453 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
@@ -781,6 +781,9 @@
     @DefaultStringValue("$type Gluster Hook")
     String VAR__TYPE__GLUSTER_HOOK();
 
+    @DefaultStringValue("$type Service")
+    String VAR__TYPE__GLUSTER_SERVICE();
+
     @DefaultStringValue("Cannot ${action} ${type}. The chosen disk drive 
letter is already in use, please select a free one.")
     String ACTION_TYPE_FAILED_DISK_LETTER_ALREADY_IN_USE();
 
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
index 0298cac..64ace53 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Enums.java
@@ -336,4 +336,7 @@
 
     String ServiceType___SHD();
 
+    String GlusterServiceStatus___STARTED();
+
+    String GlusterServiceStatus___STOPPED();
 }
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 46d53ad..f7f6298 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
@@ -157,6 +157,8 @@
 
        String ActionGroup___MANIPULATE_GLUSTER_HOOK();
 
+       String ActionGroup___MANIPULATE_GLUSTER_SERVICE();
+
        String EventNotificationEntity___Host();
 
        String EventNotificationEntity___Vm();
@@ -170,6 +172,8 @@
        String EventNotificationEntity___DWH();
 
        String EventNotificationEntity___GlusterHook();
+
+       String EventNotificationEntity___GlusterService();
 
        String AuditLogType___VDS_FAILURE();
 
@@ -273,6 +277,14 @@
     String AuditLogType___GLUSTER_HOOK_DISABLE();
 
     String AuditLogType___GLUSTER_HOOK_DISABLE_FAILED();
+
+    String AuditLogType___GLUSTER_SERVICE_STARTED();
+
+    String AuditLogType___GLUSTER_SERVICE_START_FAILED();
+
+    String AuditLogType___GLUSTER_SERVICE_STOPPED();
+
+    String AuditLogType___GLUSTER_SERVICE_STOP_FAILED();
 
     String VdcActionType___ActivateVds();
 
@@ -581,6 +593,8 @@
 
        String VdcActionType___DisableGlusterHook();
 
+       String VdcActionType___ManageGlusterService();
+
        String VdcActionType___ConnectStorageToVds();
 
        String VdcObjectType___AdElements();
@@ -617,6 +631,8 @@
 
        String VdcObjectType___GlusterHook();
 
+       String VdcObjectType___GlusterService();
+
        String VdsSelectionAlgorithm___None();
 
        String VdsSelectionAlgorithm___EvenlyDistribute();
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
index e918f89..c5654f9 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
+++ 
b/frontend/webadmin/modules/uicompat/src/main/resources/org/ovirt/engine/ui/uicompat/Enums.properties
@@ -149,6 +149,8 @@
 GlusterVolumeType___DISTRIBUTED_STRIPE=Distributed Stripe
 GlusterStatus___UP=Up
 GlusterStatus___DOWN=Down
+GlusterServiceStatus___STARTED=Service started
+GlusterServiceStatus___STOPPED=Service stopped
 TransportType___TCP=TCP
 TransportType___RDMA=RDMA
 ServiceType___NFS=NFS
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 f9d5cf2..0455418 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
@@ -74,6 +74,7 @@
 ActionGroup___DELETE_DISK=Delete
 ActionGroup___PORT_MIRRORING=Port Mirroring
 ActionGroup___MANIPULATE_GLUSTER_HOOK=Manipulate Gluster Hook
+ActionGroup___MANIPULATE_GLUSTER_SERVICE=Manipulate Service
 EventNotificationEntity___Host=Host Events:
 EventNotificationEntity___Vm=VM Events:
 EventNotificationEntity___Storage=Storage Management Events:
@@ -81,6 +82,7 @@
 EventNotificationEntity___GlusterVolume=Gluster Volume Events:
 EventNotificationEntity___DWH=Data Warehouse Events:
 EventNotificationEntity___GlusterHook=Gluster Hook Events:
+EventNotificationEntity___GlusterService=Gluster Service:
 AuditLogType___VDS_FAILURE=Host is non-responsive
 AuditLogType___USER_VDS_MAINTENANCE=Host was switched to Maintenance Mode
 AuditLogType___USER_VDS_MAINTENANCE_MIGRATION_FAILED=Failed to switch Host to 
Maintenance mode
@@ -133,6 +135,10 @@
 AuditLogType___GLUSTER_HOOK_ENABLE_FAILED=Failed to Enable Gluster Hook
 AuditLogType___GLUSTER_HOOK_DISABLE=Gluster Hook Disabled
 AuditLogType___GLUSTER_HOOK_DISABLE_FAILED=Failed to Disable Gluster Hook
+AuditLogType___GLUSTER_SERVICE_STARTED=Gluster Service started
+AuditLogType___GLUSTER_SERVICE_START_FAILED=Failed to start Gluster service
+AuditLogType___GLUSTER_SERVICE_STOPPED=Gluster Service stopped
+AuditLogType___GLUSTER_SERVICE_STOP_FAILED=Failed to stop Gluster service
 
 VdcActionType___ActivateVds=Activate Host
 VdcActionType___RecoveryStoragePool=Reinitialize Data Center
@@ -261,6 +267,7 @@
 vdcActionType___StopGlusterVolumeProfile=Stop Gluster Volume Profile
 VdcActionType___EnableGlusterHook=Enable Gluster Hook
 VdcActionType___DisableGlusterHook=Disable Gluster Hook
+VdcActionType___ManageGlusterService=Manage Service
 VdcActionType___ActivateStorageDomain=Activate Storage Domain
 VdcActionType___FenceVdsManualy=Fence Host Manually
 VdcActionType___AddEmptyStoragePool=New Data Center
@@ -305,6 +312,7 @@
 VdcObjectType___EventNotification=Event Notification
 VdcObjectType___ImportExport=Import/Export
 VdcObjectType___GlusterHook=Gluster Hook
+VdcObjectType___GlusterService=Gluster Service
 VdsSelectionAlgorithm___None=None
 VdsSelectionAlgorithm___EvenlyDistribute=Even Distribution
 VdsSelectionAlgorithm___PowerSave=Power Saving
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
index c2444db..baac469 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
+++ 
b/frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
@@ -232,6 +232,7 @@
 VAR__TYPE__GLUSTER_BRICK=$type Gluster Brick
 VAR__TYPE__GLUSTER_SERVER=$type Gluster Server
 VAR__TYPE__GLUSTER_HOOK=$type Gluster Hook
+VAR__TYPE__GLUSTER_SERVICE=$type Service
 VAR__ACTION__RUN=$action run
 VAR__ACTION__REMOVE=$action remove
 VAR__ACTION__ADD=$action add
@@ -826,6 +827,9 @@
 ACTION_TYPE_FAILED_GLUSTER_HOOK_ID_IS_REQUIRED=Cannot ${action} ${type}. 
Gluster hook id is required.
 ACTION_TYPE_FAILED_GLUSTER_HOOK_DOES_NOT_EXIST=Cannot ${action} ${type}. 
Gluster hook does not exist.
 SERVER_ALREADY_PART_OF_ANOTHER_CLUSTER=Server ${server} is already part of 
another cluster.
+ACTION_TYPE_FAILED_SERVER_SERVICE_NOT_FOUND=Cannot ${action} ${type}. Service 
not found.
+ACTION_TYPE_FAILED_SERVICE_ALREADY_RUNNING=Cannot ${action} ${type}. Service 
${service} is already running on server ${server}.
+ACTION_TYEPE_FAILED_SERVICE_ALREADY_STOPPED=Cannot ${action} ${type}. Service 
${service} already stopped on Server ${server}.
 
 # External Events Errors Messages
 VAR__TYPE__EXTERNAL_EVENT=$type External Event


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifcab38866c49c6f5d43e3b33006c428ec9304501
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to