mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
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>
This commit is contained in:
parent
b12905b7a8
commit
985b2aa88d
@ -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());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user