CLOUDSTACK-7929: While creating network offering if one specifies negative value for network rate then we will convert that value to 0 i.e. unlimited

This closes #40
This commit is contained in:
Anshul Gangwar 2014-11-14 10:56:05 +05:30 committed by Rajesh Battala
parent 4d583a4a71
commit 9c328cb9dd
1 changed files with 4 additions and 0 deletions

View File

@ -3744,6 +3744,10 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
throw new InvalidParameterValueException("Invalid value for Availability. Supported types: " + Availability.Required + ", " + Availability.Optional);
}
if (networkRate != null && networkRate < 0) {
networkRate = 0;
}
Long serviceOfferingId = cmd.getServiceOfferingId();
if (serviceOfferingId != null) {