sureshanaparti commented on a change in pull request #4640:
URL: https://github.com/apache/cloudstack/pull/4640#discussion_r580140924
##########
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:
@Spaceman1984 how about defining `failOnChecks`locally in this method
and set to true when poolId is passed, instead method parameter.
----------------------------------------------------------------
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]