X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=nexthopmgr%2Fnexthopmgr-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fvpnservice%2Fnexthopmgr%2FVpnInterfaceChangeListener.java;h=cb2cc623e499e940e1790920556d109d36bfed76;hb=f8491c1dd136f75d119be896e063fcd9f82d41fb;hp=1245a12ad9da2699894aaa6dcf375946c75342fc;hpb=cd331f15ad231c081bf3725fd10e8cfd39f58241;p=vpnservice.git diff --git a/nexthopmgr/nexthopmgr-impl/src/main/java/org/opendaylight/vpnservice/nexthopmgr/VpnInterfaceChangeListener.java b/nexthopmgr/nexthopmgr-impl/src/main/java/org/opendaylight/vpnservice/nexthopmgr/VpnInterfaceChangeListener.java index 1245a12a..cb2cc623 100644 --- a/nexthopmgr/nexthopmgr-impl/src/main/java/org/opendaylight/vpnservice/nexthopmgr/VpnInterfaceChangeListener.java +++ b/nexthopmgr/nexthopmgr-impl/src/main/java/org/opendaylight/vpnservice/nexthopmgr/VpnInterfaceChangeListener.java @@ -57,7 +57,7 @@ public class VpnInterfaceChangeListener extends AbstractDataChangeListener identifier, Adjacencies adjs) { - + LOG.trace("Adding adjacencies interface : key: " + identifier + ", value=" + adjs ); InstanceIdentifier vpnIfId = identifier.firstIdentifierOf(VpnInterface.class); - Optional vpnIf = read(LogicalDatastoreType.CONFIGURATION, vpnIfId); + Optional vpnIf = read(LogicalDatastoreType.OPERATIONAL, vpnIfId); VpnInterface vpnIfData = vpnIf.get(); List adjList = adjs.getAdjacency(); @@ -87,15 +87,7 @@ public class VpnInterfaceChangeListener extends AbstractDataChangeListener identifier, Adjacencies adjs) { - InstanceIdentifier vpnIfId = identifier.firstIdentifierOf(VpnInterface.class); - Optional vpnIf = read(LogicalDatastoreType.CONFIGURATION, vpnIfId); - VpnInterface vpnIfData = vpnIf.get(); - - List adjList = adjs.getAdjacency(); - for (Adjacency adjacency : adjList) { - nexthopManager.removeLocalNextHop(vpnIfData.getVpnInstanceName(), adjacency.getIpAddress()); - } - + // nexthop group will be removed after fib entry deletion } @Override