Spaceman1984 commented on a change in pull request #4640:
URL: https://github.com/apache/cloudstack/pull/4640#discussion_r572761630
##########
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:
Done
##########
File path:
core/src/main/java/com/cloud/agent/api/GetStoragePoolCapabilitiesAnswer.java
##########
@@ -0,0 +1,19 @@
+package com.cloud.agent.api;
+
+public class GetStoragePoolCapabilitiesAnswer extends Answer {
+ public GetStoragePoolCapabilitiesAnswer(GetStoragePoolCapabilitiesCommand
cmd) {
+ super(cmd);
+
+ poolInfo = new StoragePoolInfo();
+ }
+
+ public StoragePoolInfo getPoolInfo() {
+ return poolInfo;
+ }
+
+ public void setPoolInfo(StoragePoolInfo poolInfo) {
+ this.poolInfo = poolInfo;
+ }
+
+ private StoragePoolInfo poolInfo;
Review comment:
Done
----------------------------------------------------------------
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]