GaOrtiga commented on code in PR #12961:
URL: https://github.com/apache/cloudstack/pull/12961#discussion_r3196763336
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -3934,16 +3934,16 @@ public Long finalizeAccountId(Long accountId, String
accountName, Long domainId,
throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
String.format("Both %s and %s are needed if using either. Consider using %s
instead.",
ApiConstants.ACCOUNT, ApiConstants.DOMAIN_ID,
ApiConstants.ACCOUNT_ID));
}
- throw new InvalidParameterValueException(String.format("Unable to find
account by name [%s] on domain [%s].", accountName, domainId));
+ throw new InvalidParameterValueException(String.format("Unable to find
account with name [%s] on the specified domain.", accountName));
}
protected long getActiveProjectAccountByProjectId(long projectId) {
Project project = _projectMgr.getProject(projectId);
if (project == null) {
- throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
String.format("Unable to find project with ID [%s].", projectId));
+ throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
String.format("Unable to find project with the specified ID.", projectId));
Review Comment:
projectId not being injected to the string
##########
framework/quota/src/main/java/org/apache/cloudstack/quota/dao/QuotaBalanceDao.java:
##########
@@ -28,16 +28,13 @@ public interface QuotaBalanceDao extends
GenericDao<QuotaBalanceVO, Long> {
QuotaBalanceVO saveQuotaBalance(QuotaBalanceVO qb);
- List<QuotaBalanceVO> findCreditBalance(Long accountId, Long domainId, Date
startDate, Date endDate);
+ List<QuotaBalanceVO> findCreditBalances(Long accountId, Long domainId,
Date startDate, Date endDate);
- QuotaBalanceVO findLastBalanceEntry(Long accountId, Long domainId, Date
beforeThis);
+ QuotaBalanceVO getLastQuotaBalanceEntry(Long accountId, Long domainId,
Date beforeThis);
QuotaBalanceVO findLaterBalanceEntry(Long accountId, Long domainId, Date
afterThis);
- List<QuotaBalanceVO> findQuotaBalance(Long accountId, Long domainId, Date
startDate, Date endDate);
-
- List<QuotaBalanceVO> lastQuotaBalanceVO(Long accountId, Long domainId,
Date startDate);
-
- BigDecimal lastQuotaBalance(Long accountId, Long domainId, Date startDate);
+ List<QuotaBalanceVO> listQuotaBalances(Long accountId, Long domainId, Date
startDate, Date endDate);
+ BigDecimal getLastQuotaBalance(Long accountId, Long domainId);
Review Comment:
```suggestion
List<QuotaBalanceVO> listQuotaBalances(Long accountId, Long domainId,
Date startDate, Date endDate);
BigDecimal getLastQuotaBalance(Long accountId, Long domainId);
```
##########
server/src/main/java/com/cloud/user/AccountManagerImpl.java:
##########
@@ -3934,16 +3934,16 @@ public Long finalizeAccountId(Long accountId, String
accountName, Long domainId,
throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
String.format("Both %s and %s are needed if using either. Consider using %s
instead.",
ApiConstants.ACCOUNT, ApiConstants.DOMAIN_ID,
ApiConstants.ACCOUNT_ID));
}
- throw new InvalidParameterValueException(String.format("Unable to find
account by name [%s] on domain [%s].", accountName, domainId));
+ throw new InvalidParameterValueException(String.format("Unable to find
account with name [%s] on the specified domain.", accountName));
}
protected long getActiveProjectAccountByProjectId(long projectId) {
Project project = _projectMgr.getProject(projectId);
if (project == null) {
- throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
String.format("Unable to find project with ID [%s].", projectId));
+ throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
String.format("Unable to find project with the specified ID.", projectId));
}
if (project.getState() != Project.State.Active) {
- throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
String.format("Project with ID [%s] is not active.", projectId));
+ throw new ServerApiException(ApiErrorCode.PARAM_ERROR,
String.format("Project is not active.", projectId));
Review Comment:
same here
--
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]