Sahina Bose has posted comments on this change.

Change subject: engine: Bll to resume geo-rep session
......................................................................


Patch Set 4:

(3 comments)

Unit test and messages are missing (see 
http://www.ovirt.org/Engine_Adding_Messages)

http://gerrit.ovirt.org/#/c/32935/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ResumeGeoRepGlusterVolumeCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ResumeGeoRepGlusterVolumeCommand.java:

Line 16:     @Override
Line 17:     protected void setActionMessageParameters() {
Line 18:         
addCanDoActionMessage(VdcBllMessages.VAR_ACTION_GEO_REP_RESUME);
Line 19:         
addCanDoActionMessage(VdcBllMessages.VAR__TYPE__GLUSTER_VOLUME);
Line 20:     }
Add canDoAction to verify that the session is in paused state. You can only 
resume if the session is paused.
Line 21: 
Line 22: 
Line 23:     @Override
Line 24:     protected void executeCommand() {


Line 23:     @Override
Line 24:     protected void executeCommand() {
Line 25:         ResumeGeoRepGlusterVolumeParameters parameters = 
getParameters();
Line 26:         setGlusterVolumeId(parameters.getVolumeId());
Line 27:         VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.ResumeGeoRepGlusterVolume, new 
GlusterVolumeResumeGeoRepVDSParameters(upServer.getId(), 
getGlusterVolumeName(), parameters.getSlaveHostName(), 
parameters.getSlaveVolumeName(), parameters.isForce()));
To resume a session, you would be passing a geo-rep session Id. The volumeName, 
slaveHostName, slaveVolumeName etc should be retrieved from the Db for that 
sessionId.
Line 28:         setSucceeded(returnValue.getSucceeded());
Line 29:         if(!getSucceeded()) {
Line 30:             
handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_RESUME_FAILED, 
returnValue.getVdsError().getMessage());
Line 31:             return;


Line 24:     protected void executeCommand() {
Line 25:         ResumeGeoRepGlusterVolumeParameters parameters = 
getParameters();
Line 26:         setGlusterVolumeId(parameters.getVolumeId());
Line 27:         VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.ResumeGeoRepGlusterVolume, new 
GlusterVolumeResumeGeoRepVDSParameters(upServer.getId(), 
getGlusterVolumeName(), parameters.getSlaveHostName(), 
parameters.getSlaveVolumeName(), parameters.isForce()));
Line 28:         setSucceeded(returnValue.getSucceeded());
Update session's state once succeeded.
Line 29:         if(!getSucceeded()) {
Line 30:             
handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_RESUME_FAILED, 
returnValue.getVdsError().getMessage());
Line 31:             return;
Line 32:         }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4c8a94c84758d89096c8726b9c11d5d0990a7002
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anb...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Ramesh N <rnach...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to