Hi,
When a deviation module adds only an extension statement (no data-node changes) to a notification, the notification's children disappear from the compiled schema.
Subsequent lyd_new_path calls for those children fail with "Not found node ... in path."
Steps to reproduce:
repro.zip
- A module base defines a notification with leaf children.
- A deviation module does
deviate add { myext:annotation "value"; } on that notification — no data nodes are added, removed, or modified.
- After loading the deviation module,
lyd_new_path("/base:my-notif/username", ...) fails.
Without the deviation loaded, the same lyd_new_path call succeeds.
Expected behavior:
A deviate add containing only extension statements should not affect the notification's data children. lyd_new_path should succeed both before and after loading
the deviation.
Actual behavior:
=== Without deviation module ===
lyd_new_path(/base:my-notif/username) => LY_SUCCESS
=== Loading deviation module (extension-only deviate-add) ===
lyd_new_path(/base:my-notif/username) => Validation failed
error: Not found node "username" in path.
Version: libyang 5.6.3
Thanks
Hi,
When a deviation module adds only an extension statement (no data-node changes) to a notification, the notification's children disappear from the compiled schema.
Subsequent lyd_new_path calls for those children fail with "Not found node ... in path."
Steps to reproduce:
repro.zip
deviate add { myext:annotation "value"; }on that notification — no data nodes are added, removed, or modified.lyd_new_path("/base:my-notif/username", ...)fails.Without the deviation loaded, the same lyd_new_path call succeeds.
Expected behavior:
A deviate add containing only extension statements should not affect the notification's data children. lyd_new_path should succeed both before and after loading
the deviation.
Actual behavior:
Version: libyang 5.6.3
Thanks