Michael Pasternak has posted comments on this change. Change subject: restapi: Throw exception if setting lower VM pool size ......................................................................
Patch Set 1: I would prefer that you didn't submit this (1 inline comment) .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmPoolResource.java Line 107: int size = 0; Line 108: if (incoming.isSetSize()) { Line 109: if (incoming.getSize() < currentVmCount) { Line 110: final Fault f = new Fault(); Line 111: final String faultString = "Requested VM pool size cannot be lower than the current capacity"; this logic should not reside in the api, you should be passing vm_size as is to backend, and let can-do-action fail (if applicable) Line 112: f.setReason(faultString); Line 113: final Response response = Response.status(Response.Status.BAD_REQUEST).entity(f).build(); Line 114: throw new WebApplicationException(response); Line 115: } else { -- To view, visit http://gerrit.ovirt.org/13978 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibe4ad50e6962159df5891be4653bc05eb3dfd237 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Libor Spevak <lspe...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches