Added context-reference statements to the YANG models. 08/2208/2
authorTony Tkacik <ttkacik@cisco.com>
Mon, 28 Oct 2013 09:42:01 +0000 (10:42 +0100)
committerTony Tkacik <ttkacik@cisco.com>
Mon, 28 Oct 2013 09:54:12 +0000 (10:54 +0100)
context-reference statement is used to mark a leaf
in RPCs which serves as identifier of the context
in which RPC is used. The context is then used
as an routing information when selecting between
multiple implementations of same RPCs.

Change-Id: I1e8bf7e98429262967ae63f7a2e0481396048e3e
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
opendaylight/md-sal/model/model-flow-service/src/main/yang/flow-node-inventory.yang
opendaylight/md-sal/model/model-flow-service/src/main/yang/group-service.yang
opendaylight/md-sal/model/model-flow-service/src/main/yang/packet-processing.yang

index d4c06c5..61980d9 100644 (file)
@@ -126,6 +126,7 @@ module flow-node-inventory {
     }
 
     augment "/inv:node-connector-updated" {
-        ext:augment-identifier "flow-capable-node-connector-updated";   
+        ext:augment-identifier "flow-capable-node-connector-updated";
+        uses flow-node-connector;
     }
 }
\ No newline at end of file
index 3c6287f..50969ee 100644 (file)
@@ -47,6 +47,10 @@ module sal-group {
 
     rpc update-group {
         input {
+            leaf node {
+                ext:context-reference "inv:node-context";
+                type inv:node-ref;
+            }
             uses group-update;
         }
     }     
index 24fc642..f93b7b4 100644 (file)
@@ -2,6 +2,7 @@ module packet-processing {
     namespace "urn:opendaylight:packet:service";
     prefix flow;
 
+    import yang-ext {prefix ext;}
     import opendaylight-inventory {prefix inv;}
     import ietf-inet-types {prefix inet;}
     import ietf-yang-types {prefix yang;} 
@@ -46,6 +47,10 @@ module packet-processing {
        input {
             leaf cookie {
                 type cookie;
+            }
+            leaf node {
+                ext:context-reference "inv:node-context";
+                type inv:node-ref;
             }
                leaf egress {
                        type inv:node-connector-ref;