rajiv-jain-netapp commented on code in PR #13053:
URL: https://github.com/apache/cloudstack/pull/13053#discussion_r3498952449


##########
plugins/storage/volume/ontap/src/main/java/org/apache/cloudstack/storage/service/UnifiedNASStrategy.java:
##########
@@ -96,24 +119,40 @@ public void copyCloudStackVolume(CloudStackVolume 
cloudstackVolume) {
 
     @Override
     public CloudStackVolume getCloudStackVolume(Map<String, String> 
cloudStackVolumeMap) {
-        return null;
+        logger.info("getCloudStackVolume: Get cloudstack volume " + 
cloudStackVolumeMap);
+        CloudStackVolume cloudStackVolume = null;
+        FileInfo fileInfo = 
getFile(cloudStackVolumeMap.get(OntapStorageConstants.VOLUME_UUID),cloudStackVolumeMap.get(OntapStorageConstants.FILE_PATH));
+
+        if (fileInfo != null) {
+            cloudStackVolume = new CloudStackVolume();
+            
cloudStackVolume.setFlexVolumeUuid(cloudStackVolumeMap.get(OntapStorageConstants.VOLUME_UUID));
+            cloudStackVolume.setFile(fileInfo);
+        } else {
+            logger.warn("getCloudStackVolume: File not found for volume UUID: 
{} and file path: {}", 
cloudStackVolumeMap.get(OntapStorageConstants.VOLUME_UUID), 
cloudStackVolumeMap.get(OntapStorageConstants.FILE_PATH));
+        }
+

Review Comment:
   corrected



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