Michael Pasternak has posted comments on this change.

Change subject: core, webadmin, restapi: Fix VM creation with blank template
......................................................................


Patch Set 8: Code-Review-1

(2 comments)

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java
Line 108: 
Line 109:                 VDSGroup cluster = 
lookupCluster(staticVm.getVdsGroupId());
Line 110:                 if (cluster.getArchitecture() == 
ArchitectureType.undefined) {
Line 111:                     throw new 
WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
Line 112:                             .entity("The selected cluster does not 
have architecture, please set it before adding vms.")
i don't think this should be in the api, this is a part of business logic and 
should be a part of the command (along with error message which should be 
localized BTW)
Line 113:                             .build());
Line 114:                 }
Line 115: 
Line 116:                 if (Guid.Empty.equals(templateId) && !vm.isSetOs()) {


Line 155: 
Line 156:         if (defaultOs == null) {
Line 157:             throw new 
WebApplicationException(Response.status(Response.Status.BAD_REQUEST)
Line 158:                     .entity("Could not determine the default OS based 
on the architecture of the selected cluster.")
Line 159:                     .build());
same
Line 160:         }
Line 161: 
Line 162:         vm.setOsId(defaultOs);
Line 163:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I880e5940c7244476e477e098445a47210ea08b5d
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vitor de Lima <vitor.l...@eldorado.org.br>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<gustavo.pedr...@eldorado.org.br>
Gerrit-Reviewer: Leonardo Bianconi <leonardo.bianc...@eldorado.org.br>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skriva...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Vitor de Lima <vitor.l...@eldorado.org.br>
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