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


##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/listener/OntapHostListener.java:
##########
@@ -63,26 +71,39 @@ public class OntapHostListener implements 
HypervisorHostListener {
 
     @Override
     public boolean hostConnect(long hostId, long poolId)  {
-        logger.info("Connect to host " + hostId + " from pool " + poolId);
+        logger.info("hostConnect: Connecting host {} to pool {}", hostId, 
poolId);
         Host host = _hostDao.findById(hostId);
         if (host == null) {
-            logger.error("host was not found with id : {}", hostId);
+            logger.error("hostConnect: Host was not found with id: {}", 
hostId);
             return false;
         }
         if (!host.getHypervisorType().equals(Hypervisor.HypervisorType.KVM)) {
-            logger.error("ONTAP plugin does not support {} type host currently 
", host.getHypervisorType());
+            logger.error("hostConnect: ONTAP plugin does not support {} type 
host currently", host.getHypervisorType());
             return false;
         }
 
         StoragePool pool = _storagePoolDao.findById(poolId);
         if (pool == null) {
-            logger.error("Failed to connect host - storage pool not found with 
id: {}", poolId);
+            logger.error("hostConnect: Failed to connect host - storage pool 
not found with id: {}", poolId);
             return false;
         }
-        logger.info("Connecting host {} to ONTAP storage pool {}", 
host.getName(), pool.getName());
+        logger.info("hostConnect: Connecting host {} to ONTAP storage pool 
{}", host.getName(), pool.getName());
         try {
             // Load storage pool details from database to pass mount options 
and other config to agent
             Map<String, String> detailsMap = 
_storagePoolDetailsDao.listDetailsKeyPairs(poolId);
+            if (detailsMap == null || detailsMap.isEmpty()) {

Review Comment:
   ```suggestion
               if (MapUtils.isEmpty(detailsMap)) {
   ```



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