libyang icon indicating copy to clipboard operation
libyang copied to clipboard

question regarding node validation with extension plugin

Open jeremie6wind opened this issue 3 months ago • 4 comments

Hi, The node callback has been removed from plugin_ext in libyang 4. In my case, it was used to validate data in a container with extensions.

For example, I have this kind of container:

container cont1 {
   extension myext ;
   list list1 {
     key "name";
     leaf name {
     type string;
   }
   list list2 {
     key "name";
     leaf name {
       type string;
   }
}

The node callback of myext plugin was called and I could check the values of "name" node in both lists.

I could use some must, however if the number of list in cont1 increases, it becomes difficult to maintain.

How should I do that with libyang4?

Thank you. BR

jeremie6wind avatar Nov 14 '25 14:11 jeremie6wind