diff options
| author | Russ White <russ@riw.us> | 2019-07-16 09:17:51 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-16 09:17:51 -0400 |
| commit | daba7c09bedcd0ec4c064603419cdcbde3c751e2 (patch) | |
| tree | 8d30cd8bd57e651359cb19f97968a33f059c0374 /isisd/isis_cli.c | |
| parent | b34c6dff642442eac77f4057e92a91868caf721b (diff) | |
| parent | 8222b997c7e6c04ec35a3f00d1f9aeeb76003eb7 (diff) | |
Merge pull request #4669 from opensourcerouting/bfd-isis-northbound
isisd: migrate BFD command to northbound
Diffstat (limited to 'isisd/isis_cli.c')
| -rw-r--r-- | isisd/isis_cli.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 0334b98a12..4b43260773 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -333,6 +333,40 @@ void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode, } /* + * XPath: /frr-interface:lib/interface/frr-isisd:isis/bfd-monitoring + */ +DEFPY(isis_bfd, + isis_bfd_cmd, + "[no] isis bfd", + NO_STR + PROTO_HELP + "Enable BFD support\n") +{ + const struct lyd_node *dnode; + + dnode = yang_dnode_get(vty->candidate_config->dnode, + "%s/frr-isisd:isis", VTY_CURR_XPATH); + if (dnode == NULL) { + vty_out(vty, "ISIS is not enabled on this circuit\n"); + return CMD_SUCCESS; + } + + nb_cli_enqueue_change(vty, "./frr-isisd:isis/bfd-monitoring", + NB_OP_MODIFY, no ? "false" : "true"); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_ip_isis_bfd_monitoring(struct vty *vty, struct lyd_node *dnode, + bool show_defaults) +{ + if (!yang_dnode_get_bool(dnode, NULL)) + vty_out(vty, " no"); + + vty_out(vty, "isis bfd\n"); +} + +/* * XPath: /frr-isisd:isis/instance/area-address */ DEFPY(net, net_cmd, "[no] net WORD", @@ -1949,6 +1983,7 @@ void isis_cli_init(void) install_element(INTERFACE_NODE, &ip_router_isis_cmd); install_element(INTERFACE_NODE, &ip6_router_isis_cmd); install_element(INTERFACE_NODE, &no_ip_router_isis_cmd); + install_element(INTERFACE_NODE, &isis_bfd_cmd); install_element(ISIS_NODE, &net_cmd); |
