Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions server/src/com/cloud/configuration/ConfigurationManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -3601,9 +3601,9 @@ public boolean deleteVlanAndPublicIpRange(final long userId, final long vlanDbId
}

boolean isDomainSpecific = false;
List<DomainVlanMapVO> domainVln = _domainVlanMapDao.listDomainVlanMapsByVlan(vlanRange.getId());
List<DomainVlanMapVO> domainVlan = _domainVlanMapDao.listDomainVlanMapsByVlan(vlanRange.getId());
// Check for domain wide pool. It will have an entry for domain_vlan_map.
if (domainVln != null && !domainVln.isEmpty()) {
if (domainVlan != null && !domainVlan.isEmpty()) {
isDomainSpecific = true;
}

Expand Down Expand Up @@ -3760,10 +3760,10 @@ public Vlan dedicatePublicIpRange(final DedicatePublicIpRangeCmd cmd) throws Res
forSystemVms = ip.isForSystemVms();
final Long allocatedToAccountId = ip.getAllocatedToAccountId();
if (allocatedToAccountId != null) {
final Account accountAllocatedTo = _accountMgr.getActiveAccountById(allocatedToAccountId);
if (!accountAllocatedTo.getAccountName().equalsIgnoreCase(accountName)) {
if (vlanOwner != null && allocatedToAccountId != vlanOwner.getId()) {
throw new InvalidParameterValueException(ip.getAddress() + " Public IP address in range is allocated to another account ");
}
final Account accountAllocatedTo = _accountMgr.getActiveAccountById(allocatedToAccountId);
if (vlanOwner == null && domain != null && domain.getId() != accountAllocatedTo.getDomainId()){
throw new InvalidParameterValueException(ip.getAddress()
+ " Public IP address in range is allocated to another domain/account ");
Expand Down Expand Up @@ -3824,9 +3824,9 @@ public boolean releasePublicIpRange(final long vlanDbId, final long userId, fina
}

boolean isDomainSpecific = false;
final List<DomainVlanMapVO> domainVln = _domainVlanMapDao.listDomainVlanMapsByVlan(vlanDbId);
final List<DomainVlanMapVO> domainVlan = _domainVlanMapDao.listDomainVlanMapsByVlan(vlanDbId);
// Check for domain wide pool. It will have an entry for domain_vlan_map.
if (domainVln != null && !domainVln.isEmpty()) {
if (domainVlan != null && !domainVlan.isEmpty()) {
isDomainSpecific = true;
}

Expand Down Expand Up @@ -3879,7 +3879,7 @@ public boolean releasePublicIpRange(final long vlanDbId, final long userId, fina
// decrement resource count for dedicated public ip's
_resourceLimitMgr.decrementResourceCount(acctVln.get(0).getAccountId(), ResourceType.public_ip, new Long(ips.size()));
return true;
} else if (isDomainSpecific && _domainVlanMapDao.remove(domainVln.get(0).getId())) {
} else if (isDomainSpecific && _domainVlanMapDao.remove(domainVlan.get(0).getId())) {
s_logger.debug("Remove the vlan from domain_vlan_map successfully.");
return true;
} else {
Expand Down