diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-11-29 03:57:39 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-12-03 16:47:58 +0100 |
commit | 1e42a07ce99cf703e248f6b6a56825cb445efebf (patch) | |
tree | 6dd56b89e9af979ee4392fd17d8f98b64ecc8f0e /ripngd/ripng_cli.c | |
parent | ripngd: retrofit the 'router ripng' command to the new northbound model (diff) | |
download | frr-1e42a07ce99cf703e248f6b6a56825cb445efebf.tar.xz frr-1e42a07ce99cf703e248f6b6a56825cb445efebf.zip |
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 <renato@opensourcerouting.org>
Diffstat (limited to 'ripngd/ripng_cli.c')
-rw-r--r-- | ripngd/ripng_cli.c | 26 |
1 files changed, 26 insertions, 0 deletions
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); } |