mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:41:21 +00:00
isisd: fix "no bfd profile" command
Instead of setting the profile to an empty string we should destroy the NB node. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
13bf38300e
commit
bb28b985fd
@ -378,8 +378,14 @@ DEFPY_YANG(isis_bfd_profile,
|
|||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
nb_cli_enqueue_change(vty, "./frr-isisd:isis/bfd-monitoring/profile",
|
if (no)
|
||||||
NB_OP_MODIFY, no ? NULL : profile);
|
nb_cli_enqueue_change(vty,
|
||||||
|
"./frr-isisd:isis/bfd-monitoring/profile",
|
||||||
|
NB_OP_DESTROY, NULL);
|
||||||
|
else
|
||||||
|
nb_cli_enqueue_change(vty,
|
||||||
|
"./frr-isisd:isis/bfd-monitoring/profile",
|
||||||
|
NB_OP_MODIFY, profile);
|
||||||
|
|
||||||
return nb_cli_apply_changes(vty, NULL);
|
return nb_cli_apply_changes(vty, NULL);
|
||||||
}
|
}
|
||||||
@ -387,18 +393,14 @@ DEFPY_YANG(isis_bfd_profile,
|
|||||||
void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
|
void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode,
|
||||||
bool show_defaults)
|
bool show_defaults)
|
||||||
{
|
{
|
||||||
const char *profile;
|
|
||||||
|
|
||||||
if (!yang_dnode_get_bool(dnode, "./enabled"))
|
if (!yang_dnode_get_bool(dnode, "./enabled"))
|
||||||
vty_out(vty, " no");
|
vty_out(vty, " no");
|
||||||
|
|
||||||
vty_out(vty, " isis bfd\n");
|
vty_out(vty, " isis bfd\n");
|
||||||
|
|
||||||
if (yang_dnode_exists(dnode, "./profile")) {
|
if (yang_dnode_exists(dnode, "./profile"))
|
||||||
profile = yang_dnode_get_string(dnode, "./profile");
|
vty_out(vty, " isis bfd profile %s\n",
|
||||||
if (profile[0] != '\0')
|
yang_dnode_get_string(dnode, "./profile"));
|
||||||
vty_out(vty, " isis bfd profile %s\n", profile);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user