Description
We do not seem to enforce that 'unique' statement argument actually references a leaf/leaf-list when the unique statement is introduced via "deviate add".
This was discovered by checking our behavior w.r.t a NETMOD WG query.
We have a test case which covers the following:
module foo {
deviation "/bar:my-list" {
deviate add {
unique "my-leaf-a my-leaf-b";
unique "my-leaf-c my-leaf-d";
}
}
}
and checks whether the unique statements are added, but alas the checks are incomplete.
The implementation interprets these arguments as "foo:my-leaf-a" and transplants them verbatim – which means that /bar:my-list has the equivalent of
unique "foo:my-leaf-a foo:my-leaf-b"; unique "foo:my-leaf-c foo:my-leaf-d";
and the model context gets happily constructed in DeviationResolutionTest.testDeviateAdd().
Attachments
Issue Links
- relates to
-
YANGTOOLS-1434 Building SchemaContext fails when augmenting submodel data
-
- Resolved
-