Ori Liel has posted comments on this change.
Change subject: restapi: #864991 - Vm Custom Properties Ignored
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmResource.java
Line 207: }
Line 208:
Line 209: @Override
Line 210: public Response start(Action action) {
Line 211: RunVmOnceParams params = map(get(), new
RunVmOnceParams(guid));
You make a good point, but I think there's an even stronger argument for using
get():
Using a direct query instead of get() will result in populate() not being
called. If at any point in the future, anything important for RunVmOnce
parameters will reside in populate(), which is, I believe, quite a plausible
scenario, we will immediately have a bug.
I prefer the robustness of using get() over the performance gain of saving the
payload and ballooning queries. After all, these queries are run even when
getting the entire VMs collection with no performance issue, and here we are
talking about a single VM.
Does this make you reconsider?
Line 212: if (action.isSetVm()) {
Line 213: validateEnums(VM.class, action.getVm());
Line 214: VM vm = action.getVm();
Line 215: params = map(vm, params);
--
To view, visit http://gerrit.ovirt.org/8706
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5d9c4ac782edf1779455aeee4121091199b76b3d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches