Damans227 commented on code in PR #14219:
URL: https://github.com/apache/cloudstack/pull/14219#discussion_r4205598507


##########
api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java:
##########
@@ -56,7 +56,7 @@ public class UpdateStoragePoolCmd extends BaseCmd {
     @Parameter(name = ApiConstants.CAPACITY_IOPS, type = CommandType.LONG, 
required = false, description = "IOPS CloudStack can provision from this 
storage pool")

Review Comment:
   should capacityiops get the same check? a negative value still goes through 
on that one



##########
api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java:
##########
@@ -56,7 +56,7 @@ public class UpdateStoragePoolCmd extends BaseCmd {
     @Parameter(name = ApiConstants.CAPACITY_IOPS, type = CommandType.LONG, 
required = false, description = "IOPS CloudStack can provision from this 
storage pool")
     private Long capacityIops;
 
-    @Parameter(name = ApiConstants.CAPACITY_BYTES, type = CommandType.LONG, 
required = false, description = "Bytes CloudStack can provision from this 
storage pool")
+    @Parameter(name = ApiConstants.CAPACITY_BYTES, type = CommandType.LONG, 
required = false, description = "Bytes CloudStack can provision from this 
storage pool",validations={ApiArgValidator.PositiveNumber})

Review Comment:
   can we add the same check on createStoragePool too? it still takes a 
negative size when the pool is first added



-- 
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