Omer Frenkel has posted comments on this change.

Change subject: restapi: add use_latest_template_version to vm restapi
......................................................................


Patch Set 5:

(2 comments)

http://gerrit.ovirt.org/#/c/23560/5/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java:

Line 144:           //TODO: Get rid of this logic code when Backend supports 
default memory.
Line 145:             staticVm.setMemSizeMb(DEFAULT_MEMORY_SIZE);
Line 146:         }
Line 147:         if (vm.isSetTemplate()) {
Line 148:             if(vm.getTemplate().getId() != null) {
pretty minor, but i think that according to the project code style, there 
should be a space after "if"
Line 149:                 
staticVm.setVmtGuid(GuidUtils.asGuid(vm.getTemplate().getId()));
Line 150:             }
Line 151:             // There is no need to pass this property to backend if
Line 152:             // no template was specified.


Line 355:             model.setTemplate(new Template());
Line 356:             model.getTemplate().setId(entity.getVmtGuid().toString());
Line 357:             // display this property only if the vm is stateless
Line 358:             // otherwise the value of this property is meaningless 
and misleading
Line 359:             if(entity.isStateless()) {
should be displayed also for vms from vm-pool. they also can use this mechanism 
but not marked as stateless.
there is a check below for "entity.getVmPoolId() != null" so i guess you can do 
the same
Line 360:                 
model.setUseLatestTemplateVersion(entity.isUseLatestVersion());
Line 361:             }
Line 362:         }
Line 363:         if (entity.getStatus() != null) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I38b569f7ef6df4d485dac15b804427c8248ab540
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
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