Omer Frenkel has submitted this change and it was merged.

Change subject: core: [cleanup] organize canMigrateVm method
......................................................................


core: [cleanup] organize canMigrateVm method

This patch organize MigrateVmCommand#canMigrateVm method:
1. replaced the unused paramter vmGuid with VM instance. that way, the
method is more testable (can be tested without mocking, just insert a
different VM to check as parameter)
2. remove the can-do-action error messages list from the parameters, and
use addCanDoActionMessage & failCanDoAction methods inside the method
instead
3. set the action and type for the can-do-action messages in the
standard way by override setActionMessageParameters method

Change-Id: Ica36ecc272a295ee82ec51d7b62a90d84489d8c9
Signed-off-by: Arik Hadas <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/InternalMigrateVmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java
3 files changed, 51 insertions(+), 54 deletions(-)

Approvals:
  Omer Frenkel: Looks good to me, approved
  Arik Hadas: Verified


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ica36ecc272a295ee82ec51d7b62a90d84489d8c9
Gerrit-PatchSet: 5
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: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to