diff options
author | Christian Hopps <chopps@labn.net> | 2023-04-17 07:16:32 +0200 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2023-04-17 07:43:48 +0200 |
commit | 4ac51e2430f099bc4f4881e4a83b5ea13c418131 (patch) | |
tree | f63702c2f03bba955155fbb29433fd1d569242f8 | |
parent | lib: add and use new yang function for finding schema nodes (diff) | |
download | frr-4ac51e2430f099bc4f4881e4a83b5ea13c418131.tar.xz frr-4ac51e2430f099bc4f4881e4a83b5ea13c418131.zip |
lib: fix broken "show yang operational-data" functionality
Previously was using an API that returned the root of the data tree given the
users input xpath value, and then used it like it was the leaf node (last not
first). So basically this CLI command only worked when one requested the root
node of the model.
Signed-off-by: Christian Hopps <chopps@labn.net>
-rw-r--r-- | lib/northbound.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/northbound.c b/lib/northbound.c index ba9b6d59b..775f6ff92 100644 --- a/lib/northbound.c +++ b/lib/northbound.c @@ -2129,8 +2129,8 @@ int nb_oper_data_iterate(const char *xpath, struct yang_translator *translator, * all YANG lists (if any). */ - LY_ERR err = lyd_new_path(NULL, ly_native_ctx, xpath, NULL, - LYD_NEW_PATH_UPDATE, &dnode); + LY_ERR err = lyd_new_path2(NULL, ly_native_ctx, xpath, NULL, 0, 0, + LYD_NEW_PATH_UPDATE, NULL, &dnode); if (err || !dnode) { const char *errmsg = err ? ly_errmsg(ly_native_ctx) : "node not found"; |