Michael Pasternak has posted comments on this change. Change subject: restapi: user cannnot take a vm from pool via restapi #864438 ......................................................................
Patch Set 2: (1 inline comment) .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmPoolResource.java Line 149: this.queryParamsClass = queryParamsClass; Line 150: } Line 151: Line 152: public org.ovirt.engine.api.model.VM lookupEntity(Guid id) throws BackendFailureException { Line 153: VM vm = doGetEntity(VM.class, not correct, getEntity() returns T where T is vmpool, doGetEntity() used to fetch any entity and in this case VM. btw and i don't want to throw 404 if i can't find entity declared by BE in action returnvalue, i'd just not set it in action response (also this should not ever happen as this is action and not create operation). Line 154: query, getQueryParams(queryParamsClass, id), id.toString()); Line 155: org.ovirt.engine.api.model.VM model = new org.ovirt.engine.api.model.VM(); Line 156: model.setId(vm.getId().toString()); Line 157: return LinkHelper.addLinks(getUriInfo(), model); -- To view, visit http://gerrit.ovirt.org/8488 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Icdd917a5f443bd7e8d06b582ae4559bef90608e6 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Ori Liel <ol...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches