Leafref and identityref types to Json
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / resources / yang-to-json-conversion / leafref / main-module.yang
diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/resources/yang-to-json-conversion/leafref/main-module.yang b/opendaylight/md-sal/sal-rest-connector/src/test/resources/yang-to-json-conversion/leafref/main-module.yang
new file mode 100644 (file)
index 0000000..8c80392
--- /dev/null
@@ -0,0 +1,43 @@
+module main-module {
+  namespace "main:module";  
+
+  prefix "mainmod";
+  revision 2013-12-2 {    
+  }
+  
+       container cont {
+               leaf lf1 {
+                       type uint32;
+               }
+               
+               container cont1 {
+                       leaf lf11 {
+                               type boolean;
+                       }
+               }
+               
+               leaf lf2 {
+                       type leafref {
+                               path "../lf1";
+                       }
+               }
+               
+               leaf lf3 {
+                       type leafref {
+                               path "/cont/cont1/lf11";
+                       }
+               }
+               
+               /* reference to nonexisting leaf */
+               leaf lf5 {
+                       type leafref {
+                               path "/cont/lf";
+                       }
+               }
+               
+               
+       }
+       
+
+         
+}
\ No newline at end of file