Kobi Ianko has posted comments on this change. Change subject: core: Enhancing the quota to apply to internal commands ......................................................................
Patch Set 1: (4 comments) http://gerrit.ovirt.org/#/c/26654/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommandBase.java: Line 764: Line 765: private boolean internalValidateAndSetQuota() { Line 766: // Quota accounting is done only in the most external Command, Line 767: // Quota will account to an internal command only if it is marked as @QuotaVdsDependentForInternalCommand Line 768: if ((isInternalExecution() && !isQuotaInternalDependent()) || !isQuotaDependant()) { > don't change this 'if', "isInternal" should be part of isQuotaDependant Done Line 769: return true; Line 770: } Line 771: Line 772: QuotaConsumptionParametersWrapper quotaConsumptionParametersWrapper = new QuotaConsumptionParametersWrapper(this, http://gerrit.ovirt.org/#/c/26654/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotSetNumberOfCpusCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HotSetNumberOfCpusCommand.java: Line 132: getVm().getVdsGroupId(), Line 133: getVm().getCpuPerSocket() * Math.abs(cpuToConsume), Line 134: 0)); Line 135: } Line 136: return list; > separate patch please. Done Line 137: } http://gerrit.ovirt.org/#/c/26654/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaVdsDependentForInternalCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/quota/QuotaVdsDependentForInternalCommand.java: Line 11: */ Line 12: Line 13: @Retention(RetentionPolicy.RUNTIME) Line 14: @Target(ElementType.TYPE) Line 15: public @interface QuotaVdsDependentForInternalCommand { > I don't like annotation, but if others are okay with it, I will be able to Done Line 16: Line 11: */ Line 12: Line 13: @Retention(RetentionPolicy.RUNTIME) Line 14: @Target(ElementType.TYPE) Line 15: public @interface QuotaVdsDependentForInternalCommand { > actually I won't be able to sleep, since we mark quota dependant in VdcActi We will still keep the quota type at the VdcActionType. in the long run we can move some data in the VdcActionType to the command itself, I like using annotation because of the slick look, but we can do it in other ways for example: @Quota(type=QuotaDependency.VDS_GROUP, useInternaly=True) Line 16: -- To view, visit http://gerrit.ovirt.org/26654 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3e4a050cb845165630741c4857f0ba7de12fa60e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Kobi Ianko <k...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Kobi Ianko <k...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches