rhtyd commented on a change in pull request #4555:
URL: https://github.com/apache/cloudstack/pull/4555#discussion_r547089501
##########
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:
... read the code down below, looks like we want the ostypeid to be null
so we can get it from `getDefaultDeployAsIsGuestOsId`
----------------------------------------------------------------
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]