// Check if the IP range overlaps with the private ip
checkOverlapPrivateIpRange(zoneId, startIP, endIP);
Transaction txn = Transaction.currentTxn();
txn.start();
Vlan vlan = createVlanAndPublicIpRange(zoneId, networkId, physicalNetworkId, forVirtualNetwork, podId, startIP,
endIP, vlanGateway, vlanNetmask, vlanId, vlanOwner);
if (associateIpRangeToAccount) {
_networkMgr.associateIpAddressListToAccount(userId, vlanOwner.getId(), zoneId, vlan.getId(), null);
}
txn.commit();
// Associate ips to the network
if (associateIpRangeToAccount) {