for (Adjacency adjacency : adjacencies) {
if (Objects.equals(adjacency.getIpAddress(), adj.getIpAddress())) {
String rd = adjacency.getVrfId();
- InstanceIdentifier<Adjacency> adjIdentifier = VpnUtil
- .getVpnInterfaceOpDataEntryAdjacencyIdentifier(currVpnIntf.getName(),
- currVpnIntf.getVpnInstanceName(), adj.getIpAddress());
- LOG.debug("delAdjFromVpnInterface: adjIdentifier {}", adjIdentifier);
- writeOperTxn.delete(adjIdentifier);
if (adj.getNextHopIpList() != null) {
for (String nh : adj.getNextHopIpList()) {
deleteExtraRouteFromCurrentAndImportingVpns(
private void deleteExtraRouteFromCurrentAndImportingVpns(String vpnName, String destination, String nextHop,
String rd, String intfName, TypedWriteTransaction<Configuration> writeConfigTxn,
TypedWriteTransaction<Operational> writeOperTx) {
+ LOG.info("removing extra-route {} for nexthop {} in VPN {} intfName {} rd {}",
+ destination, nextHop, vpnName, intfName, rd);
vpnManager.delExtraRoute(vpnName, destination, nextHop, rd, vpnName, intfName, writeConfigTxn, writeOperTx);
List<VpnInstanceOpDataEntry> vpnsToImportRoute = vpnUtil.getVpnsImportingMyRoute(vpnName);
for (VpnInstanceOpDataEntry vpn : vpnsToImportRoute) {
String vpnRd = vpn.getVrfId();
if (vpnRd != null) {
+ LOG.info("deleting extra-route {} for nexthop {} in VPN {} intfName {} vpnRd {}",
+ destination, nextHop, vpnName, intfName, vpnRd);
vpnManager.delExtraRoute(vpnName, destination, nextHop, vpnRd, vpnName, intfName, writeConfigTxn,
writeOperTx);
}
String vpnNamePrefixKey = VpnUtil.getVpnNamePrefixKey(vpnName, prefix);
// FIXME: separate out to somehow?
final ReentrantLock lock = JvmGlobalLocks.getLockForString(vpnNamePrefixKey);
- lock.lock();
+ LOG.info("removing prefix {} for nexthop {} in VPN {} rd {}", prefix, nextHop, vpnName, extraRouteRd);
try {
+ lock.lock();
if (vpnUtil.removeOrUpdateDSForExtraRoute(vpnName, primaryRd, extraRouteRd, vpnInterfaceName, prefix,
nextHop, nextHopTunnelIp, operTx)) {
return;
MDSALUtil.syncDelete(dataBroker,
LogicalDatastoreType.CONFIGURATION, VpnExtraRouteHelper.getUsedRdsIdentifier(getVpnId(vpnName),
prefix, nextHop));
- LOG.debug("removeOrUpdateDSForExtraRoute: Removed vpn-to-extraroute with rd {} prefix {} nexthop {}",
+ LOG.info("removeOrUpdateDSForExtraRoute: Removed vpn-to-extraroute with rd {} prefix {} nexthop {}",
extraRouteRd, prefix, nextHop);
fibManager.refreshVrfEntry(primaryRd, prefix);
operTx.delete(VpnUtil.getVpnInterfaceOpDataEntryAdjacencyIdentifier(vpnInterfaceName, vpnName, prefix));