summaryrefslogtreecommitdiffstats
path: root/ripngd/ripng_cli.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-11-29 13:56:09 +0100
committerRenato Westphal <renato@opensourcerouting.org>2018-12-03 16:47:58 +0100
commit521d1b1283f50b15bd5dd6b57c7d22f2078058b9 (patch)
tree483b98c7f0effe2d0af5a4b90253d0677203b1cb /ripngd/ripng_cli.c
parentripngd: retrofit the 'redistribute' commands to the new northbound model (diff)
downloadfrr-521d1b1283f50b15bd5dd6b57c7d22f2078058b9.tar.xz
frr-521d1b1283f50b15bd5dd6b57c7d22f2078058b9.zip
ripngd: retrofit the 'route' command to the new northbound model
Trivial conversion. Remove the ripng->route routing table and associated code because this variable was used only to show the running configuration. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripngd/ripng_cli.c')
-rw-r--r--ripngd/ripng_cli.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c
index f7c4514d0..876c537af 100644
--- a/ripngd/ripng_cli.c
+++ b/ripngd/ripng_cli.c
@@ -312,6 +312,28 @@ void cli_show_ripng_redistribute(struct vty *vty, struct lyd_node *dnode,
vty_out(vty, "\n");
}
+/*
+ * XPath: /frr-ripngd:ripngd/instance/static-route
+ */
+DEFPY (ripng_route,
+ ripng_route_cmd,
+ "[no] route X:X::X:X/M",
+ NO_STR
+ "Static route setup\n"
+ "Set static RIPng route announcement\n")
+{
+ nb_cli_enqueue_change(vty, "./static-route",
+ no ? NB_OP_DELETE : NB_OP_CREATE, route_str);
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_ripng_route(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults)
+{
+ vty_out(vty, " route %s\n", yang_dnode_get_string(dnode, NULL));
+}
+
void ripng_cli_init(void)
{
install_element(CONFIG_NODE, &router_ripng_cmd);
@@ -326,4 +348,5 @@ void ripng_cli_init(void)
install_element(RIPNG_NODE, &ripng_offset_list_cmd);
install_element(RIPNG_NODE, &ripng_passive_interface_cmd);
install_element(RIPNG_NODE, &ripng_redistribute_cmd);
+ install_element(RIPNG_NODE, &ripng_route_cmd);
}