Yang and XML conversion to Json test with equals
[controller.git] / opendaylight / md-sal / sal-rest-connector / src / test / resources / yang-to-json-conversion / simple-data-types / simple-data-types.yang
diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/resources/yang-to-json-conversion/simple-data-types/simple-data-types.yang b/opendaylight/md-sal/sal-rest-connector/src/test/resources/yang-to-json-conversion/simple-data-types/simple-data-types.yang
new file mode 100644 (file)
index 0000000..4ad0983
--- /dev/null
@@ -0,0 +1,134 @@
+module simple-data-types {
+  namespace "simple:data:types";  
+
+  prefix "smpdtp";
+  revision 2013-11-12 {    
+  }
+  
+  container cont {
+         leaf lfnint8Min {
+               type int8; 
+         }
+         leaf lfnint8Max {
+               type int8; 
+         }
+         leaf lfnint16Min {
+               type int16; 
+         }
+         leaf lfnint16Max {
+               type int16; 
+         }
+         leaf lfnint32Min {
+               type int32; 
+         }
+         leaf lfnint32Max {
+               type int32; 
+         }
+         leaf lfnint64Min {
+               type int64; 
+         }
+         leaf lfnint64Max {
+               type int64; 
+         }
+         
+         leaf lfnuint8Max {
+               type uint8; 
+         }
+         leaf lfnuint16Max {
+               type uint16; 
+         }
+         leaf lfnuint32Max {
+               type uint32; 
+         }
+         leaf lfuint64Max {
+               type uint64; 
+         }
+         leaf lfstr {
+               type string;
+         }       
+         leaf lfbool1 {
+               type boolean;
+         }       
+         leaf lfbool2 {
+               type boolean;
+         }       
+         leaf lfbool3 {
+               type boolean;
+         }       
+         leaf lfdecimal1 {
+               type decimal64 {
+                       fraction-digits 2;
+               }       
+         }       
+         leaf lfdecimal2 {
+               type decimal64 {
+                       fraction-digits 2;
+               }       
+         }       
+         leaf lfdecimal3 {
+               type decimal64 {
+                       fraction-digits 2;
+               }       
+         }      
+          
+         leaf lfdecimal4 {
+               type decimal64 {
+                       fraction-digits 2;
+               }       
+         }
+                 
+         
+         leaf lfdecimal6 {
+               type decimal64 {
+                       fraction-digits 2;
+               }       
+         }       
+
+    leaf lfenum {
+      type enumeration {
+        enum enum1;
+        enum enum2;
+        enum enum3;
+        enum enum4;
+      }
+    }
+
+    leaf lfbits {
+      type bits {
+        bit bit1;
+        bit bit2;
+        bit bit3;
+        bit bit4;
+      }
+    }  
+    
+    leaf lfbinary {
+       type binary;
+    }  
+    
+    leaf lfref1 {                  //reference to string type
+       type leafref {
+               path "../lfstr";
+       }
+    }
+    
+    leaf lfref2 {                  //reference to number type
+       type leafref {
+               path "../lfnint8Max";
+       }
+    }
+    
+    leaf lfempty {
+       type empty;
+    }
+    
+    leaf-list lflstunion {
+       type union {
+               type uint16;
+               type string;
+       }
+    }
+         
+         
+  }
+}
\ No newline at end of file