pyang fixes for service models
[controller.git] / opendaylight / md-sal / model / model-inventory / src / main / yang / node-inventory.yang
index 6ef5b63bd4fa47ef1df89daa2e24f63eb1ff983e..77c92f91ce4358883513079f209c0d5098d9b2aa 100644 (file)
@@ -2,9 +2,9 @@ module opendaylight-inventory {
     namespace "urn:opendaylight:inventory";
     prefix inv;
 
-    import yang-ext {prefix ext;}
-    import ietf-inet-types {prefix inet;}
-    import ietf-yang-types {prefix yang;}
+    import yang-ext {prefix ext; revision-date "2013-07-09";}
+    import ietf-inet-types {prefix inet; revision-date "2010-09-24";}
+    import ietf-yang-types {prefix yang; revision-date "2010-09-24";}
 
 
     revision "2013-08-19" {
@@ -41,13 +41,28 @@ module opendaylight-inventory {
     }
 
     identity node-connector-context {
-        
+        description "Identity used to mark node connector context";
+    }
+
+    identity node-type {
+        description "Base identity for node types";
+    }
+
+    identity node-connector-type {
+        description "Base identity for node connectors type";
     }
 
     grouping node {
-    leaf id {
+        leaf id {
             type node-id;
         }
+
+        list "node-connector" {
+            key "id";
+            ext:context-instance "node-connector-context";
+
+            uses node-connector;
+        }
     }
 
     grouping node-connector {
@@ -56,6 +71,15 @@ module opendaylight-inventory {
         }
     }
 
+    grouping node-context-ref {
+        description 
+        "Helper grouping which contains a reference to node context.";
+        leaf node {
+            ext:context-reference "node-context";
+            type node-ref;
+        }
+    }
+
     /** Base structure **/
     container nodes {
         list node {
@@ -63,13 +87,36 @@ module opendaylight-inventory {
             ext:context-instance "node-context";
 
             uses node;
+        }
+    }
+
+    notification node-updated {
+        leaf node-ref {
+            ext:context-reference "node-context";
+            type node-ref;
+        }
+        uses node;
+    }
 
-            list "node-connector" {
-                key "id";
-                ext:context-instance "node-connector-context";
+    notification node-connector-updated {
+        leaf node-connector-ref {
+            ext:context-reference "node-connector-context";
+            type node-connector-ref;
+        }
+        uses node-connector;
+    }
+
+    notification node-removed {
+        leaf node-ref {
+            ext:context-reference "node-context";
+            type node-ref;
+        }
+    }
 
-                use node-connector;
-            }
+    notification node-connector-removed {
+        leaf node-connector-ref {
+            ext:context-reference "node-connector-context";
+            type node-connector-ref;
         }
     }
 }
\ No newline at end of file