diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2018-05-09 01:35:01 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-27 16:16:12 -0200 |
| commit | 90eff9dafe8f6985d77db9db8a1b48e159ed046c (patch) | |
| tree | 3843e159dca61d70b44441d6ae0eabe231ef3b46 /ripd/rip_northbound.c | |
| parent | b745780b5f56e9770c5ba0785bafd17b2239c6cc (diff) | |
ripd: retrofit the 'version' command to the new northbound model
Trivial conversion.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ripd/rip_northbound.c')
| -rw-r--r-- | ripd/rip_northbound.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ripd/rip_northbound.c b/ripd/rip_northbound.c index a99a92de9b..f94681700d 100644 --- a/ripd/rip_northbound.c +++ b/ripd/rip_northbound.c @@ -755,7 +755,11 @@ static int ripd_instance_version_receive_modify(enum nb_event event, const struct lyd_node *dnode, union nb_resource *resource) { - /* TODO: implement me. */ + if (event != NB_EV_APPLY) + return NB_OK; + + rip->version_recv = yang_dnode_get_enum(dnode, NULL); + return NB_OK; } @@ -766,7 +770,11 @@ static int ripd_instance_version_send_modify(enum nb_event event, const struct lyd_node *dnode, union nb_resource *resource) { - /* TODO: implement me. */ + if (event != NB_EV_APPLY) + return NB_OK; + + rip->version_send = yang_dnode_get_enum(dnode, NULL); + return NB_OK; } @@ -1167,6 +1175,10 @@ const struct frr_yang_module_info frr_ripd_info = { .cbs.modify = ripd_instance_timers_update_interval_modify, }, { + .xpath = "/frr-ripd:ripd/instance/version", + .cbs.cli_show = cli_show_rip_version, + }, + { .xpath = "/frr-ripd:ripd/instance/version/receive", .cbs.modify = ripd_instance_version_receive_modify, }, |
