Juan Hernandez has posted comments on this change. Change subject: core, webadmin, restapi: Fix VM creation with blank template ......................................................................
Patch Set 10: (1 comment) .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmsResource.java Line 165: Line 166: vm.setDefaultDisplayType(defaultDisplayType); Line 167: Line 168: } Line 169: If I understand correctly the AddVmCommand gets the type of the OS from the osId property of the VmBase class. This is an int, and apparently 0 means that the operating system wasn't found. I think that when vm.os.type hasn't been provided by the user the API should populate VmBase.osId with 0 or some other value that indicates to the backend that it hasn't actually been populated. Maybe it should be Integer instead of int, in order to use null to indicate that it wasn't populated. The backend should then check the value and use the business logic to decide what should be the default OS. Line 170: private boolean shouldMakeCreatorExplicitOwner() { Line 171: // In the user level API we should make the creator the owner of the new created machine Line 172: return isFiltered(); Line 173: } -- 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: 10 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: Juan Hernandez <juan.hernan...@redhat.com> 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