nvazquez commented on code in PR #6413:
URL: https://github.com/apache/cloudstack/pull/6413#discussion_r901758532


##########
engine/components-api/src/main/java/com/cloud/storage/StorageManager.java:
##########
@@ -163,6 +163,36 @@ public interface StorageManager extends StorageService {
             true,
             ConfigKey.Scope.Cluster,
             null);
+    ConfigKey<Boolean> VmwareCreateCloneFull = new ConfigKey<>(Boolean.class,
+            "vmware.create.full.clone",
+            "Storage",
+            "false",
+            "If set to true, creates VMs as full clones on ESX hypervisor",
+            true,
+            ConfigKey.Scope.StoragePool,
+            null);
+    ConfigKey<Boolean> VmwareAllowParallelExecution = new 
ConfigKey<>(Boolean.class,
+            "vmware.allow.parallel.command.execution",
+            "Advanced",
+            "false",
+            "allow commands to be executed in parallel in spite of 
'vmware.create.full.clone' being set to true.",
+            true,
+            ConfigKey.Scope.Global,
+            null);
+
+    static boolean shouldExecuteInSequenceOnVmware() {
+                final Boolean fullClone = getFullCloneConfiguration();
+                final Boolean allowParallel = 
getAllowParallelExecutionConfiguration();
+                return fullClone && !allowParallel;
+            }
+
+    static Boolean getAllowParallelExecutionConfiguration() {
+        return VmwareAllowParallelExecution.value();
+    }
+
+    static Boolean getFullCloneConfiguration() {

Review Comment:
   Since this configuration is storage-pool wide, shouldn't this method check 
the value a specific pool? Otherwise it is taking the global value but not the 
granular values



##########
engine/components-api/src/main/java/com/cloud/storage/StorageManager.java:
##########
@@ -163,6 +163,36 @@ public interface StorageManager extends StorageService {
             true,
             ConfigKey.Scope.Cluster,
             null);
+    ConfigKey<Boolean> VmwareCreateCloneFull = new ConfigKey<>(Boolean.class,
+            "vmware.create.full.clone",
+            "Storage",
+            "false",
+            "If set to true, creates VMs as full clones on ESX hypervisor",
+            true,
+            ConfigKey.Scope.StoragePool,
+            null);
+    ConfigKey<Boolean> VmwareAllowParallelExecution = new 
ConfigKey<>(Boolean.class,
+            "vmware.allow.parallel.command.execution",
+            "Advanced",
+            "false",
+            "allow commands to be executed in parallel in spite of 
'vmware.create.full.clone' being set to true.",
+            true,
+            ConfigKey.Scope.Global,
+            null);
+
+    static boolean shouldExecuteInSequenceOnVmware() {
+                final Boolean fullClone = getFullCloneConfiguration();
+                final Boolean allowParallel = 
getAllowParallelExecutionConfiguration();
+                return fullClone && !allowParallel;
+            }
+
+    static Boolean getAllowParallelExecutionConfiguration() {
+        return VmwareAllowParallelExecution.value();
+    }
+
+    static Boolean getFullCloneConfiguration() {

Review Comment:
   Since this configuration is storage-pool wide, shouldn't this method check 
the value on a specific pool? Otherwise it is taking the global value but not 
the granular values



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