Martin Beták has posted comments on this change. Change subject: engine: Ability to assign multiple VMs from a pool to single user ......................................................................
Patch Set 5: (2 inline comments) .................................................... File backend/manager/dbscripts/upgrade/03_03_0110_add_max_assigned_vms_per_user.sql Line 1: select fn_db_add_column('vm_pools', 'max_assigned_vms_per_user', 'smallint default 1'); Done .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommonVmPoolWithVmsCommand.java Line 235: return false; Line 236: } Line 237: Line 238: pool = getParameters().getVmPool(); Line 239: if (pool.getMaxAssignedVmsPerUser() < 1 || pool.getMaxAssignedVmsPerUser() > pool.getAssignedVmsCount()) { I looked at it under debugger and getParameters().getVmsCount() can be in fact substituted for getAssignedVmsCount() but only on new pool creation. On edit getParameters().getVmsCount() is zero whereas getAssignedVmsCount() has always the right value. So this is the only correct way to do it. Tested with both REST and webadmin. Line 240: addCanDoActionMessage(VdcBllMessages.VM_POOL_NUMBER_OF_ASSIGNED_VMS_OUT_OF_RANGE); Line 241: return false; Line 242: } Line 243: -- To view, visit http://gerrit.ovirt.org/14005 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a1cc836db48d7094c2e7a03ee3a60b0b34a52a9 Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Beták <mbe...@redhat.com> Gerrit-Reviewer: Martin Beták <mbe...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches