]> git.puffer.fish Git - matthieu/frr.git/commitdiff
vtysh: Add `no static-sids` command
authorCarmine Scarpitta <cscarpit@cisco.com>
Thu, 27 Feb 2025 11:12:39 +0000 (12:12 +0100)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Fri, 28 Feb 2025 14:16:16 +0000 (14:16 +0000)
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 <cscarpit@cisco.com>
(cherry picked from commit 96134d196490c304b3b78487b06f0d34ce488651)

vtysh/vtysh.c

index 0559e89f92bd407156b8b7eadc88cfbe2c7b4826..31e7ce12bac95b6ef61d6a64a5d35fe0c059e149 100644 (file)
@@ -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);