diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2018-11-29 11:02:35 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2018-12-03 13:47:58 -0200 |
| commit | 6fc293855457baf848b05fcf30b2ffeddb43445f (patch) | |
| tree | 68d14c304426044bcff7da254a27fce632aa8cd5 /ripngd/ripng_cli.c | |
| parent | 521d1b1283f50b15bd5dd6b57c7d22f2078058b9 (diff) | |
ripngd: retrofit the 'aggregate-address' command to the new northbound model
Trivial conversion. Remove the ripng->aggregate 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.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c index 876c537aff..e6daa62980 100644 --- a/ripngd/ripng_cli.c +++ b/ripngd/ripng_cli.c @@ -334,6 +334,30 @@ void cli_show_ripng_route(struct vty *vty, struct lyd_node *dnode, vty_out(vty, " route %s\n", yang_dnode_get_string(dnode, NULL)); } +/* + * XPath: /frr-ripngd:ripngd/instance/aggregate-addres + */ +DEFPY (ripng_aggregate_address, + ripng_aggregate_address_cmd, + "[no] aggregate-address X:X::X:X/M", + NO_STR + "Set aggregate RIPng route announcement\n" + "Aggregate network\n") +{ + nb_cli_enqueue_change(vty, "./aggregate-address", + no ? NB_OP_DELETE : NB_OP_CREATE, + aggregate_address_str); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_ripng_aggregate_address(struct vty *vty, struct lyd_node *dnode, + bool show_defaults) +{ + vty_out(vty, " aggregate-address %s\n", + yang_dnode_get_string(dnode, NULL)); +} + void ripng_cli_init(void) { install_element(CONFIG_NODE, &router_ripng_cmd); @@ -349,4 +373,5 @@ void ripng_cli_init(void) install_element(RIPNG_NODE, &ripng_passive_interface_cmd); install_element(RIPNG_NODE, &ripng_redistribute_cmd); install_element(RIPNG_NODE, &ripng_route_cmd); + install_element(RIPNG_NODE, &ripng_aggregate_address_cmd); } |
