diff options
author | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-09-03 08:54:57 +0200 |
---|---|---|
committer | Carmine Scarpitta <carmine.scarpitta@uniroma2.it> | 2023-09-11 22:11:51 +0200 |
commit | bfec26bc7a59698f82e66d1c7a6ae64909191a83 (patch) | |
tree | fad612f17f878dc78f297cfaac56cad557372fa2 /isisd/isis_cli.c | |
parent | yang: Add SRv6 interface to IS-IS YANG model (diff) | |
download | frr-bfec26bc7a59698f82e66d1c7a6ae64909191a83.tar.xz frr-bfec26bc7a59698f82e66d1c7a6ae64909191a83.zip |
isisd: Make SRv6 interface configurable
Add CLI command and functions to configure the interface used for
installing SRv6 SIDs into Linux data plane
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Diffstat (limited to 'isisd/isis_cli.c')
-rw-r--r-- | isisd/isis_cli.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 328f76b35..9718a457e 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -2239,6 +2239,33 @@ void cli_show_isis_srv6_node_msd(struct vty *vty, const struct lyd_node *dnode, } /* + * XPath: /frr-isisd:isis/instance/segment-routing-srv6/interface + */ +DEFPY (isis_srv6_interface, + isis_srv6_interface_cmd, + "[no] interface WORD$interface", + NO_STR + "Interface for Segment Routing over IPv6 (SRv6)\n" + "Interface for Segment Routing over IPv6 (SRv6)\n") +{ + if (no) { + nb_cli_enqueue_change(vty, "./interface", + NB_OP_MODIFY, NULL); + } else { + nb_cli_enqueue_change(vty, "./interface", + NB_OP_MODIFY, interface); + } + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_isis_srv6_interface(struct vty *vty, const struct lyd_node *dnode, + bool show_defaults) +{ + vty_out(vty, " interface %s\n", yang_dnode_get_string(dnode, NULL)); +} + +/* * XPath: /frr-isisd:isis/instance/fast-reroute/level-{1,2}/lfa/priority-limit */ DEFPY_YANG (isis_frr_lfa_priority_limit, @@ -4011,6 +4038,7 @@ void isis_cli_init(void) install_element(ISIS_NODE, &no_isis_srv6_enable_cmd); install_element(ISIS_SRV6_NODE, &isis_srv6_locator_cmd); install_element(ISIS_SRV6_NODE, &isis_srv6_node_msd_cmd); + install_element(ISIS_SRV6_NODE, &isis_srv6_interface_cmd); install_element(ISIS_SRV6_NODE_MSD_NODE, &isis_srv6_node_msd_max_segs_left_cmd); install_element(ISIS_SRV6_NODE_MSD_NODE, |