Fix invalid augmentations 42/85242/1
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 19 Oct 2019 12:43:00 +0000 (14:43 +0200)
committerRobert Varga <nite@hq.sk>
Sat, 19 Oct 2019 12:58:01 +0000 (12:58 +0000)
choice/case structures are collapsed to their parent data tree
node, hence it is invalid to define (in same namespace) the equivalent
of:

container {
  leaf foo { type string; }
  choice some {
    case foo {
      leaf foo { type string; }
    }
  }
}

Fix up the testing model.

Change-Id: I1e3ef8f9b38016e0290221f22b8233fba176bc0e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-test-model/src/main/yang/opendaylight-mdsal-augment-test.yang

index 4f452997331824ccd14842da79c805122cb79a8c..5a5dae9e80be601b3569ac49b89102b9e42f7be9 100644 (file)
@@ -29,6 +29,12 @@ module opendaylight-mdsal-augment-test {
         }
     }
 
+    grouping leaf2-from-grouping {
+        leaf leaf2-from-grouping {
+            type string;
+        }
+    }
+
     grouping complex-from-grouping {
         container container-with-uses {
             uses leaf-from-grouping;
@@ -125,7 +131,7 @@ module opendaylight-mdsal-augment-test {
 
     augment "/test:top/test:top-level-list/test:choice-in-list" {
         case simple-via-uses {
-            uses leaf-from-grouping;
+            uses leaf2-from-grouping;
         }
         case empty-leaf {
             leaf empty-type {
@@ -136,7 +142,7 @@ module opendaylight-mdsal-augment-test {
 
     augment "/test:put-top/test:input/test:top-level-list/test:choice-in-list" {
         case simple-via-uses {
-            uses leaf-from-grouping;
+            uses leaf2-from-grouping;
         }
     }