summaryrefslogtreecommitdiffstats
path: root/isisd/isis_cli.c
diff options
context:
space:
mode:
authorOlivier Dugeon <olivier.dugeon@orange.com>2021-06-22 20:18:00 +0200
committerOlivier Dugeon <olivier.dugeon@orange.com>2021-11-30 15:22:28 +0100
commited6189a9b5c6597b18fe789953595ac335ac2aa3 (patch)
treebdd5a5bcf2f035cafb281d2a7940f2c93401fa79 /isisd/isis_cli.c
parentisisd: Prepare IS-IS for Link State support (diff)
downloadfrr-ed6189a9b5c6597b18fe789953595ac335ac2aa3.tar.xz
frr-ed6189a9b5c6597b18fe789953595ac335ac2aa3.zip
isisd: Add Link State Traffic Engineering support
Add Link State TED features to isis_te.c and new CLI to export LS TED and show LS TED to IS-IS. IS-IS LSPs are parse each time a new LSP event occurs in order to update accordingly the Link State Traffic Engineering Database. LS TED could be exported through the ZAPI Opaque message (see sharpd as example). Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r--isisd/isis_cli.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c
index b6f798bb2..70f14ecc9 100644
--- a/isisd/isis_cli.c
+++ b/isisd/isis_cli.c
@@ -1190,6 +1190,36 @@ DEFPY_YANG(isis_mpls_te_inter_as, isis_mpls_te_inter_as_cmd,
}
/*
+ * XPath: /frr-isisd:isis/instance/mpls-te/export
+ */
+DEFPY_YANG(isis_mpls_te_export, isis_mpls_te_export_cmd, "mpls-te export",
+ MPLS_TE_STR "Enable export of MPLS-TE Link State information\n")
+{
+ nb_cli_enqueue_change(vty, "./mpls-te/export", NB_OP_MODIFY, "true");
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+DEFPY_YANG(no_isis_mpls_te_export, no_isis_mpls_te_export_cmd,
+ "no mpls-te export",
+ NO_STR MPLS_TE_STR
+ "Disable export of MPLS-TE Link State information\n")
+{
+ nb_cli_enqueue_change(vty, "./mpls-te/export", NB_OP_MODIFY, "false");
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_isis_mpls_te_export(struct vty *vty, const struct lyd_node *dnode,
+ bool show_defaults)
+{
+ if (!yang_dnode_get_bool(dnode, NULL))
+ vty_out(vty, " no");
+
+ vty_out(vty, " mpls-te export\n");
+}
+
+/*
* XPath: /frr-isisd:isis/instance/default-information-originate
*/
DEFPY_YANG(isis_default_originate, isis_default_originate_cmd,
@@ -3165,6 +3195,8 @@ void isis_cli_init(void)
install_element(ISIS_NODE, &isis_mpls_te_router_addr_v6_cmd);
install_element(ISIS_NODE, &no_isis_mpls_te_router_addr_v6_cmd);
install_element(ISIS_NODE, &isis_mpls_te_inter_as_cmd);
+ install_element(ISIS_NODE, &isis_mpls_te_export_cmd);
+ install_element(ISIS_NODE, &no_isis_mpls_te_export_cmd);
install_element(ISIS_NODE, &isis_default_originate_cmd);
install_element(ISIS_NODE, &isis_redistribute_cmd);