Initial opendaylight infrastructure commit!!
[controller.git] / opendaylight / sal / yang-prototype / code-generator / code-generator-demo / src / main / resources / demo / types2.yang
diff --git a/opendaylight/sal/yang-prototype/code-generator/code-generator-demo/src/main/resources/demo/types2.yang b/opendaylight/sal/yang-prototype/code-generator/code-generator-demo/src/main/resources/demo/types2.yang
new file mode 100644 (file)
index 0000000..a056bdb
--- /dev/null
@@ -0,0 +1,35 @@
+module types2 {
+       yang-version 1;
+    namespace "urn:simple.types.data.demo";
+    prefix "t2";
+    
+    import types1 {
+         prefix "t1";
+     }
+
+    organization "Cisco";
+
+    contact "WILL-BE-DEFINED-LATER";
+
+    description "This is types-data test description";
+
+    revision "2013-02-27" {
+        reference " WILL BE DEFINED LATER";
+    }
+    
+    
+     augment "/t1:interfaces/t1:ifEntry" {
+         when "t1:ifType='ds0'";
+         leaf ds0ChannelNumber {
+             type string;
+         }
+     }
+     
+     typedef my-leaf-ref {
+               type leafref {
+                       path "/t1:topology/t1:name";
+               }
+               description "This type is used for leafs that reference network node instance.";
+       }
+     
+}