Refactored YANG types resolving.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / test / resources / model / testfile1.yang
index 2c796a9acd8e0f4199aebb43bc1a57ed4eaef3bf..f38e3488cff82b387fd937e6ab25a7687820ce8e 100644 (file)
@@ -1,5 +1,5 @@
 module types1 {
-       yang-version 1;
+    yang-version 1;
     namespace "urn:simple.container.demo";
     prefix "t1";
     
@@ -8,7 +8,7 @@ module types1 {
          revision-date 2013-02-27;
      }
     
-    organization "Cisco";
+    organization "opendaylight";
     contact "WILL-BE-DEFINED-LATER";
     
     revision "2013-02-27" {
@@ -28,12 +28,54 @@ module types1 {
                  type int32;
              }
          }
-     }
+    }
      
-       leaf testleaf {
-               type data:my-base-int32-type {
-                       range "11..max";
-               }
-       } 
+    leaf testleaf {
+        type data:my-type1 {
+            range "min..max";
+        }
+    }
+    
+    leaf test-string-leaf {
+        type data:my-string-type-ext;
+    }
+    
+    leaf leaf-with-length {
+       type data:my-string-type {
+               length "7..max";
+       }
+    }
+    
+    leaf test-int-leaf {
+        type data:my-int-type-ext;
+    }
+    
+    leaf test-decimal-leaf {
+        type data:my-decimal-type {
+            fraction-digits 4;
+        }
+    }
+    
+    leaf test-decimal-leaf2 {
+        type data:my-decimal-type-ext;
+    }
+    
+    container ext {
+        data:c-define "MY_INTERFACES";
+    }
+    
+    leaf union-leaf {
+       type data:my-union-ext;
+    }
+    
+    deviation /data:system/data:user {
+        deviate add {
+            default "admin"; // new users are 'admin' by default
+        }
+    }
+    
+    leaf nested-union-leaf {
+       type data:nested-union1;
+    }
 
 }