summaryrefslogtreecommitdiff
path: root/ripngd/ripng_cli.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-11-29 13:24:26 -0200
committerRenato Westphal <renato@opensourcerouting.org>2018-12-03 13:47:58 -0200
commit49e06d25ad80d47bacf805959d05906ecf9ff3e0 (patch)
tree5833330924db1fcf2a4c6adf79436c3490d040bf /ripngd/ripng_cli.c
parentb87413387024dec9149e4922cb134b898a5dd426 (diff)
ripngd: implement the 'clear-ripng-route' YANG RPC
The "clear ipv6 ripng" command was turned into a YANG RPC so that other northbound plugins can execute it as well. This RPC closely matches the 'clear-rip-route' RPC from the ietf-rip module. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripngd/ripng_cli.c')
-rw-r--r--ripngd/ripng_cli.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c
index 431c1ee324..a187e80fd7 100644
--- a/ripngd/ripng_cli.c
+++ b/ripngd/ripng_cli.c
@@ -451,6 +451,19 @@ void cli_show_ipv6_ripng_split_horizon(struct vty *vty, struct lyd_node *dnode,
}
}
+/*
+ * XPath: /frr-ripngd:clear-ripng-route
+ */
+DEFPY (clear_ipv6_rip,
+ clear_ipv6_rip_cmd,
+ "clear ipv6 ripng",
+ CLEAR_STR
+ IPV6_STR
+ "Clear IPv6 RIP database\n")
+{
+ return nb_cli_rpc("/frr-ripngd:clear-ripng-route", NULL, NULL);
+}
+
void ripng_cli_init(void)
{
install_element(CONFIG_NODE, &router_ripng_cmd);
@@ -471,4 +484,6 @@ void ripng_cli_init(void)
install_element(RIPNG_NODE, &no_ripng_timers_cmd);
install_element(INTERFACE_NODE, &ipv6_ripng_split_horizon_cmd);
+
+ install_element(ENABLE_NODE, &clear_ipv6_rip_cmd);
}