Fixed tests. Added javadocs to yang-model-api.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / yang-model-parser-impl / src / test / resources / model / testfile2.yang
index 15685f75a1b1c55ac50f608a66f055df7f522fbd..783c89b6177540fc4150eb2d861fd741f1649a31 100644 (file)
@@ -3,13 +3,9 @@ module types2 {
     namespace "urn:simple.types.data.demo";
     prefix "t2";
     
-    import types1 {
-         prefix "if";
-         revision-date 2013-02-27;
-     }
-
     organization "opendaylight";
-    contact "WILL-BE-DEFINED-LATER";
+    contact "http://www.opendaylight.org/";
+    
     description "This is types-data test description";
 
     revision "2013-02-27" {
@@ -24,7 +20,7 @@ module types2 {
 
     typedef my-type1 {
         type my-base-int32-type {
-            range "11..max";
+            range "3..9|11..max";
         }
         units "mile";
         default "11";
@@ -109,13 +105,6 @@ module types2 {
        }
     }
 
-    augment "/if:interfaces/if:ifEntry" {
-        when "if:ifType='ds0'";
-        leaf ds0ChannelNumber {
-            type string;
-        }
-    }
-
     leaf if-name {
         type leafref {
             path "/interface/name";
@@ -145,5 +134,46 @@ module types2 {
             type string;
         }
     }
+    
+    grouping target {
+        leaf address {
+            type string;
+            description "Target IP address";
+        }
+        container port {
+            description "Target port container";
+        }
+    }
+
+    container peer {
+        container destination {
+            uses target {
+                refine address {
+                    default "1.2.3.4";
+                }
+                refine port {
+                    must "must-condition" {
+                        error-message "An error message test";
+                        error-app-tag "An error app tag test";
+                    }
+                }
+            }
+        }
+    }
+    
+    container interfaces {
+         list ifEntry {
+             key "ifIndex";
+
+             leaf ifIndex {
+                 type uint32;
+                 units minutes;
+             }
+             
+             leaf ifMtu {
+                 type int32;
+             }
+         }
+    }
 
 }