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 <yzasl...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to