mirror of https://github.com/apache/cloudstack.git
bug 10848: listCapacity - sum the used and reserved capacities. Also apply overprovisioning factore explicitly
This commit is contained in:
parent
2fc5cc73ba
commit
3921421ce5
|
|
@ -255,7 +255,7 @@ public class CapacityDaoImpl extends GenericDaoBase<CapacityVO, Long> implements
|
|||
public Long getUsedCapacity() {
|
||||
return sumUsed;
|
||||
}
|
||||
public long getSumReserved() {
|
||||
public long getReservedCapacity() {
|
||||
return sumReserved;
|
||||
}
|
||||
public Long getTotalCapacity() {
|
||||
|
|
|
|||
|
|
@ -2481,8 +2481,12 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
|
||||
for (SummedCapacity summedCapacity : summedCapacities){
|
||||
CapacityVO capacity = new CapacityVO(null, zoneId, podId, clusterId,
|
||||
summedCapacity.getUsedCapacity(), summedCapacity.getTotalCapacity(), summedCapacity.getCapacityType());
|
||||
|
||||
summedCapacity.getUsedCapacity() + summedCapacity.getReservedCapacity(),
|
||||
summedCapacity.getTotalCapacity(), summedCapacity.getCapacityType());
|
||||
|
||||
if (capacityType == Capacity.CAPACITY_TYPE_CPU){
|
||||
capacity.setTotalCapacity((long)(summedCapacity.getTotalCapacity() * ApiDBUtils.getCpuOverprovisioningFactor()));
|
||||
}
|
||||
capacities.add(capacity);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue