summaryrefslogtreecommitdiff
path: root/staticd/static_vty.c
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <jafar@atcorp.com>2025-02-28 14:46:40 -0600
committerGitHub <noreply@github.com>2025-02-28 14:46:40 -0600
commit13b386b65795f1b79968e251365e870e1309734d (patch)
treed585660b2fdb4648bf7e48108de7844ef862a892 /staticd/static_vty.c
parent3a8426fe4da6415e47c2d26c07f0cebb9e96432f (diff)
parentdc9c6adf4d112f7f94d194a413e32f4698eafea5 (diff)
Merge pull request #18284 from FRRouting/mergify/bp/dev/10.3/pr-18263
staticd: Add `no` form for `static-sids` command (backport #18263)
Diffstat (limited to 'staticd/static_vty.c')
-rw-r--r--staticd/static_vty.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/staticd/static_vty.c b/staticd/static_vty.c
index f93e81e8dc..13a61e52c7 100644
--- a/staticd/static_vty.c
+++ b/staticd/static_vty.c
@@ -1174,10 +1174,22 @@ DEFUN_YANG_NOSH (no_static_srv6, no_static_srv6_cmd,
return nb_cli_apply_changes(vty, "%s", xpath);
}
-DEFUN_NOSH (static_srv6_sids, static_srv6_sids_cmd,
- "static-sids",
+DEFPY_YANG_NOSH (static_srv6_sids, static_srv6_sids_cmd,
+ "[no] static-sids",
+ NO_STR
"Segment Routing SRv6 SIDs\n")
{
+ char xpath[XPATH_MAXLEN];
+
+ if (no) {
+ snprintf(xpath, sizeof(xpath), FRR_STATIC_SRV6_STATIC_SIDS_XPATH,
+ "frr-staticd:staticd", "staticd", VRF_DEFAULT_NAME);
+
+ nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
+
+ return nb_cli_apply_changes(vty, "%s", xpath);
+ }
+
VTY_PUSH_CONTEXT_NULL(SRV6_SIDS_NODE);
return CMD_SUCCESS;
}