From: Renato Westphal Date: Sun, 6 Dec 2020 01:10:54 +0000 (-0300) Subject: isisd: fix LFA command to use correct operations X-Git-Tag: base_7.6~50^2~7 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7ab5ca104752c180c3756b007c8d3bba88cc7d1b;p=mirror%2Ffrr.git 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 --- 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"); } }