Change in ovirt-engine[ovirt-engine-4.1]: restapi: Autoadjusting max memory when VM created

Code Review gerrit at ovirt.org
Tue Mar 14 14:19:29 UTC 2017


>From Tal Nisan <tnisan at redhat.com>:

Tal Nisan has submitted this change and it was merged.

Change subject: restapi: Autoadjusting max memory when VM created
......................................................................


restapi: Autoadjusting max memory when VM created

Problem: Since engine 4.1 VM-like entities have new property - max
memory. If one tried to create a new VM using script created for engine
4.0 specifying custom memory size larger template max memory and didn't
specifying max memory explicitly then creation of VM failed. Max memory
copied from template was smaller than memory.

Solution: If max memory is not specified and memory is specified, then
max memory is automatically set to value
VmCommonUtils#getMaxMemorySizeDefault(int memory) (currently 4*memory).
UI uses same method.

Change-Id: I6e1d0847c68a774f6028824e4533df772c19dfea
Bug-Url: https://bugzilla.redhat.com/1430795
Signed-off-by: Jakub Niedermertl <jniederm at redhat.com>
---
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Jakub Niedermertl: Verified
  Juan Hernandez: Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/74056
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e1d0847c68a774f6028824e4533df772c19dfea
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.1
Gerrit-Owner: Jakub Niedermertl <jniederm at redhat.com>
Gerrit-Reviewer: Jakub Niedermertl <jniederm at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list