]> git.proxmox.com Git - mirror_frr.git/commit
ripd: retrofit the 'distance source' commands to the new northbound model
authorRenato Westphal <renato@opensourcerouting.org>
Wed, 9 May 2018 04:34:59 +0000 (01:34 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Sat, 27 Oct 2018 18:16:12 +0000 (16:16 -0200)
commit23b23d8c27e972ab254503479ad891880ec597d9
tree7b03964540c437349b8f9b08a2fc8876a4b7936a
parent7f8a9cbab7922be545a96af91d72fe38caf8e197
ripd: retrofit the 'distance source' commands to the new northbound model

The "distance (1-255) A.B.C.D/M [WORD]" command was modeled using a
YANG list, which makes it a little bit more complicated to convert to
the new northbound model.

The rip_distance_set() and rip_distance_unset() functions were removed
since they set/unset multiple configuration options at the same time. The
northbound callbacks need to set/unset configuration options individually.

When a distance list is created, use yang_dnode_set_entry() to store
a pointer in the configuration node, and retrieve this pointer in the
other callbacks using yang_dnode_get_entry().

The 'rip_distance' structure was moved to ripd.h so that it can be used
in the rip_northbound.c file.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ripd/rip_cli.c
ripd/rip_cli.h
ripd/rip_northbound.c
ripd/ripd.c
ripd/ripd.h