From 1e42a07ce99cf703e248f6b6a56825cb445efebf Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Thu, 29 Nov 2018 00:57:39 -0200 Subject: ripngd: retrofit the 'allow-ecmp' command to the new northbound model Trivial conversion. The ripng->ecmp variable was converted to a boolean to match the way it's defined in the YANG module. Signed-off-by: Renato Westphal --- ripngd/ripng_cli.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'ripngd/ripng_cli.c') diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c index 7bdc74220..8944198c2 100644 --- a/ripngd/ripng_cli.c +++ b/ripngd/ripng_cli.c @@ -75,8 +75,34 @@ void cli_show_router_ripng(struct vty *vty, struct lyd_node *dnode, vty_out(vty, "router ripng\n"); } +/* + * XPath: /frr-ripngd:ripngd/instance/allow-ecmp + */ +DEFPY (ripng_allow_ecmp, + ripng_allow_ecmp_cmd, + "[no] allow-ecmp", + NO_STR + "Allow Equal Cost MultiPath\n") +{ + nb_cli_enqueue_change(vty, "./allow-ecmp", NB_OP_MODIFY, + no ? "false" : "true"); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_ripng_allow_ecmp(struct vty *vty, struct lyd_node *dnode, + bool show_defaults) +{ + if (!yang_dnode_get_bool(dnode, NULL)) + vty_out(vty, " no"); + + vty_out(vty, " allow-ecmp\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); } -- cgit v1.2.3