From 6bda2739c82724db6510d8a593ccc0a5f8e8b992 Mon Sep 17 00:00:00 2001 From: Likitha Shetty Date: Thu, 28 Nov 2013 15:40:05 +0530 Subject: [PATCH] CLOUDSTACK-5302. listHosts API response - value of cpuallocated is always 0% --- server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java index 3112702c645..1b95d9b24cc 100644 --- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java @@ -109,7 +109,7 @@ public class HostJoinDaoImpl extends GenericDaoBase 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());