summaryrefslogtreecommitdiff
path: root/isisd/isis_cli.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-12-05 22:10:54 -0300
committerRenato Westphal <renato@opensourcerouting.org>2021-01-08 22:22:11 -0300
commit7ab5ca104752c180c3756b007c8d3bba88cc7d1b (patch)
treeaf5e4e3327073c3b28710d9f6ed18cbda34d75e1 /isisd/isis_cli.c
parent077d336aa7f543525c03de5a4617a2314c7ca984 (diff)
isisd: fix LFA command to use correct operations
The "load-sharing" node is a boolean leaf that has a default value. As such, it doesn't make sense to either create or delete it. That node always exists in the configuration tree. Its value should only be modified. Change the corresponding CLI wrapper command to reflect that fact. This commit doesn't introduce any change of behavior as the NB API maps create/destroy edit operations to modify operations whenever that makes sense. However it's better to not rely on that behavior and always use the correct operations in the CLI commands. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r--isisd/isis_cli.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index 1f0bebaf45..392b9e675d 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -1915,22 +1915,22 @@ DEFPY_YANG (isis_frr_lfa_load_sharing,
if (no) {
nb_cli_enqueue_change(
vty, "./fast-reroute/level-1/lfa/load-sharing",
- NB_OP_DESTROY, "true");
+ NB_OP_MODIFY, "true");
} else {
nb_cli_enqueue_change(
vty, "./fast-reroute/level-1/lfa/load-sharing",
- NB_OP_CREATE, "false");
+ NB_OP_MODIFY, "false");
}
}
if (!level || strmatch(level, "level-2")) {
if (no) {
nb_cli_enqueue_change(
vty, "./fast-reroute/level-2/lfa/load-sharing",
- NB_OP_DESTROY, "true");
+ NB_OP_MODIFY, "true");
} else {
nb_cli_enqueue_change(
vty, "./fast-reroute/level-2/lfa/load-sharing",
- NB_OP_CREATE, "false");
+ NB_OP_MODIFY, "false");
}
}