mirror of https://github.com/apache/cloudstack.git
bug 6889: fixing the issue where we were able to create a disk offering of size 0. The check was incorrect, and now we ensure we only create the right sized volumes.
status 6889: resolved fixed
This commit is contained in:
parent
85f78d8cb3
commit
b6aeb6746c
|
|
@ -1152,7 +1152,7 @@ public class ConfigurationManagerImpl implements ConfigurationManager {
|
|||
|
||||
@Override
|
||||
public DiskOfferingVO createDiskOffering(long domainId, String name, String description, int numGibibytes, String tags) throws InvalidParameterValueException {
|
||||
if ((numGibibytes != 0) && (numGibibytes < 1)) {
|
||||
if ((numGibibytes <= 0)) {
|
||||
throw new InvalidParameterValueException("Please specify a disk size of at least 1 Gb.");
|
||||
} else if (numGibibytes > _maxVolumeSizeInGb) {
|
||||
throw new InvalidParameterValueException("The maximum size for a disk is " + _maxVolumeSizeInGb + " Gb.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue