mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-7453: Network rate field specified with negative value in service offering results in db Exception
This commit is contained in:
parent
fe6f0cf626
commit
490d499b7f
|
|
@ -2045,8 +2045,13 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
|
|||
allowNetworkRate = true;
|
||||
}
|
||||
|
||||
if (cmd.getNetworkRate() != null && !allowNetworkRate) {
|
||||
throw new InvalidParameterValueException("Network rate can be specified only for non-System offering and system offerings having \"domainrouter\" systemvmtype");
|
||||
if (cmd.getNetworkRate() != null) {
|
||||
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) {
|
||||
throw new InvalidParameterValueException("Failed to create service offering " + name + ": specify the network rate value more than 0");
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd.getDeploymentPlanner() != null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue