piyush5netapp commented on code in PR #13578:
URL: https://github.com/apache/cloudstack/pull/13578#discussion_r3559518159


##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/lifecycle/OntapPrimaryDatastoreLifecycle.java:
##########
@@ -337,9 +337,16 @@ public boolean attachZone(DataStore dataStore, ZoneScope 
scope, Hypervisor.Hyper
             logger.error("attachZone : Storage Pool not found for id: " + 
dataStore.getId());
             throw new CloudRuntimeException("Storage Pool not found for id: " 
+ dataStore.getId());
         }
+        if (!Hypervisor.HypervisorType.KVM.equals(hypervisorType)){
+            logger.error("attachZone : ONTAP primary storage is supported only 
for KVM hypervisor");
+            throw new CloudRuntimeException("ONTAP primary storage is 
supported only for KVM hypervisor");
+        }
+        storagePool.setHypervisor(hypervisorType);
+        storagePoolDao.update(storagePool.getId(),storagePool);
+        logger.debug("attachZone : Set Hypervisor type for storage pool {} to 
{}", storagePool.getName(), hypervisorType);

Review Comment:
   Done



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