Ravi Nori has posted comments on this change.

Change subject: [WIP] core: introduce RemoveSnapshotSingleDiskLive BLL command
......................................................................


Patch Set 5:

(3 comments)

http://gerrit.ovirt.org/#/c/26909/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DestroyImageCommandCallback.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DestroyImageCommandCallback.java:

Line 21: //        if (AsyncTaskManager.getInstance().)
Line 22:         DestroyImageCommand cmd = getCommand(cmdId);
Line 23:         AsyncTasks task = 
TaskManagerUtil.getAsyncTaskFromDb(cmd.getParameters().getVdsmTaskIds().get(0));
Line 24:         if (task.getstatus() == AsyncTaskStatusEnum.finished) {
Line 25:             cmd.setCommandStatus(task.getCommandStatus());
For Async tasks the command status should automatically be set by 
AsyncTaskManager framework, no need to do it here
Line 26:             // TODO GP ^^^ or below?
Line 27:             //cmd.setCommandStatus(task.getresult() == 
AsyncTaskResultEnum.success /*(or cleanSuccess?)*/ ? CommandStatus.SUCCEEDED : 
CommandStatus.FAILED);
Line 28:         }
Line 29:     }


http://gerrit.ovirt.org/#/c/26909/5/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeCommandCallback.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MergeCommandCallback.java:

Line 17:     private static final Log log = 
LogFactory.getLog(MergeCommandCallback.class);
Line 18: 
Line 19:     @Override
Line 20:     public void executed(VdcReturnValueBase result) {
Line 21:         return;
> ?
I will handle the above at CommandCallBack to provide default empty 
implementations
Line 22:     }
Line 23: 
Line 24:     @Override
Line 25:     public void doPolling(Guid cmdId, List<Guid> childCmdIds) {


Line 30:                 command.getParameters().getVmId(),
Line 31:                 command.getParameters().getImageGroupId());
Line 32:         for (VmJob vmJob : vmJobs) {
Line 33:             if 
(vmJob.getId().equals(command.getParameters().getVmJobId())) {
Line 34:                 isRunning = true;
I think you can break out of the loop here.

This call back looks good.
Line 35:             }
Line 36:         }
Line 37: 
Line 38:         if (!isRunning) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic47eb91a0ea1fe150e3b2152e2c9d5f1f2eb3678
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@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