cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [01/35] git commit: updated refs/heads/marvin_refactor to 4abd929
Date Fri, 19 Apr 2013 11:28:15 GMT
Updated Branches:
  refs/heads/marvin_refactor 94b18c6e9 -> 4abd92922


CLOUDSTACK-2046: Primary Storage & Secondary Storage is max limit is set 0 with listResourceLimits
API response as ROOT admin

Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>


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

Branch: refs/heads/marvin_refactor
Commit: 985b2aa88d4d02db98a2e9be7ac081e4efbff879
Parents: b12905b
Author: Sanjay Tripathi <sanjay.tripathi@citrix.com>
Authored: Wed Apr 17 12:03:47 2013 +0530
Committer: Sateesh Chodapuneedi <sateesh@apache.org>
Committed: Thu Apr 18 05:26:00 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/api/ApiResponseHelper.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/985b2aa8/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 819c88b..7629e5e 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -379,7 +379,7 @@ public class ApiResponseHelper implements ResponseGenerator {
             populateDomain(resourceLimitResponse, accountTemp.getDomainId());
         }
         resourceLimitResponse.setResourceType(Integer.valueOf(limit.getType().getOrdinal()).toString());
-        if(limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage)
{
+        if((limit.getType() == ResourceType.primary_storage || limit.getType() == ResourceType.secondary_storage)
&& limit.getMax() >= 0) {
             resourceLimitResponse.setMax((long) Math.ceil(limit.getMax()/ResourceType.bytesToGiB));
         } else {
             resourceLimitResponse.setMax(limit.getMax());


Mime
View raw message