winterhazel commented on code in PR #13449:
URL: https://github.com/apache/cloudstack/pull/13449#discussion_r3562731618


##########
plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaCreditsCmd.java:
##########
@@ -42,22 +41,35 @@ public class QuotaCreditsCmd extends BaseCmd {
     @Inject
     QuotaService _quotaService;
 
-
-
-    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, 
required = true, description = "Account Id for which quota credits need to be 
added")
+    @Deprecated
+    @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, 
description = "Name of the Account for which Quota credits will be added. 
Deprecated, please use '" +
+            ApiConstants.ACCOUNT_ID + "' instead.")
     private String accountName;
 
     @ACL
-    @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, 
required = true, entityType = DomainResponse.class, description = "Domain for 
which quota credits need to be added")
+    @Deprecated
+    @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, 
entityType = DomainResponse.class,
+            description = "Domain of the Account specified by '" + 
ApiConstants.ACCOUNT + "' for which Quota credits will be added. " +
+                    "Deprecated, please use '" + ApiConstants.ACCOUNT_ID + "' 
instead.")
     private Long domainId;
 
-    @Parameter(name = ApiConstants.VALUE, type = CommandType.DOUBLE, required 
= true, description = "Value of the credits to be added+, subtracted-")
+    @ACL
+    @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, 
entityType = AccountResponse.class,
+            description = "ID of the Account for which Quota credits will be 
added. Cannot be specified with '" + ApiConstants.PROJECT_ID + "'.")
+    private Long accountId;
+
+    @ACL
+    @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, 
entityType = ProjectResponse.class,
+            description = "ID of the Project for which Quota credits will be 
added. Cannot be specified with '" + ApiConstants.ACCOUNT_ID + "'.")
+    private Long projectId;
+
+    @Parameter(name = ApiConstants.VALUE, type = CommandType.DOUBLE, required 
= true, description = "Amount of credits to be added (in case of a positive 
value) or subtracted (in case of a negative value).")
     private Double value;
 
-    @Parameter(name = "min_balance", type = CommandType.DOUBLE, required = 
false, description = "Minimum balance threshold of the Account")
+    @Parameter(name = "min_balance", type = CommandType.DOUBLE, description = 
"An email will be sent to the Account when the Quota credits get below this 
threshold.")
     private Double minBalance;
 
-    @Parameter(name = "quota_enforce", type = CommandType.BOOLEAN, required = 
false, description = "Account for which quota enforce is set to false will not 
be locked when there is no credit balance")
+    @Parameter(name = "quota_enforce", type = CommandType.BOOLEAN, description 
= "Whether to lock the Account when Quota credits are below zero.")

Review Comment:
   Fixed in 1bd57cd



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