DaanHoogland commented on a change in pull request #4555:
URL: https://github.com/apache/cloudstack/pull/4555#discussion_r547216104
##########
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 really refuse the parameter as opposed to just ignore it?
being this strict may crash operator scripts unnecessarily.
----------------------------------------------------------------
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]