CLOUDSTACK-5302. listHosts API response - value of cpuallocated is always 0%

This commit is contained in:
Likitha Shetty 2013-11-28 15:40:05 +05:30
parent 81c07f1791
commit 6bda2739c8
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ public class HostJoinDaoImpl extends GenericDaoBase<HostJoinVO, Long> implements
if (details.contains(HostDetails.all) || details.contains(HostDetails.capacity)) {
// set allocated capacities
Long mem = host.getMemReservedCapacity() + host.getMemUsedCapacity();
Long cpu = host.getCpuReservedCapacity() + host.getCpuReservedCapacity();
Long cpu = host.getCpuReservedCapacity() + host.getCpuUsedCapacity();
hostResponse.setMemoryAllocated(mem);
hostResponse.setMemoryTotal(host.getTotalMemory());