Skip to content

Commit 31876fb

Browse files
anshulgangwarrajesh-battala
authored andcommitted
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
1 parent 055f6ad commit 31876fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/src/com/cloud/configuration/ConfigurationManagerImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3738,6 +3738,10 @@ public NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd) {
37383738
throw new InvalidParameterValueException("Invalid value for Availability. Supported types: " + Availability.Required + ", " + Availability.Optional);
37393739
}
37403740

3741+
if (networkRate != null && networkRate < 0) {
3742+
networkRate = 0;
3743+
}
3744+
37413745
Long serviceOfferingId = cmd.getServiceOfferingId();
37423746

37433747
if (serviceOfferingId != null) {

0 commit comments

Comments
 (0)