sureshanaparti commented on a change in pull request #4640:
URL: https://github.com/apache/cloudstack/pull/4640#discussion_r572616290
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -5260,6 +5269,66 @@ protected Answer execute(ModifyStoragePoolCommand cmd) {
}
}
+ protected Answer execute(GetStoragePoolCapabilitiesCommand cmd) {
+
+ try {
+
+ VmwareHypervisorHost hyperHost = getHyperHost(getServiceContext());
+
+ HostMO host = (HostMO) hyperHost;
+
+ StorageFilerTO pool = cmd.getPool();
+
+ ManagedObjectReference morDatastore =
HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(hyperHost,
pool.getUuid());
+
+ if (morDatastore == null) {
+ morDatastore = hyperHost.mountDatastore((pool.getType() ==
StoragePoolType.VMFS || pool.getType() == StoragePoolType.PreSetup ||
pool.getType() == StoragePoolType.DatastoreCluster), pool.getHost(),
pool.getPort(), pool.getPath(), pool.getUuid().replace("-", ""), true);
+ }
+
+ assert (morDatastore != null);
+
+ DatastoreMO dsMo = new DatastoreMO(getServiceContext(),
morDatastore);
+
+ GetStoragePoolCapabilitiesAnswer answer = new
GetStoragePoolCapabilitiesAnswer(cmd);
+
+ if (pool.getType() == StoragePoolType.NetworkFilesystem) {
Review comment:
Can you define this method generic, irrespective of storage pool type.
----------------------------------------------------------------
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]