]> git.proxmox.com Git - mirror_frr.git/commitdiff
isisd: fix LFA command to use correct operations
authorRenato Westphal <renato@opensourcerouting.org>
Sun, 6 Dec 2020 01:10:54 +0000 (22:10 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 9 Jan 2021 01:22:11 +0000 (22:22 -0300)
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>
isisd/isis_cli.c

index 1f0bebaf455e79375a6f03e83cba3e38a626aaf9..392b9e675d1bd53e5c31aaba4d2c5de33471f68b 100644 (file)
@@ -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");
                }
        }