Bug 7939: VpnService Suite and Tempest failures 72/54272/3
authorVivekanandan Narasimhan <n.vivekanandan@ericsson.com>
Tue, 21 Mar 2017 18:02:58 +0000 (23:32 +0530)
committerSam Hague <shague@redhat.com>
Sat, 8 Apr 2017 16:41:47 +0000 (16:41 +0000)
This fix is an add-on patch for the below review

https://git.opendaylight.org/gerrit/#/c/53772/

and is in a direction to solve the OperTxn gets
failing when configTxn changes are triggered.

Also we fix here the routerInterface VrfEntry
management such that when we clearly know its a
router-interface VRFEntry, we donot do any further
processing than what is required for the same.

Change-Id: I8efc5c41f26e9e6dd04c8638b2cfaa94a2050384
Signed-off-by: Vivekanandan Narasimhan <n.vivekanandan@ericsson.com>
vpnservice/fibmanager/fibmanager-impl/src/main/java/org/opendaylight/netvirt/fibmanager/VrfEntryListener.java

index 289d97cf40cf1ad55334a5b09c73b8c36a1cc628..958605139fba59c77c69711f8e96ccf359a6657d 100755 (executable)
@@ -2168,7 +2168,10 @@ public class VrfEntryListener extends AsyncDataTreeChangeListenerBase<VrfEntry,
     protected Boolean installRouterFibEntries(final VrfEntry vrfEntry, final Collection<VpnToDpnList> vpnToDpnList,
             long vpnId, int addOrRemove) {
         RouterInterface routerInt = vrfEntry.getAugmentation(RouterInterface.class);
-        if (routerInt != null && vpnToDpnList != null) {
+        if (routerInt == null) {
+            return false;
+        }
+        if (vpnToDpnList != null) {
             String routerId = routerInt.getUuid();
             String macAddress = routerInt.getMacAddress();
             String ipValue = routerInt.getIpAddress();
@@ -2180,9 +2183,8 @@ public class VrfEntryListener extends AsyncDataTreeChangeListenerBase<VrfEntry,
                             new MacAddress(macAddress), addOrRemove);
                 }
             }
-            return true;
         }
-        return false;
+        return true;
     }
 
     public void installRouterFibEntry(final VrfEntry vrfEntry, BigInteger dpnId, long vpnId, String routerUuid,