Updated Branches: refs/heads/master 81c07f179 -> 6bda2739c
CLOUDSTACK-5302. listHosts API response - value of cpuallocated is always 0% Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6bda2739 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6bda2739 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6bda2739 Branch: refs/heads/master Commit: 6bda2739c82724db6510d8a593ccc0a5f8e8b992 Parents: 81c07f1 Author: Likitha Shetty <[email protected]> Authored: Thu Nov 28 15:40:05 2013 +0530 Committer: Likitha Shetty <[email protected]> Committed: Thu Nov 28 15:52:42 2013 +0530 ---------------------------------------------------------------------- server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6bda2739/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java index 3112702..1b95d9b 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<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());
