rhtyd commented on a change in pull request #4555: URL: https://github.com/apache/cloudstack/pull/4555#discussion_r547089083
########## 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: Should we simply ignore for VMware, even if ostypeid is provided? ---------------------------------------------------------------- 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: us...@infra.apache.org