Dhandapani Gopal has uploaded a new change for review. Change subject: engine: Start Gluster Volume Profile command ......................................................................
engine: Start Gluster Volume Profile command Includes following related to the command for "gluster volume profile start" - New Bll Command - New Vds Command - Audit Log Messages and Severities - App Errors - VDSM Errors - Junit test class Change-Id: Ia47f7033f080f75a6ebf8481ea4199ee32bbf4ab Signed-off-by: Dhandapani <[email protected]> --- A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommand.java A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommandTest.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/StartGlusterVolumeProfileVDSCommand.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, 204 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/61/8261/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommand.java new file mode 100644 index 0000000..daa2196 --- /dev/null +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommand.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 Start Gluster Volume Profile + */ +@NonTransactiveCommandAttribute +public class StartGlusterVolumeProfileCommand extends GlusterVolumeCommandBase<GlusterVolumeParameters> { + + private static final long serialVersionUID = 8083311388300152297L; + + public StartGlusterVolumeProfileCommand(GlusterVolumeParameters params) { + super(params); + } + + @Override + protected void setActionMessageParameters() { + addCanDoActionMessage(VdcBllMessages.VAR__ACTION__START_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.StartGlusterVolumeProfile, + new GlusterVolumeVDSParameters(upServer.getId(), getGlusterVolumeName())); + setSucceeded(returnValue.getSucceeded()); + if (!getSucceeded()) { + handleVdsError(AuditLogType.GLUSTER_VOLUME_PROFILE_START_FAILED, returnValue.getVdsError().getMessage()); + return; + } + } + + @Override + public AuditLogType getAuditLogTypeValue() { + if (getSucceeded()) { + return AuditLogType.GLUSTER_VOLUME_PROFILE_START; + } else { + return errorType == null ? AuditLogType.GLUSTER_VOLUME_PROFILE_START_FAILED : errorType; + } + } +} diff --git a/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommandTest.java b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommandTest.java new file mode 100644 index 0000000..993c4fd --- /dev/null +++ b/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeProfileCommandTest.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.GlusterVolumeActionParameters; +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 StartGlusterVolumeProfileCommandTest { + + @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 StartGlusterVolumeProfileCommand cmd; + + private void prepareMocks(StartGlusterVolumeProfileCommand 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 StartGlusterVolumeProfileCommand(new GlusterVolumeActionParameters(stoppedVolumeId, false))); + prepareMocks(cmd); + assertTrue(cmd.canDoAction()); + } + + @Test + public void canDoActionSucceedsOnStartedVolume() { + cmd = spy(new StartGlusterVolumeProfileCommand(new GlusterVolumeActionParameters(startedVolumeId, false))); + prepareMocks(cmd); + assertTrue(cmd.canDoAction()); + } + + @Test + public void canDoActionFailsOnNull() { + cmd = spy(new StartGlusterVolumeProfileCommand(new GlusterVolumeActionParameters(null, false))); + 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 0a7d9d1..c2aa4cd 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 @@ -206,6 +206,9 @@ 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), + 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 8cdf3e5..c30b563 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 @@ -58,6 +58,8 @@ AddEventNotificationEntry(EventNotificationEntity.GlusterVolume, AuditLogType.GLUSTER_VOLUME_REPLACE_BRICK_START_FAILED); AddEventNotificationEntry(EventNotificationEntity.Host, AuditLogType.GLUSTER_HOST_ADD_FAILED); 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); // 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 2aec786..365e43f 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 @@ -256,6 +256,7 @@ StartRebalanceGlusterVolume(1407, ActionGroup.MANIPULATE_GLUSTER_VOLUME), ReplaceGlusterVolumeBrick(1408, ActionGroup.MANIPULATE_GLUSTER_VOLUME), AddBricksToGlusterVolume(1409, ActionGroup.MANIPULATE_GLUSTER_VOLUME), + StartGlusterVolumeProfile(1410, ActionGroup.MANIPULATE_GLUSTER_VOLUME), ; 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 fb4fe2a..1c82c66 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,6 +341,7 @@ GlusterHostRemoveFailed(4406), GlusterAddHostFailed(4404), GlusterPeerListFailed(4407), + GlusterVolumeProfileStartFailed(4158), 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 8f3ec23..63419ba 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 @@ -138,6 +138,7 @@ GlusterHostRemove("org.ovirt.engine.core.vdsbroker.gluster"), GlusterHostAdd("org.ovirt.engine.core.vdsbroker.gluster"), GlusterServersList("org.ovirt.engine.core.vdsbroker.gluster"), + StartGlusterVolumeProfile("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 92fe26c..bfaa506 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 @@ -61,6 +61,7 @@ VAR__ACTION__LOGOFF, VAR__ACTION__REBALANCE_START, VAR__ACTION__ASSIGN, + VAR__ACTION__START_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 b1ebf0b..01ee5eb 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 @@ -82,6 +82,8 @@ mSeverities.put(AuditLogType.GLUSTER_VOLUME_REPLACE_BRICK_START, AuditLogSeverity.NORMAL); mSeverities.put(AuditLogType.GLUSTER_VOLUME_REPLACE_BRICK_START_FAILED, AuditLogSeverity.ERROR); 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); } 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 f7508e0..908b899 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties @@ -259,6 +259,7 @@ VAR__ACTION__LOGOFF=$action log off VAR__ACTION__ASSIGN=$action assign VAR__ACTION__REBALANCE_START=$action rebalance +VAR__ACTION__START_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 7c8c453..fe2b715 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -552,4 +552,6 @@ GLUSTER_HOST_REMOVE_FAILED=Failed to remove gluster server ${VdsName} from Cluster ${VdsGroupName}. GLUSTER_SERVERS_LIST_FAILED=Failed to fetch gluster peer list from server ${VdsName} on Cluster ${VdsGroupName}. HA_VM_FAILED=Highly Available VM ${VmName} failed. It will be restarted automatically. -HA_VM_RESTART_FAILED=Restart of the Highly Available VM ${VmName} failed. +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}. 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 92036ad..c055ee2 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 @@ GlusterVolumeReplaceBrickStartFailed=Gluster Volume Replace Brick Start Failed GlusterHostRemoveFailed=Gluster Server Remove Failed GlusterAddHostFailed=Gluster Server Add Failed -GlusterPeerListFailed=Gluster Peer List Failed +GlusterPeerListFailed=Gluster Peer List Failed +GlusterVolumeProfileStartFailed=Gluster Volume Profile Start 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 b4b909e..91a6bd3 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 @@ -31,6 +31,7 @@ case GlusterHostRemoveFailed: case GlusterAddHostFailed: case GlusterPeerListFailed: + case GlusterVolumeProfileStartFailed: // 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/StartGlusterVolumeProfileVDSCommand.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/StartGlusterVolumeProfileVDSCommand.java new file mode 100644 index 0000000..554649f --- /dev/null +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/StartGlusterVolumeProfileVDSCommand.java @@ -0,0 +1,16 @@ +package org.ovirt.engine.core.vdsbroker.gluster; + +import org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeVDSParameters; + +public class StartGlusterVolumeProfileVDSCommand<P extends GlusterVolumeVDSParameters> extends AbstractGlusterBrokerCommand<P> { + public StartGlusterVolumeProfileVDSCommand(P parameters) { + super(parameters); + } + + @Override + protected void ExecuteVdsBrokerCommand() { + status = getBroker().glusterVolumeProfileStart(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 f04e32e..92dd077 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 @@ -236,4 +236,6 @@ GlusterServersListReturnForXmlRpc glusterServersList(); + StatusOnlyReturnForXmlRpc glusterVolumeProfileStart(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 246da01..924147f 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 @@ -231,4 +231,6 @@ @FutureCall(delegeteTo = "ping") public FutureTask<Map<String, Object>> futurePing(); + public Map<String, Object> glusterVolumeProfileStart(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 a711e24..c6106bc 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 @@ -1149,4 +1149,13 @@ } } + @Override + public StatusOnlyReturnForXmlRpc glusterVolumeProfileStart(String volumeName) { + try { + return new StatusOnlyReturnForXmlRpc(vdsServer.glusterVolumeProfileStart(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 0be0f7f..a85212d 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 @@ -688,6 +688,9 @@ @DefaultStringValue("$action rebalance") String VAR__ACTION__REBALANCE_START(); + @DefaultStringValue("$action volume profile") + String VAR__ACTION__START_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 2c15ba2..8856928 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 @@ -689,6 +689,9 @@ @DefaultStringValue("Gluster Host Remove Failed.") String GlusterHostRemoveFailed(); + @DefaultStringValue("Gluster Volume Profile Start Failed.") + String GlusterVolumeProfileStartFailed(); + 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 eaab817..5ac111b 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 @@ -236,6 +236,10 @@ String AuditLogType___GLUSTER_HOST_REMOVE_FAILED(); + String AuditLogType___GLUSTER_VOLUME_PROFILE_START(); + + String AuditLogType___GLUSTER_VOLUME_PROFILE_START_FAILED(); + String VdcActionType___ActivateVds(); String VdcActionType___RecoveryStoragePool(); @@ -527,6 +531,8 @@ String VdcActionType___GlusterHostAdd(); + String vdcActionType___StartGlusterVolumeProfile(); + 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 ffa7614..b8c59af 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 @@ -114,6 +114,8 @@ AuditLogType___GLUSTER_VOLUME_REPLACE_BRICK_START_FAILED=Gluster Volume Replace Brick could not be started AuditLogType___GLUSTER_HOST_ADD_FAILED=Failed to Add Gluster Server 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 VdcActionType___ActivateVds=Activate Host VdcActionType___RecoveryStoragePool=Reinitialize Data Center @@ -234,6 +236,7 @@ VdcActionType___StartRebalanceGlusterVolume=Start Rebalance Gluster Volume VdcActionType___ReplaceGlusterVolumeBrick=Start Gluster Volume Replace Brick VdcActionType___GlusterHostAdd=Add Gluster server +vdcActionType___StartGlusterVolumeProfile=Start 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/8261 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia47f7033f080f75a6ebf8481ea4199ee32bbf4ab 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
