anmolbabu has posted comments on this change.

Change subject: engine : Bll command to start geo-rep session
......................................................................


Patch Set 2:

(4 comments)

http://gerrit.ovirt.org/#/c/32537/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeGeoRepStartCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeGeoRepStartCommand.java:

Line 6: import org.ovirt.engine.core.common.vdscommands.VDSCommandType;
Line 7: import org.ovirt.engine.core.common.vdscommands.VDSReturnValue;
Line 8: import 
org.ovirt.engine.core.common.vdscommands.gluster.GlusterVolumeGeoRepSessionStartVDSParameters;
Line 9: 
Line 10: public class GlusterVolumeGeoRepStartCommand extends 
GlusterVolumeCommandBase<GlusterVolumeGeoRepSessionStartParameters> {
> Extend from GeoRepSessionCommandBase in http://gerrit.ovirt.org/33038
Done
Line 11:     public 
GlusterVolumeGeoRepStartCommand(GlusterVolumeGeoRepSessionStartParameters 
params) {
Line 12:         super(params);
Line 13:     }
Line 14: 


Line 21:     @Override
Line 22:     protected void executeCommand() {
Line 23:         GlusterVolumeGeoRepSessionStartParameters parameters = 
getParameters();
Line 24:         setGlusterVolumeId(parameters.getVolumeId());
Line 25:         VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.GlusterVolumeGeoRepStart, new 
GlusterVolumeGeoRepSessionStartVDSParameters(upServer.getId(), 
getGlusterVolumeName(), parameters.getSlaveVolumeName(), 
parameters.getSlaveHost()));
> You need to validate that these parameters are present in the canDoAction m
Done
Line 26:         setSucceeded(returnValue.getSucceeded());
Line 27:         if(! getSucceeded()) {
Line 28:             
handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_START_FAILED_EXCEPTION, 
returnValue.getVdsError().getMessage());
Line 29:         }


Line 25:         VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.GlusterVolumeGeoRepStart, new 
GlusterVolumeGeoRepSessionStartVDSParameters(upServer.getId(), 
getGlusterVolumeName(), parameters.getSlaveVolumeName(), 
parameters.getSlaveHost()));
Line 26:         setSucceeded(returnValue.getSucceeded());
Line 27:         if(! getSucceeded()) {
Line 28:             
handleVdsError(AuditLogType.GLUSTER_VOLUME_GEO_REP_START_FAILED_EXCEPTION, 
returnValue.getVdsError().getMessage());
Line 29:         }
> If succeeded, shouldn't the entry be created in the database?
Modified right. I mean entry should be created by the create verb right
Line 30:     }
Line 31: 
Line 32:     @Override
Line 33:     public AuditLogType getAuditLogTypeValue() {


http://gerrit.ovirt.org/#/c/32537/2/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterVolumeGeoRepSessionStartParameters.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/gluster/GlusterVolumeGeoRepSessionStartParameters.java:

Line 1: package org.ovirt.engine.core.common.action.gluster;
Line 2: 
Line 3: import org.ovirt.engine.core.compat.Guid;
Line 4: 
Line 5: public class GlusterVolumeGeoRepSessionStartParameters extends 
GlusterVolumeParameters{
> Can you rename this as GlusterVolumeGeoRepSessionParameters, so that this c
Done
Line 6: 
Line 7:     private static final long serialVersionUID = -881348048838907389L;
Line 8: 
Line 9:     private String slaveVolumeName;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib74c515d23218bb2e30403e0e0042c84b74dc2bb
Gerrit-PatchSet: 2
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: anmolbabu <anb...@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