Amit Aviram has posted comments on this change.

Change subject: engine: Added init method to command base.
......................................................................


Patch Set 2: -Code-Review

Moti- Another example for "init" usage could be in cloning a VM- its disk image 
sometime needs to be configured before executing the command. (This patch could 
very much use this kind of method: http://gerrit.ovirt.org/#/c/35225/8 . 
reading its commit message will describe why)

Arik- I agree that returning boolean does not really fit to initialization 
method. my thoughts of using this method is letting exceptions be thrown out of 
the init and being catched at the internalCanDoAction try..catch block.

However, the infra should force such implementations- so maybe it will be 
better to extract the init() call from the current boolean chain 
(isUserAuthorizedToRunAction() && init() && isBackwardsCompatible() && 
valida...)

This will enforce the implementations not to return "false" if init fails.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0c71548a8fab5538ee97c279f12a821999635950
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to