rohityadavcloud commented on code in PR #7160:
URL: https://github.com/apache/cloudstack/pull/7160#discussion_r1187360547
##########
plugins/hypervisors/vmware/src/main/java/com/cloud/storage/resource/VmwareStorageProcessor.java:
##########
@@ -2822,7 +2822,10 @@ private ManagedObjectReference
getVmfsDatastore(VmwareContext context, VmwareHyp
throw new Exception("A relevant SCSI disk could not be located to
use to create a datastore.");
}
- morDs = firstHostDatastoreSystemMO.createVmfsDatastore(datastoreName,
hostScsiDisk);
+ morDs = firstHostDatastoreSystemMO.findDatastoreByName(datastoreName);
+ if (morDs == null) {
+ morDs =
firstHostDatastoreSystemMO.createVmfsDatastore(datastoreName, hostScsiDisk);
Review Comment:
LGTM, the code is trying to find a DS by name and when it's not found it's
creating a vmfs datastore. Should this be generic and enough to merge/accept
this change - @harikrishna-patnala @shwstppr @nvazquez @DaanHoogland ?
--
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]