diff options
author | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-05-15 20:24:59 +0200 |
---|---|---|
committer | Rafael Zalamena <rzalamena@opensourcerouting.org> | 2020-05-20 15:39:34 +0200 |
commit | d40d6c2274b7d05b4facd70228aaa8a1866d7efa (patch) | |
tree | f67e2939849d2b4a6801f7fdd4d9cd3a359e1be7 /bfdd | |
parent | yang: support BFD session profiles (diff) | |
download | frr-d40d6c2274b7d05b4facd70228aaa8a1866d7efa.tar.xz frr-d40d6c2274b7d05b4facd70228aaa8a1866d7efa.zip |
bfdd,lib,vtysh: new command node for BFD profiles
Add the necessary code to implement the BFD profile command node.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Diffstat (limited to 'bfdd')
-rw-r--r-- | bfdd/bfdd_cli.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/bfdd/bfdd_cli.c b/bfdd/bfdd_cli.c index 3e44fcb22..eda8166e6 100644 --- a/bfdd/bfdd_cli.c +++ b/bfdd/bfdd_cli.c @@ -395,6 +395,33 @@ void bfd_cli_show_echo_interval(struct vty *vty, struct lyd_node *dnode, } } +/* + * Profile commands. + */ +DEFPY_NOSH(bfd_profile, bfd_profile_cmd, + "profile WORD$name", + BFD_PROFILE_STR + BFD_PROFILE_NAME_STR) +{ + return CMD_SUCCESS; +} + +DEFPY(no_bfd_profile, no_bfd_profile_cmd, + "no profile BFDPROF$name", + NO_STR + BFD_PROFILE_STR + BFD_PROFILE_NAME_STR) +{ + return CMD_SUCCESS; +} + +struct cmd_node bfd_profile_node = { + .name = "bfd profile", + .node = BFD_PROFILE_NODE, + .parent_node = BFD_NODE, + .prompt = "%s(config-bfd-profile)# ", +}; + void bfdd_cli_init(void) { @@ -410,4 +437,11 @@ bfdd_cli_init(void) install_element(BFD_PEER_NODE, &bfd_peer_tx_cmd); install_element(BFD_PEER_NODE, &bfd_peer_echo_cmd); install_element(BFD_PEER_NODE, &bfd_peer_echo_interval_cmd); + + /* Profile commands. */ + install_node(&bfd_profile_node); + install_default(BFD_PROFILE_NODE); + + install_element(BFD_NODE, &bfd_profile_cmd); + install_element(BFD_NODE, &no_bfd_profile_cmd); } |