summaryrefslogtreecommitdiffstats
path: root/vtysh
diff options
context:
space:
mode:
authorHiroki Shirokura <hiroki.shirokura@linecorp.com>2021-12-18 09:11:58 +0100
committerLouis Scalbert <louis.scalbert@6wind.com>2023-04-18 10:13:59 +0200
commit46fb37cf6774e910692f254e870451b2960197f2 (patch)
tree51e6ae40ff220e8f525c0b034c44c2211eaf8ec5 /vtysh
parentlib: add library for igp flexible-algorithm (diff)
downloadfrr-46fb37cf6774e910692f254e870451b2960197f2.tar.xz
frr-46fb37cf6774e910692f254e870451b2960197f2.zip
lib,vtysh,isisd,yang: algo cli/yang/callbacks
Define the IS-IS flex-algo structure in yang, the CLI configuration commands and the skeletons of frontend and backend functions that are called by the CLI code. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Eric Kinzie <ekinzie@labn.net> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'vtysh')
-rw-r--r--vtysh/vtysh.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c
index 4d52bd036..04f7ff65e 100644
--- a/vtysh/vtysh.c
+++ b/vtysh/vtysh.c
@@ -1175,6 +1175,13 @@ static struct cmd_node isis_node = {
.parent_node = CONFIG_NODE,
.prompt = "%s(config-router)# ",
};
+
+static struct cmd_node isis_flex_algo_node = {
+ .name = "isis-flex-algo",
+ .node = ISIS_FLEX_ALGO_NODE,
+ .parent_node = ISIS_NODE,
+ .prompt = "%s(config-router-flex-algo)# ",
+};
#endif /* HAVE_ISISD */
#ifdef HAVE_FABRICD
@@ -2095,6 +2102,14 @@ DEFUNSH(VTYSH_ISISD, router_isis, router_isis_cmd,
vty->node = ISIS_NODE;
return CMD_SUCCESS;
}
+
+DEFUNSH(VTYSH_ISISD, isis_flex_algo, isis_flex_algo_cmd, "flex-algo (128-255)",
+ "Flexible Algorithm\n"
+ "Flexible Algorithm Number\n")
+{
+ vty->node = ISIS_FLEX_ALGO_NODE;
+ return CMD_SUCCESS;
+}
#endif /* HAVE_ISISD */
#ifdef HAVE_FABRICD
@@ -2578,6 +2593,18 @@ DEFUNSH(VTYSH_ISISD, vtysh_quit_isisd, vtysh_quit_isisd_cmd, "quit",
{
return vtysh_exit_isisd(self, vty, argc, argv);
}
+
+DEFUNSH(VTYSH_ISISD, vtysh_exit_isis_flex_algo, vtysh_exit_isis_flex_algo_cmd,
+ "exit", "Exit current mode and down to previous mode\n")
+{
+ return vtysh_exit(vty);
+}
+
+DEFUNSH(VTYSH_ISISD, vtysh_quit_isis_flex_algo, vtysh_quit_isis_flex_algo_cmd,
+ "quit", "Exit current mode and down to previous mode\n")
+{
+ return vtysh_exit_isisd(self, vty, argc, argv);
+}
#endif /* HAVE_ISISD */
#if HAVE_BFDD > 0
@@ -4702,6 +4729,12 @@ void vtysh_init_vty(void)
install_element(ISIS_NODE, &vtysh_exit_isisd_cmd);
install_element(ISIS_NODE, &vtysh_quit_isisd_cmd);
install_element(ISIS_NODE, &vtysh_end_all_cmd);
+
+ install_node(&isis_flex_algo_node);
+ install_element(ISIS_NODE, &isis_flex_algo_cmd);
+ install_element(ISIS_FLEX_ALGO_NODE, &vtysh_exit_isis_flex_algo_cmd);
+ install_element(ISIS_FLEX_ALGO_NODE, &vtysh_quit_isis_flex_algo_cmd);
+ install_element(ISIS_FLEX_ALGO_NODE, &vtysh_end_all_cmd);
#endif /* HAVE_ISISD */
/* fabricd */