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 <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa
<[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches