Libor Spevak has posted comments on this change. Change subject: restapi: Throw exception if setting lower VM pool size ......................................................................
Patch Set 1: (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"; OK, UpdateVmPoolWithVmsCommand already tests negative size: ... } else if (returnValue && getParameters().getVmsCount() < 0) { addCanDoActionMessage(VdcBllMessages.VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL); ... so, I send this info to backend. 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: 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