If two leaf-nodes with same name are used in a container, then yang loader throws error. It works as expected.
But if the a leaf-node with same name is tried to be added into container using augment, then no error is thrown.
It is observed the duplicate leaf is not added into the data tree, which is correct, but it was also expected to throw an error while loading which indicates an invalid configuartion.
In the above example, uses grouping-1; tries to add leaf leaf-root to container. It does not get added due to duplication ( as expected), but no error was thrown to show the incorrect duplicate configuration.
This issue is continuation of https://github.com/freeconf/yang/issues/73.
If two leaf-nodes with same name are used in a container, then yang loader throws error. It works as expected. But if the a leaf-node with same name is tried to be added into container using augment, then no error is thrown. It is observed the duplicate leaf is not added into the data tree, which is correct, but it was also expected to throw an error while loading which indicates an invalid configuartion.
File used: module check_similar_identifiers_using_augments {
In the above example, uses grouping-1; tries to add
leaf leaf-root
to container. It does not get added due to duplication ( as expected), but no error was thrown to show the incorrect duplicate configuration.