Merge branch '4.16'

This commit is contained in:
nvazquez 2022-03-10 09:34:49 -03:00
commit 8dc5db137f
No known key found for this signature in database
GPG Key ID: 656E1BCC8CB54F84

View File

@ -180,11 +180,12 @@ public class GetUploadParamsForTemplateCmd extends AbstractGetUploadParamsCmd {
if (getZoneId() <= 0) {
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "invalid zoneid");
}
if (!hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString()) && osTypeId == null) {
if (!isDeployAsIs() && osTypeId == null) {
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Missing parameter ostypeid");
}
if (hypervisor.equalsIgnoreCase(Hypervisor.HypervisorType.VMware.toString()) && deployAsIs && osTypeId != null) {
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid parameter ostypeid, not applicable for VMware");
if (isDeployAsIs() && osTypeId != null) {
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid parameter ostypeid, not applicable for" +
"VMware when deploy-as-is is set to true");
}
}