Added YANG typedef support in the YANG parser
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / test / resources / model / testfile1.yang
index 2c796a9acd8e0f4199aebb43bc1a57ed4eaef3bf..0d5fba7b356a2fe2abc273067d888706b29beb6a 100644 (file)
@@ -1,39 +1,57 @@
-module types1 {
-       yang-version 1;
-    namespace "urn:simple.container.demo";
-    prefix "t1";
-    
-    import types2 {
-         prefix "data";
-         revision-date 2013-02-27;
-     }
-    
-    organization "Cisco";
-    contact "WILL-BE-DEFINED-LATER";
-    
-    revision "2013-02-27" {
-        reference " WILL BE DEFINED LATER";
-    }
-    
-    container interfaces {
-         list ifEntry {
-             key "ifIndex";
-
-             leaf ifIndex {
-                 type uint32;
-                 units minutes;
-             }
-             
-             leaf ifMtu {
-                 type int32;
-             }
-         }
-     }
-     
-       leaf testleaf {
-               type data:my-base-int32-type {
-                       range "11..max";
-               }
-       } 
-
-}
+module types1 {\r
+    yang-version 1;\r
+    namespace "urn:simple.container.demo";\r
+    prefix "t1";\r
+    \r
+    import types2 {\r
+         prefix "data";\r
+         revision-date 2013-02-27;\r
+     }\r
+    \r
+    organization "Cisco";\r
+    contact "WILL-BE-DEFINED-LATER";\r
+    \r
+    revision "2013-02-27" {\r
+        reference " WILL BE DEFINED LATER";\r
+    }\r
+    \r
+    container interfaces {\r
+         list ifEntry {\r
+             key "ifIndex";\r
+\r
+             leaf ifIndex {\r
+                 type uint32;\r
+                 units minutes;\r
+             }\r
+             \r
+             leaf ifMtu {\r
+                 type int32;\r
+             }\r
+         }\r
+     }\r
+     \r
+    leaf testleaf {\r
+        type data:my-base-int32-type {\r
+            range "min..max";\r
+        }\r
+    }\r
+    \r
+    leaf test-string-leaf {\r
+        type data:my-string-type-ext;\r
+    }\r
+    \r
+    leaf test-int-leaf {\r
+        type data:my-int-type-ext;\r
+    }\r
+    \r
+    leaf test-decimal-leaf {\r
+        type data:my-decimal-type {\r
+            fraction-digits 4;\r
+        }\r
+    }\r
+    \r
+    leaf test-decimal-leaf2 {\r
+        type data:my-decimal-type-ext;\r
+    }\r
+\r
+}\r