DaanHoogland commented on code in PR #10505: URL: https://github.com/apache/cloudstack/pull/10505#discussion_r2182409958
########## plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaSummaryCmd.java: ########## @@ -42,29 +47,25 @@ public class QuotaSummaryCmd extends BaseListCmd { @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, required = false, entityType = DomainResponse.class, description = "Optional, If domain Id is given and the caller is domain admin then the statement is generated for domain.") private Long domainId; - @Parameter(name = ApiConstants.LIST_ALL, type = CommandType.BOOLEAN, required = false, description = "Optional, to list all accounts irrespective of the quota activity") + @Parameter(name = ApiConstants.LIST_ALL, type = CommandType.BOOLEAN, description = "False (default) lists balance summary for account. True lists balance summary for " + + "accounts which the caller has access.") private Boolean listAll; + @Parameter(name = ApiConstants.ACCOUNT_STATE_TO_SHOW, type = CommandType.STRING, description = "Possible values are [ALL, ACTIVE, REMOVED]. ALL will list summaries for " + + "active and removed accounts; ACTIVE will list summaries only for active accounts; REMOVED will list summaries only for removed accounts. The default value is ACTIVE.") Review Comment: ```suggestion @Parameter(name = ApiConstants.ACCOUNT_STATE_TO_SHOW, type = CommandType.STRING, description = "Possible values are [ALL, ACTIVE, REMOVED]. ALL will list summaries for " + "active and removed accounts; ACTIVE will list summaries only for active accounts; REMOVED will list summaries only for removed accounts. The default value is ACTIVE.”, since = “4.21.0) ``` ########## plugins/database/quota/src/main/java/org/apache/cloudstack/api/response/QuotaSummaryResponse.java: ########## @@ -30,52 +29,68 @@ public class QuotaSummaryResponse extends BaseResponse { @SerializedName("accountid") - @Param(description = "account id") + @Param(description = "Account's ID") private String accountId; @SerializedName("account") - @Param(description = "account name") + @Param(description = "Account's name") private String accountName; @SerializedName("domainid") - @Param(description = "domain id") + @Param(description = "Domain's ID") private String domainId; @SerializedName("domain") - @Param(description = "domain name") - private String domainName; + @Param(description = "Domain's path") + private String domainPath; @SerializedName("balance") - @Param(description = "account balance") + @Param(description = "Account's balance") private BigDecimal balance; @SerializedName("state") - @Param(description = "account state") + @Param(description = "Account's state") private State state; + @SerializedName("domainremoved") + @Param(description = "If the domain is removed or not") + private boolean domainRemoved; + + @SerializedName("accountremoved") + @Param(description = "If the account is removed or not") + private boolean accountRemoved; Review Comment: since parameters on these ########## plugins/database/quota/src/main/java/org/apache/cloudstack/api/response/QuotaSummaryResponse.java: ########## @@ -30,52 +29,68 @@ public class QuotaSummaryResponse extends BaseResponse { @SerializedName("accountid") - @Param(description = "account id") + @Param(description = "Account's ID") private String accountId; @SerializedName("account") - @Param(description = "account name") + @Param(description = "Account's name") private String accountName; @SerializedName("domainid") - @Param(description = "domain id") + @Param(description = "Domain's ID") private String domainId; @SerializedName("domain") - @Param(description = "domain name") - private String domainName; + @Param(description = "Domain's path") + private String domainPath; @SerializedName("balance") - @Param(description = "account balance") + @Param(description = "Account's balance") private BigDecimal balance; @SerializedName("state") - @Param(description = "account state") + @Param(description = "Account's state") private State state; + @SerializedName("domainremoved") + @Param(description = "If the domain is removed or not") + private boolean domainRemoved; + + @SerializedName("accountremoved") + @Param(description = "If the account is removed or not") + private boolean accountRemoved; + @SerializedName("quota") - @Param(description = "quota usage of this period") + @Param(description = "Quota consumed between the startdate and enddate") private BigDecimal quotaUsage; @SerializedName("startdate") - @Param(description = "start date") - private Date startDate = null; + @Param(description = "Start date of the quota consumption") + private Date startDate; @SerializedName("enddate") - @Param(description = "end date") - private Date endDate = null; + @Param(description = "End date of the quota consumption") + private Date endDate; @SerializedName("currency") - @Param(description = "currency") + @Param(description = "Currency") private String currency; @SerializedName("quotaenabled") @Param(description = "if the account has the quota config enabled") private boolean quotaEnabled; - public QuotaSummaryResponse() { - super(); - } + @SerializedName("projectname") + @Param(description = "Name of the project") + private String projectName; + + @SerializedName("projectid") + @Param(description = "Project's id") + private String projectId; + + @SerializedName("projectremoved") + @Param(description = "Whether the project is removed or not") + private Boolean projectRemoved; Review Comment: add since parameters ########## plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaSummaryCmd.java: ########## @@ -42,29 +47,25 @@ public class QuotaSummaryCmd extends BaseListCmd { @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, required = false, entityType = DomainResponse.class, description = "Optional, If domain Id is given and the caller is domain admin then the statement is generated for domain.") private Long domainId; - @Parameter(name = ApiConstants.LIST_ALL, type = CommandType.BOOLEAN, required = false, description = "Optional, to list all accounts irrespective of the quota activity") + @Parameter(name = ApiConstants.LIST_ALL, type = CommandType.BOOLEAN, description = "False (default) lists balance summary for account. True lists balance summary for " + + "accounts which the caller has access.") private Boolean listAll; + @Parameter(name = ApiConstants.ACCOUNT_STATE_TO_SHOW, type = CommandType.STRING, description = "Possible values are [ALL, ACTIVE, REMOVED]. ALL will list summaries for " + + "active and removed accounts; ACTIVE will list summaries only for active accounts; REMOVED will list summaries only for removed accounts. The default value is ACTIVE.") + private String accountStateToShow; + @Inject - QuotaResponseBuilder _responseBuilder; + QuotaResponseBuilder quotaResponseBuilder; - public QuotaSummaryCmd() { - super(); - } + @Inject + QuotaService quotaService; Review Comment: maybe move these to top of class? -- 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: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org