engine/orchestration: display numeric value instead of variable name (#3818)

If the disk size of the vm to be created is greater
than the volume size, then the exception message should
display the numeric value instead of variable name
This commit is contained in:
Rakesh 2020-01-31 11:12:06 +01:00 committed by GitHub
parent f72f39cd11
commit 1a5b7c362e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -645,7 +645,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati
if (size < 0 || (size > 0 && size < (1024 * 1024 * 1024))) {
throw new InvalidParameterValueException("Please specify a size of at least 1 GB.");
} else if (size > (MaxVolumeSize.value() * 1024 * 1024 * 1024)) {
throw new InvalidParameterValueException("volume size " + size + ", but the maximum size allowed is " + MaxVolumeSize + " GB.");
throw new InvalidParameterValueException("volume size " + size + ", but the maximum size allowed is " + MaxVolumeSize.value() + " GB.");
}
return true;