mirror of https://github.com/apache/cloudstack.git
CS-15158: Correcting the allocated size for local storage in listStoragePools
Reviewed-by: Kishan
This commit is contained in:
parent
bc1574709d
commit
f352bb17bf
|
|
@ -1240,7 +1240,8 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
}
|
||||
|
||||
StorageStats stats = ApiDBUtils.getStoragePoolStatistics(pool.getId());
|
||||
long allocatedSize = ApiDBUtils.getStorageCapacitybyPool(pool.getId(), Capacity.CAPACITY_TYPE_STORAGE_ALLOCATED);
|
||||
short capacityType = pool.isShared() ? Capacity.CAPACITY_TYPE_STORAGE_ALLOCATED : Capacity.CAPACITY_TYPE_LOCAL_STORAGE;
|
||||
long allocatedSize = ApiDBUtils.getStorageCapacitybyPool(pool.getId(), capacityType);
|
||||
poolResponse.setDiskSizeTotal(pool.getCapacityBytes());
|
||||
poolResponse.setDiskSizeAllocated(allocatedSize);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue