Libor Spevak has posted comments on this change. Change subject: restapi: Throw exception if setting lower VM pool size ......................................................................
Patch Set 2: (1 inline comment) .................................................... File backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendVmPoolResource.java Line 103: final int currentVmCount = current.getAssignedVmsCount(); Line 104: Line 105: int size = 0; Line 106: if (incoming.isSetSize()) { Line 107: // in case the value is negative, the backend command will fail on canDoAction I think, the message VM_POOL_CANNOT_CREATE_WITH_NO_VMS is activated only for AddVmPoolWithVms command in CommonVmPoolWithVmsCommand (getActionType() == VdcActionType.AddVmPoolWithVms && getParameters().getVmsCount() < 1), so it goes up to UpdateVmPoolWithVmsCommand and another message is supplied: VM_POOL_CANNOT_DECREASE_VMS_FROM_POOL. Line 108: size = incoming.getSize() - currentVmCount; Line 109: } Line 110: Line 111: final org.ovirt.engine.core.common.businessentities.VmPool entity = map(incoming, current); -- 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: 2 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