CS-15158: Correcting the allocated size for local storage in listStoragePools

Reviewed-by: Kishan
This commit is contained in:
Nitin Mehta 2012-08-31 15:20:00 +05:30
parent bc1574709d
commit f352bb17bf
1 changed files with 2 additions and 1 deletions

View File

@ -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);