Juan Hernandez has posted comments on this change.

Change subject: restapi: wrong cpu_profile on change template cluster
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/36054/5/backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java:

Line 118:                 // since the template cpu_profile doesn't match 
cluster.
Line 119:                 if (!vm.isSetCpuProfile() && vm.isSetCluster()
Line 120:                         && 
!ObjectUtils.equals(templateEntity.getVdsGroupId(), vm.getCluster().getId())) {
Line 121:                     builtFromTemplate.setCpuProfileId(null);
Line 122:                 }
> in the backend side I don't know whether cpu profile is set.
The object pointed by the local variable "builtFromTemplate" is eventually 
passed to the backend, after mapping it and assigning to the local variable 
"staticVm", and then passing it as a parameter to the "AddVmCommandParameters" 
constructor. If possible the backend should get it from there, and the RESTAPI 
should just send to the backend whatever the caller provided.
Line 123: 
Line 124:                 VmStatic builtFromInstanceType = null;
Line 125:                 
org.ovirt.engine.core.common.businessentities.InstanceType instanceTypeEntity = 
null;
Line 126:                 if (vm.isSetInstanceType() && 
(vm.getInstanceType().isSetId() || vm.getInstanceType().isSetName())) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2cdac29a9cfbe1d6b5fb5ccdb1be68c0f98c038
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to