sudo87 commented on code in PR #13325:
URL: https://github.com/apache/cloudstack/pull/13325#discussion_r4547741641


##########
server/src/main/java/com/cloud/network/vpc/VpcManagerImpl.java:
##########
@@ -595,6 +600,16 @@ public VpcOffering createVpcOffering(CreateVPCOfferingCmd 
cmd) {
         boolean specifyAsNumber = cmd.getSpecifyAsNumber();
         String routingModeString = cmd.getRoutingMode();
         boolean conserveMode = cmd.isConserveMode();
+        Integer publicNetworkRate = cmd.getPublicNetworkRate();
+        if (publicNetworkRate != null) {
+            if (publicNetworkRate < -1) {
+                throw new InvalidParameterValueException("Failed to create VPC 
offering " + vpcOfferingName + ": specify the public network rate value as -1 
(unlimited) or a positive value");

Review Comment:
   -1 is the documented way to say unlimited, so I’d keep the message as is. 0 
is only tolerated and normalised to -1,



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to