Updated models, modeling existing SAL and its functionality
[controller.git] / opendaylight / sal / yang-prototype / sal / model / model-inventory / src / main / yang / inventory.yang
diff --git a/opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/inventory.yang b/opendaylight/sal/yang-prototype/sal/model/model-inventory/src/main/yang/inventory.yang
new file mode 100644 (file)
index 0000000..a114c62
--- /dev/null
@@ -0,0 +1,69 @@
+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;}
+
+
+    revision "2013-08-19" {
+        description "Initial revision of Inventory model";
+    }
+
+    typedef node-id {
+        type inet:uri;
+    }
+
+    typedef node-connector-id {
+        type inet:uri;
+    }
+
+    typedef node-ref {
+        type instance-identifier;
+    }
+
+    typedef node-connector-ref {
+        type instance-identifier;
+    }
+
+    identity node-context {
+        description "Identity used to mark node context";
+    }
+
+    identity node-connector-context {
+
+    }
+
+       grouping node {
+               leaf id {
+            type node-id;
+        }
+       }
+
+       grouping node-connector {
+               leaf id {
+            type node-connector-id;
+               }
+       }
+
+
+
+
+    /** Base structure **/
+    container nodes {
+        list node {
+            key "id";
+            ext:context-instance "node-context";
+
+                       uses node;
+
+            list "node-connector" {
+                key "id";
+                ext:context-instance "node-connector-context";
+                
+                use node-connector;
+            }
+        }
+    }
+}
\ No newline at end of file