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 d4c06c57841576a38a26414dbf98f66300e34e69..61980d99d4e1f98a7f05b6de399865a637ff3de4 100644 (file)
@@ -126,6 +126,7 @@ module flow-node-inventory {
     }
 
     augment "/inv:node-connector-updated" {
     }
 
     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
     }
 }
\ No newline at end of file
index 3c6287f879506959dc9141bc6f7542dc1ca2916a..50969eee2d7d10c1ffc3557f6a4435ab72032a87 100644 (file)
@@ -47,6 +47,10 @@ module sal-group {
 
     rpc update-group {
         input {
 
     rpc update-group {
         input {
+            leaf node {
+                ext:context-reference "inv:node-context";
+                type inv:node-ref;
+            }
             uses group-update;
         }
     }     
             uses group-update;
         }
     }     
index 24fc6429af688bedb0b426c6f21e98eb40f53c56..f93b7b4c0c82a73ff04ee19ed8ed9d3a9e3894a0 100644 (file)
@@ -2,6 +2,7 @@ module packet-processing {
     namespace "urn:opendaylight:packet:service";
     prefix flow;
 
     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;} 
     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;
        input {
             leaf cookie {
                 type cookie;
+            }
+            leaf node {
+                ext:context-reference "inv:node-context";
+                type inv:node-ref;
             }
                leaf egress {
                        type inv:node-connector-ref;
             }
                leaf egress {
                        type inv:node-connector-ref;