rootNode.getDataAfter() return null instead of emptylist 93/77493/4
authorFaseela K <faseela.k@ericsson.com>
Mon, 5 Nov 2018 08:56:39 +0000 (14:26 +0530)
committerMichael Vorburger <vorburger@redhat.com>
Mon, 5 Nov 2018 14:37:32 +0000 (14:37 +0000)
After Neon MRI version bump, on a node removal, rootNode.getDataAfter()
is returning null instead of empty list, and hence requires a change
in service-binding logic of GENIUS

JIRA: TSC-179
Change-Id: I098fed50647268b70469b7097b3979d2424f8a0f
Signed-off-by: Faseela K <faseela.k@ericsson.com>
interfacemanager/interfacemanager-impl/src/main/java/org/opendaylight/genius/interfacemanager/servicebindings/flowbased/config/helpers/FlowBasedIngressServicesConfigUnbindHelper.java
interfacemanager/interfacemanager-impl/src/main/java/org/opendaylight/genius/interfacemanager/servicebindings/flowbased/listeners/FlowBasedServicesConfigListener.java

index d76801c7106037e981acf4defbff8c6f824e2e07..6f00aeaf4464583660572fa65cd96620de255766 100644 (file)
@@ -63,7 +63,7 @@ public class FlowBasedIngressServicesConfigUnbindHelper extends AbstractFlowBase
                 boundServicesState.getInterfaceName());
         futures.add(txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> {
             BigInteger dpId = boundServicesState.getDpid();
-            if (boundServices.isEmpty()) {
+            if (boundServices == null || boundServices.isEmpty()) {
                 // Remove default entry from Lport Dispatcher Table.
                 FlowBasedServicesUtils.removeLPortDispatcherFlow(dpId, boundServicesState.getInterfaceName(),
                         boundServiceOld, tx, NwConstants.DEFAULT_SERVICE_INDEX);
index b9fba4b9950a4a000784d080a111e0d2426148b8..2c4ff5a9a0787e541fedf94544674a6c4ddd9ff6 100644 (file)
@@ -299,7 +299,7 @@ public class FlowBasedServicesConfigListener implements ClusteredDataTreeChangeL
                             boundServicesNew.getServiceName(), boundServicesNew.getServicePriority());
                     return;
                 }
-                if (boundServicesList.isEmpty()) {
+                if (boundServicesList == null || boundServicesList.isEmpty()) {
                     FlowBasedServicesUtils.removeBoundServicesState(tx, interfaceName, serviceMode);
                 }
                 flowBasedServicesConfigRemovable.unbindService(futures, interfaceName, boundServicesNew,