nvazquez commented on a change in pull request #4555:
URL: https://github.com/apache/cloudstack/pull/4555#discussion_r547249180



##########
File path: 
api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java
##########
@@ -168,6 +170,12 @@ private void validateRequest() {
         if (getZoneId() <= 0) {
             throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "invalid 
zoneid");
         }
+        if 
(!hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString()) && 
osTypeId == null) {
+            throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Missing 
parameter ostypeid");
+        }
+        if 
(hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString()) && 
osTypeId != null) {

Review comment:
       This change is in line with the changes we have done with the 
registerTemplate API. We are informing the user in case they provide the 
'ostypeid' parameter that it is not used anymore and failing




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