Roy Golan has posted comments on this change.

Change subject: restapi: Fix VM creation with blank template
......................................................................


Patch Set 4:

"About the problem with the REST API error, maybe we could (if the cluster has 
undefined architecture) set the OS type to any value and let the CDA fail 
(there is another patch that prevents VMs to be added into clusters with 
undefined architecture)."

I'm taking my comment back. I saw REST do throw exceptions in other places in 
resources in case of validations.

the adding of canDo on undefined is excellent 




About choosing a proper default OS for each architecture, getting the OS with 
the smallest ID is not the greatest idea, but I couldn't find any place (in the 
code or in the DB or maybe in a properties files) to put a map between each 
architecture and its default OS.

look at OsREpository interface. there's a constant there for DEFAULT_OS. I 
don't mind expanding this to a method to get the default os by architecture

 vm.setOs(osRepo.getDefaultOs(getCluster.getArch()))

-- 
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: 4
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: 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: No
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to