This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.15 by this push:
new 5cbc1d9 Fixed invalid ostypeid when not using deployasis (#5033)
5cbc1d9 is described below
commit 5cbc1d9b18353b71f79fd208f00340df58a5c856
Author: Spaceman1984 <[email protected]>
AuthorDate: Fri May 21 11:45:24 2021 +0200
Fixed invalid ostypeid when not using deployasis (#5033)
---
.../api/command/user/template/GetUploadParamsForTemplateCmd.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java
b/api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java
index 2fafe93..6dbaddb 100644
---
a/api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java
+++
b/api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java
@@ -183,7 +183,7 @@ public class GetUploadParamsForTemplateCmd extends
AbstractGetUploadParamsCmd {
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) {
+ if
(hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString()) &&
deployAsIs && osTypeId != null) {
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid
parameter ostypeid, not applicable for VMware");
}
}