Change in ovirt-engine[master]: core: change import vm to be VmCommand - part 3

ahadas at redhat.com ahadas at redhat.com
Thu Nov 27 16:57:16 UTC 2014


Arik Hadas has submitted this change and it was merged.

Change subject: core: change import vm to be VmCommand - part 3
......................................................................


core: change import vm to be VmCommand - part 3

Introduce ImportValidator that stores the validation logics which are
required for import operations, to reduce the coupling between
ImportVmcommand and MoveOrCopyTemplateCommand. This validator will be
used later in other import commands.

The tests which test the logic of the validation were moved to
ImportValidatorTest and the tests in ImportVmCommandTest were changed
such that they will check that the right error is returned from the
canDoAction method, assuming that the validator returns the appropriate
error.

Change-Id: I7fa61e7f493d196acdb40bfe461665d6668c6508
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImportVmFromConfigurationCommand.java
A backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/ImportValidator.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVMFromConfigurationCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/ImportVmCommandTest.java
A backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/ImportValidatorTest.java
6 files changed, 392 insertions(+), 50 deletions(-)

Approvals:
  Arik Hadas: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7fa61e7f493d196acdb40bfe461665d6668c6508
Gerrit-PatchSet: 9
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: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list