CLOUDSTACK-7453: Network rate field specified with negative value in service offering results in db Exception

This commit is contained in:
Saksham Srivastava 2014-08-28 16:01:11 +05:30
parent 490d499b7f
commit d9531fb0de
1 changed files with 1 additions and 1 deletions

View File

@ -2049,7 +2049,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
if(!allowNetworkRate) {
throw new InvalidParameterValueException("Network rate can be specified only for non-System offering and system offerings having \"domainrouter\" systemvmtype");
}
if(cmd.getNetworkRate().intValue() <= 1) {
if(cmd.getNetworkRate().intValue() < 1) {
throw new InvalidParameterValueException("Failed to create service offering " + name + ": specify the network rate value more than 0");
}
}