Spaceman1984 commented on a change in pull request #4640:
URL: https://github.com/apache/cloudstack/pull/4640#discussion_r580242683
##########
File path: server/src/main/java/com/cloud/storage/StorageManagerImpl.java
##########
@@ -2331,6 +2338,80 @@ public ImageStore updateImageStoreStatus(Long id,
Boolean readonly) {
return imageStoreVO;
}
+ @Override
+ public void updateStorageCapabilities(Long poolId, boolean failOnChecks) {
+ List<StoragePoolVO> pools = new ArrayList<>();
+ if (poolId == null) {
+ pools = _storagePoolDao.listByStatus(StoragePoolStatus.Up);
+ } else {
+ StoragePoolVO pool = _storagePoolDao.findById(poolId);
+
+ if (pool == null) {
+ throw new CloudRuntimeException("Primary storage not found for
id: " + poolId);
+ }
+
+ pools.add(pool);
+ }
+
+ if (pools.size() == 0) {
+ throw new CloudRuntimeException("No storage pools found to
update.");
+ }
+
+ for (StoragePoolVO pool: pools) {
+
+ // Only checking NFS for now - required for disk provisioning type
support for vmware.
+ if (pool.getPoolType() != StoragePoolType.NetworkFilesystem) {
+ if (failOnChecks) {
Review comment:
failOnChecks is not only dependent on the pool id being null or not, it
is also dependent on where the method is being called from.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]