summaryrefslogtreecommitdiff
path: root/lib/northbound_oper.c
AgeCommit message (Collapse)Author
2024-05-02lib: fix `time_t` print without castDavid Lamparter
The gcc plugin wasn't warning about printing `suseconds_t` (which is `time_t`, but in `struct timeval`.) It needs to be printed with a cast, just like `time_t`. Luckily there is only one such usage. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-03-26mgmtd: add support for native 'edit' operationIgor Ryzhov
This operation basically implements support for RESTCONF operations. It receives an xpath and a data tree in JSON/XML format, instead of a list of (xpath, value) tuples as required by the current protobuf interface. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-15lib: fix oper data leaf creationIgor Ryzhov
When creating an initial tree trunk for oper data walk, if the xpath represents a leaf, the leaf is created with an incorrect empty value. If it doesn't actually exist in daemon's oper data, its value is not overwritten later and an empty value is returned in the result. For example, when requesting `/frr-interface:lib/interface[name='eth0']/description`, the result is: ``` { "frr-interface:lib": { "interface": [ { "name": "eth0", "description": "" } ] } } ``` instead of an empty JSON that it should be. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-12lib: fix coverity issueChristian Hopps
** CID 1575595: Null pointer dereferences (REVERSE_INULL) Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-11lib: change type of `inner` to `struct lyd_node *`, cleaner codeChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-11lib: implement missing YANG choice/case statements.Christian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-10Merge pull request #15123 from LabNConsulting/chopps/fix-oper-state-memleakDonatas Abraitis
lib: fix oper-state memleak
2024-01-09lib: fix oper-state memleakChristian Hopps
Fix memleak when a key-ed query was done for which the key didn't exist. Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-07lib: use libyang functions if they are presentChristian Hopps
Add configure.ac tests for libyang functions, if not present supply the functionality ourselves in yang.[ch] Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-07lib: mgmtd: implement full XPath 1.0 predicate functionalityChristian Hopps
Allow user to specify full YANG compatible XPath 1.0 predicates. This allows for trimming results of generic queries using functions and other non-key predicates from XPath 1.0 Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-07lib: fix clang SA warningsChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-02Merge pull request #15073 from LabNConsulting/chopps/fix-yang-key-queriesDonald Sharp
lib: fix specific entry queries
2024-01-02lib: don't count on scheme key nodes being first childrenChristian Hopps
Heard back from libyang folks that this is not something they consider part of the API and/or are going to guarantee. So we cannot count on it. Expect keys at any location on the child sibling list. Signed-off-by: Christian Hopps <chopps@labn.net>
2024-01-02lib: fix specific entry queriesChristian Hopps
- fix key leaf queries - fix specific list entry with non-key leaf top element Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-28lib: northbound: add yielding and batching to oper-state queriesChristian Hopps
Signed-off-by: Christian Hopps <chopps@labn.net>