diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2018-11-29 02:41:57 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2018-12-03 13:47:58 -0200 |
| commit | 22e8c7ae642026865234741b9a9bb50df79378bf (patch) | |
| tree | 4c9e9356d6662ed1aaba0ed942fc41696ad29265 /ripngd/ripng_cli.c | |
| parent | b09956ca5184a5daff87e144efb935d21504518e (diff) | |
ripngd: retrofit the 'passive-interface' command to the new northbound model
Trivial conversion.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripngd/ripng_cli.c')
| -rw-r--r-- | ripngd/ripng_cli.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ripngd/ripng_cli.c b/ripngd/ripng_cli.c index 1eb31a0ce6..7d90867f11 100644 --- a/ripngd/ripng_cli.c +++ b/ripngd/ripng_cli.c @@ -246,6 +246,29 @@ void cli_show_ripng_offset_list(struct vty *vty, struct lyd_node *dnode, vty_out(vty, "\n"); } +/* + * XPath: /frr-ripngd:ripngd/instance/passive-interface + */ +DEFPY (ripng_passive_interface, + ripng_passive_interface_cmd, + "[no] passive-interface IFNAME", + NO_STR + "Suppress routing updates on an interface\n" + "Interface name\n") +{ + nb_cli_enqueue_change(vty, "./passive-interface", + no ? NB_OP_DELETE : NB_OP_CREATE, ifname); + + return nb_cli_apply_changes(vty, NULL); +} + +void cli_show_ripng_passive_interface(struct vty *vty, struct lyd_node *dnode, + bool show_defaults) +{ + vty_out(vty, " passive-interface %s\n", + yang_dnode_get_string(dnode, NULL)); +} + void ripng_cli_init(void) { install_element(CONFIG_NODE, &router_ripng_cmd); @@ -258,4 +281,5 @@ void ripng_cli_init(void) install_element(RIPNG_NODE, &ripng_network_prefix_cmd); install_element(RIPNG_NODE, &ripng_network_if_cmd); install_element(RIPNG_NODE, &ripng_offset_list_cmd); + install_element(RIPNG_NODE, &ripng_passive_interface_cmd); } |
