sureshanaparti commented on a change in pull request #4640:
URL: https://github.com/apache/cloudstack/pull/4640#discussion_r572618295
##########
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) {
+ boolean hardwareAccelerationSupportForDataStore =
getHardwareAccelerationSupportForDataStore(host.getMor(), dsMo.getName());
+ StoragePoolInfo poolInfo = answer.getPoolInfo();
+ Map<String, String> poolDetails = poolInfo.getDetails();
+ if (poolDetails == null) {
+ poolDetails = new HashMap<>();
Review comment:
this details should ok in response, as rest of the attributes in
`poolInfo` are unused.
----------------------------------------------------------------
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]