summaryrefslogtreecommitdiff
path: root/ripngd/ripng_cli.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-03-21 20:17:49 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2024-04-22 16:36:23 +0300
commit6e0e84491b684167324052f8d20a930505795d29 (patch)
tree7b4756e7248b5a8f5bb080fae6fc3cd12a2882ba /ripngd/ripng_cli.c
parentdbaf05ae3df9c285c2660cbd32483e690c7b1a8a (diff)
ripngd: convert RPC commands to mgmtd
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ripngd/ripng_cli.c')
-rw-r--r--ripngd/ripng_cli.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c
index 4806861fe0..99cb68ea32 100644
--- a/ripngd/ripng_cli.c
+++ b/ripngd/ripng_cli.c
@@ -624,6 +624,23 @@ DEFPY_YANG(no_ripng_ipv6_distribute_list_prefix,
return nb_cli_apply_changes(vty, NULL);
}
+/*
+ * XPath: /frr-ripngd:clear-ripng-route
+ */
+DEFPY_YANG (clear_ipv6_rip,
+ clear_ipv6_rip_cmd,
+ "clear ipv6 ripng [vrf WORD]",
+ CLEAR_STR
+ IPV6_STR
+ "Clear IPv6 RIP database\n"
+ VRF_CMD_HELP_STR)
+{
+ if (vrf)
+ nb_cli_rpc_enqueue(vty, "vrf", vrf);
+
+ return nb_cli_rpc(vty, "/frr-ripngd:clear-ripng-route", NULL);
+}
+
/* RIPng node structure. */
static struct cmd_node cmd_ripng_node = {
.name = "ripng",
@@ -663,6 +680,8 @@ void ripng_cli_init(void)
install_element(INTERFACE_NODE, &ipv6_ripng_split_horizon_cmd);
+ install_element(ENABLE_NODE, &clear_ipv6_rip_cmd);
+
if_rmap_init(RIPNG_NODE);
}