Change in ovirt-engine[master]: core: [cleanup] organize canMigrateVm method

ofrenkel at redhat.com ofrenkel at redhat.com
Thu Apr 25 07:36:45 UTC 2013


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 <ahadas at redhat.com>
---
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 <ahadas at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>



More information about the Engine-commits mailing list