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 13:16:46 UTC
[GitHub] [cloudstack] jairov4 commented on a change in pull request #5517: Fix #3448 quota calculation for monthly tariffs
jairov4 commented on a change in pull request #5517:
URL: https://github.com/apache/cloudstack/pull/5517#discussion_r786748625
##########
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:
@sureshanaparti considering the `aggregationRatio` here is actually causing the missbehavior. The raw usage already comes in hours as I pointed in the image above so it is independent of that ratio.
--
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