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>
This commit is contained in:
Renato Westphal 2020-12-05 22:10:54 -03:00
parent 077d336aa7
commit 7ab5ca1047

View 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");
}
}