Skip to content

Commit 1fbff5b

Browse files
Alena ProkharchykAlena Prokharchyk
authored andcommitted
bug 12607: fixed error message when resource limit exceeds
status 12607: resolved fixed
1 parent 4cb2936 commit 1fbff5b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ public void checkResourceLimit(Account account, ResourceType type, long... count
275275
long accountLimit = findCorrectResourceLimitForAccount(account, type);
276276
long potentialCount = _resourceCountDao.getResourceCount(account.getId(), ResourceOwnerType.Account, type) + numResources;
277277
if (accountLimit != Resource.RESOURCE_UNLIMITED && potentialCount > accountLimit) {
278-
String message = "Maximum number of resources of type \"" + type + "\" for account name=" + account.getAccountName()
278+
String message = "Maximum number of resources of type '" + type + "' for account name=" + account.getAccountName()
279279
+ " in domain id=" + account.getDomainId() + " has been exceeded.";
280280
if (project != null) {
281-
message = "Maximum number of resources of type \"" + type + "\" for project name=" + project.getName()
281+
message = "Maximum number of resources of type '" + type + "' for project name=" + project.getName()
282282
+ " in domain id=" + account.getDomainId() + " has been exceeded.";
283283
}
284284
throw new ResourceAllocationException(message, type);
@@ -298,7 +298,7 @@ public void checkResourceLimit(Account account, ResourceType type, long... count
298298
if (domainLimit != null && domainLimit.getMax().longValue() != Resource.RESOURCE_UNLIMITED) {
299299
long domainCount = _resourceCountDao.getResourceCount(domainId, ResourceOwnerType.Domain, type);
300300
if ((domainCount + numResources) > domainLimit.getMax().longValue()) {
301-
throw new ResourceAllocationException("Maximum number of resources of type \"" + type + "\" for domain id=" + domainId + " has been exceeded.", type);
301+
throw new ResourceAllocationException("Maximum number of resources of type '" + type + "' for domain id=" + domainId + " has been exceeded.", type);
302302
}
303303
}
304304

0 commit comments

Comments
 (0)