ofri masad has posted comments on this change. Change subject: core: Quota refactor - parameters ......................................................................
Patch Set 11: (3 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java Line 636: + ". Storage pool is not available for quota calculation. "); Line 637: return false; Line 638: } Line 639: Line 640: QuotaConsumptionParametersWrapper quotaConsumptionParametersWrapper = new QuotaConsumptionParametersWrapper(this, The canDoActionMessages are needed in order to allow the QuotaManager to send back error messages when it returns 'false'. canDoActionMessages is not a member of AuditLogableBase. since we don't want to pass to QuotaManager a CommandBase but an AuditLogable - we must pass this argument. Line 641: getReturnValue().getCanDoActionMessages()); Line 642: quotaConsumptionParametersWrapper.setParameters(getQuotaConsumptionParameters()); Line 643: Line 644: return true; //quotaConsumptionParametersWrapper.getParameters().isEmpty() || getQuotaManager().consume(quotaConsumptionParametersWrapper); .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaConsumptionParametersWrapper.java Line 8: public class QuotaConsumptionParametersWrapper { Line 9: Line 10: private List<QuotaConsumptionParameter> parameters; Line 11: Line 12: private AuditLogableBase auditLogable; canDoActionMessages is not a member of AuditLoggableBase Line 13: private List<String> canDoActionMessages; Line 14: Line 15: public QuotaConsumptionParametersWrapper(AuditLogableBase auditLogable, List<String> canDoActionMessages) { Line 16: this.auditLogable = auditLogable; .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java Line 310: public static VdcActionType forValue(int value) { Line 311: return mappings.get(value); Line 312: } Line 313: Line 314: public QuotaDependency getQuotaDependency() { Done Line 315: return this.quotaDependency; Line 316: } Line 317: Line 318: /** -- To view, visit http://gerrit.ovirt.org/8775 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Iebfc85569ba1aa8bd840f7239f83b7f921a4bd8e Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: ofri masad <oma...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Sharad Mishra <snmis...@linux.vnet.ibm.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: ofri masad <oma...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches