Added more tests. Fixed javadocs.
[yangtools.git] / yang-parser-impl / src / test / resources / simple-test / simple-nodes.yang
index f0dedd4d9b226b402b1013c7009f81e9f150d03c..9c3fd1a39a20bbb5598ccec78e32ba2621bed231 100644 (file)
@@ -31,10 +31,95 @@ module simple-nodes {
              error-message "An atm MTU must be  64 .. 17966";
              description "an error occured in data";
              reference "data must ref";
-        }     
+        }
         reference "data ref";
         status obsolete;
         when "class != 'wheel'";
     }
 
+    container nodes {
+        anyxml text;
+        choice level;
+        config false;
+        container node;
+        description "nodes collection";
+        grouping node-group {
+            leaf source {
+                type int8;
+            }
+            leaf target {
+                type int16;
+            }
+        }
+        if-feature has-name;
+        leaf nodes-id {
+            type int32;
+        }
+        leaf-list added {
+            type int64;
+        }
+        list links {
+        }
+        must "ifType != 'atm' or " +
+              "(ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)" {
+             error-app-tag "anyxml data error-app-tag";
+             error-message "An atm MTU must be  64 .. 17966";
+             description "an error occured in data";
+             reference "data must ref";
+        }
+        must "ifId != 0";
+        presence "required";
+        reference "nodes ref";
+        status current;
+        typedef nodes-type {
+            type string;
+        }
+        uses node-group;
+        when "class != 'wheel'";
+    }
+
+    list links {
+        anyxml text;
+        choice level;
+        config false;
+        container link;
+        description "links collection";
+        grouping link-group {
+            leaf source {
+                type int8;
+            }
+            leaf target {
+                type int16;
+            }
+        }
+        if-feature has-name;
+        key links-id;
+        leaf links-id {
+            type int32;
+        }
+        leaf-list added {
+            type int64;
+        }
+        list nodes {
+        }
+        max-elements 100;
+        min-elements 1;
+        must "ifType != 'atm' or " +
+              "(ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)" {
+             error-app-tag "anyxml data error-app-tag";
+             error-message "An atm MTU must be  64 .. 17966";
+             description "an error occured in data";
+             reference "data must ref";
+        }
+        must "ifId != 0";
+        ordered-by user;
+        reference "links ref";
+        status current;
+        typedef nodes-type {
+            type string;
+        }
+        uses link-group;
+        when "class != 'wheel'";
+    }
+
 }