From 7ab5ca104752c180c3756b007c8d3bba88cc7d1b Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Sat, 5 Dec 2020 22:10:54 -0300 Subject: [PATCH] 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 --- isisd/isis_cli.c | 8 ++++---- 1 file 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"); } } -- 2.39.5