ccp should not check public ip resource when deploy a vm on shared network

(cherry picked from commit 3201251256)
This commit is contained in:
Anthony Xu 2014-10-02 16:02:33 -07:00 committed by David Nalley
parent a9761a3eb3
commit ba1862836e
2 changed files with 4 additions and 2 deletions

View File

@ -758,7 +758,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage
assert (addrs.size() == 1) : "Return size is incorrect: " + addrs.size();
if (!fetchFromDedicatedRange) {
if (!fetchFromDedicatedRange && VlanType.VirtualNetwork.equals(vlanUse)) {
// Check that the maximum number of public IPs for the given accountId will not be exceeded
try {
_resourceLimitMgr.checkResourceLimit(owner, ResourceType.public_ip);

View File

@ -425,7 +425,9 @@ public class ResourceLimitManagerImpl extends ManagerBase implements ResourceLim
"Maximum number of resources of type '" + type + "' for project name=" + projectFinal.getName() + " in domain id=" + account.getDomainId() +
" has been exceeded.";
}
throw new ResourceAllocationException(message, type);
ResourceAllocationException e= new ResourceAllocationException(message, type);;
s_logger.error(message, e);
throw e;
}
// check all domains in the account's domain hierarchy