You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/01/18 11:11:43 UTC

[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #5517: Fix #3448 quota calculation for monthly tariffs

sureshanaparti commented on a change in pull request #5517:
URL: https://github.com/apache/cloudstack/pull/5517#discussion_r786646672



##########
File path: framework/quota/src/main/java/org/apache/cloudstack/quota/QuotaManagerImpl.java
##########
@@ -368,7 +368,7 @@ public QuotaUsageVO updateQuotaDiskUsage(UsageVO usageRecord, final BigDecimal a
         QuotaTariffVO tariff = _quotaTariffDao.findTariffPlanByUsageType(QuotaTypes.CPU_NUMBER, usageRecord.getEndDate());
         if (tariff != null && tariff.getCurrencyValue().compareTo(BigDecimal.ZERO) != 0 && serviceoffering.getCpu() != null) {
             BigDecimal cpu = new BigDecimal(serviceoffering.getCpu());
-            onehourcostpercpu = tariff.getCurrencyValue().multiply(aggregationRatio);

Review comment:
       Hi @jairov4 The `aggregationRatio` considers the aggregation range specified in the global setting 'usage.stats.job.aggregation.range', which would be skipped when it is removed. Please check.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org