BUG-6064: switching updates off as on a node updated we need not trigger 46/40346/5
authorShuva Kar <shuva.jyoti.kar@ericsson.com>
Wed, 15 Jun 2016 01:34:13 +0000 (07:04 +0530)
committerShuva Jyoti Kar <shuva.jyoti.kar@ericsson.com>
Thu, 16 Jun 2016 13:45:07 +0000 (13:45 +0000)
reconciliation

Change-Id: Ib0af4c0441f92713738985e65ff95b9149bbf787
Signed-off-by: Shuva Kar <shuva.jyoti.kar@ericsson.com>
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/impl/FlowNodeReconciliationImpl.java

index b85fe411b848581c517ed9628cd4596a031e8c56..6c43cd4912f64f43aed34ad0af79cf54839f288a 100644 (file)
@@ -152,16 +152,16 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
 
             switch (mod.getModificationType()) {
                 case DELETE:
-                    remove(key, mod.getDataBefore(), nodeIdent);
+                    if (mod.getDataAfter() == null) {
+                        remove(key, mod.getDataBefore(), nodeIdent);
+                    }
                     break;
                 case SUBTREE_MODIFIED:
-                    update(key, mod.getDataBefore(), mod.getDataAfter(), nodeIdent);
+                    //NO-OP since we donot need to reconciliate on Node-updated
                     break;
                 case WRITE:
                     if (mod.getDataBefore() == null) {
                         add(key, mod.getDataAfter(), nodeIdent);
-                    } else {
-                        update(key, mod.getDataBefore(), mod.getDataAfter(), nodeIdent);
                     }
                     break;
                 default:
@@ -184,20 +184,6 @@ public class FlowNodeReconciliationImpl implements FlowNodeReconciliation {
         }
     }
 
-
-    public void update(InstanceIdentifier<FlowCapableNode> identifier,
-                       FlowCapableNode original, FlowCapableNode update, InstanceIdentifier<FlowCapableNode> nodeIdent) {
-        if(compareInstanceIdentifierTail(identifier,II_TO_FLOW_CAPABLE_NODE)){
-            LOG.warn("Node updated: {}",nodeIdent.firstKeyOf(Node.class).getId().getValue());
-            //donot need to do anything as we are not considering updates here
-            if (!nodeIdent.isWildcarded()) {
-                // then force registration to local node cache and reconcile
-                flowNodeConnected(nodeIdent, true);
-            }
-        }
-    }
-
-
     public void add(InstanceIdentifier<FlowCapableNode> identifier, FlowCapableNode add,
                     InstanceIdentifier<FlowCapableNode> nodeIdent) {
         if(compareInstanceIdentifierTail(identifier,II_TO_FLOW_CAPABLE_NODE)){