]> git.proxmox.com Git - mirror_frr.git/commit - lib/northbound_cli.c
lib: northbound cli support to end config nodes
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Sat, 25 May 2019 01:11:27 +0000 (22:11 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Sat, 22 Jun 2019 13:08:33 +0000 (10:08 -0300)
commita4d3c1d41d13c2bbb68224b7bad141e220017b2f
tree1396d8288c49511da2078917631abb81c122d210
parent990e89e5edcc096527f291353289036aed3985a3
lib: northbound cli support to end config nodes

Some more complex CLI usages will require northbound to support
signalizing a custom configuration node end.

For an example:

```
router bgp 100
 bgp router-id 10.254.254.1
 neighbor 10.0.0.100 remote-as 200
 !
 address-family ipv4 unicast
  network 10.0.1.0/24
  network 10.0.2.0/24
  network 10.0.3.0/24
 exit-address-family
 !
 address-family ipv6 unicast
  neighbor 10.0.0.100 activate
 exit-address-family
!
```

This commit implements a new callback called `cli_show_end` which
complements `cli_show` and is only called at the end of processing the
yang configuration node. It will be used to write the configuration
node termination like: "!" or "exit-address-family".

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
lib/northbound.h
lib/northbound_cli.c