Bug 8307: Add the option for activating deviation statements
[yangtools.git] / yang / yang-parser-impl / src / test / resources / deviation-resolution-test / deviation-replace / foo.yang
index af866f4563d6f3b6a59b96bc5ab541bb7758aa19..5375af4d3bc917f523b471a877e580ad4eefc275 100644 (file)
@@ -2,9 +2,14 @@ module foo {
     namespace foo;
     prefix foo;
 
+    import bar {
+        prefix bar;
+        revision-date 2017-01-20;
+    }
+
     revision 2017-01-20;
 
-    deviation "/my-leaf" {
+    deviation "/bar:my-leaf" {
         deviate replace {
             type uint32;
             default 10;
@@ -12,7 +17,7 @@ module foo {
         }
     }
 
-    deviation "/my-leaf-list-test" {
+    deviation "/bar:my-leaf-list-test" {
         deviate replace {
             min-elements 3;
             max-elements 6;
@@ -20,85 +25,27 @@ module foo {
         }
     }
 
-    deviation "/my-choice" {
+    deviation "/bar:my-choice" {
         deviate replace {
             mandatory false;
-            foo:custom-property "new arg";
-        }
-    }
-
-    extension custom-property {
-        argument name;
-    }
-
-    leaf my-leaf {
-        type int32;
-        default 100;
-        units kilobytes;
-    }
-
-    leaf-list my-leaf-list-test {
-        type string;
-        min-elements 5;
-        max-elements 10;
-        config false;
-    }
-
-    choice my-choice {
-        mandatory true;
-        foo:custom-property "original arg";
-        case c1 {
-            leaf c1-leaf {
-                type string;
-            }
-        }
-
-        case c2 {
-            leaf c2-leaf {
-                type string;
-            }
-        }
-    }
-
-    container my-cont {
-        uses my-grouping {
-            refine my-used-leaf {
-                default "def-val-added-by-refine";
-                foo:custom-property "arg";
-            }
+            bar:custom-property "new arg";
         }
     }
 
-    augment "/my-cont" {
-        leaf my-aug-leaf {
-            type int32;
-            default "def-val";
-            units "minutes";
-            foo:custom-property "arg";
-        }
-    }
-
-    deviation "/my-cont/my-aug-leaf" {
+    deviation "/bar:my-cont/bar:my-aug-leaf" {
         deviate replace {
             type uint32;
             default "new-def-val";
             units "seconds";
-            foo:custom-property "new arg";
-        }
-    }
-
-    grouping my-grouping {
-        leaf my-used-leaf {
-            type int32;
-            units "days";
+            bar:custom-property "new arg";
         }
     }
 
-    deviation "/my-cont/my-used-leaf" {
+    deviation "/bar:my-cont/bar:my-used-leaf" {
         deviate replace {
             type uint32;
             default "new-def-val";
-            foo:custom-property "new arg";
+            bar:custom-property "new arg";
             units "weeks";
         }
     }