cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [2/2] git commit: updated refs/heads/4.4 to 8f9458e
Date Fri, 27 Jun 2014 07:42:27 GMT
CLOUDSTACK-6884: List Capacity API always returns GPU capacity also even if type is different.

(cherry picked from commit 48646ae186eb75052da3da385404a823bd785444)


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8f9458e5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8f9458e5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8f9458e5

Branch: refs/heads/4.4
Commit: 8f9458e517fe6c5f3877cbe9a0dd6ec56f4c3adb
Parents: e0d7eb8
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Fri Jun 27 11:53:07 2014 +0530
Committer: Daan Hoogland <daan@onecht.net>
Committed: Fri Jun 27 09:41:52 2014 +0200

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiResponseHelper.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8f9458e5/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index c4d5ae6..7b72f49 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -1738,7 +1738,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         }
 
         List<VgpuTypesInfo> gpuCapacities;
-        if (!result.isEmpty() && (gpuCapacities = ApiDBUtils.getGpuCapacites(result.get(0).getDataCenterId(),
result.get(0).getPodId(), result.get(0).getClusterId())) != null) {
+        if (result.size() > 1 && (gpuCapacities = ApiDBUtils.getGpuCapacites(result.get(0).getDataCenterId(),
result.get(0).getPodId(), result.get(0).getClusterId())) != null) {
             HashMap<String, Long> vgpuVMs = ApiDBUtils.getVgpuVmsCount(result.get(0).getDataCenterId(),
result.get(0).getPodId(), result.get(0).getClusterId());
 
             float capacityUsed = 0;


Mime
View raw message