You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by li...@apache.org on 2013/11/28 11:24:15 UTC

git commit: updated refs/heads/4.3 to aef392d

Updated Branches:
  refs/heads/4.3 4edc3989b -> aef392de9


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/aef392de
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aef392de
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aef392de

Branch: refs/heads/4.3
Commit: aef392de99f5e5b9acd55f942604609c870db9bd
Parents: 4edc398
Author: Likitha Shetty <li...@citrix.com>
Authored: Thu Nov 28 15:40:05 2013 +0530
Committer: Likitha Shetty <li...@citrix.com>
Committed: Thu Nov 28 15:47:40 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/aef392de/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 6847543..be3bd12 100644
--- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
@@ -113,7 +113,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());