GutoVeronezi commented on a change in pull request #5586:
URL: https://github.com/apache/cloudstack/pull/5586#discussion_r732984728



##########
File path: server/src/main/java/com/cloud/storage/StorageManagerImpl.java
##########
@@ -501,6 +498,17 @@ private GetStorageStatsAnswer 
getStoragePoolStats(StoragePool pool, GetStorageSt
         return answer;
     }
 
+    @Override
+    public boolean canPoolProvideStorageStats(StoragePool pool) {
+        DataStoreProvider storeProvider = 
_dataStoreProviderMgr.getDataStoreProvider(pool.getStorageProviderName());
+        DataStoreDriver storeDriver = storeProvider.getDataStoreDriver();
+        if (storeDriver instanceof PrimaryDataStoreDriver && 
((PrimaryDataStoreDriver)storeDriver).canProvideStorageStats()) {
+            return true;
+        }
+
+        return false;

Review comment:
       ```suggestion
          return storeDriver instanceof PrimaryDataStoreDriver && 
((PrimaryDataStoreDriver)storeDriver).canProvideStorageStats();
   ```




-- 
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