Teach AbstractGet how to transform MapNodes
[netconf.git] / netconf / mdsal-netconf-connector / src / test / resources / yang / mdsal-netconf-mapping-test.yang
index 50c975e0b37efccd7cab639b4c10d319ed19329d..86fbc3481df0bf58b2bfd7bee8f352ef2edcc408 100644 (file)
@@ -5,6 +5,9 @@ module config {
 
     revision "2015-02-26";
 
+    identity foo {
+            description "dummy identity";
+    }
     container mapping-nodes {
 
         list multiple-keys {
@@ -31,7 +34,7 @@ module config {
             }
         }
         
-        list mapping-node{
+        list mapping-node {
             key "id";
             leaf id {
                 type string;
@@ -40,6 +43,43 @@ module config {
             leaf content {
                 type string;
             }
+
+            choice ordered-choice {
+                case a {
+                    container ordered-items {
+                        list ordered-item {
+                            key "id";
+                            ordered-by user;
+                            leaf id {
+                                type string;
+                            }
+
+                            leaf content {
+                                type string;
+                            }
+                        }
+                    }
+                }
+                case b {
+                    container augmented-ordered-items {
+
+                    }
+                }
+            }
+        }
+    }
+
+    augment "/map:mapping-nodes/map:mapping-node/map:ordered-choice/map:b/map:augmented-ordered-items" {
+        list augmented-ordered-item {
+            key "id";
+            ordered-by user;
+            leaf id {
+                type string;
+            }
+
+            leaf content {
+                type string;
+            }
         }
     }
 
@@ -141,13 +181,19 @@ module config {
     }
 
     augment "/map:top/map:modules/" {
-        container augmented-container{
+        container augmented-container {
             leaf identifier {
                 type string;
             }
         }
     }
 
+    augment "/map:top/map:modules/" {
+        leaf leaf-from-augment {
+            type string;
+        }
+    }
+
     augment "/map:top" {
         container mid-level {
             container low-level {
@@ -164,4 +210,20 @@ module config {
             }
         }
     }
+
+    list toplevel-list {
+        key "id";
+        leaf id {
+            type string;
+        }
+
+        leaf content {
+            type string;
+        }
+    }
+
+    container top-with-presence {
+        presence "For testing presence containers";
+
+    }
 }
\ No newline at end of file