Arik Hadas 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(a)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/26356
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5bfa9fb37d464dd0e77b0bc206c1804713ed9575
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server