Arik Hadas has posted comments on this change.

Change subject: core: change return value of AddDisk
......................................................................


Patch Set 2:

(1 comment)

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

Line 452: 
Line 453:         if (tmpRetValue.getActionReturnValue() != null) {
Line 454:             DiskImage diskImage = (DiskImage) 
tmpRetValue.getActionReturnValue();
Line 455:             addDiskPermissions(diskImage);
Line 456:             
getReturnValue().setActionReturnValue(isExecutedAsChildCommand() ? diskImage : 
diskImage.getId());
> I think that having different return values is kind of confusing, additiona
I agree that it is confusing, but the motivation is that I want to use this 
command to create the hibernation volumes and memory volumes of snapshots. in 
both cases I need the volumes-id as well. so if I want to use this command, 
I'll need to call it and then fetch the snapshots (another DB call) - which is 
too stupid. So I think that it worth the trade-off - the API will be a bit more 
complex but it will be more useful
Allon?
Line 457:         }
Line 458:         getReturnValue().setFault(tmpRetValue.getFault());
Line 459:         setSucceeded(tmpRetValue.getSucceeded());
Line 460:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6a41d57bfb1bf48f0a2c6a3703e612b27da50db8
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to