summaryrefslogtreecommitdiff
path: root/ripngd/ripng_cli.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-11-29 01:12:29 -0200
committerRenato Westphal <renato@opensourcerouting.org>2018-12-03 13:47:58 -0200
commit54b565627ac5dbd48bc7aa48b0c7dd5836967ef4 (patch)
tree39bdbe7b63cc24f8158199ba9f297b79f064b401 /ripngd/ripng_cli.c
parent1e42a07ce99cf703e248f6b6a56825cb445efebf (diff)
ripngd: retrofit the 'default-information' command to the new northbound model
Trivial conversion. 'ripng->default_information' was removed because it was being used only to display the running configuration and thus is not necessary anymore. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripngd/ripng_cli.c')
-rw-r--r--ripngd/ripng_cli.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c
index 8944198c2f..04cde899df 100644
--- a/ripngd/ripng_cli.c
+++ b/ripngd/ripng_cli.c
@@ -99,10 +99,37 @@ void cli_show_ripng_allow_ecmp(struct vty *vty, struct lyd_node *dnode,
vty_out(vty, " allow-ecmp\n");
}
+/*
+ * XPath: /frr-ripngd:ripngd/instance/default-information-originate
+ */
+DEFPY (ripng_default_information_originate,
+ ripng_default_information_originate_cmd,
+ "[no] default-information originate",
+ NO_STR
+ "Default route information\n"
+ "Distribute default route\n")
+{
+ nb_cli_enqueue_change(vty, "./default-information-originate",
+ NB_OP_MODIFY, no ? "false" : "true");
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_ripng_default_information_originate(struct vty *vty,
+ struct lyd_node *dnode,
+ bool show_defaults)
+{
+ if (!yang_dnode_get_bool(dnode, NULL))
+ vty_out(vty, " no");
+
+ vty_out(vty, " default-information originate\n");
+}
+
void ripng_cli_init(void)
{
install_element(CONFIG_NODE, &router_ripng_cmd);
install_element(CONFIG_NODE, &no_router_ripng_cmd);
install_element(RIPNG_NODE, &ripng_allow_ecmp_cmd);
+ install_element(RIPNG_NODE, &ripng_default_information_originate_cmd);
}