Change in ovirt-engine[ovirt-engine-3.4]: core: fix support for pattern-based name for pool
iheim at redhat.com
iheim at redhat.com
Sun Apr 13 14:12:35 UTC 2014
Itamar Heim has submitted this change and it was merged.
Change subject: core: fix support for pattern-based name for pool
......................................................................
core: fix support for pattern-based name for pool
Adding the validation group 'CreateEntity' to UpdateVmPoolWithVmsCommand
caused a regression that prevented to set pattern-based name for pool.
The problem was that the validation which is declared on
VmStatic#getName was checked also for pools and it doesn't accept name
that contains '?'.
The solution is to introduce 4 additional validation groups for create
& update VMs and for create & update Templates, which extend the
'CreateEntity' and 'CreateUpdate' groups, and to change the groups of
the validation on VmStatic#getName to these instead of 'CreateEntity'
and 'CreateUpdate'.
This change is safe because every validation that was checked before
will still be checked since the new groups extend the previous ones,
except for the validation on VmStatic#getName which will be checked only
for commands that add or update VM or Template.
Change-Id: I5bfa9fb37d464dd0e77b0bc206c1804713ed9575
Bug-Url: https://bugzilla.redhat.com/1078875
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/AddVmPoolWithVmsCommandTest.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommonVmPoolWithVmsCommandTestAbstract.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/validation/group/CreateVm.java
A backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/validation/group/UpdateVm.java
7 files changed, 31 insertions(+), 9 deletions(-)
Approvals:
Omer Frenkel: Looks good to me, approved
Arik Hadas: Verified
--
To view, visit http://gerrit.ovirt.org/26624
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5bfa9fb37d464dd0e77b0bc206c1804713ed9575
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the Engine-commits
mailing list