bug 5873: if usedcapacity is larger than totalcapacity, return totalcapacity, because we preserved resources for stopped VM, at some point, usedcapacity may be larger than totalcapacity

status 5873: resolved fixed
This commit is contained in:
anthony 2011-01-07 11:53:46 -08:00
parent a2558428ad
commit df7e8169b6
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ public class ListCapacityCmd extends BaseCmd{
}
summedCapacity.setTotalCapacity(totalCapacityMap.get(key));
summedCapacity.setUsedCapacity(usedCapacityMap.get(key));
summedCapacity.setUsedCapacity((usedCapacityMap.get(key) > totalCapacityMap.get(key)) ? totalCapacityMap.get(key):usedCapacityMap.get(key));
summedCapacities.add(summedCapacity);
}