Added notification for Flow add/delete/update. 95/3895/4
authorPrasanna Huddar <prasanna.huddar@ericsson.com>
Sun, 22 Dec 2013 15:54:21 +0000 (21:24 +0530)
committerPrasanna Huddar <prasanna.huddar@ericsson.com>
Sun, 22 Dec 2013 16:37:15 +0000 (16:37 +0000)
Flow ref added to all Flow notification RPC messages.

Flow ref needed to for NSF to co-relate XID with the operation.

FlowTransaction.xtend modified to put flow reference.

Signed-off-by: Prasanna Huddar <prasanna.huddar@ericsson.com>
Change-Id: I76406f995b2bdd0e0c3c6ffea98bd28c8fe90cec

opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/frm/flow/FlowTransaction.xtend
opendaylight/md-sal/model/model-flow-service/src/main/yang/flow-service.yang
opendaylight/md-sal/model/model-flow-service/src/main/yang/group-service.yang
opendaylight/md-sal/model/model-flow-service/src/main/yang/meter-service.yang

index 5203d3c..6fcadea 100644 (file)
@@ -15,6 +15,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
 import org.opendaylight.yangtools.yang.binding.DataObject
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService
+import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowRef
 
 class FlowTransaction extends AbstractTransaction {
     
@@ -32,6 +33,7 @@ class FlowTransaction extends AbstractTransaction {
             val tableInstanceId = instanceId.firstIdentifierOf(Table);
             val nodeInstanceId = instanceId.firstIdentifierOf(Node);
             val builder = new RemoveFlowInputBuilder(flow);
+            builder.setFlowRef(new FlowRef(instanceId));
             builder.setNode(new NodeRef(nodeInstanceId));
             builder.setFlowTable(new FlowTableRef(tableInstanceId));
             _salFlowService.removeFlow(builder.build());            
@@ -45,6 +47,7 @@ class FlowTransaction extends AbstractTransaction {
             val nodeInstanceId = instanceId.firstIdentifierOf(Node);
             val builder = new UpdateFlowInputBuilder();
             builder.setNode(new NodeRef(nodeInstanceId));
+            builder.setFlowRef(new FlowRef(instanceId));
             val ufb = new UpdatedFlowBuilder(updatedFlow);
             builder.setUpdatedFlow((ufb.build()));
             val ofb = new OriginalFlowBuilder(originalFlow);
@@ -61,6 +64,7 @@ class FlowTransaction extends AbstractTransaction {
             val nodeInstanceId = instanceId.firstIdentifierOf(Node);
             val builder = new AddFlowInputBuilder(flow);
             builder.setNode(new NodeRef(nodeInstanceId));
+            builder.setFlowRef(new FlowRef(instanceId));
             builder.setFlowTable(new FlowTableRef(tableInstanceId));
             _salFlowService.addFlow(builder.build());            
         }
index 895e54e..d6a31c3 100644 (file)
@@ -89,17 +89,26 @@ module sal-flow {
     }
 
     notification flow-added {
+        leaf flow-ref {
+            type types:flow-ref;
+        }
         uses node-flow;
         uses tr:transaction-aware;
     }
 
     notification flow-updated {
+        leaf flow-ref {
+            type types:flow-ref;
+        }
         uses node-flow;
         uses tr:transaction-aware;
         
     }
 
     notification flow-removed {
+        leaf flow-ref {
+            type types:flow-ref;
+        }
         uses node-flow;
         uses tr:transaction-aware;
     }
index 1626610..6cc1537 100644 (file)
@@ -69,16 +69,25 @@ module sal-group {
     } 
 
     notification group-added {
+        leaf group-ref {
+            type group-type:group-ref;
+        }
         uses node-group;
         uses tr:transaction-aware;
     }
 
     notification group-updated {
+        leaf group-ref {
+            type group-type:group-ref;
+        }
         uses node-group;
         uses tr:transaction-aware;
     }
 
     notification group-removed {
+        leaf group-ref {
+            type group-type:group-ref;
+        }
         uses node-group;
         uses tr:transaction-aware;
     }    
index af4975e..6205fed 100644 (file)
@@ -71,16 +71,25 @@ module sal-meter {
     }
         
     notification meter-added {
+        leaf meter-ref {
+            type meter-type:meter-ref;
+        }
         uses node-meter;
         uses tr:transaction-aware;
     }
 
     notification meter-updated {
+        leaf meter-ref {
+            type meter-type:meter-ref;
+        }
         uses node-meter;
         uses tr:transaction-aware;
     }
 
     notification meter-removed {
+        leaf meter-ref {
+            type meter-type:meter-ref;
+        }
         uses node-meter;
         uses tr:transaction-aware;
     }