From 1fbff5bd05ea25b267b6595bcee190b09a495b16 Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Mon, 19 Dec 2011 11:16:30 -0800 Subject: [PATCH] bug 12607: fixed error message when resource limit exceeds status 12607: resolved fixed --- .../com/cloud/resourcelimit/ResourceLimitManagerImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java index 9eb61dc8744..557c23b32ce 100755 --- a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java +++ b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java @@ -275,10 +275,10 @@ public class ResourceLimitManagerImpl implements ResourceLimitService, Manager{ long accountLimit = findCorrectResourceLimitForAccount(account, type); long potentialCount = _resourceCountDao.getResourceCount(account.getId(), ResourceOwnerType.Account, type) + numResources; if (accountLimit != Resource.RESOURCE_UNLIMITED && potentialCount > accountLimit) { - String message = "Maximum number of resources of type \"" + type + "\" for account name=" + account.getAccountName() + String message = "Maximum number of resources of type '" + type + "' for account name=" + account.getAccountName() + " in domain id=" + account.getDomainId() + " has been exceeded."; if (project != null) { - message = "Maximum number of resources of type \"" + type + "\" for project name=" + project.getName() + message = "Maximum number of resources of type '" + type + "' for project name=" + project.getName() + " in domain id=" + account.getDomainId() + " has been exceeded."; } throw new ResourceAllocationException(message, type); @@ -298,7 +298,7 @@ public class ResourceLimitManagerImpl implements ResourceLimitService, Manager{ if (domainLimit != null && domainLimit.getMax().longValue() != Resource.RESOURCE_UNLIMITED) { long domainCount = _resourceCountDao.getResourceCount(domainId, ResourceOwnerType.Domain, type); if ((domainCount + numResources) > domainLimit.getMax().longValue()) { - throw new ResourceAllocationException("Maximum number of resources of type \"" + type + "\" for domain id=" + domainId + " has been exceeded.", type); + throw new ResourceAllocationException("Maximum number of resources of type '" + type + "' for domain id=" + domainId + " has been exceeded.", type); } }