Change in ovirt-engine[master]: core: make RunVmValidator stateful

ofrenkel at redhat.com ofrenkel at redhat.com
Mon Nov 18 16:12:37 UTC 2013


Omer Frenkel has submitted this change and it was merged.

Change subject: core: make RunVmValidator stateful
......................................................................


core: make RunVmValidator stateful

RunVmValidator, as implied by its name, contains validations that should
be checked before running a VM. The relevant information for those
validations is the VM which is going to be run, the parameters for the
run command and whether the run command is internal or not.

This patch changes RunVmValidator to take the information it needs,
which is mentioned above, at creation time (i.e as arguments in its
constructor) and save it as part of the instance state. That way, we
won't need to pass it on each invocation from outside of this class.

Change-Id: I5f2f0ce4a0a92ff610f5c2a8be1e084f0c188f77
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmPoolCommandBase.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/RunVmValidator.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RunVmCommandTest.java
4 files changed, 35 insertions(+), 50 deletions(-)

Approvals:
  Omer Frenkel: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f2f0ce4a0a92ff610f5c2a8be1e084f0c188f77
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas 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>
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list