Replies: 1 comment
-
When sysrepo is queried for any operational data, it performs best-effort text-based comparison of the requested XPath and all paths that are subscribed for providing data. Based on that it does not request any data it is certain that are not needed. So you do not need any functions for this as it works out-of-the-box. You can mention specific use-cases that you would like to work better (data being requested that are not necessary) but there are limits to text-based XPath comparisons. You can also look at how it works. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In FRR we need to implement fetching operational data from our various routing daemons, we can't store the all instance data in a single libyang tree directly b/c things like constantly updating telemetry data etc..
The FRR daemons register paths that they are interested in (for config notification and/or supplying operational state). The user can then query this data with an xpath expression.
So, is there a function in libyang that can be used to compare a user supplied full-featured xpath with these daemon registered path prefixes so we know whether or not to send the query request off to the daemon? I suppose it would be "is
path
a prefix forxpath
?" or "isxpath
a subset ofpath
?"Also, It's my understanding that this sort of backend-instance data support has not yet been added to libyang directly. Please correct me if wrong :)
Beta Was this translation helpful? Give feedback.
All reactions