listPortForwardingRules: return empty response instead of throwing exception when ipAddress doesn't have any rules assigned.

This commit is contained in:
alena 2010-11-19 17:26:12 -08:00
parent 0cd0795645
commit 5426b1487c
1 changed files with 1 additions and 3 deletions

View File

@ -1128,9 +1128,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
if ((addrOwner != null) && !_domainDao.isChildDomain(account.getDomainId(), addrOwner.getDomainId())) {
throw new PermissionDeniedException("Unable to list port forwarding rules for address " + ipAddress + ", permission denied for account " + account.getId());
}
} else {
throw new InvalidParameterValueException("Unable to list port forwarding rules for address " + ipAddress + ", address not in use.");
}
}
} else {
if (account != null) {
if ((ipAddressVO.getAccountId() == null) || (account.getId() != ipAddressVO.getAccountId().longValue())) {