shwstppr commented on a change in pull request #4901:
URL: https://github.com/apache/cloudstack/pull/4901#discussion_r612271833



##########
File path: 
api/src/main/java/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java
##########
@@ -275,7 +280,8 @@ public boolean isDirectDownload() {
     }
 
     public Boolean isDeployAsIs() {
-        return hypervisor != null && 
hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString());
+        return hypervisor != null && 
hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString())
+                && deployAsIs != null && deployAsIs;

Review comment:
       ```suggestion
           return 
Hypervisor.HypervisorType.VMware.toString().equalsIgnoreCase(hypervisor) &&
                   Boolean.TRUE.equals(deployAsIs);
   ```
   Somewhat easier to read

##########
File path: 
api/src/main/java/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java
##########
@@ -162,6 +162,11 @@
                 description = "true if template should bypass Secondary 
Storage and be downloaded to Primary Storage on deployment")
     private Boolean directDownload;
 
+    @Parameter(name=ApiConstants.DEPLOY_AS_IS,
+            type = CommandType.BOOLEAN,
+            description = "(Vmware only) true if VM deployments should 
preserve all the configurations defined for this template")

Review comment:
       ```suggestion
               description = "(VMware only) true if VM deployments should 
preserve all the configurations defined for this template", since = "4.15.1")
   ```

##########
File path: ui/src/views/image/RegisterOrUploadTemplate.vue
##########
@@ -800,6 +812,8 @@ export default {
             params[key] = input
           } else if (key === 'hypervisor') {
             params[key] = this.hyperVisor.opts[input].name
+          } else if (key === 'deployasis') {
+            params[key] = input

Review comment:
       Shouldn't this be handled by default at 841-842? Else, is it better to 
club 809, 811 and this




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


Reply via email to