sureshanaparti commented on code in PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#discussion_r1734291711


##########
server/src/main/java/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java:
##########
@@ -229,6 +231,17 @@ public StoragePoolResponse 
newStoragePoolForMigrationResponse(StoragePoolJoinVO
         poolResponse.setDiskSizeTotal(pool.getCapacityBytes());
         poolResponse.setDiskSizeAllocated(allocatedSize);
         poolResponse.setCapacityIops(pool.getCapacityIops());
+
+        if (storagePool != null) {
+            poolResponse.setManaged(storagePool.isManaged());
+            if (storagePool.isManaged()) {
+                DataStore store = dataStoreMgr.getDataStore(pool.getId(), 
DataStoreRole.Primary);
+                PrimaryDataStoreDriver driver = (PrimaryDataStoreDriver) 
store.getDriver();
+                long usedIops = driver.getUsedIops(storagePool);
+                poolResponse.setAllocatedIops(usedIops);

Review Comment:
   this code is sync with the response parameters set for managed pools here:
   
   
https://github.com/apache/cloudstack/blob/674129cd588e9be67923fc06d652170f405f2d07/server/src/main/java/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java#L147-L151



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to