From 720879b08a34ff7f166f3c1b8f5a1c75e7d00b9b Mon Sep 17 00:00:00 2001 From: Carmine Scarpitta Date: Thu, 27 Feb 2025 12:12:39 +0100 Subject: [PATCH] vtysh: Add `no static-sids` command Previous commits introduced the `no` form for the `static-sids` command. This change allow users to remove all static SIDs at once. This commit makes the `no static-sids` command available in vtysh. ``` router# config router(config)# segment-routing router(sr)# srv6 router(srv6)# no static-sids ``` Signed-off-by: Carmine Scarpitta (cherry picked from commit 96134d196490c304b3b78487b06f0d34ce488651) --- vtysh/vtysh.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vtysh/vtysh.c b/vtysh/vtysh.c index 0559e89f92..31e7ce12ba 100644 --- a/vtysh/vtysh.c +++ b/vtysh/vtysh.c @@ -1708,6 +1708,14 @@ DEFUNSH(VTYSH_MGMTD, srv6_sids, srv6_sids_cmd, return CMD_SUCCESS; } +DEFUNSH(VTYSH_MGMTD, no_srv6_sids, no_srv6_sids_cmd, + "no static-sids", + NO_STR + "Segment-Routing SRv6 SIDs configuration\n") +{ + return CMD_SUCCESS; +} + DEFUNSH(VTYSH_ZEBRA, srv6_locators, srv6_locators_cmd, "locators", "Segment-Routing SRv6 locators configuration\n") @@ -5543,6 +5551,7 @@ void vtysh_init_vty(void) install_element(SRV6_NODE, &vtysh_end_all_cmd); install_element(SRV6_NODE, &srv6_encap_cmd); install_element(SRV6_NODE, &srv6_sids_cmd); + install_element(SRV6_NODE, &no_srv6_sids_cmd); install_element(SRV6_SIDS_NODE, &exit_srv6_sids_config_cmd); install_element(SRV6_SIDS_NODE, &vtysh_end_all_cmd); -- 2.39.5