diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2024-01-24 10:49:52 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-24 10:49:52 -0500 |
| commit | 16406a31d388b6fdbf3d7445f8a4f0cedce0f926 (patch) | |
| tree | e695af8b514955276700ffe7fb7844cf0bf35100 /zebra/interface.c | |
| parent | 1ea73983fd1056f5f6232424185057cb58c90319 (diff) | |
| parent | a594cda8cec0a67d59ee28d5fb59e958611370c9 (diff) | |
Merge pull request #15196 from idryzhov/nb-leaf-list
lib: remove leaf-list xpath hack from northbound
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 4c6fc8c36a..9f160020a8 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -4701,12 +4701,16 @@ DEFUN (no_link_params_use_bw, } static int ag_change(struct vty *vty, int argc, struct cmd_token **argv, - const char *xpath, bool no, int start_idx) + const char *xpath_base, bool no, int start_idx) { - for (int i = start_idx; i < argc; i++) + char xpath[XPATH_MAXLEN]; + + for (int i = start_idx; i < argc; i++) { + snprintf(xpath, XPATH_MAXLEN, "%s[.='%s']", xpath_base, + argv[i]->arg); nb_cli_enqueue_change(vty, xpath, - no ? NB_OP_DESTROY : NB_OP_CREATE, - argv[i]->arg); + no ? NB_OP_DESTROY : NB_OP_CREATE, NULL); + } return nb_cli_apply_changes(vty, NULL); } |
