Skip to content

Commit 7a3a882

Browse files
DaanHooglandyadvr
authored andcommitted
server: Fixes #2545 revert dedicate vlan code removal (#2664)
This re-adds logic to allow dedication of public ip/range to a domain and its usage.
1 parent ebb22a4 commit 7a3a882

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

server/src/com/cloud/network/IpAddressManagerImpl.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030
import javax.inject.Inject;
3131

32+
import com.cloud.dc.DomainVlanMapVO;
3233
import org.apache.log4j.Logger;
3334

3435
import org.apache.cloudstack.acl.ControlledEntity.ACLType;
@@ -727,6 +728,11 @@ public IPAddressVO doInTransaction(TransactionStatus status) throws Insufficient
727728
dedicatedVlanDbIds.add(map.getVlanDbId());
728729
}
729730
}
731+
List<DomainVlanMapVO> domainMaps = _domainVlanMapDao.listDomainVlanMapsByDomain(owner.getDomainId());
732+
for (DomainVlanMapVO map : domainMaps) {
733+
if (vlanDbIds == null || vlanDbIds.contains(map.getVlanDbId()))
734+
dedicatedVlanDbIds.add(map.getVlanDbId());
735+
}
730736
List<VlanVO> nonDedicatedVlans = _vlanDao.listZoneWideNonDedicatedVlans(dcId);
731737
for (VlanVO nonDedicatedVlan : nonDedicatedVlans) {
732738
if (vlanDbIds == null || vlanDbIds.contains(nonDedicatedVlan.getId()))

0 commit comments

Comments
 (0)