Skip to content

Commit 5cbc1d9

Browse files
authored
Fixed invalid ostypeid when not using deployasis (#5033)
1 parent 5f734f7 commit 5cbc1d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private void validateRequest() {
183183
if (!hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString()) && osTypeId == null) {
184184
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Missing parameter ostypeid");
185185
}
186-
if (hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString()) && osTypeId != null) {
186+
if (hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString()) && deployAsIs && osTypeId != null) {
187187
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid parameter ostypeid, not applicable for VMware");
188188
}
189189
}

0 commit comments

Comments
 (0)