fixed inconsistency of IP on VR when VR is destroyed and recrea… (#3825)

This commit is contained in:
Pearl Dsilva 2020-01-23 21:29:00 +05:30 committed by dahn
parent b79a539191
commit b581f85d4b

View File

@ -2298,6 +2298,10 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel, Confi
} else {
ipv6 = _ipv6Dao.findByNetworkIdAndIp(network.getId(), nic.getIPv6Address());
}
if (vlans.isEmpty()) {
return nic;
}
//return nic only when its ip address belong to the pod range (for the Basic zone case)
for (Vlan vlan : vlans) {
if (ip != null && ip.getVlanId() == vlan.getId()) {