]> git.proxmox.com Git - mirror_frr.git/commitdiff
Merge pull request #9077 from idryzhov/ospf-memory-alloc
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 3 Sep 2021 14:14:44 +0000 (10:14 -0400)
committerGitHub <noreply@github.com>
Fri, 3 Sep 2021 14:14:44 +0000 (10:14 -0400)
ospfd: remove unnecessary memory allocation

732 files changed:
.dir-locals.el
Makefile.am
alpine/APKBUILD.in
babeld/babel_interface.c
babeld/babel_main.c
babeld/babeld.c
bfdd/bfdd.c
bfdd/bfdd_cli.c
bgpd/bgp_attr.c
bgpd/bgp_bmp.c
bgpd/bgp_clist.c
bgpd/bgp_clist.h
bgpd/bgp_community.c
bgpd/bgp_community_alias.c
bgpd/bgp_community_alias.h
bgpd/bgp_damp.c
bgpd/bgp_damp.h
bgpd/bgp_ecommunity.c
bgpd/bgp_ecommunity.h
bgpd/bgp_evpn.c
bgpd/bgp_filter.c
bgpd/bgp_fsm.c
bgpd/bgp_io.c
bgpd/bgp_lcommunity.c
bgpd/bgp_main.c
bgpd/bgp_memory.c
bgpd/bgp_memory.h
bgpd/bgp_mpath.c
bgpd/bgp_mplsvpn.c
bgpd/bgp_nb.c [deleted file]
bgpd/bgp_nb.h [deleted file]
bgpd/bgp_nb_config.c [deleted file]
bgpd/bgp_network.c
bgpd/bgp_nht.c
bgpd/bgp_nht.h
bgpd/bgp_open.c
bgpd/bgp_packet.c
bgpd/bgp_pbr.c
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_routemap.c
bgpd/bgp_routemap_nb.c
bgpd/bgp_routemap_nb.h
bgpd/bgp_routemap_nb_config.c
bgpd/bgp_rpki.c
bgpd/bgp_snmp.c
bgpd/bgp_vty.c
bgpd/bgp_vty.h
bgpd/bgp_zebra.c
bgpd/bgpd.c
bgpd/bgpd.h
bgpd/rfapi/bgp_rfapi_cfg.c
bgpd/subdir.am
configure.ac
doc/developer/scripting.rst
doc/developer/workflow.rst
doc/user/bgp.rst
doc/user/filter.rst
doc/user/ospf6d.rst
doc/user/pathd.rst
doc/user/pbr.rst
doc/user/pim.rst
doc/user/routemap.rst
doc/user/zebra.rst
docker/alpine/Dockerfile
docker/alpine/docker-start
docker/alpine/libyang/10-remove-non-standard-headers.patch [new file with mode: 0644]
docker/alpine/libyang/11-utest-dont-parse-dlerror.patch [new file with mode: 0644]
docker/alpine/libyang/APKBUILD [new file with mode: 0755]
eigrpd/eigrp_cli.c
eigrpd/eigrp_main.c
fpm/subdir.am
grpc/subdir.am
include/linux/rtnetlink.h
isisd/isis_circuit.c
isisd/isis_cli.c
isisd/isis_lsp.c
isisd/isis_main.c
isisd/isis_nb.c
isisd/isis_nb.h
isisd/isisd.c
isisd/subdir.am
ldpd/ldp_vty_conf.c
ldpd/ldpd.c
ldpd/subdir.am
lib/bfd.c
lib/command.c
lib/command.h
lib/elf_py.c
lib/filter.c
lib/filter.h
lib/filter_cli.c
lib/filter_nb.c
lib/frr_zmq.c
lib/frrlua.c
lib/frrlua.h
lib/frrscript.c
lib/frrscript.h
lib/frrstr.c
lib/frrstr.h
lib/if.c
lib/if.h
lib/keychain.c
lib/libfrr.c
lib/nexthop_group.c
lib/pbr.h
lib/plist.c
lib/plist.h
lib/route_opaque.h
lib/route_types.txt
lib/routemap.c
lib/routemap.h
lib/routemap_cli.c
lib/subdir.am
lib/vrf.c
lib/vrf.h
lib/vty.c
lib/zclient.c
lib/zclient.h
mlag/subdir.am
nhrpd/nhrp_main.c
nhrpd/nhrp_route.c
nhrpd/nhrp_shortcut.c
nhrpd/nhrp_vty.c
ospf6d/ospf6_abr.c
ospf6d/ospf6_area.c
ospf6d/ospf6_area.h
ospf6d/ospf6_asbr.c
ospf6d/ospf6_asbr.h
ospf6d/ospf6_flood.c
ospf6d/ospf6_flood.h
ospf6d/ospf6_gr.h [new file with mode: 0644]
ospf6d/ospf6_gr_helper.c [new file with mode: 0644]
ospf6d/ospf6_interface.c
ospf6d/ospf6_interface.h
ospf6d/ospf6_intra.c
ospf6d/ospf6_lsa.c
ospf6d/ospf6_lsa.h
ospf6d/ospf6_lsdb.c
ospf6d/ospf6_lsdb.h
ospf6d/ospf6_main.c
ospf6d/ospf6_message.c
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_neighbor.h
ospf6d/ospf6_nssa.c
ospf6d/ospf6_nssa.h
ospf6d/ospf6_route.c
ospf6d/ospf6_route.h
ospf6d/ospf6_spf.c
ospf6d/ospf6_top.c
ospf6d/ospf6_top.h
ospf6d/ospf6_zebra.c
ospf6d/ospf6d.c
ospf6d/ospf6d.h
ospf6d/subdir.am
ospfclient/subdir.am
ospfd/ospf_flood.c
ospfd/ospf_interface.c
ospfd/ospf_interface.h
ospfd/ospf_lsa.c
ospfd/ospf_main.c
ospfd/ospf_network.c
ospfd/ospf_nsm.c
ospfd/ospf_spf.c
ospfd/ospf_vty.c
ospfd/ospfd.c
ospfd/subdir.am
pathd/path_cli.c
pathd/path_main.c
pathd/path_nb.c
pathd/path_nb.h
pathd/path_pcep_cli.c
pathd/path_ted.c
pathd/pathd.h
pathd/subdir.am
pbrd/pbr_main.c
pbrd/pbr_map.h
pbrd/pbr_vty.c
pbrd/pbr_zebra.c
pimd/pim_bsm.c
pimd/pim_cmd.c
pimd/pim_iface.c
pimd/pim_ifchannel.c
pimd/pim_igmp.c
pimd/pim_igmp.h
pimd/pim_igmpv3.c
pimd/pim_instance.c
pimd/pim_instance.h
pimd/pim_main.c
pimd/pim_mroute.c
pimd/pim_msdp.c
pimd/pim_nb_config.c
pimd/pim_neighbor.c
pimd/pim_pim.c
pimd/pim_rp.c
pimd/pim_rpf.c
pimd/pim_sock.c
pimd/pim_upstream.c
pimd/pim_vty.c
qpb/subdir.am
redhat/frr.spec.in
ripd/rip_interface.c
ripd/rip_main.c
ripd/rip_snmp.c
ripd/ripd.c
ripd/subdir.am
ripngd/ripng_interface.c
ripngd/ripng_main.c
ripngd/ripngd.c
sharpd/sharp_main.c
snapcraft/README.snap_build.md
snapcraft/README.usage.md
snapcraft/defaults/pathd.conf.default [new file with mode: 0644]
snapcraft/scripts/Makefile
snapcraft/scripts/pathd-service [new file with mode: 0644]
snapcraft/snapcraft.yaml.in
staticd/static_main.c
staticd/static_nb_config.c
staticd/static_nht.c
staticd/static_routes.c
staticd/static_routes.h
staticd/static_vrf.c
staticd/static_vty.c
staticd/static_zebra.c
staticd/static_zebra.h
tests/.gitignore
tests/bgpd/test_ecommunity.c
tests/bgpd/test_peer_attr.c
tests/isisd/test_isis_lspdb.c
tests/lib/cli/common_cli.c
tests/lib/cli/common_cli.h
tests/lib/cli/test_cli.refout.in
tests/lib/script1.lua
tests/lib/test_frrscript.c
tests/lib/test_plist.c [new file with mode: 0644]
tests/subdir.am
tests/topotests/bfd_topo2/r2/ospf6d.conf
tests/topotests/bfd_topo2/r4/ospf6d.conf
tests/topotests/bfd_topo2/test_bfd_topo2.py
tests/topotests/bfd_vrf_topo1/r1/bfdd.conf
tests/topotests/bfd_vrf_topo1/r1/bgpd.conf
tests/topotests/bfd_vrf_topo1/r1/zebra.conf
tests/topotests/bfd_vrf_topo1/r2/bfdd.conf
tests/topotests/bfd_vrf_topo1/r2/bgpd.conf
tests/topotests/bfd_vrf_topo1/r2/zebra.conf
tests/topotests/bfd_vrf_topo1/r3/bfdd.conf
tests/topotests/bfd_vrf_topo1/r3/bgpd.conf
tests/topotests/bfd_vrf_topo1/r3/zebra.conf
tests/topotests/bfd_vrf_topo1/r4/bfdd.conf
tests/topotests/bfd_vrf_topo1/r4/bgpd.conf
tests/topotests/bfd_vrf_topo1/r4/zebra.conf
tests/topotests/bfd_vrf_topo1/test_bfd_vrf_topo1.py
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgpd.conf [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra.conf [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgpd.conf [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra.conf [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_base.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_no_rt2.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_no_rt5.json [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/__init__.py [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/host1/bgpd.conf [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/host1/zebra.conf [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/host2/bgpd.conf [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/host2/zebra.conf [deleted file]
tests/topotests/bgp-evpn-overlay-index-gateway/test_bgp_evpn_overlay_index_gateway.py [deleted file]
tests/topotests/bgp_aggregate_address_topo1/test_bgp_aggregate_address_topo1.py
tests/topotests/bgp_basic_functionality_topo1/test_bgp_basic_functionality.py
tests/topotests/bgp_community_alias/r1/bgpd.conf
tests/topotests/bgp_community_alias/r2/bgpd.conf
tests/topotests/bgp_community_alias/r2/zebra.conf
tests/topotests/bgp_community_alias/test_bgp-community-alias.py
tests/topotests/bgp_community_change_update/test_bgp_community_change_update.py
tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py
tests/topotests/bgp_default_afi_safi/test_bgp-default-afi-safi.py
tests/topotests/bgp_default_route/test_bgp_default-originate.py
tests/topotests/bgp_default_route_route_map_match/test_bgp_default-originate_route-map_match.py
tests/topotests/bgp_default_route_route_map_match2/test_bgp_default-originate_route-map_match2.py
tests/topotests/bgp_default_route_route_map_match_set/test_bgp_default-originate_route-map_match_set.py
tests/topotests/bgp_default_route_route_map_set/test_bgp_default-originate_route-map_set.py
tests/topotests/bgp_distance_change/test_bgp_distance_change.py
tests/topotests/bgp_dont_capability_negogiate/__init__.py [new file with mode: 0644]
tests/topotests/bgp_dont_capability_negogiate/r1/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_dont_capability_negogiate/r1/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_dont_capability_negogiate/r2/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_dont_capability_negogiate/r2/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_dont_capability_negogiate/test_bgp_dont_capability_negotiate.py [new file with mode: 0644]
tests/topotests/bgp_ebgp_common_subnet_nexthop_unchanged/test_bgp-ebgp-common-subnet-nexthop-unchanged.py
tests/topotests/bgp_ebgp_requires_policy/test_bgp_ebgp_requires_policy.py
tests/topotests/bgp_ecmp_topo3/ibgp_ecmp_topo3.json [new file with mode: 0644]
tests/topotests/bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py [new file with mode: 0644]
tests/topotests/bgp_evpn_mh/test_evpn_mh.py
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_base.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_no_rt2.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_no_rt5.json [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/__init__.py [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/host1/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/host1/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/host2/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/host2/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py [new file with mode: 0755]
tests/topotests/bgp_evpn_rt5/test_bgp_evpn.py
tests/topotests/bgp_evpn_vxlan_topo1/test_bgp_evpn_vxlan.py
tests/topotests/bgp_features/exabgp.env [deleted file]
tests/topotests/bgp_features/peer1/exa_readpipe.py [deleted file]
tests/topotests/bgp_features/peer1/exabgp.cfg [deleted file]
tests/topotests/bgp_features/peer2/exa_readpipe.py [deleted file]
tests/topotests/bgp_features/peer2/exabgp.cfg [deleted file]
tests/topotests/bgp_features/peer3/exa_readpipe.py [deleted file]
tests/topotests/bgp_features/peer3/exabgp.cfg [deleted file]
tests/topotests/bgp_features/peer4/exa_readpipe.py [deleted file]
tests/topotests/bgp_features/peer4/exabgp.cfg [deleted file]
tests/topotests/bgp_features/r1/bgp_damp_announced.json [deleted file]
tests/topotests/bgp_features/r1/bgp_damp_setup.json [deleted file]
tests/topotests/bgp_features/r2/bgp_damp_announced.json [deleted file]
tests/topotests/bgp_features/r2/bgp_damp_withdrawn.json [deleted file]
tests/topotests/bgp_features/test_bgp_features.py
tests/topotests/bgp_gr_functionality_topo1/test_bgp_gr_functionality_topo1.py
tests/topotests/bgp_gr_functionality_topo2/test_bgp_gr_functionality_topo2.py
tests/topotests/bgp_gshut/test_bgp_gshut.py
tests/topotests/bgp_gshut_topo1/test_ebgp_gshut_topo1.py
tests/topotests/bgp_gshut_topo1/test_ibgp_gshut_topo1.py
tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_ibgp_nbr.json [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_nbr.json [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_unnumbered_nbr.json [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ibgp_nbr.json [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ibgp_unnumbered_nbr.json [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_ibgp_nbr.py [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_nbr.py [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_unnumbered_nbr.py [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_nbr.py [new file with mode: 0644]
tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_unnumbered_nbr.py [new file with mode: 0644]
tests/topotests/bgp_large_community/test_bgp_large_community_topo_1.py
tests/topotests/bgp_large_community/test_bgp_large_community_topo_2.py
tests/topotests/bgp_link_bw_ip/r1/bgpd.conf
tests/topotests/bgp_link_bw_ip/r3/bgp-route-1.json [new file with mode: 0644]
tests/topotests/bgp_link_bw_ip/r3/bgpd.conf
tests/topotests/bgp_link_bw_ip/r6/bgpd.conf
tests/topotests/bgp_link_bw_ip/test_bgp_linkbw_ip.py
tests/topotests/bgp_listen_on_multiple_addresses/test_bgp_listen_on_multiple_addresses.py
tests/topotests/bgp_local_as_private_remove/test_bgp_local_as_private_remove.py
tests/topotests/bgp_maximum_prefix_invalid_update/test_bgp_maximum_prefix_invalid_update.py
tests/topotests/bgp_maximum_prefix_out/test_bgp_maximum_prefix_out.py
tests/topotests/bgp_minimum_holdtime/__init__.py [new file with mode: 0644]
tests/topotests/bgp_minimum_holdtime/r1/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_minimum_holdtime/r1/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_minimum_holdtime/r2/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_minimum_holdtime/r2/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py [new file with mode: 0755]
tests/topotests/bgp_multi_vrf_topo1/test_bgp_multi_vrf_topo1.py
tests/topotests/bgp_multi_vrf_topo2/test_bgp_multi_vrf_topo2.py
tests/topotests/bgp_multiview_topo1/peer1/exa-send.py
tests/topotests/bgp_multiview_topo1/peer2/exa-send.py
tests/topotests/bgp_multiview_topo1/peer3/exa-send.py
tests/topotests/bgp_multiview_topo1/peer4/exa-send.py
tests/topotests/bgp_multiview_topo1/peer5/exa-send.py
tests/topotests/bgp_multiview_topo1/peer6/exa-send.py
tests/topotests/bgp_multiview_topo1/peer7/exa-send.py
tests/topotests/bgp_multiview_topo1/peer8/exa-send.py
tests/topotests/bgp_multiview_topo1/r1/bgpd.conf
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1-post4.1.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1-post6.1.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2-post4.1.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2-post6.1.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3-post4.1.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3-post6.1.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3.ref [deleted file]
tests/topotests/bgp_multiview_topo1/r1/view_1.json [new file with mode: 0644]
tests/topotests/bgp_multiview_topo1/r1/view_2.json [new file with mode: 0644]
tests/topotests/bgp_multiview_topo1/r1/view_3.json [new file with mode: 0644]
tests/topotests/bgp_multiview_topo1/test_bgp_multiview_topo1.py
tests/topotests/bgp_path_attributes_topo1/test_bgp_path_attributes.py
tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py
tests/topotests/bgp_prefix_list_topo1/test_prefix_lists.py
tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py
tests/topotests/bgp_prefix_sid2/test_bgp_prefix_sid2.py
tests/topotests/bgp_recursive_route_ebgp_multi_hop/test_bgp_recursive_route_ebgp_multi_hop.py
tests/topotests/bgp_reject_as_sets/test_bgp_reject_as_sets.py
tests/topotests/bgp_rmap_extcommunity_none/__init__.py [new file with mode: 0644]
tests/topotests/bgp_rmap_extcommunity_none/r1/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_rmap_extcommunity_none/r1/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_rmap_extcommunity_none/r2/bgpd.conf [new file with mode: 0644]
tests/topotests/bgp_rmap_extcommunity_none/r2/zebra.conf [new file with mode: 0644]
tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py [new file with mode: 0644]
tests/topotests/bgp_route_aggregation/test_bgp_aggregation.py
tests/topotests/bgp_route_map/test_route_map_topo1.py
tests/topotests/bgp_route_map/test_route_map_topo2.py
tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py
tests/topotests/bgp_set_local_preference_add_subtract/test_bgp_set_local-preference_add_subtract.py
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/test_bgp_srv6l3vpn_to_bgp_vrf.py
tests/topotests/bgp_suppress_fib/test_bgp_suppress_fib.py
tests/topotests/bgp_tcp_mss/test_bgp_tcp_mss.py
tests/topotests/bgp_update_delay/test_bgp_update_delay.py
tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo1.py
tests/topotests/bgp_vrf_dynamic_route_leak/test_bgp_vrf_dynamic_route_leak_topo2.py
tests/topotests/bgp_vrf_lite_ipv6_rtadv/test_bgp_vrf_lite_ipv6_rtadv.py
tests/topotests/bgp_vrf_netns/r1/bgpd.conf
tests/topotests/bgp_vrf_netns/r1/summary.txt
tests/topotests/bgp_vrf_netns/r1/summary20.txt
tests/topotests/bgp_vrf_netns/r1/zebra.conf
tests/topotests/bgp_vrf_netns/test_bgp_vrf_netns_topo.py
tests/topotests/bgp_vrf_route_leak_basic/test_bgp-vrf-route-leak-basic.py
tests/topotests/conftest.py
tests/topotests/evpn_pim_1/leaf1/pimd.conf
tests/topotests/evpn_pim_1/leaf2/pimd.conf
tests/topotests/evpn_pim_1/spine/pimd.conf
tests/topotests/evpn_pim_1/test_evpn_pim_topo1.py
tests/topotests/evpn_type5_test_topo1/test_evpn_type5_chaos_topo1.py
tests/topotests/evpn_type5_test_topo1/test_evpn_type5_topo1.py
tests/topotests/isis_lsp_bits_topo1/test_isis_lsp_bits_topo1.py
tests/topotests/isis_rlfa_topo1/test_isis_rlfa_topo1.py
tests/topotests/isis_snmp/test_isis_snmp.py
tests/topotests/ldp_snmp/test_ldp_snmp_topo1.py
tests/topotests/ldp_sync_isis_topo1/test_ldp_sync_isis_topo1.py
tests/topotests/lib/bgp.py
tests/topotests/lib/common_config.py
tests/topotests/lib/ospf.py
tests/topotests/lib/pim.py
tests/topotests/lib/scapy_sendpkt.py [new file with mode: 0755]
tests/topotests/lib/topogen.py
tests/topotests/lib/topojson.py
tests/topotests/lib/topotest.py
tests/topotests/msdp_mesh_topo1/r1/pimd.conf
tests/topotests/msdp_mesh_topo1/r2/pimd.conf
tests/topotests/msdp_mesh_topo1/r3/pimd.conf
tests/topotests/msdp_topo1/r1/pimd.conf
tests/topotests/msdp_topo1/r2/pimd.conf
tests/topotests/msdp_topo1/r3/pimd.conf
tests/topotests/msdp_topo1/r4/pimd.conf
tests/topotests/msdp_topo1/test_msdp_topo1.py
tests/topotests/multicast_pim_bsm_topo1/test_mcast_pim_bsmp_01.py
tests/topotests/multicast_pim_bsm_topo2/test_mcast_pim_bsmp_02.py
tests/topotests/multicast_pim_sm_topo1/multicast_pim_sm_topo1.json
tests/topotests/multicast_pim_sm_topo1/test_multicast_pim_sm_topo1.py
tests/topotests/multicast_pim_sm_topo2/multicast_pim_sm_topo2.json
tests/topotests/multicast_pim_sm_topo2/test_multicast_pim_sm_topo2.py
tests/topotests/multicast_pim_sm_topo3/multicast_pim_sm_topo3.json
tests/topotests/multicast_pim_sm_topo3/multicast_pim_sm_topo4.json
tests/topotests/multicast_pim_sm_topo3/test_multicast_pim_sm_topo3.py
tests/topotests/multicast_pim_static_rp_topo1/multicast_pim_static_rp.json
tests/topotests/multicast_pim_static_rp_topo1/test_multicast_pim_static_rp.py
tests/topotests/nhrp_topo/test_nhrp_topo.py
tests/topotests/ospf-sr-te-topo1/dst/zebra.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt1/bgpd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt1/ospfd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt1/pathd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt1/step2/show_operational_data.ref [deleted file]
tests/topotests/ospf-sr-te-topo1/rt1/step2/show_operational_data_with_candidate.ref [deleted file]
tests/topotests/ospf-sr-te-topo1/rt1/step3/show_operational_data_with_single_candidate.ref [deleted file]
tests/topotests/ospf-sr-te-topo1/rt1/step3/show_operational_data_with_two_candidates.ref [deleted file]
tests/topotests/ospf-sr-te-topo1/rt1/zebra.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt2/ospfd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt2/zebra.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt3/ospfd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt3/zebra.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt4/ospfd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt4/zebra.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt5/ospfd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt5/zebra.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt6/bgpd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt6/ospfd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt6/pathd.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/rt6/step2/show_operational_data.ref [deleted file]
tests/topotests/ospf-sr-te-topo1/rt6/step2/show_operational_data_with_candidate.ref [deleted file]
tests/topotests/ospf-sr-te-topo1/rt6/step3/show_operational_data_with_single_candidate.ref [deleted file]
tests/topotests/ospf-sr-te-topo1/rt6/step3/show_operational_data_with_two_candidates.ref [deleted file]
tests/topotests/ospf-sr-te-topo1/rt6/zebra.conf [deleted file]
tests/topotests/ospf-sr-te-topo1/test_ospf_sr_te_topo1.py [deleted file]
tests/topotests/ospf6_topo1/test_ospf6_topo1.py
tests/topotests/ospf6_topo1_vrf/test_ospf6_topo1_vrf.py
tests/topotests/ospf6_topo2/r1/ospf6d.conf
tests/topotests/ospf6_topo2/r2/ospf6d.conf
tests/topotests/ospf6_topo2/r3/ospf6d.conf
tests/topotests/ospf6_topo2/r4/ospf6d.conf
tests/topotests/ospf6_topo2/test_ospf6_topo2.py
tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_topo1.py
tests/topotests/ospf_basic_functionality/test_ospf_asbr_summary_type7_lsa.py
tests/topotests/ospf_basic_functionality/test_ospf_authentication.py
tests/topotests/ospf_basic_functionality/test_ospf_ecmp.py
tests/topotests/ospf_basic_functionality/test_ospf_ecmp_lan.py
tests/topotests/ospf_basic_functionality/test_ospf_lan.py
tests/topotests/ospf_basic_functionality/test_ospf_nssa.py
tests/topotests/ospf_basic_functionality/test_ospf_p2mp.py
tests/topotests/ospf_basic_functionality/test_ospf_routemaps.py
tests/topotests/ospf_basic_functionality/test_ospf_rte_calc.py
tests/topotests/ospf_basic_functionality/test_ospf_single_area.py
tests/topotests/ospf_dual_stack/test_ospf_dual_stack.py
tests/topotests/ospf_gr_helper/ospf_gr_helper.json [new file with mode: 0644]
tests/topotests/ospf_gr_helper/test_ospf_gr_helper.py [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/dst/zebra.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt1/bgpd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt1/pathd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt1/step2/show_operational_data.ref [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt1/step2/show_operational_data_with_candidate.ref [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt1/step3/show_operational_data_with_single_candidate.ref [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt1/step3/show_operational_data_with_two_candidates.ref [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt1/zebra.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt2/zebra.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt3/zebra.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt4/zebra.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt5/zebra.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/bgpd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/pathd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/step2/show_operational_data.ref [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/step2/show_operational_data_with_candidate.ref [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/step3/show_operational_data_with_single_candidate.ref [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/step3/show_operational_data_with_two_candidates.ref [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/zebra.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py [new file with mode: 0755]
tests/topotests/ospf_suppress_fa/test_ospf_suppress_fa.py
tests/topotests/ospf_tilfa_topo1/test_ospf_tilfa_topo1.py
tests/topotests/ospf_topo1_vrf/r1/ospfd.conf
tests/topotests/ospf_topo1_vrf/r1/ospfroute.txt
tests/topotests/ospf_topo1_vrf/r1/ospfroute_down.txt
tests/topotests/ospf_topo1_vrf/r1/zebra.conf
tests/topotests/ospf_topo1_vrf/r1/zebraroute.txt
tests/topotests/ospf_topo1_vrf/r1/zebraroutedown.txt
tests/topotests/ospf_topo1_vrf/r2/ospfd.conf
tests/topotests/ospf_topo1_vrf/r2/ospfroute.txt
tests/topotests/ospf_topo1_vrf/r2/ospfroute_down.txt
tests/topotests/ospf_topo1_vrf/r2/zebra.conf
tests/topotests/ospf_topo1_vrf/r2/zebraroute.txt
tests/topotests/ospf_topo1_vrf/r2/zebraroutedown.txt
tests/topotests/ospf_topo1_vrf/r3/ospfd.conf
tests/topotests/ospf_topo1_vrf/r3/ospfroute.txt
tests/topotests/ospf_topo1_vrf/r3/ospfroute_down.txt
tests/topotests/ospf_topo1_vrf/r3/zebra.conf
tests/topotests/ospf_topo1_vrf/r3/zebraroute.txt
tests/topotests/ospf_topo1_vrf/r3/zebraroutedown.txt
tests/topotests/ospf_topo1_vrf/test_ospf_topo1_vrf.py
tests/topotests/ospf_topo2/test_ospf_topo2.py
tests/topotests/ospfv3_basic_functionality/ospfv3_asbr_summary_topo1.json [new file with mode: 0644]
tests/topotests/ospfv3_basic_functionality/ospfv3_ecmp.json [new file with mode: 0644]
tests/topotests/ospfv3_basic_functionality/ospfv3_routemaps.json [new file with mode: 0644]
tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py [new file with mode: 0644]
tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py [new file with mode: 0644]
tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py [new file with mode: 0644]
tests/topotests/ospfv3_basic_functionality/test_ospfv3_rte_calc.py
tests/topotests/ospfv3_basic_functionality/test_ospfv3_single_area.py
tests/topotests/pim_acl/h1/zebra.conf [new file with mode: 0644]
tests/topotests/pim_acl/h2/zebra.conf [new file with mode: 0644]
tests/topotests/pim_acl/r1/acl_1_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r1/acl_2_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r1/acl_3_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r1/acl_4_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r1/acl_5_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r1/acl_6_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r1/ospf_neighbor.json [new file with mode: 0644]
tests/topotests/pim_acl/r1/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r1/pim_neighbor.json [new file with mode: 0644]
tests/topotests/pim_acl/r1/pimd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r1/zebra.conf [new file with mode: 0644]
tests/topotests/pim_acl/r11/acl_1_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r11/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r11/pimd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r11/zebra.conf [new file with mode: 0644]
tests/topotests/pim_acl/r12/acl_2_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r12/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r12/pimd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r12/zebra.conf [new file with mode: 0644]
tests/topotests/pim_acl/r13/acl_3_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r13/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r13/pimd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r13/zebra.conf [new file with mode: 0644]
tests/topotests/pim_acl/r14/acl_4_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r14/acl_5_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r14/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r14/pimd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r14/zebra.conf [new file with mode: 0644]
tests/topotests/pim_acl/r15/acl_6_pim_join.json [new file with mode: 0644]
tests/topotests/pim_acl/r15/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r15/pimd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r15/zebra.conf [new file with mode: 0644]
tests/topotests/pim_acl/test_pim_acl.py [new file with mode: 0755]
tests/topotests/pim_basic/r1/pimd.conf
tests/topotests/pim_basic/rp/pimd.conf
tests/topotests/pim_basic_topo2/r2/pimd.conf
tests/topotests/pim_igmp_vrf/h1/zebra.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/h2/zebra.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/h3/zebra.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/h4/zebra.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/ospf_blue_neighbor.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/ospf_red_neighbor.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/pim_blue_join.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/pim_blue_neighbor.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/pim_blue_pimreg11.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/pim_red_join.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/pim_red_neighbor.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/pim_red_pimreg12.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/pimd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r1/zebra.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r11/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r11/pim_blue_join.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r11/pimd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r11/zebra.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r12/ospfd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r12/pim_red_join.json [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r12/pimd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r12/zebra.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/test_pim_vrf.py [new file with mode: 0755]
tests/topotests/route_scale/test_route_scale.py
tests/topotests/simple_snmp_test/test_simple_snmp.py
tests/topotests/srv6_locator/test_srv6_locator.py
tests/topotests/static_routing_with_ebgp/test_static_routes_topo4_ebgp.py
tests/topotests/zebra_netlink/test_zebra_netlink.py
tests/topotests/zebra_opaque/test_zebra_opaque.py
tests/topotests/zebra_rib/test_zebra_rib.py
tests/topotests/zebra_seg6_route/test_zebra_seg6_route.py
tests/topotests/zebra_seg6local_route/test_zebra_seg6local_route.py
tools/etc/frr/support_bundle_commands.conf
tools/frr-reload.py
tools/frrcommon.sh.in
tools/releasedate.py [new file with mode: 0644]
vrrpd/vrrp_main.c
vrrpd/vrrp_vty.c
vtysh/vtysh.c
vtysh/vtysh_config.c
yang/frr-bgp-route-map.yang
yang/frr-filter.yang
yang/frr-igmp.yang
yang/frr-pim.yang
zebra/debug.c
zebra/if_netlink.c
zebra/interface.c
zebra/kernel_netlink.c
zebra/kernel_netlink.h
zebra/kernel_socket.c
zebra/main.c
zebra/redistribute.c
zebra/rib.h
zebra/rt.h
zebra/rt_netlink.c
zebra/rt_netlink.h
zebra/rtread_netlink.c
zebra/rtread_sysctl.c
zebra/rule_netlink.c
zebra/subdir.am
zebra/zapi_msg.c
zebra/zapi_msg.h
zebra/zebra_dplane.c
zebra/zebra_dplane.h
zebra/zebra_evpn.c
zebra/zebra_evpn.h
zebra/zebra_evpn_mac.c
zebra/zebra_evpn_mac.h
zebra/zebra_evpn_mh.c
zebra/zebra_evpn_mh.h
zebra/zebra_evpn_neigh.c
zebra/zebra_evpn_neigh.h
zebra/zebra_fpm.c
zebra/zebra_mpls.c
zebra/zebra_mpls.h
zebra/zebra_mpls_vty.c
zebra/zebra_netns_notify.c
zebra/zebra_pbr.c
zebra/zebra_ptm.c
zebra/zebra_ptm.h
zebra/zebra_pw.c
zebra/zebra_rib.c
zebra/zebra_routemap_nb_config.c
zebra/zebra_srv6_vty.c
zebra/zebra_vrf.c
zebra/zebra_vrf.h
zebra/zebra_vxlan.c
zebra/zebra_vxlan.h
zebra/zserv.c

index e47f245db79a8e2e4d2055809c88c586e7d4a736..1332f7b6a2316b53d317025f61b5c2fa1fc43233 100644 (file)
@@ -4,5 +4,7 @@
 
 ((c-mode . ((indent-tabs-mode . t)
             (show-trailing-whitespace . t)
-            (c-basic-offset . 8)
-            )))
+            (c-basic-offset . 8)))
+ (json-mode . ((js-indent-level 4)))
+ (python-mode . ((python-formatter . black)
+                 (python-fill-column . 88))))
index 9bc5dd7d2241f1b0bdc0613f8a334dc371c13f8a..ce0f70a1a294043f17f989b15b75cdb80f5ce760 100644 (file)
@@ -29,11 +29,33 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/lib/assert \
        $(CPPFLAGS_BASE) \
        # end
+
+# AM_LDFLAGS is used for executables (daemons).  LDFLAGS can be left alone,
+# but if it is changed it should include $(AM_LDFLAGS)
 AM_LDFLAGS = \
+       -export-dynamic \
+       $(AC_LDFLAGS) \
+       $(AC_LDFLAGS_EXEC) \
+       $(SAN_FLAGS) \
+       # end
+
+# libraries need to use libxxx_LDFLAGS = $(LIB_LDFLAGS) -version-info X:Y:Z
+LIB_LDFLAGS = \
        -export-dynamic \
        $(AC_LDFLAGS) \
        $(SAN_FLAGS) \
        # end
+
+# modules need to use xxx_LDFLAGS = $(MODULE_LDFLAGS)
+MODULE_LDFLAGS = \
+       -export-dynamic \
+       -avoid-version \
+       -module \
+       -shared \
+       $(AC_LDFLAGS) \
+       $(SAN_FLAGS) \
+       # end
+
 DEFS = @DEFS@ -DSYSCONFDIR=\"$(sysconfdir)/\" -DCONFDATE=$(CONFDATE)
 
 AR_FLAGS = @AR_FLAGS@
index e6776cb3a20fbe64d84eb0ea39257c91469b6aa8..ccae9bfd0b50e556edf9ef705a8ac0494c5128ea 100644 (file)
@@ -13,7 +13,7 @@ makedepends="ncurses-dev net-snmp-dev gawk texinfo perl
     expat fakeroot flex fortify-headers gdbm git gmp isl json-c-dev kmod
     lddtree libacl libatomic libattr libblkid libburn libbz2 libc-dev
     libcap-dev libcurl libedit libffi libgcc libgomp libisoburn libisofs
-    libltdl libressl libssh2 libstdc++ libtool libuuid libyang-dev
+    libltdl libressl libssh2 libstdc++ libtool libuuid
     linux-headers lzip lzo m4 make mkinitfs mpc1 mpfr4 mtools musl-dev
     ncurses-libs ncurses-terminfo ncurses-terminfo-base patch pax-utils pcre
     perl pkgconf python3 python3-dev readline readline-dev sqlite-libs
@@ -60,7 +60,7 @@ package() {
        cd "$builddir"
        make DESTDIR="$pkgdir" install
 
-       install -Dm644 "$builddir"/tools/etc/frr/daemons "$pkgdir"$_sysconfdir
+       install -Dm644 "$builddir"/tools/etc/frr/daemons "$pkgdir"$_sysconfdir/daemons
        install -d "$pkgdir"/etc/init.d
        ln -s ${_sbindir}/frr "$pkgdir"/etc/init.d/frr
 }
index 43ed97cf17d2152b144f46da81d9cad5854567fa..615ed9fee31a6837b9d442a5dcae308be62c86bd 100644 (file)
@@ -59,15 +59,6 @@ static void babel_interface_free (babel_interface_nfo *bi);
 
 
 static vector babel_enable_if;                 /* enable interfaces (by cmd). */
-static int interface_config_write(struct vty *vty);
-static struct cmd_node babel_interface_node = {
-    .name = "interface",
-    .node = INTERFACE_NODE,
-    .parent_node = CONFIG_NODE,
-    .prompt = "%s(config-if)# ",
-    .config_write = interface_config_write,
-};
-
 
 int
 babel_interface_up (ZAPI_CALLBACK_ARGS)
@@ -1257,8 +1248,7 @@ babel_if_init(void)
     babel_enable_if = vector_init (1);
 
     /* install interface node and commands */
-    install_node(&babel_interface_node);
-    if_cmd_init();
+    if_cmd_init(interface_config_write);
 
     install_element(BABEL_NODE, &babel_network_cmd);
     install_element(BABEL_NODE, &no_babel_network_cmd);
@@ -1372,7 +1362,7 @@ interface_config_write (struct vty *vty)
                 write++;
             }
         }
-        vty_endframe (vty, "!\n");
+        vty_endframe (vty, "exit\n!\n");
         write++;
     }
     return write;
index df1998c4fcc3aa8291693397ce388d98e88cc062..61a800eef4a70dc3181711c7637094c4bbd1a87b 100644 (file)
@@ -183,8 +183,7 @@ main(int argc, char **argv)
          case 0:
            break;
          default:
-           frr_help_exit (1);
-           break;
+           frr_help_exit(1);
          }
     }
 
index b9623b64b5fa56dd97f8c21e8028dbc77f70a3af..f61eac000f86d4d94e525807a5e09663cfe6140c 100644 (file)
@@ -132,6 +132,8 @@ babel_config_write (struct vty *vty)
 
     lines += config_write_distribute (vty, babel_routing_process->distribute_ctx);
 
+    vty_out (vty, "exit\n");
+
     return lines;
 }
 
@@ -819,7 +821,7 @@ babeld_quagga_init(void)
     install_element(BABEL_NODE, &babel_ipv6_distribute_list_cmd);
     install_element(BABEL_NODE, &babel_no_ipv6_distribute_list_cmd);
 
-    vrf_cmd_init(NULL, &babeld_privs);
+    vrf_cmd_init(NULL);
 
     babel_if_init();
 
index 7a2c3cc3aa1305899f3b7b323b3601ec1a381058..188e47905cfef441876b643030da499814d41545 100644 (file)
@@ -364,7 +364,6 @@ int main(int argc, char *argv[])
 
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index 26ff4a758a03a3ac10277007eec78a277a2dab58..384bb26fd7d30295a91a60c834b599602d549d1d 100644 (file)
@@ -101,6 +101,7 @@ void bfd_cli_show_header(struct vty *vty,
 void bfd_cli_show_header_end(struct vty *vty,
                             struct lyd_node *dnode __attribute__((__unused__)))
 {
+       vty_out(vty, "exit\n");
        vty_out(vty, "!\n");
 }
 
@@ -275,6 +276,7 @@ void bfd_cli_show_multi_hop_peer(struct vty *vty,
 void bfd_cli_show_peer_end(struct vty *vty,
                           struct lyd_node *dnode __attribute__((__unused__)))
 {
+       vty_out(vty, " exit\n");
        vty_out(vty, " !\n");
 }
 
index adf408220e036c3aec05c63f3c4adbbb76dd2cc8..f1c953f21d22fc911c7de772139d1c1471e0bdaa 100644 (file)
@@ -789,9 +789,9 @@ static void attr_show_all_iterator(struct hash_bucket *bucket, struct vty *vty)
                inet_ntop(AF_INET6, &attr->srv6_vpn->sid, sid_str, BUFSIZ);
 
        vty_out(vty,
-               "\tflags: %" PRIu64" med: %u local_pref: %u origin: %u weight: %u label: %u sid: %s\n",
-               attr->flag, attr->med, attr->local_pref, attr->origin,
-               attr->weight, attr->label, sid_str);
+               "\tflags: %" PRIu64" distance: %u med: %u local_pref: %u origin: %u weight: %u label: %u sid: %s\n",
+               attr->flag, attr->distance, attr->med, attr->local_pref,
+               attr->origin, attr->weight, attr->label, sid_str);
 }
 
 void attr_show_all(struct vty *vty)
@@ -1497,8 +1497,10 @@ static int bgp_attr_aspath(struct bgp_attr_parser_args *args)
         * peer with AS4 => will get 4Byte ASnums
         * otherwise, will get 16 Bit
         */
-       attr->aspath = aspath_parse(peer->curr, length,
-                                   CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV));
+       attr->aspath = aspath_parse(
+               peer->curr, length,
+               CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV)
+                       && CHECK_FLAG(peer->cap, PEER_CAP_AS4_ADV));
 
        /* In case of IBGP, length will be zero. */
        if (!attr->aspath) {
@@ -2309,8 +2311,10 @@ bgp_attr_ext_communities(struct bgp_attr_parser_args *args)
                                          args->total);
        }
 
-       attr->ecommunity =
-               ecommunity_parse(stream_pnt(peer->curr), length);
+       attr->ecommunity = ecommunity_parse(
+               stream_pnt(peer->curr), length,
+               CHECK_FLAG(peer->flags,
+                          PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE));
        /* XXX: fix ecommunity_parse to use stream API */
        stream_forward_getp(peer->curr, length);
 
@@ -2378,7 +2382,10 @@ bgp_attr_ipv6_ext_communities(struct bgp_attr_parser_args *args)
                                          args->total);
        }
 
-       ipv6_ecomm = ecommunity_parse_ipv6(stream_pnt(peer->curr), length);
+       ipv6_ecomm = ecommunity_parse_ipv6(
+               stream_pnt(peer->curr), length,
+               CHECK_FLAG(peer->flags,
+                          PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE));
        bgp_attr_set_ipv6_ecommunity(attr, ipv6_ecomm);
 
        /* XXX: fix ecommunity_parse to use stream API */
@@ -3745,7 +3752,8 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer,
        struct aspath *aspath;
        int send_as4_path = 0;
        int send_as4_aggregator = 0;
-       bool use32bit = CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV);
+       bool use32bit = CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV)
+                       && CHECK_FLAG(peer->cap, PEER_CAP_AS4_ADV);
 
        if (!bgp)
                bgp = peer->bgp;
index dbc35de80bd1ccbed6d8a08412cec8ac9ddf3ddb..1bc3fd0dbae7226f5f78cfd2735b37b52345fe25 100644 (file)
@@ -2400,6 +2400,8 @@ static int bmp_config_write(struct bgp *bgp, struct vty *vty)
                frr_each (bmp_actives, &bt->actives, ba)
                        vty_out(vty, "  bmp connect %s port %u min-retry %u max-retry %u\n",
                                ba->hostname, ba->port, ba->minretry, ba->maxretry);
+
+               vty_out(vty, " exit\n");
        }
 
        return 0;
index 50122ad7da6cb3edac230e53c699993fb05bb14e..33e3db2c16696163bccade4977fc2c9bbe5fa4df 100644 (file)
@@ -33,6 +33,7 @@
 #include "bgpd/bgp_community.h"
 #include "bgpd/bgp_ecommunity.h"
 #include "bgpd/bgp_lcommunity.h"
+#include "bgpd/bgp_community_alias.h"
 #include "bgpd/bgp_aspath.h"
 #include "bgpd/bgp_regex.h"
 #include "bgpd/bgp_clist.h"
@@ -548,6 +549,8 @@ static bool community_regexp_include(regex_t *reg, struct community *com, int i)
 static bool community_regexp_match(struct community *com, regex_t *reg)
 {
        const char *str;
+       char *regstr;
+       int rv;
 
        /* When there is no communities attribute it is treated as empty
           string.  */
@@ -556,12 +559,14 @@ static bool community_regexp_match(struct community *com, regex_t *reg)
        else
                str = community_str(com, false);
 
+       regstr = bgp_alias2community_str(str);
+
        /* Regular expression match.  */
-       if (regexec(reg, str, 0, NULL, 0) == 0)
-               return true;
+       rv = regexec(reg, regstr, 0, NULL, 0);
 
-       /* No match.  */
-       return false;
+       XFREE(MTYPE_TMP, regstr);
+
+       return rv == 0;
 }
 
 static char *lcommunity_str_get(struct lcommunity *lcom, int i)
@@ -618,6 +623,8 @@ static bool lcommunity_regexp_include(regex_t *reg, struct lcommunity *lcom,
 static bool lcommunity_regexp_match(struct lcommunity *com, regex_t *reg)
 {
        const char *str;
+       char *regstr;
+       int rv;
 
        /* When there is no communities attribute it is treated as empty
           string.  */
@@ -626,12 +633,14 @@ static bool lcommunity_regexp_match(struct lcommunity *com, regex_t *reg)
        else
                str = lcommunity_str(com, false);
 
+       regstr = bgp_alias2community_str(str);
+
        /* Regular expression match.  */
-       if (regexec(reg, str, 0, NULL, 0) == 0)
-               return true;
+       rv = regexec(reg, regstr, 0, NULL, 0);
 
-       /* No match.  */
-       return false;
+       XFREE(MTYPE_TMP, regstr);
+
+       return rv == 0;
 }
 
 
@@ -1372,3 +1381,67 @@ void community_list_terminate(struct community_list_handler *ch)
 
        XFREE(MTYPE_COMMUNITY_LIST_HANDLER, ch);
 }
+
+static int bgp_community_list_vector_walker(struct hash_bucket *bucket,
+                                           void *data)
+{
+       vector *comps = data;
+       struct community_list *list = bucket->data;
+
+       vector_set(*comps, XSTRDUP(MTYPE_COMPLETION, list->name));
+
+       return 1;
+}
+
+static void bgp_community_list_cmd_completion(vector comps,
+                                             struct cmd_token *token)
+{
+       struct community_list_master *cm;
+
+       cm = community_list_master_lookup(bgp_clist, COMMUNITY_LIST_MASTER);
+
+       hash_walk(cm->hash, bgp_community_list_vector_walker, &comps);
+}
+
+static void bgp_lcommunity_list_cmd_completion(vector comps,
+                                              struct cmd_token *token)
+{
+       struct community_list_master *cm;
+
+       cm = community_list_master_lookup(bgp_clist,
+                                         LARGE_COMMUNITY_LIST_MASTER);
+
+       hash_walk(cm->hash, bgp_community_list_vector_walker, &comps);
+}
+
+static void bgp_extcommunity_list_cmd_completion(vector comps,
+                                                struct cmd_token *token)
+{
+       struct community_list_master *cm;
+
+       cm = community_list_master_lookup(bgp_clist, EXTCOMMUNITY_LIST_MASTER);
+
+       hash_walk(cm->hash, bgp_community_list_vector_walker, &comps);
+}
+
+static const struct cmd_variable_handler community_list_handlers[] = {
+       {.tokenname = "COMMUNITY_LIST_NAME",
+        .completions = bgp_community_list_cmd_completion},
+       {.completions = NULL}};
+
+static const struct cmd_variable_handler lcommunity_list_handlers[] = {
+       {.tokenname = "LCOMMUNITY_LIST_NAME",
+        .completions = bgp_lcommunity_list_cmd_completion},
+       {.completions = NULL}};
+
+static const struct cmd_variable_handler extcommunity_list_handlers[] = {
+       {.tokenname = "EXTCOMMUNITY_LIST_NAME",
+        .completions = bgp_extcommunity_list_cmd_completion},
+       {.completions = NULL}};
+
+void bgp_community_list_command_completion_setup(void)
+{
+       cmd_variable_handler_register(community_list_handlers);
+       cmd_variable_handler_register(lcommunity_list_handlers);
+       cmd_variable_handler_register(extcommunity_list_handlers);
+}
index 632e1730cc6c3739e21878253190c0322e0a23e6..bb7c1363b2c4726a45429172d7a864e4e3c56143 100644 (file)
@@ -184,4 +184,6 @@ static inline uint32_t bgp_clist_hash_key(char *name)
        return jhash(name, strlen(name), 0xdeadbeaf);
 }
 
+extern void bgp_community_list_command_completion_setup(void);
+
 #endif /* _QUAGGA_BGP_CLIST_H */
index e91166449a1fb5a0e6bf9bad4113f42269f90e04..b187fd973656bd4df1326af015394c850ffd6fa6 100644 (file)
@@ -544,7 +544,7 @@ struct community *community_dup(struct community *com)
        return new;
 }
 
-/* Retrun string representation of communities attribute. */
+/* Return string representation of communities attribute. */
 char *community_str(struct community *com, bool make_json)
 {
        if (!com)
@@ -594,8 +594,6 @@ bool community_match(const struct community *com1, const struct community *com2)
                return false;
 }
 
-/* If two aspath have same value then return 1 else return 0. This
-   function is used by hash package. */
 bool community_cmp(const struct community *com1, const struct community *com2)
 {
        if (com1 == NULL && com2 == NULL)
index 6e510a0a0440df053a512100edf2c5398bffb9dd..793f3ac9ac1cf3bfaf5fa43c9b98b48af5c6a211 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "memory.h"
 #include "lib/jhash.h"
+#include "frrstr.h"
 
 #include "bgpd/bgpd.h"
 #include "bgpd/bgp_community_alias.h"
@@ -152,3 +153,74 @@ const char *bgp_community2alias(char *community)
 
        return community;
 }
+
+const char *bgp_alias2community(char *alias)
+{
+       struct community_alias ca;
+       struct community_alias *find;
+
+       memset(&ca, 0, sizeof(ca));
+       strlcpy(ca.alias, alias, sizeof(ca.alias));
+
+       find = bgp_ca_alias_lookup(&ca);
+       if (find)
+               return find->community;
+
+       return alias;
+}
+
+/* Communities structs have `->str` which is used
+ * for vty outputs and extended BGP community lists
+ * with regexp.
+ * This is a helper to convert already aliased version
+ * of communities into numerical-only format.
+ */
+char *bgp_alias2community_str(const char *str)
+{
+       char **aliases;
+       char *comstr;
+       int num, i;
+
+       frrstr_split(str, " ", &aliases, &num);
+       const char *communities[num];
+
+       for (i = 0; i < num; i++)
+               communities[i] = bgp_alias2community(aliases[i]);
+
+       comstr = frrstr_join(communities, num, " ");
+
+       for (i = 0; i < num; i++)
+               XFREE(MTYPE_TMP, aliases[i]);
+       XFREE(MTYPE_TMP, aliases);
+
+       return comstr;
+}
+
+static int bgp_community_alias_vector_walker(struct hash_bucket *bucket,
+                                            void *data)
+{
+       vector *comps = data;
+       struct community_alias *alias = bucket->data;
+
+       vector_set(*comps, XSTRDUP(MTYPE_COMPLETION, alias->alias));
+
+       return 1;
+}
+
+static void bgp_community_alias_cmd_completion(vector comps,
+                                              struct cmd_token *token)
+{
+       hash_walk(bgp_ca_alias_hash, bgp_community_alias_vector_walker, &comps);
+}
+
+static const struct cmd_variable_handler community_alias_handlers[] = {
+       {.varname = "alias_name",
+        .completions = bgp_community_alias_cmd_completion},
+       {.tokenname = "ALIAS_NAME",
+        .completions = bgp_community_alias_cmd_completion},
+       {.completions = NULL}};
+
+void bgp_community_alias_command_completion_setup(void)
+{
+       cmd_variable_handler_register(community_alias_handlers);
+}
index c84119a0d6c1473294267292d38d86de7bfe9fc9..57cde0ad4454461eccdcf3e04b9a84c01b2e0ce7 100644 (file)
@@ -42,5 +42,8 @@ extern void bgp_ca_community_delete(struct community_alias *ca);
 extern void bgp_ca_alias_delete(struct community_alias *ca);
 extern int bgp_community_alias_write(struct vty *vty);
 extern const char *bgp_community2alias(char *community);
+extern const char *bgp_alias2community(char *alias);
+extern char *bgp_alias2community_str(const char *str);
+extern void bgp_community_alias_command_completion_setup(void);
 
 #endif /* FRR_BGP_COMMUNITY_ALIAS_H */
index 2a372c0ba4b528f02a99606c4cef3a19d94dcf20..6726dd616039554f8f7b3187b992d47caf27e912 100644 (file)
 #include "bgpd/bgp_advertise.h"
 #include "bgpd/bgp_vty.h"
 
-static void bgp_reuselist_add(struct reuselist *list,
-                             struct bgp_damp_info *info)
-{
-       struct reuselist_node *new_node;
-
-       assert(info);
-       new_node = XCALLOC(MTYPE_BGP_DAMP_REUSELIST, sizeof(*new_node));
-       new_node->info = info;
-       SLIST_INSERT_HEAD(list, new_node, entry);
-}
-
-static void bgp_reuselist_del(struct reuselist *list,
-                             struct reuselist_node **node)
-{
-       if ((*node) == NULL)
-               return;
-       assert(list && node && *node);
-       SLIST_REMOVE(list, (*node), reuselist_node, entry);
-       XFREE(MTYPE_BGP_DAMP_REUSELIST, (*node));
-       *node = NULL;
-}
-
-static void bgp_reuselist_switch(struct reuselist *source,
-                                struct reuselist_node *node,
-                                struct reuselist *target)
-{
-       assert(source && target && node);
-       SLIST_REMOVE(source, node, reuselist_node, entry);
-       SLIST_INSERT_HEAD(target, node, entry);
-}
-
-static void bgp_reuselist_free(struct reuselist *list)
-{
-       struct reuselist_node *rn;
-
-       assert(list);
-       while ((rn = SLIST_FIRST(list)) != NULL)
-               bgp_reuselist_del(list, &rn);
-}
-
-static struct reuselist_node *bgp_reuselist_find(struct reuselist *list,
-                                                struct bgp_damp_info *info)
-{
-       struct reuselist_node *rn;
-
-       assert(list && info);
-       SLIST_FOREACH (rn, list, entry) {
-               if (rn->info == info)
-                       return rn;
-       }
-       return NULL;
-}
+/* Global variable to access damping configuration */
+static struct bgp_damp_config damp[AFI_MAX][SAFI_MAX];
 
-static void bgp_damp_info_unclaim(struct bgp_damp_info *bdi)
-{
-       struct reuselist_node *node;
-
-       assert(bdi && bdi->config);
-       if (bdi->index == BGP_DAMP_NO_REUSE_LIST_INDEX) {
-               node = bgp_reuselist_find(&bdi->config->no_reuse_list, bdi);
-               if (node)
-                       bgp_reuselist_del(&bdi->config->no_reuse_list, &node);
-       } else {
-               node = bgp_reuselist_find(&bdi->config->reuse_list[bdi->index],
-                                         bdi);
-               if (node)
-                       bgp_reuselist_del(&bdi->config->reuse_list[bdi->index],
-                                         &node);
-       }
-       bdi->config = NULL;
-}
-
-static void bgp_damp_info_claim(struct bgp_damp_info *bdi,
-                               struct bgp_damp_config *bdc)
-{
-       assert(bdc && bdi);
-       if (bdi->config == NULL) {
-               bdi->config = bdc;
-               return;
-       }
-       bgp_damp_info_unclaim(bdi);
-       bdi->config = bdc;
-       bdi->afi = bdc->afi;
-       bdi->safi = bdc->safi;
-}
-
-struct bgp_damp_config *get_active_bdc_from_pi(struct bgp_path_info *pi,
-                                              afi_t afi, safi_t safi)
-{
-       if (!pi)
-               return NULL;
-       if (CHECK_FLAG(pi->peer->af_flags[afi][safi],
-                      PEER_FLAG_CONFIG_DAMPENING))
-               return &pi->peer->damp[afi][safi];
-       if (peer_group_active(pi->peer))
-               if (CHECK_FLAG(pi->peer->group->conf->af_flags[afi][safi],
-                              PEER_FLAG_CONFIG_DAMPENING))
-                       return &pi->peer->group->conf->damp[afi][safi];
-       if (CHECK_FLAG(pi->peer->bgp->af_flags[afi][safi],
-                      BGP_CONFIG_DAMPENING))
-               return &pi->peer->bgp->damp[afi][safi];
-       return NULL;
-}
+/* Utility macro to add and delete BGP dampening information to no
+   used list.  */
+#define BGP_DAMP_LIST_ADD(N, A) BGP_PATH_INFO_ADD(N, A, no_reuse_list)
+#define BGP_DAMP_LIST_DEL(N, A) BGP_PATH_INFO_DEL(N, A, no_reuse_list)
 
 /* Calculate reuse list index by penalty value.  */
 static int bgp_reuse_index(int penalty, struct bgp_damp_config *bdc)
 {
        unsigned int i;
-       unsigned int index;
+       int index;
 
        /*
         * reuse_limit can't be zero, this is for Coverity
@@ -168,45 +72,27 @@ static int bgp_reuse_index(int penalty, struct bgp_damp_config *bdc)
 static void bgp_reuse_list_add(struct bgp_damp_info *bdi,
                               struct bgp_damp_config *bdc)
 {
-       bgp_damp_info_claim(bdi, bdc);
-       bdi->index = bgp_reuse_index(bdi->penalty, bdc);
-       bgp_reuselist_add(&bdc->reuse_list[bdi->index], bdi);
-}
+       int index;
 
-/* Delete BGP dampening information from reuse list.  */
-static void bgp_reuse_list_delete(struct bgp_damp_info *bdi,
-                                 struct bgp_damp_config *bdc)
-{
-       struct reuselist *list;
-       struct reuselist_node *rn;
+       index = bdi->index = bgp_reuse_index(bdi->penalty, bdc);
 
-       list = &bdc->reuse_list[bdi->index];
-       rn = bgp_reuselist_find(list, bdi);
-       bgp_damp_info_unclaim(bdi);
-       bgp_reuselist_del(list, &rn);
+       bdi->prev = NULL;
+       bdi->next = bdc->reuse_list[index];
+       if (bdc->reuse_list[index])
+               bdc->reuse_list[index]->prev = bdi;
+       bdc->reuse_list[index] = bdi;
 }
 
-static void bgp_no_reuse_list_add(struct bgp_damp_info *bdi,
+/* Delete BGP dampening information from reuse list.  */
+static void bgp_reuse_list_delete(struct bgp_damp_info *bdi,
                                  struct bgp_damp_config *bdc)
 {
-       bgp_damp_info_claim(bdi, bdc);
-       bdi->index = BGP_DAMP_NO_REUSE_LIST_INDEX;
-       bgp_reuselist_add(&bdc->no_reuse_list, bdi);
-}
-
-static void bgp_no_reuse_list_delete(struct bgp_damp_info *bdi,
-                                    struct bgp_damp_config *bdc)
-{
-       struct reuselist_node *rn;
-
-       assert(bdc && bdi);
-       if (bdi->config == NULL) {
-               bgp_damp_info_unclaim(bdi);
-               return;
-       }
-       bdi->config = NULL;
-       rn = bgp_reuselist_find(&bdc->no_reuse_list, bdi);
-       bgp_reuselist_del(&bdc->no_reuse_list, &rn);
+       if (bdi->next)
+               bdi->next->prev = bdi->prev;
+       if (bdi->prev)
+               bdi->prev->next = bdi->next;
+       else
+               bdc->reuse_list[bdi->index] = bdi->next;
 }
 
 /* Return decayed penalty value.  */
@@ -229,33 +115,32 @@ int bgp_damp_decay(time_t tdiff, int penalty, struct bgp_damp_config *bdc)
    is evaluated.  RFC2439 Section 4.8.7.  */
 static int bgp_reuse_timer(struct thread *t)
 {
-       struct bgp_damp_config *bdc = THREAD_ARG(t);
        struct bgp_damp_info *bdi;
-       struct reuselist plist;
-       struct reuselist_node *node;
-       struct bgp *bgp;
+       struct bgp_damp_info *next;
        time_t t_now, t_diff;
 
+       struct bgp_damp_config *bdc = THREAD_ARG(t);
+
+       bdc->t_reuse = NULL;
        thread_add_timer(bm->master, bgp_reuse_timer, bdc, DELTA_REUSE,
                         &bdc->t_reuse);
 
        t_now = bgp_clock();
 
-       /* 1.  save a pointer to the current queue head and zero the list head
-        * list head entry. */
-       assert(bdc->reuse_offset < bdc->reuse_list_size);
-       plist = bdc->reuse_list[bdc->reuse_offset];
-       SLIST_INIT(&bdc->reuse_list[bdc->reuse_offset]);
+       /* 1.  save a pointer to the current zeroth queue head and zero the
+          list head entry.  */
+       bdi = bdc->reuse_list[bdc->reuse_offset];
+       bdc->reuse_list[bdc->reuse_offset] = NULL;
 
        /* 2.  set offset = modulo reuse-list-size ( offset + 1 ), thereby
           rotating the circular queue of list-heads.  */
        bdc->reuse_offset = (bdc->reuse_offset + 1) % bdc->reuse_list_size;
-       assert(bdc->reuse_offset < bdc->reuse_list_size);
 
        /* 3. if ( the saved list head pointer is non-empty ) */
-       while ((node = SLIST_FIRST(&plist)) != NULL) {
-               bdi = node->info;
-               bgp = bdi->path->peer->bgp;
+       for (; bdi; bdi = next) {
+               struct bgp *bgp = bdi->path->peer->bgp;
+
+               next = bdi->next;
 
                /* Set t-diff = t-now - t-updated.  */
                t_diff = t_now - bdi->t_updated;
@@ -284,27 +169,16 @@ static int bgp_reuse_timer(struct thread *t)
                                            bdi->safi);
                        }
 
-                       if (bdi->penalty <= bdc->reuse_limit / 2.0) {
-                               bgp_damp_info_free(&bdi, bdc, 1, bdi->afi,
-                                                  bdi->safi);
-                               bgp_reuselist_del(&plist, &node);
-                       } else {
-                               node->info->index =
-                                       BGP_DAMP_NO_REUSE_LIST_INDEX;
-                               bgp_reuselist_switch(&plist, node,
-                                                    &bdc->no_reuse_list);
-                       }
-               } else {
+                       if (bdi->penalty <= bdc->reuse_limit / 2.0)
+                               bgp_damp_info_free(bdi, 1, bdc->afi, bdc->safi);
+                       else
+                               BGP_DAMP_LIST_ADD(bdc, bdi);
+               } else
                        /* Re-insert into another list (See RFC2439 Section
                         * 4.8.6).  */
-                       bdi->index = bgp_reuse_index(bdi->penalty, bdc);
-                       bgp_reuselist_switch(&plist, node,
-                                            &bdc->reuse_list[bdi->index]);
-               }
+                       bgp_reuse_list_add(bdi, bdc);
        }
 
-       assert(SLIST_EMPTY(&plist));
-
        return 0;
 }
 
@@ -315,13 +189,10 @@ int bgp_damp_withdraw(struct bgp_path_info *path, struct bgp_dest *dest,
        time_t t_now;
        struct bgp_damp_info *bdi = NULL;
        unsigned int last_penalty = 0;
-       struct bgp_damp_config *bdc;
-
-       bdc = get_active_bdc_from_pi(path, afi, safi);
-       if (!bdc)
-               return BGP_DAMP_USED;
+       struct bgp_damp_config *bdc = &damp[afi][safi];
 
        t_now = bgp_clock();
+
        /* Processing Unreachable Messages.  */
        if (path->extra)
                bdi = path->extra->damp_info;
@@ -343,13 +214,12 @@ int bgp_damp_withdraw(struct bgp_path_info *path, struct bgp_dest *dest,
                bdi->flap = 1;
                bdi->start_time = t_now;
                bdi->suppress_time = 0;
-               bdi->index = BGP_DAMP_NO_REUSE_LIST_INDEX;
+               bdi->index = -1;
                bdi->afi = afi;
                bdi->safi = safi;
                (bgp_path_info_extra_get(path))->damp_info = bdi;
-               bgp_no_reuse_list_add(bdi, bdc);
+               BGP_DAMP_LIST_ADD(bdc, bdi);
        } else {
-               bgp_damp_info_claim(bdi, bdc);
                last_penalty = bdi->penalty;
 
                /* 1. Set t-diff = t-now - t-updated.  */
@@ -375,7 +245,7 @@ int bgp_damp_withdraw(struct bgp_path_info *path, struct bgp_dest *dest,
        /* Remove the route from a reuse list if it is on one.  */
        if (CHECK_FLAG(bdi->path->flags, BGP_PATH_DAMPED)) {
                /* If decay rate isn't equal to 0, reinsert brn. */
-               if (bdi->penalty != last_penalty) {
+               if (bdi->penalty != last_penalty && bdi->index >= 0) {
                        bgp_reuse_list_delete(bdi, bdc);
                        bgp_reuse_list_add(bdi, bdc);
                }
@@ -387,9 +257,10 @@ int bgp_damp_withdraw(struct bgp_path_info *path, struct bgp_dest *dest,
        if (bdi->penalty >= bdc->suppress_value) {
                bgp_path_info_set_flag(dest, path, BGP_PATH_DAMPED);
                bdi->suppress_time = t_now;
-               bgp_no_reuse_list_delete(bdi, bdc);
+               BGP_DAMP_LIST_DEL(bdc, bdi);
                bgp_reuse_list_add(bdi, bdc);
        }
+
        return BGP_DAMP_USED;
 }
 
@@ -399,10 +270,7 @@ int bgp_damp_update(struct bgp_path_info *path, struct bgp_dest *dest,
        time_t t_now;
        struct bgp_damp_info *bdi;
        int status;
-       struct bgp_damp_config *bdc;
-
-       bdc = get_active_bdc_from_pi(path, afi, safi);
-       assert(bdc);
+       struct bgp_damp_config *bdc = &damp[afi][safi];
 
        if (!path->extra || !((bdi = path->extra->damp_info)))
                return BGP_DAMP_USED;
@@ -421,7 +289,7 @@ int bgp_damp_update(struct bgp_path_info *path, struct bgp_dest *dest,
                 && (bdi->penalty < bdc->reuse_limit)) {
                bgp_path_info_unset_flag(dest, path, BGP_PATH_DAMPED);
                bgp_reuse_list_delete(bdi, bdc);
-               bgp_no_reuse_list_add(bdi, bdc);
+               BGP_DAMP_LIST_ADD(bdc, bdi);
                bdi->suppress_time = 0;
                status = BGP_DAMP_USED;
        } else
@@ -429,29 +297,36 @@ int bgp_damp_update(struct bgp_path_info *path, struct bgp_dest *dest,
 
        if (bdi->penalty > bdc->reuse_limit / 2.0)
                bdi->t_updated = t_now;
-       else {
-               bgp_damp_info_unclaim(bdi);
-               bgp_damp_info_free(&bdi, bdc, 0, afi, safi);
-       }
+       else
+               bgp_damp_info_free(bdi, 0, afi, safi);
 
        return status;
 }
 
-void bgp_damp_info_free(struct bgp_damp_info **bdi, struct bgp_damp_config *bdc,
-                       int withdraw, afi_t afi, safi_t safi)
+void bgp_damp_info_free(struct bgp_damp_info *bdi, int withdraw, afi_t afi,
+                       safi_t safi)
 {
-       assert(bdc && bdi && *bdi);
+       struct bgp_path_info *path;
+       struct bgp_damp_config *bdc = &damp[afi][safi];
 
-       if ((*bdi)->path == NULL) {
-               XFREE(MTYPE_BGP_DAMP_INFO, (*bdi));
+       if (!bdi)
                return;
-       }
 
-       (*bdi)->path->extra->damp_info = NULL;
-       bgp_path_info_unset_flag((*bdi)->dest, (*bdi)->path,
+       path = bdi->path;
+       path->extra->damp_info = NULL;
+
+       if (CHECK_FLAG(path->flags, BGP_PATH_DAMPED))
+               bgp_reuse_list_delete(bdi, bdc);
+       else
+               BGP_DAMP_LIST_DEL(bdc, bdi);
+
+       bgp_path_info_unset_flag(bdi->dest, path,
                                 BGP_PATH_HISTORY | BGP_PATH_DAMPED);
-       if ((*bdi)->lastrecord == BGP_RECORD_WITHDRAW && withdraw)
-               bgp_path_info_delete((*bdi)->dest, (*bdi)->path);
+
+       if (bdi->lastrecord == BGP_RECORD_WITHDRAW && withdraw)
+               bgp_path_info_delete(bdi->dest, path);
+
+       XFREE(MTYPE_BGP_DAMP_INFO, bdi);
 }
 
 static void bgp_damp_parameter_set(int hlife, int reuse, int sup, int maxsup,
@@ -494,7 +369,8 @@ static void bgp_damp_parameter_set(int hlife, int reuse, int sup, int maxsup,
 
        bdc->reuse_list =
                XCALLOC(MTYPE_BGP_DAMP_ARRAY,
-                       bdc->reuse_list_size * sizeof(struct reuselist));
+                       bdc->reuse_list_size * sizeof(struct bgp_reuse_node *));
+
        /* Reuse-array computations */
        bdc->reuse_index = XCALLOC(MTYPE_BGP_DAMP_ARRAY,
                                   sizeof(int) * bdc->reuse_index_size);
@@ -521,7 +397,7 @@ static void bgp_damp_parameter_set(int hlife, int reuse, int sup, int maxsup,
 int bgp_damp_enable(struct bgp *bgp, afi_t afi, safi_t safi, time_t half,
                    unsigned int reuse, unsigned int suppress, time_t max)
 {
-       struct bgp_damp_config *bdc = &bgp->damp[afi][safi];
+       struct bgp_damp_config *bdc = &damp[afi][safi];
 
        if (CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)) {
                if (bdc->half_life == half && bdc->reuse_limit == reuse
@@ -533,8 +409,6 @@ int bgp_damp_enable(struct bgp *bgp, afi_t afi, safi_t safi, time_t half,
 
        SET_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING);
        bgp_damp_parameter_set(half, reuse, suppress, max, bdc);
-       bdc->afi = afi;
-       bdc->safi = safi;
 
        /* Register reuse timer.  */
        thread_add_timer(bm->master, bgp_reuse_timer, bdc, DELTA_REUSE,
@@ -543,38 +417,8 @@ int bgp_damp_enable(struct bgp *bgp, afi_t afi, safi_t safi, time_t half,
        return 0;
 }
 
-/* Clean all the bgp_damp_info stored in reuse_list and no_reuse_list. */
-void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc,
-                        afi_t afi, safi_t safi)
+static void bgp_damp_config_clean(struct bgp_damp_config *bdc)
 {
-       struct bgp_damp_info *bdi;
-       struct reuselist_node *rn;
-       struct reuselist *list;
-       unsigned int i;
-
-       bdc->reuse_offset = 0;
-       for (i = 0; i < bdc->reuse_list_size; ++i) {
-               list = &bdc->reuse_list[i];
-               while ((rn = SLIST_FIRST(list)) != NULL) {
-                       bdi = rn->info;
-                       if (bdi->lastrecord == BGP_RECORD_UPDATE) {
-                               bgp_aggregate_increment(bgp, &bdi->dest->p,
-                                                       bdi->path, bdi->afi,
-                                                       bdi->safi);
-                               bgp_process(bgp, bdi->dest, bdi->afi,
-                                           bdi->safi);
-                       }
-                       bgp_reuselist_del(list, &rn);
-                       bgp_damp_info_free(&bdi, bdc, 1, afi, safi);
-               }
-       }
-
-       while ((rn = SLIST_FIRST(&bdc->no_reuse_list)) != NULL) {
-               bdi = rn->info;
-               bgp_reuselist_del(&bdc->no_reuse_list, &rn);
-               bgp_damp_info_free(&bdi, bdc, 1, afi, safi);
-       }
-
        /* Free decay array */
        XFREE(MTYPE_BGP_DAMP_ARRAY, bdc->decay_array);
        bdc->decay_array_size = 0;
@@ -584,81 +428,96 @@ void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc,
        bdc->reuse_index_size = 0;
 
        /* Free reuse list array. */
-       for (i = 0; i < bdc->reuse_list_size; ++i)
-               bgp_reuselist_free(&bdc->reuse_list[i]);
-
        XFREE(MTYPE_BGP_DAMP_ARRAY, bdc->reuse_list);
        bdc->reuse_list_size = 0;
-
-       THREAD_OFF(bdc->t_reuse);
 }
 
-/* Disable route flap dampening for a bgp instance.
- *
- * Please note that this function also gets used to free memory when deleting a
- * bgp instance.
- */
-int bgp_damp_disable(struct bgp *bgp, afi_t afi, safi_t safi)
+/* Clean all the bgp_damp_info stored in reuse_list. */
+void bgp_damp_info_clean(afi_t afi, safi_t safi)
 {
-       struct bgp_damp_config *bdc;
+       unsigned int i;
+       struct bgp_damp_info *bdi, *next;
+       struct bgp_damp_config *bdc = &damp[afi][safi];
 
-       bdc = &bgp->damp[afi][safi];
-       if (!bdc)
-               return 0;
+       bdc->reuse_offset = 0;
+
+       for (i = 0; i < bdc->reuse_list_size; i++) {
+               if (!bdc->reuse_list[i])
+                       continue;
 
+               for (bdi = bdc->reuse_list[i]; bdi; bdi = next) {
+                       next = bdi->next;
+                       bgp_damp_info_free(bdi, 1, afi, safi);
+               }
+               bdc->reuse_list[i] = NULL;
+       }
+
+       for (bdi = bdc->no_reuse_list; bdi; bdi = next) {
+               next = bdi->next;
+               bgp_damp_info_free(bdi, 1, afi, safi);
+       }
+       bdc->no_reuse_list = NULL;
+}
+
+int bgp_damp_disable(struct bgp *bgp, afi_t afi, safi_t safi)
+{
+       struct bgp_damp_config *bdc = &damp[afi][safi];
        /* If it wasn't enabled, there's nothing to do. */
        if (!CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING))
                return 0;
 
        /* Cancel reuse event. */
-       thread_cancel(&bdc->t_reuse);
+       thread_cancel(&(bdc->t_reuse));
 
        /* Clean BGP dampening information.  */
-       bgp_damp_info_clean(bgp, bdc, afi, safi);
+       bgp_damp_info_clean(afi, safi);
 
-       UNSET_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING);
+       /* Clear configuration */
+       bgp_damp_config_clean(bdc);
 
+       UNSET_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING);
        return 0;
 }
 
-void bgp_config_write_damp(struct vty *vty, struct bgp *bgp, afi_t afi,
-                          safi_t safi)
+void bgp_config_write_damp(struct vty *vty, afi_t afi, safi_t safi)
 {
-       struct bgp_damp_config *bdc;
-
-       bdc = &bgp->damp[afi][safi];
-       if (bdc->half_life == DEFAULT_HALF_LIFE * 60
-           && bdc->reuse_limit == DEFAULT_REUSE
-           && bdc->suppress_value == DEFAULT_SUPPRESS
-           && bdc->max_suppress_time == bdc->half_life * 4)
+       if (damp[afi][safi].half_life == DEFAULT_HALF_LIFE * 60
+           && damp[afi][safi].reuse_limit == DEFAULT_REUSE
+           && damp[afi][safi].suppress_value == DEFAULT_SUPPRESS
+           && damp[afi][safi].max_suppress_time
+                      == damp[afi][safi].half_life * 4)
                vty_out(vty, "  bgp dampening\n");
-       else if (bdc->half_life != DEFAULT_HALF_LIFE * 60
-                && bdc->reuse_limit == DEFAULT_REUSE
-                && bdc->suppress_value == DEFAULT_SUPPRESS
-                && bdc->max_suppress_time == bdc->half_life * 4)
-               vty_out(vty, "  bgp dampening %lld\n", bdc->half_life / 60LL);
+       else if (damp[afi][safi].half_life != DEFAULT_HALF_LIFE * 60
+                && damp[afi][safi].reuse_limit == DEFAULT_REUSE
+                && damp[afi][safi].suppress_value == DEFAULT_SUPPRESS
+                && damp[afi][safi].max_suppress_time
+                           == damp[afi][safi].half_life * 4)
+               vty_out(vty, "  bgp dampening %lld\n",
+                       damp[afi][safi].half_life / 60LL);
        else
                vty_out(vty, "  bgp dampening %lld %d %d %lld\n",
-                       bdc->half_life / 60LL, bdc->reuse_limit,
-                       bdc->suppress_value, bdc->max_suppress_time / 60LL);
+                       damp[afi][safi].half_life / 60LL,
+                       damp[afi][safi].reuse_limit,
+                       damp[afi][safi].suppress_value,
+                       damp[afi][safi].max_suppress_time / 60LL);
 }
 
-static const char *bgp_get_reuse_time(struct bgp_damp_config *bdc,
-                                     unsigned int penalty, char *buf,
-                                     size_t len, bool use_json,
-                                     json_object *json)
+static const char *bgp_get_reuse_time(unsigned int penalty, char *buf,
+                                     size_t len, afi_t afi, safi_t safi,
+                                     bool use_json, json_object *json)
 {
        time_t reuse_time = 0;
        struct tm tm;
        int time_store = 0;
 
-       if (penalty > bdc->reuse_limit) {
+       if (penalty > damp[afi][safi].reuse_limit) {
                reuse_time = (int)(DELTA_T
-                                  * ((log((double)bdc->reuse_limit / penalty))
-                                     / (log(bdc->decay_array[1]))));
+                                  * ((log((double)damp[afi][safi].reuse_limit
+                                          / penalty))
+                                     / (log(damp[afi][safi].decay_array[1]))));
 
-               if (reuse_time > bdc->max_suppress_time)
-                       reuse_time = bdc->max_suppress_time;
+               if (reuse_time > damp[afi][safi].max_suppress_time)
+                       reuse_time = damp[afi][safi].max_suppress_time;
 
                gmtime_r(&reuse_time, &tm);
        } else
@@ -710,15 +569,14 @@ static const char *bgp_get_reuse_time(struct bgp_damp_config *bdc,
        return buf;
 }
 
-void bgp_damp_info_vty(struct vty *vty, struct bgp *bgp,
-                      struct bgp_path_info *path, afi_t afi, safi_t safi,
-                      json_object *json_path)
+void bgp_damp_info_vty(struct vty *vty, struct bgp_path_info *path, afi_t afi,
+                      safi_t safi, json_object *json_path)
 {
        struct bgp_damp_info *bdi;
        time_t t_now, t_diff;
        char timebuf[BGP_UPTIME_LEN];
        int penalty;
-       struct bgp_damp_config *bdc = &bgp->damp[afi][safi];
+       struct bgp_damp_config *bdc = &damp[afi][safi];
 
        if (!path->extra)
                return;
@@ -744,8 +602,8 @@ void bgp_damp_info_vty(struct vty *vty, struct bgp *bgp,
 
                if (CHECK_FLAG(path->flags, BGP_PATH_DAMPED)
                    && !CHECK_FLAG(path->flags, BGP_PATH_HISTORY))
-                       bgp_get_reuse_time(bdc, penalty, timebuf,
-                                          BGP_UPTIME_LEN, 1, json_path);
+                       bgp_get_reuse_time(penalty, timebuf, BGP_UPTIME_LEN,
+                                          afi, safi, 1, json_path);
        } else {
                vty_out(vty,
                        "      Dampinfo: penalty %d, flapped %d times in %s",
@@ -756,15 +614,14 @@ void bgp_damp_info_vty(struct vty *vty, struct bgp *bgp,
                if (CHECK_FLAG(path->flags, BGP_PATH_DAMPED)
                    && !CHECK_FLAG(path->flags, BGP_PATH_HISTORY))
                        vty_out(vty, ", reuse in %s",
-                               bgp_get_reuse_time(bdc, penalty, timebuf,
-                                                  BGP_UPTIME_LEN, 0,
+                               bgp_get_reuse_time(penalty, timebuf,
+                                                  BGP_UPTIME_LEN, afi, safi, 0,
                                                   json_path));
 
                vty_out(vty, "\n");
        }
 }
 
-
 const char *bgp_damp_reuse_time_vty(struct vty *vty, struct bgp_path_info *path,
                                    char *timebuf, size_t len, afi_t afi,
                                    safi_t safi, bool use_json,
@@ -773,11 +630,7 @@ const char *bgp_damp_reuse_time_vty(struct vty *vty, struct bgp_path_info *path,
        struct bgp_damp_info *bdi;
        time_t t_now, t_diff;
        int penalty;
-       struct bgp_damp_config *bdc;
-
-       bdc = get_active_bdc_from_pi(path, afi, safi);
-       if (!bdc)
-               return NULL;
+       struct bgp_damp_config *bdc = &damp[afi][safi];
 
        if (!path->extra)
                return NULL;
@@ -787,7 +640,7 @@ const char *bgp_damp_reuse_time_vty(struct vty *vty, struct bgp_path_info *path,
 
        /* If dampening is not enabled or there is no dampening information,
           return immediately.  */
-       if (!bdi)
+       if (!bdc || !bdi)
                return NULL;
 
        /* Calculate new penalty.  */
@@ -795,23 +648,24 @@ const char *bgp_damp_reuse_time_vty(struct vty *vty, struct bgp_path_info *path,
        t_diff = t_now - bdi->t_updated;
        penalty = bgp_damp_decay(t_diff, bdi->penalty, bdc);
 
-       return bgp_get_reuse_time(bdc, penalty, timebuf, len, use_json, json);
+       return bgp_get_reuse_time(penalty, timebuf, len, afi, safi, use_json,
+                                 json);
 }
 
-
 static int bgp_print_dampening_parameters(struct bgp *bgp, struct vty *vty,
                                          afi_t afi, safi_t safi)
 {
-       struct bgp_damp_config *bdc;
        if (CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)) {
-               bdc = &bgp->damp[afi][safi];
                vty_out(vty, "Half-life time: %lld min\n",
-                       (long long)bdc->half_life / 60);
-               vty_out(vty, "Reuse penalty: %d\n", bdc->reuse_limit);
-               vty_out(vty, "Suppress penalty: %d\n", bdc->suppress_value);
+                       (long long)damp[afi][safi].half_life / 60);
+               vty_out(vty, "Reuse penalty: %d\n",
+                       damp[afi][safi].reuse_limit);
+               vty_out(vty, "Suppress penalty: %d\n",
+                       damp[afi][safi].suppress_value);
                vty_out(vty, "Max suppress time: %lld min\n",
-                       (long long)bdc->max_suppress_time / 60);
-               vty_out(vty, "Max suppress penalty: %u\n", bdc->ceiling);
+                       (long long)damp[afi][safi].max_suppress_time / 60);
+               vty_out(vty, "Max suppress penalty: %u\n",
+                       damp[afi][safi].ceiling);
                vty_out(vty, "\n");
        } else
                vty_out(vty, "dampening not enabled for %s\n",
@@ -824,8 +678,8 @@ int bgp_show_dampening_parameters(struct vty *vty, afi_t afi, safi_t safi,
                                  uint16_t show_flags)
 {
        struct bgp *bgp;
-
        bgp = bgp_get_default();
+
        if (bgp == NULL) {
                vty_out(vty, "No BGP process is configured\n");
                return CMD_WARNING;
@@ -864,132 +718,3 @@ int bgp_show_dampening_parameters(struct vty *vty, afi_t afi, safi_t safi,
        }
        return CMD_SUCCESS;
 }
-
-void bgp_peer_damp_enable(struct peer *peer, afi_t afi, safi_t safi,
-                         time_t half, unsigned int reuse,
-                         unsigned int suppress, time_t max)
-{
-       struct bgp_damp_config *bdc;
-
-       if (!peer)
-               return;
-       bdc = &peer->damp[afi][safi];
-       if (peer_af_flag_check(peer, afi, safi, PEER_FLAG_CONFIG_DAMPENING)) {
-               if (bdc->half_life == half && bdc->reuse_limit == reuse
-                   && bdc->suppress_value == suppress
-                   && bdc->max_suppress_time == max)
-                       return;
-               bgp_peer_damp_disable(peer, afi, safi);
-       }
-       SET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_CONFIG_DAMPENING);
-       bgp_damp_parameter_set(half, reuse, suppress, max, bdc);
-       bdc->afi = afi;
-       bdc->safi = safi;
-       thread_add_timer(bm->master, bgp_reuse_timer, bdc, DELTA_REUSE,
-                        &bdc->t_reuse);
-}
-
-/* Disable route flap dampening for a peer.
- *
- * Please note that this function also gets used to free memory when deleting a
- * peer or peer group.
- */
-void bgp_peer_damp_disable(struct peer *peer, afi_t afi, safi_t safi)
-{
-       struct bgp_damp_config *bdc;
-
-       if (!peer_af_flag_check(peer, afi, safi, PEER_FLAG_CONFIG_DAMPENING))
-               return;
-       bdc = &peer->damp[afi][safi];
-       if (!bdc)
-               return;
-       bgp_damp_info_clean(peer->bgp, bdc, afi, safi);
-       UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_CONFIG_DAMPENING);
-}
-
-void bgp_config_write_peer_damp(struct vty *vty, struct peer *peer, afi_t afi,
-                               safi_t safi)
-{
-       struct bgp_damp_config *bdc;
-
-       bdc = &peer->damp[afi][safi];
-       if (bdc->half_life == DEFAULT_HALF_LIFE * 60
-           && bdc->reuse_limit == DEFAULT_REUSE
-           && bdc->suppress_value == DEFAULT_SUPPRESS
-           && bdc->max_suppress_time == bdc->half_life * 4)
-               vty_out(vty, "  neighbor %s dampening\n", peer->host);
-       else if (bdc->half_life != DEFAULT_HALF_LIFE * 60
-                && bdc->reuse_limit == DEFAULT_REUSE
-                && bdc->suppress_value == DEFAULT_SUPPRESS
-                && bdc->max_suppress_time == bdc->half_life * 4)
-               vty_out(vty, "  neighbor %s dampening %lld\n", peer->host,
-                       bdc->half_life / 60LL);
-       else
-               vty_out(vty, "  neighbor %s dampening %lld %d %d %lld\n",
-                       peer->host, bdc->half_life / 60LL, bdc->reuse_limit,
-                       bdc->suppress_value, bdc->max_suppress_time / 60LL);
-}
-
-static void bgp_print_peer_dampening_parameters(struct vty *vty,
-                                               struct peer *peer, afi_t afi,
-                                               safi_t safi, bool use_json,
-                                               json_object *json)
-{
-       struct bgp_damp_config *bdc;
-
-       if (!peer)
-               return;
-       if (CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_CONFIG_DAMPENING)) {
-               bdc = &peer->damp[afi][safi];
-               if (!bdc)
-                       return;
-               if (use_json) {
-                       json_object_int_add(json, "halfLifeSecs",
-                                           bdc->half_life);
-                       json_object_int_add(json, "reusePenalty",
-                                           bdc->reuse_limit);
-                       json_object_int_add(json, "suppressPenalty",
-                                           bdc->suppress_value);
-                       json_object_int_add(json, "maxSuppressTimeSecs",
-                                           bdc->max_suppress_time);
-                       json_object_int_add(json, "maxSuppressPenalty",
-                                           bdc->ceiling);
-               } else {
-                       vty_out(vty, "Half-life time: %lld min\n",
-                               (long long)bdc->half_life / 60);
-                       vty_out(vty, "Reuse penalty: %d\n", bdc->reuse_limit);
-                       vty_out(vty, "Suppress penalty: %d\n",
-                               bdc->suppress_value);
-                       vty_out(vty, "Max suppress time: %lld min\n",
-                               (long long)bdc->max_suppress_time / 60);
-                       vty_out(vty, "Max suppress penalty: %u\n",
-                               bdc->ceiling);
-                       vty_out(vty, "\n");
-               }
-       } else if (!use_json)
-               vty_out(vty, "neighbor dampening not enabled for %s\n",
-                       get_afi_safi_str(afi, safi, false));
-}
-
-void bgp_show_peer_dampening_parameters(struct vty *vty, struct peer *peer,
-                                       afi_t afi, safi_t safi, bool use_json)
-{
-       json_object *json;
-
-       if (use_json) {
-               json = json_object_new_object();
-               json_object_string_add(json, "addressFamily",
-                                      get_afi_safi_str(afi, safi, false));
-               bgp_print_peer_dampening_parameters(vty, peer, afi, safi, true,
-                                                   json);
-               vty_out(vty, "%s\n",
-                       json_object_to_json_string_ext(
-                               json, JSON_C_TO_STRING_PRETTY));
-               json_object_free(json);
-       } else {
-               vty_out(vty, "\nFor address family: %s\n",
-                       get_afi_safi_str(afi, safi, false));
-               bgp_print_peer_dampening_parameters(vty, peer, afi, safi, false,
-                                                   NULL);
-       }
-}
index c03a0cc5c972a58eee1e3a34802caba416acc5b8..0c70abef84da5a5f9176af5adc7b28eee11e6c0b 100644 (file)
 
 /* Structure maintained on a per-route basis. */
 struct bgp_damp_info {
+       /* Doubly linked list.  This information must be linked to
+          reuse_list or no_reuse_list.  */
+       struct bgp_damp_info *next;
+       struct bgp_damp_info *prev;
+
        /* Figure-of-merit.  */
        unsigned int penalty;
 
@@ -40,9 +45,6 @@ struct bgp_damp_info {
        /* Time of route start to be suppressed.  */
        time_t suppress_time;
 
-       /* Back reference to associated dampening configuration. */
-       struct bgp_damp_config *config;
-
        /* Back reference to bgp_path_info. */
        struct bgp_path_info *path;
 
@@ -51,8 +53,6 @@ struct bgp_damp_info {
 
        /* Current index in the reuse_list. */
        int index;
-#define BGP_DAMP_NO_REUSE_LIST_INDEX                                           \
-       (-1) /* index for elements on no_reuse_list */
 
        /* Last time message type. */
        uint8_t lastrecord;
@@ -63,13 +63,6 @@ struct bgp_damp_info {
        safi_t safi;
 };
 
-struct reuselist_node {
-       SLIST_ENTRY(reuselist_node) entry;
-       struct bgp_damp_info *info;
-};
-
-SLIST_HEAD(reuselist, reuselist_node);
-
 /* Specified parameter set configuration. */
 struct bgp_damp_config {
        /* Value over which routes suppressed.  */
@@ -107,11 +100,11 @@ struct bgp_damp_config {
        int *reuse_index;
 
        /* Reuse list array per-set based. */
-       struct reuselist *reuse_list;
-       unsigned int reuse_offset;
+       struct bgp_damp_info **reuse_list;
+       int reuse_offset;
 
        /* All dampening information which is not on reuse list.  */
-       struct reuselist no_reuse_list;
+       struct bgp_damp_info *no_reuse_list;
 
        /* Reuse timer thread per-set base. */
        struct thread *t_reuse;
@@ -139,8 +132,6 @@ struct bgp_damp_config {
 #define REUSE_LIST_SIZE          256
 #define REUSE_ARRAY_SIZE        1024
 
-extern struct bgp_damp_config *get_active_bdc_from_pi(struct bgp_path_info *pi,
-                                                     afi_t afi, safi_t safi);
 extern int bgp_damp_enable(struct bgp *, afi_t, safi_t, time_t, unsigned int,
                           unsigned int, time_t);
 extern int bgp_damp_disable(struct bgp *, afi_t, safi_t);
@@ -148,18 +139,13 @@ extern int bgp_damp_withdraw(struct bgp_path_info *path, struct bgp_dest *dest,
                             afi_t afi, safi_t safi, int attr_change);
 extern int bgp_damp_update(struct bgp_path_info *path, struct bgp_dest *dest,
                           afi_t afi, safi_t saff);
-extern void bgp_damp_info_free(struct bgp_damp_info **path,
-                              struct bgp_damp_config *bdc, int withdraw,
+extern void bgp_damp_info_free(struct bgp_damp_info *path, int withdraw,
                               afi_t afi, safi_t safi);
-extern void bgp_damp_info_clean(struct bgp *bgp, struct bgp_damp_config *bdc,
-                               afi_t afi, safi_t safi);
-extern void bgp_damp_config_clean(struct bgp_damp_config *bdc);
+extern void bgp_damp_info_clean(afi_t afi, safi_t safi);
 extern int bgp_damp_decay(time_t, int, struct bgp_damp_config *damp);
-extern void bgp_config_write_damp(struct vty *vty, struct bgp *bgp, afi_t afi,
-                                 safi_t safi);
-extern void bgp_damp_info_vty(struct vty *vty, struct bgp *bgp,
-                             struct bgp_path_info *path, afi_t afi,
-                             safi_t safi, json_object *json_path);
+extern void bgp_config_write_damp(struct vty *, afi_t afi, safi_t safi);
+extern void bgp_damp_info_vty(struct vty *vty, struct bgp_path_info *path,
+                             afi_t afi, safi_t safi, json_object *json_path);
 extern const char *bgp_damp_reuse_time_vty(struct vty *vty,
                                           struct bgp_path_info *path,
                                           char *timebuf, size_t len, afi_t afi,
@@ -167,14 +153,5 @@ extern const char *bgp_damp_reuse_time_vty(struct vty *vty,
                                           json_object *json);
 extern int bgp_show_dampening_parameters(struct vty *vty, afi_t, safi_t,
                                         uint16_t);
-extern void bgp_peer_damp_enable(struct peer *peer, afi_t afi, safi_t safi,
-                                time_t half, unsigned int reuse,
-                                unsigned int suppress, time_t max);
-extern void bgp_peer_damp_disable(struct peer *peer, afi_t afi, safi_t safi);
-extern void bgp_config_write_peer_damp(struct vty *vty, struct peer *peer,
-                                      afi_t afi, safi_t safi);
-extern void bgp_show_peer_dampening_parameters(struct vty *vty,
-                                              struct peer *peer, afi_t afi,
-                                              safi_t safi, bool use_json);
 
 #endif /* _QUAGGA_BGP_DAMP_H */
index 3a951e6e80c2ab1a42140086d7a02ef740542d2e..1e95d401aace2739ebc73898256a8b5ba7a36357 100644 (file)
@@ -201,6 +201,7 @@ ecommunity_uniq_sort_internal(struct ecommunity *ecom,
 
        new = ecommunity_new();
        new->unit_size = ecom_size;
+       new->disable_ieee_floating = ecom->disable_ieee_floating;
 
        for (i = 0; i < ecom->size; i++) {
                eval = (void *)(ecom->val + (i * ecom_size));
@@ -220,8 +221,9 @@ struct ecommunity *ecommunity_uniq_sort(struct ecommunity *ecom)
 
 /* Parse Extended Communites Attribute in BGP packet.  */
 static struct ecommunity *ecommunity_parse_internal(uint8_t *pnt,
-                                       unsigned short length,
-                                       unsigned short size_ecom)
+                                                   unsigned short length,
+                                                   unsigned short size_ecom,
+                                                   bool disable_ieee_floating)
 {
        struct ecommunity tmp;
        struct ecommunity *new;
@@ -234,6 +236,7 @@ static struct ecommunity *ecommunity_parse_internal(uint8_t *pnt,
           Attribute.  */
        tmp.size = length / size_ecom;
        tmp.val = pnt;
+       tmp.disable_ieee_floating = disable_ieee_floating;
 
        /* Create a new Extended Communities Attribute by uniq and sort each
           Extended Communities value  */
@@ -242,17 +245,18 @@ static struct ecommunity *ecommunity_parse_internal(uint8_t *pnt,
        return ecommunity_intern(new);
 }
 
-struct ecommunity *ecommunity_parse(uint8_t *pnt,
-                                   unsigned short length)
+struct ecommunity *ecommunity_parse(uint8_t *pnt, unsigned short length,
+                                   bool disable_ieee_floating)
 {
-       return ecommunity_parse_internal(pnt, length, ECOMMUNITY_SIZE);
+       return ecommunity_parse_internal(pnt, length, ECOMMUNITY_SIZE,
+                                        disable_ieee_floating);
 }
 
-struct ecommunity *ecommunity_parse_ipv6(uint8_t *pnt,
-                                        unsigned short length)
+struct ecommunity *ecommunity_parse_ipv6(uint8_t *pnt, unsigned short length,
+                                        bool disable_ieee_floating)
 {
-       return ecommunity_parse_internal(pnt, length,
-                                        IPV6_ECOMMUNITY_SIZE);
+       return ecommunity_parse_internal(pnt, length, IPV6_ECOMMUNITY_SIZE,
+                                        disable_ieee_floating);
 }
 
 /* Duplicate the Extended Communities Attribute structure.  */
@@ -273,7 +277,7 @@ struct ecommunity *ecommunity_dup(struct ecommunity *ecom)
        return new;
 }
 
-/* Retrun string representation of communities attribute. */
+/* Return string representation of ecommunities attribute. */
 char *ecommunity_str(struct ecommunity *ecom)
 {
        if (!ecom->str)
@@ -836,11 +840,23 @@ static int ecommunity_rt_soo_str(char *buf, size_t bufsz, const uint8_t *pnt,
                                              ECOMMUNITY_SIZE);
 }
 
-static int ecommunity_lb_str(char *buf, size_t bufsz, const uint8_t *pnt)
+/* Helper function to convert IEEE-754 Floating Point to uint32 */
+static uint32_t ieee_float_uint32_to_uint32(uint32_t u)
+{
+       union {
+               float r;
+               uint32_t d;
+       } f = {.d = u};
+
+       return (uint32_t)f.r;
+}
+
+static int ecommunity_lb_str(char *buf, size_t bufsz, const uint8_t *pnt,
+                            bool disable_ieee_floating)
 {
        int len = 0;
        as_t as;
-       uint32_t bw;
+       uint32_t bw_tmp, bw;
        char bps_buf[20] = {0};
 
 #define ONE_GBPS_BYTES (1000 * 1000 * 1000 / 8)
@@ -849,7 +865,11 @@ static int ecommunity_lb_str(char *buf, size_t bufsz, const uint8_t *pnt)
 
        as = (*pnt++ << 8);
        as |= (*pnt++);
-       (void)ptr_get_be32(pnt, &bw);
+       (void)ptr_get_be32(pnt, &bw_tmp);
+
+       bw = disable_ieee_floating ? bw_tmp
+                                  : ieee_float_uint32_to_uint32(bw_tmp);
+
        if (bw >= ONE_GBPS_BYTES)
                snprintf(bps_buf, sizeof(bps_buf), "%.3f Gbps",
                         (float)(bw / ONE_GBPS_BYTES));
@@ -940,8 +960,9 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter)
                                } else if (sub_type ==
                                           ECOMMUNITY_LINK_BANDWIDTH &&
                                           type == ECOMMUNITY_ENCODE_AS) {
-                                       ecommunity_lb_str(encbuf,
-                                               sizeof(encbuf), pnt);
+                                       ecommunity_lb_str(
+                                               encbuf, sizeof(encbuf), pnt,
+                                               ecom->disable_ieee_floating);
                                } else
                                        unk_ecom = 1;
                        } else {
@@ -1147,7 +1168,8 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter)
                } else if (type == ECOMMUNITY_ENCODE_AS_NON_TRANS) {
                        sub_type = *pnt++;
                        if (sub_type == ECOMMUNITY_LINK_BANDWIDTH)
-                               ecommunity_lb_str(encbuf, sizeof(encbuf), pnt);
+                               ecommunity_lb_str(encbuf, sizeof(encbuf), pnt,
+                                                 ecom->disable_ieee_floating);
                        else
                                unk_ecom = 1;
                } else {
@@ -1533,7 +1555,10 @@ const uint8_t *ecommunity_linkbw_present(struct ecommunity *ecom, uint32_t *bw)
                        pnt = ptr_get_be32(pnt, &bwval);
                        (void)pnt; /* consume value */
                        if (bw)
-                               *bw = bwval;
+                               *bw = ecom->disable_ieee_floating
+                                             ? bwval
+                                             : ieee_float_uint32_to_uint32(
+                                                       bwval);
                        return eval;
                }
        }
@@ -1542,9 +1567,9 @@ const uint8_t *ecommunity_linkbw_present(struct ecommunity *ecom, uint32_t *bw)
 }
 
 
-struct ecommunity *ecommunity_replace_linkbw(as_t as,
-                                            struct ecommunity *ecom,
-                                            uint64_t cum_bw)
+struct ecommunity *ecommunity_replace_linkbw(as_t as, struct ecommunity *ecom,
+                                            uint64_t cum_bw,
+                                            bool disable_ieee_floating)
 {
        struct ecommunity *new;
        struct ecommunity_val lb_eval;
@@ -1574,8 +1599,8 @@ struct ecommunity *ecommunity_replace_linkbw(as_t as,
         */
        if (cum_bw > 0xFFFFFFFF)
                cum_bw = 0xFFFFFFFF;
-       encode_lb_extcomm(as > BGP_AS_MAX ? BGP_AS_TRANS : as, cum_bw,
-                         false, &lb_eval);
+       encode_lb_extcomm(as > BGP_AS_MAX ? BGP_AS_TRANS : as, cum_bw, false,
+                         &lb_eval, disable_ieee_floating);
        new = ecommunity_dup(ecom);
        ecommunity_add_val(new, &lb_eval, true, true);
 
index 03b23fcd37405e6d10d02474cc5b14fbe54aab20..f22855c329076f3b40afdee136d366434640d983 100644 (file)
@@ -124,6 +124,9 @@ struct ecommunity {
 
        /* Human readable format string.  */
        char *str;
+
+       /* Disable IEEE floating-point encoding for extended community */
+       bool disable_ieee_floating;
 };
 
 struct ecommunity_as {
@@ -198,13 +201,28 @@ static inline void encode_route_target_as4(as_t as, uint16_t val,
        eval->val[7] = val & 0xff;
 }
 
+/* Helper function to convert uint32 to IEEE-754 Floating Point */
+static uint32_t uint32_to_ieee_float_uint32(uint32_t u)
+{
+       union {
+               float r;
+               uint32_t d;
+       } f = {.r = (float)u};
+
+       return f.d;
+}
+
 /*
  * Encode BGP Link Bandwidth extended community
  *  bandwidth (bw) is in bytes-per-sec
  */
 static inline void encode_lb_extcomm(as_t as, uint32_t bw, bool non_trans,
-                                    struct ecommunity_val *eval)
+                                    struct ecommunity_val *eval,
+                                    bool disable_ieee_floating)
 {
+       uint32_t bandwidth =
+               disable_ieee_floating ? bw : uint32_to_ieee_float_uint32(bw);
+
        memset(eval, 0, sizeof(*eval));
        eval->val[0] = ECOMMUNITY_ENCODE_AS;
        if (non_trans)
@@ -212,18 +230,20 @@ static inline void encode_lb_extcomm(as_t as, uint32_t bw, bool non_trans,
        eval->val[1] = ECOMMUNITY_LINK_BANDWIDTH;
        eval->val[2] = (as >> 8) & 0xff;
        eval->val[3] = as & 0xff;
-       eval->val[4] = (bw >> 24) & 0xff;
-       eval->val[5] = (bw >> 16) & 0xff;
-       eval->val[6] = (bw >> 8) & 0xff;
-       eval->val[7] = bw & 0xff;
+       eval->val[4] = (bandwidth >> 24) & 0xff;
+       eval->val[5] = (bandwidth >> 16) & 0xff;
+       eval->val[6] = (bandwidth >> 8) & 0xff;
+       eval->val[7] = bandwidth & 0xff;
 }
 
 extern void ecommunity_init(void);
 extern void ecommunity_finish(void);
 extern void ecommunity_free(struct ecommunity **);
-extern struct ecommunity *ecommunity_parse(uint8_t *, unsigned short);
+extern struct ecommunity *ecommunity_parse(uint8_t *, unsigned short,
+                                          bool disable_ieee_floating);
 extern struct ecommunity *ecommunity_parse_ipv6(uint8_t *pnt,
-                                               unsigned short length);
+                                               unsigned short length,
+                                               bool disable_ieee_floating);
 extern struct ecommunity *ecommunity_dup(struct ecommunity *);
 extern struct ecommunity *ecommunity_merge(struct ecommunity *,
                                           struct ecommunity *);
@@ -281,7 +301,9 @@ extern void bgp_aggr_ecommunity_remove(void *arg);
 extern const uint8_t *ecommunity_linkbw_present(struct ecommunity *ecom,
                                                uint32_t *bw);
 extern struct ecommunity *ecommunity_replace_linkbw(as_t as,
-                               struct ecommunity *ecom, uint64_t cum_bw);
+                                                   struct ecommunity *ecom,
+                                                   uint64_t cum_bw,
+                                                   bool disable_ieee_floating);
 
 static inline void ecommunity_strip_rts(struct ecommunity *ecom)
 {
index b05bc5033b781e19bc870a074184ee2940f97a1a..cbd29c146a38b9aad03366f9af3682e1f53648ad 100644 (file)
@@ -2385,6 +2385,7 @@ bgp_create_evpn_bgp_path_info(struct bgp_path_info *parent_pi,
                memcpy(&pi->extra->label, &parent_pi->extra->label,
                       sizeof(pi->extra->label));
                pi->extra->num_labels = parent_pi->extra->num_labels;
+               pi->extra->igpmetric = parent_pi->extra->igpmetric;
        }
        bgp_path_info_add(dest, pi);
 
@@ -2520,7 +2521,7 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
        /* Gateway IP nexthop should be resolved */
        if (attr.evpn_overlay.type == OVERLAY_INDEX_GATEWAY_IP) {
                if (bgp_find_or_add_nexthop(bgp_vrf, bgp_vrf, afi, safi, pi,
-                                           NULL, 0))
+                                           NULL, 0, NULL))
                        bgp_path_info_set_flag(dest, pi, BGP_PATH_VALID);
                else {
                        if (BGP_DEBUG(nht, NHT)) {
index 8d6691945fe24d38f590ec89e9841f4a67194830..641cc7605fd17eb9524f217e249266b48cee3f00 100644 (file)
@@ -612,78 +612,118 @@ DEFUN (no_as_path_all,
        return CMD_SUCCESS;
 }
 
-static void as_list_show(struct vty *vty, struct as_list *aslist)
+static void as_list_show(struct vty *vty, struct as_list *aslist,
+                        json_object *json)
 {
        struct as_filter *asfilter;
+       json_object *json_aslist = NULL;
 
-       vty_out(vty, "AS path access list %s\n", aslist->name);
+       if (json) {
+               json_aslist = json_object_new_array();
+               json_object_object_add(json, aslist->name, json_aslist);
+       } else
+               vty_out(vty, "AS path access list %s\n", aslist->name);
 
        for (asfilter = aslist->head; asfilter; asfilter = asfilter->next) {
-               vty_out(vty, "    %s %s\n", filter_type_str(asfilter->type),
-                       asfilter->reg_str);
+               if (json) {
+                       json_object *json_asfilter = json_object_new_object();
+
+                       json_object_int_add(json_asfilter, "sequenceNumber",
+                                           asfilter->seq);
+                       json_object_string_add(json_asfilter, "type",
+                                              filter_type_str(asfilter->type));
+                       json_object_string_add(json_asfilter, "regExp",
+                                              asfilter->reg_str);
+
+                       json_object_array_add(json_aslist, json_asfilter);
+               } else
+                       vty_out(vty, "    %s %s\n",
+                               filter_type_str(asfilter->type),
+                               asfilter->reg_str);
        }
 }
 
-static void as_list_show_all(struct vty *vty)
+static void as_list_show_all(struct vty *vty, json_object *json)
 {
        struct as_list *aslist;
-       struct as_filter *asfilter;
-
-       for (aslist = as_list_master.str.head; aslist; aslist = aslist->next) {
-               vty_out(vty, "AS path access list %s\n", aslist->name);
 
-               for (asfilter = aslist->head; asfilter;
-                    asfilter = asfilter->next) {
-                       vty_out(vty, "    %s %s\n",
-                               filter_type_str(asfilter->type),
-                               asfilter->reg_str);
-               }
-       }
+       for (aslist = as_list_master.str.head; aslist; aslist = aslist->next)
+               as_list_show(vty, aslist, json);
 }
 
 DEFUN (show_as_path_access_list,
        show_bgp_as_path_access_list_cmd,
-       "show bgp as-path-access-list WORD",
+       "show bgp as-path-access-list WORD [json]",
        SHOW_STR
        BGP_STR
        "List AS path access lists\n"
-       "AS path access list name\n")
+       "AS path access list name\n"
+       JSON_STR)
 {
        int idx_word = 3;
        struct as_list *aslist;
+       bool uj = use_json(argc, argv);
+       json_object *json = NULL;
+
+       if (uj)
+               json = json_object_new_object();
 
        aslist = as_list_lookup(argv[idx_word]->arg);
        if (aslist)
-               as_list_show(vty, aslist);
+               as_list_show(vty, aslist, json);
+
+       if (uj) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
 
        return CMD_SUCCESS;
 }
 
 ALIAS (show_as_path_access_list,
        show_ip_as_path_access_list_cmd,
-       "show ip as-path-access-list WORD",
+       "show ip as-path-access-list WORD [json]",
        SHOW_STR
        IP_STR
        "List AS path access lists\n"
-       "AS path access list name\n")
+       "AS path access list name\n"
+       JSON_STR)
 
 DEFUN (show_as_path_access_list_all,
        show_bgp_as_path_access_list_all_cmd,
-       "show bgp as-path-access-list",
+       "show bgp as-path-access-list [json]",
        SHOW_STR
        BGP_STR
-       "List AS path access lists\n")
+       "List AS path access lists\n"
+       JSON_STR)
 {
-       as_list_show_all(vty);
+       bool uj = use_json(argc, argv);
+       json_object *json = NULL;
+
+       if (uj)
+               json = json_object_new_object();
+
+       as_list_show_all(vty, json);
+
+       if (uj) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
+
        return CMD_SUCCESS;
 }
 
 ALIAS (show_as_path_access_list_all,
        show_ip_as_path_access_list_all_cmd,
-       "show ip as-path-access-list",
+       "show ip as-path-access-list [json]",
        SHOW_STR
        IP_STR
-       "List AS path access lists\n")
+       "List AS path access lists\n"
+       JSON_STR)
 
 static int config_write_as_list(struct vty *vty)
 {
index 54eec8ab7b2a836d5d652aa455cc3bc726085caa..0f2926d0605a164349e50c034c9560c2bf7161d0 100644 (file)
@@ -110,9 +110,9 @@ int bgp_peer_reg_with_nht(struct peer *peer)
            && !CHECK_FLAG(peer->bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK))
                connected = 1;
 
-       return bgp_find_or_add_nexthop(peer->bgp, peer->bgp,
-                                      family2afi(peer->su.sa.sa_family),
-                                      SAFI_UNICAST, NULL, peer, connected);
+       return bgp_find_or_add_nexthop(
+               peer->bgp, peer->bgp, family2afi(peer->su.sa.sa_family),
+               SAFI_UNICAST, NULL, peer, connected, NULL);
 }
 
 static void peer_xfer_stats(struct peer *peer_dst, struct peer *peer_src)
@@ -1378,6 +1378,9 @@ int bgp_stop(struct peer *peer)
                peer->fd = -1;
        }
 
+       /* Reset capabilities. */
+       peer->cap = 0;
+
        FOREACH_AFI_SAFI (afi, safi) {
                /* Reset all negotiated variables */
                peer->afc_nego[afi][safi] = 0;
@@ -2193,7 +2196,8 @@ void bgp_fsm_nht_update(struct peer *peer, bool has_valid_nexthops)
        case OpenConfirm:
        case Established:
                if (!has_valid_nexthops
-                   && (peer->gtsm_hops == BGP_GTSM_HOPS_CONNECTED))
+                   && (peer->gtsm_hops == BGP_GTSM_HOPS_CONNECTED
+                       || peer->bgp->fast_convergence))
                        BGP_EVENT_ADD(peer, TCP_fatal_error);
        case Clearing:
        case Deleted:
index e9b0f9e46a103f41ca03b96663a0ed2bb2720473..9b5a31f289da73c638a674aa4e5fe6a82dd11bea 100644 (file)
@@ -111,6 +111,7 @@ void bgp_reads_off(struct peer *peer)
 
        thread_cancel_async(fpt->master, &peer->t_read, NULL);
        THREAD_OFF(peer->t_process_packet);
+       THREAD_OFF(peer->t_process_packet_error);
 
        UNSET_FLAG(peer->thread_flags, PEER_THREAD_READS_ON);
 }
@@ -208,7 +209,7 @@ static int bgp_process_reads(struct thread *thread)
                 * specific state change from 'bgp_read'.
                 */
                thread_add_event(bm->master, bgp_packet_process_error,
-                                peer, code, NULL);
+                                peer, code, &peer->t_process_packet_error);
        }
 
        while (more) {
index 6121c4905f7ae71cee02d07397c203b6b1c001d6..9d8196878992e111c23d391632c5ec4bd159d610 100644 (file)
@@ -287,7 +287,7 @@ void lcommunity_unintern(struct lcommunity **lcom)
        }
 }
 
-/* Retrun string representation of communities attribute. */
+/* Return string representation of lcommunities attribute. */
 char *lcommunity_str(struct lcommunity *lcom, bool make_json)
 {
        if (!lcom)
index 6736671f37d1e5ed96a78b2f3f30c1fe75025343..08776d200f8a65a49f077e5c7d2e9f1335a3c0cb 100644 (file)
@@ -61,8 +61,6 @@
 #include "bgpd/bgp_network.h"
 #include "bgpd/bgp_errors.h"
 #include "bgpd/bgp_script.h"
-#include "lib/routing_nb.h"
-#include "bgpd/bgp_nb.h"
 #include "bgpd/bgp_evpn_mh.h"
 #include "bgpd/bgp_nht.h"
 #include "bgpd/bgp_routemap_nb.h"
@@ -379,11 +377,9 @@ static void bgp_vrf_terminate(void)
 }
 
 static const struct frr_yang_module_info *const bgpd_yang_modules[] = {
-       &frr_bgp_info,
        &frr_filter_info,
        &frr_interface_info,
        &frr_route_map_info,
-       &frr_routing_info,
        &frr_vrf_info,
        &frr_bgp_route_map_info,
 };
@@ -494,7 +490,6 @@ int main(int argc, char **argv)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
        if (skip_runas)
@@ -517,10 +512,6 @@ int main(int argc, char **argv)
        bgp_script_init();
 #endif
 
-       hook_register(routing_conf_event,
-                     routing_control_plane_protocols_name_validate);
-
-
        /* BGP related initialization.  */
        bgp_init((unsigned short)instance);
 
index 196e56a9372c6fb7cf0c65f8612519cbad6da58b..ffb1ec162b5d480f8b953e199a81aabdef20d1c2 100644 (file)
@@ -100,7 +100,6 @@ DEFINE_MTYPE(BGPD, PEER_UPDATE_SOURCE, "BGP peer update interface");
 DEFINE_MTYPE(BGPD, PEER_CONF_IF, "BGP peer config interface");
 DEFINE_MTYPE(BGPD, BGP_DAMP_INFO, "Dampening info");
 DEFINE_MTYPE(BGPD, BGP_DAMP_ARRAY, "BGP Dampening array");
-DEFINE_MTYPE(BGPD, BGP_DAMP_REUSELIST, "BGP Dampening reuse list");
 DEFINE_MTYPE(BGPD, BGP_REGEXP, "BGP regexp");
 DEFINE_MTYPE(BGPD, BGP_AGGREGATE, "BGP aggregate");
 DEFINE_MTYPE(BGPD, BGP_ADDR, "BGP own address");
index 0021fa9c3d897d749bdda83fd0fc09168aa6d2b9..63e7b40ef786456dd7faf9182cbdd4e2e9b6437f 100644 (file)
@@ -96,7 +96,6 @@ DECLARE_MTYPE(PEER_UPDATE_SOURCE);
 DECLARE_MTYPE(PEER_CONF_IF);
 DECLARE_MTYPE(BGP_DAMP_INFO);
 DECLARE_MTYPE(BGP_DAMP_ARRAY);
-DECLARE_MTYPE(BGP_DAMP_REUSELIST);
 DECLARE_MTYPE(BGP_REGEXP);
 DECLARE_MTYPE(BGP_AGGREGATE);
 DECLARE_MTYPE(BGP_ADDR);
index 8127428bc71dc8597f1e980cad539a7993e38024..1d727d267a9b4b7bc7cba563879ab7b9fd568fe8 100644 (file)
@@ -610,7 +610,8 @@ void bgp_path_info_mpath_update(struct bgp_dest *dest,
                                prev_mpath = cur_mpath;
                                mpath_count++;
                                if (ecommunity_linkbw_present(
-                                       cur_mpath->attr->ecommunity, &bwval))
+                                           cur_mpath->attr->ecommunity,
+                                           &bwval))
                                        cum_bw += bwval;
                                else
                                        all_paths_lb = false;
@@ -699,7 +700,8 @@ void bgp_path_info_mpath_update(struct bgp_dest *dest,
                                mpath_changed = 1;
                                mpath_count++;
                                if (ecommunity_linkbw_present(
-                                       new_mpath->attr->ecommunity, &bwval))
+                                           new_mpath->attr->ecommunity,
+                                           &bwval))
                                        cum_bw += bwval;
                                else
                                        all_paths_lb = false;
@@ -721,9 +723,9 @@ void bgp_path_info_mpath_update(struct bgp_dest *dest,
 
        if (new_best) {
                bgp_path_info_mpath_count_set(new_best, mpath_count - 1);
-               if (mpath_count <= 1 ||
-                   !ecommunity_linkbw_present(
-                       new_best->attr->ecommunity, &bwval))
+               if (mpath_count <= 1
+                   || !ecommunity_linkbw_present(new_best->attr->ecommunity,
+                                                 &bwval))
                        all_paths_lb = false;
                else
                        cum_bw += bwval;
index 0de48dcf78f5941f4267458ef1fb349cf7f73fb0..1af2ab384f7eb910ba596d25ee997271b21f638b 100644 (file)
@@ -595,7 +595,7 @@ void ensure_vrf_tovpn_sid(struct bgp *bgp_vpn, struct bgp *bgp_vrf, afi_t afi)
                return;
 
        /* check invalid case both configured index and auto */
-       if (tovpn_sid_index != 0 && tovpn_sid_index) {
+       if (tovpn_sid_index != 0 && tovpn_sid_auto) {
                zlog_err("%s: index-mode and auto-mode both selected. ignored.",
                         __func__);
                return;
@@ -845,7 +845,7 @@ leak_update(struct bgp *bgp, /* destination bgp instance */
                         * 'connected' parameter?
                         */
                        nh_valid = bgp_find_or_add_nexthop(
-                               bgp, bgp_nexthop, afi, safi, bpi, NULL, 0);
+                               bgp, bgp_nexthop, afi, safi, bpi, NULL, 0, p);
 
                if (debug)
                        zlog_debug("%s: nexthop is %svalid (in vrf %s)",
@@ -931,7 +931,7 @@ leak_update(struct bgp *bgp, /* destination bgp instance */
                 * 'connected' parameter?
                 */
                nh_valid = bgp_find_or_add_nexthop(bgp, bgp_nexthop, afi, safi,
-                                                  new, NULL, 0);
+                                                  new, NULL, 0, p);
 
        if (debug)
                zlog_debug("%s: nexthop is %svalid (in vrf %s)",
diff --git a/bgpd/bgp_nb.c b/bgpd/bgp_nb.c
deleted file mode 100644 (file)
index a424999..0000000
+++ /dev/null
@@ -1,10325 +0,0 @@
-/*
- * Bgp northbound callbacks registery
- * Copyright (C) 2020  Nvidia
- *                    Chirag Shah
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <zebra.h>
-
-#include "northbound.h"
-#include "libfrr.h"
-#include "bgpd/bgp_nb.h"
-
-/* clang-format off */
-const struct frr_yang_module_info frr_bgp_info = {
-       .name = "frr-bgp",
-       .nodes = {
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp,
-                               .create = bgp_router_create,
-                               .destroy = bgp_router_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/local-as",
-                       .cbs = {
-                               .modify = bgp_global_local_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/router-id",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_router_id,
-                               .modify = bgp_global_router_id_modify,
-                               .destroy = bgp_global_router_id_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/confederation/identifier",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_confederation_identifier,
-                               .modify = bgp_global_confederation_identifier_modify,
-                               .destroy = bgp_global_confederation_identifier_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/confederation/member-as",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_confederation_member_as,
-                               .create = bgp_global_confederation_member_as_create,
-                               .destroy = bgp_global_confederation_member_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_med_config,
-                               .apply_finish = bgp_global_med_config_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/enable-med-admin",
-                       .cbs = {
-                               .modify = bgp_global_med_config_enable_med_admin_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-admin",
-                       .cbs = {
-                               .modify = bgp_global_med_config_max_med_admin_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-onstart-up-time",
-                       .cbs = {
-                               .modify = bgp_global_med_config_max_med_onstart_up_time_modify,
-                               .destroy = bgp_global_med_config_max_med_onstart_up_time_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-onstart-up-value",
-                       .cbs = {
-                               .modify = bgp_global_med_config_max_med_onstart_up_value_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_route_reflector,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/route-reflector-cluster-id",
-                       .cbs = {
-                               .modify = bgp_global_route_reflector_route_reflector_cluster_id_modify,
-                               .destroy = bgp_global_route_reflector_route_reflector_cluster_id_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/no-client-reflect",
-                       .cbs = {
-                               .modify = bgp_global_route_reflector_no_client_reflect_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/allow-outbound-policy",
-                       .cbs = {
-                               .modify = bgp_global_route_reflector_allow_outbound_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options",
-                       .cbs = {
-                               .apply_finish = bgp_global_route_selection_options_apply_finish,
-                               .cli_show = cli_show_router_bgp_route_selection,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/always-compare-med",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_always_compare_med_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/deterministic-med",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_deterministic_med_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/confed-med",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_confed_med_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/missing-as-worst-med",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_missing_as_worst_med_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/aspath-confed",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_aspath_confed_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/ignore-as-path-length",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_ignore_as_path_length_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/external-compare-router-id",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_external_compare_router_id_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/allow-multiple-as",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_allow_multiple_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/multi-path-as-set",
-                       .cbs = {
-                               .modify = bgp_global_route_selection_options_multi_path_as_set_modify,
-                               .destroy = bgp_global_route_selection_options_multi_path_as_set_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config",
-                       .cbs = {
-                               .cli_show = cli_show_router_global_neighbor_config,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/dynamic-neighbors-limit",
-                       .cbs = {
-                               .modify = bgp_global_global_neighbor_config_dynamic_neighbors_limit_modify,
-                               .destroy = bgp_global_global_neighbor_config_dynamic_neighbors_limit_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/log-neighbor-changes",
-                       .cbs = {
-                               .modify = bgp_global_global_neighbor_config_log_neighbor_changes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/packet-quanta-config/wpkt-quanta",
-                       .cbs = {
-                               .modify = bgp_global_global_neighbor_config_packet_quanta_config_wpkt_quanta_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/packet-quanta-config/rpkt-quanta",
-                       .cbs = {
-                               .modify = bgp_global_global_neighbor_config_packet_quanta_config_rpkt_quanta_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/enabled",
-                       .cbs = {
-                               .modify = bgp_global_graceful_restart_enabled_modify,
-                               .destroy = bgp_global_graceful_restart_enabled_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/graceful-restart-disable",
-                       .cbs = {
-                               .modify = bgp_global_graceful_restart_graceful_restart_disable_modify,
-                               .destroy = bgp_global_graceful_restart_graceful_restart_disable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/preserve-fw-entry",
-                       .cbs = {
-                               .modify = bgp_global_graceful_restart_preserve_fw_entry_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/restart-time",
-                       .cbs = {
-                               .modify = bgp_global_graceful_restart_restart_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/stale-routes-time",
-                       .cbs = {
-                               .modify = bgp_global_graceful_restart_stale_routes_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/selection-deferral-time",
-                       .cbs = {
-                               .modify = bgp_global_graceful_restart_selection_deferral_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/rib-stale-time",
-                       .cbs = {
-                               .modify = bgp_global_graceful_restart_rib_stale_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-update-group-config/subgroup-pkt-queue-size",
-                       .cbs = {
-                               .cli_show = cli_show_router_global_update_group_config_subgroup_pkt_queue_size,
-                               .modify = bgp_global_global_update_group_config_subgroup_pkt_queue_size_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-update-group-config/coalesce-time",
-                       .cbs = {
-                               .cli_show = cli_show_router_global_update_group_config_coalesce_time,
-                               .modify = bgp_global_global_update_group_config_coalesce_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/rmap-delay-time",
-                       .cbs = {
-                               .modify = bgp_global_global_config_timers_rmap_delay_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/update-delay-time",
-                       .cbs = {
-                               .modify = bgp_global_global_config_timers_update_delay_time_modify,
-                               .destroy = bgp_global_global_config_timers_update_delay_time_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/establish-wait-time",
-                       .cbs = {
-                               .modify = bgp_global_global_config_timers_establish_wait_time_modify,
-                               .destroy = bgp_global_global_config_timers_establish_wait_time_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/connect-retry-interval",
-                       .cbs = {
-                               .modify = bgp_global_global_config_timers_connect_retry_interval_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/hold-time",
-                       .cbs = {
-                               .modify = bgp_global_global_config_timers_hold_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/keepalive",
-                       .cbs = {
-                               .modify = bgp_global_global_config_timers_keepalive_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/instance-type-view",
-                       .cbs = {
-                               .modify = bgp_global_instance_type_view_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/ebgp-multihop-connected-route-check",
-                       .cbs = {
-                               .cli_show = cli_show_router_global_ebgp_multihop_connected_route_check,
-                               .modify = bgp_global_ebgp_multihop_connected_route_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/fast-external-failover",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_fast_external_failover,
-                               .modify = bgp_global_fast_external_failover_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/local-pref",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_local_pref,
-                               .modify = bgp_global_local_pref_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/default-shutdown",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_default_shutdown,
-                               .modify = bgp_global_default_shutdown_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/ebgp-requires-policy",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_ebgp_requires_policy,
-                               .modify = bgp_global_ebgp_requires_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/suppress-duplicates",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_suppress_duplicates,
-                               .modify = bgp_global_suppress_duplicates_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/show-hostname",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_show_hostname,
-                               .modify = bgp_global_show_hostname_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/show-nexthop-hostname",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_show_nexthop_hostname,
-                               .modify = bgp_global_show_nexthop_hostname_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/import-check",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_import_check,
-                               .modify = bgp_global_import_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-shutdown/enable",
-                       .cbs = {
-                               .cli_show = cli_show_router_bgp_graceful_shutdown,
-                               .modify = bgp_global_graceful_shutdown_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list",
-                       .cbs = {
-                               .create = bgp_global_bmp_config_target_list_create,
-                               .destroy = bgp_global_bmp_config_target_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/incoming-session/session-list",
-                       .cbs = {
-                               .create = bgp_global_bmp_config_target_list_incoming_session_session_list_create,
-                               .destroy = bgp_global_bmp_config_target_list_incoming_session_session_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list",
-                       .cbs = {
-                               .create = bgp_global_bmp_config_target_list_outgoing_session_session_list_create,
-                               .destroy = bgp_global_bmp_config_target_list_outgoing_session_session_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list/min-retry-time",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_outgoing_session_session_list_min_retry_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list/max-retry-time",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_outgoing_session_session_list_max_retry_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/mirror",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_mirror_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/stats-time",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_stats_time_modify,
-                               .destroy = bgp_global_bmp_config_target_list_stats_time_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/ipv4-access-list",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_ipv4_access_list_modify,
-                               .destroy = bgp_global_bmp_config_target_list_ipv4_access_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/ipv6-access-list",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_ipv6_access_list_modify,
-                               .destroy = bgp_global_bmp_config_target_list_ipv6_access_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi",
-                       .cbs = {
-                               .create = bgp_global_bmp_config_target_list_afi_safis_afi_safi_create,
-                               .destroy = bgp_global_bmp_config_target_list_afi_safis_afi_safi_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/mirror-buffer-limit",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_mirror_buffer_limit_modify,
-                               .destroy = bgp_global_bmp_config_mirror_buffer_limit_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_header,
-                               .cli_show_end = cli_show_bgp_global_afi_safi_header_end,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_create,
-                               .destroy = bgp_neighbors_neighbor_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-interface",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_local_interface_modify,
-                               .destroy = bgp_neighbors_neighbor_local_interface_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-port",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_local_port_modify,
-                               .destroy = bgp_neighbors_neighbor_local_port_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/peer-group",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_peer_group_modify,
-                               .destroy = bgp_neighbors_neighbor_peer_group_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/password",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_password_modify,
-                               .destroy = bgp_neighbors_neighbor_password_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ttl-security",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_ttl_security_modify,
-                               .destroy = bgp_neighbors_neighbor_ttl_security_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/solo",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_solo_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/enforce-first-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_enforce_first_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/description",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_description_modify,
-                               .destroy = bgp_neighbors_neighbor_description_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/passive-mode",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_passive_mode_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/dynamic-capability",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_capability_options_dynamic_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/strict-capability",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_capability_options_strict_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/extended-nexthop-capability",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_capability_options_extended_nexthop_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/capability-negotiate",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_capability_options_capability_negotiate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/override-capability",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_capability_options_override_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/update-source/ip",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_update_source_ip_modify,
-                               .destroy = bgp_neighbors_neighbor_update_source_ip_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/update-source/interface",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_update_source_interface_modify,
-                               .destroy = bgp_neighbors_neighbor_update_source_interface_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/neighbor-remote-as/remote-as-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/neighbor-remote-as/remote-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_neighbor_remote_as_remote_as_modify,
-                               .destroy = bgp_neighbors_neighbor_neighbor_remote_as_remote_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/enabled",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_ebgp_multihop_enabled_modify,
-                               .destroy = bgp_neighbors_neighbor_ebgp_multihop_enabled_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/multihop-ttl",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_modify,
-                               .destroy = bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/disable-connected-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_ebgp_multihop_disable_connected_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as",
-                       .cbs = {
-                               .apply_finish = bgp_neighbors_neighbor_local_as_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/local-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_local_as_local_as_modify,
-                               .destroy = bgp_neighbors_neighbor_local_as_local_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/no-prepend",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_local_as_no_prepend_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/replace-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_local_as_replace_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/enable",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_bfd_options_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/detect-multiplier",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_bfd_options_detect_multiplier_modify,
-                               .destroy = bgp_neighbors_neighbor_bfd_options_detect_multiplier_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/required-min-rx",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_bfd_options_required_min_rx_modify,
-                               .destroy = bgp_neighbors_neighbor_bfd_options_required_min_rx_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/desired-min-tx",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_bfd_options_desired_min_tx_modify,
-                               .destroy = bgp_neighbors_neighbor_bfd_options_desired_min_tx_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/session-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_bfd_options_session_type_modify,
-                               .destroy = bgp_neighbors_neighbor_bfd_options_session_type_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/check-cp-failure",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_bfd_options_check_cp_failure_modify,
-                               .destroy = bgp_neighbors_neighbor_bfd_options_check_cp_failure_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown",
-                       .cbs = {
-                               .apply_finish = bgp_neighbors_neighbor_admin_shutdown_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/enable",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_admin_shutdown_enable_modify,
-                               .destroy = bgp_neighbors_neighbor_admin_shutdown_enable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/message",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_admin_shutdown_message_modify,
-                               .destroy = bgp_neighbors_neighbor_admin_shutdown_message_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/enable",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_graceful_restart_enable_modify,
-                               .destroy = bgp_neighbors_neighbor_graceful_restart_enable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/graceful-restart-helper",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_graceful_restart_graceful_restart_helper_modify,
-                               .destroy = bgp_neighbors_neighbor_graceful_restart_graceful_restart_helper_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/graceful-restart-disable",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_modify,
-                               .destroy = bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/advertise-interval",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_timers_advertise_interval_modify,
-                               .destroy = bgp_neighbors_neighbor_timers_advertise_interval_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/connect-time",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_timers_connect_time_modify,
-                               .destroy = bgp_neighbors_neighbor_timers_connect_time_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/hold-time",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_timers_hold_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/keepalive",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_timers_keepalive_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/enabled",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/v6only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_v6only_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/peer-group",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_peer_group_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_peer_group_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/password",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_password_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_password_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ttl-security",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_ttl_security_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_ttl_security_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/solo",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_solo_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/enforce-first-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_enforce_first_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/description",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_description_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_description_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/passive-mode",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_passive_mode_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/dynamic-capability",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_capability_options_dynamic_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/strict-capability",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_capability_options_strict_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/extended-nexthop-capability",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_capability_options_extended_nexthop_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/capability-negotiate",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_capability_options_capability_negotiate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/override-capability",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_capability_options_override_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/update-source/ip",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_update_source_ip_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_update_source_ip_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/update-source/interface",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_update_source_interface_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_update_source_interface_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as",
-                       .cbs = {
-                               .apply_finish = bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/enabled",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/multihop-ttl",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/disable-connected-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_ebgp_multihop_disable_connected_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as",
-                       .cbs = {
-                               .apply_finish = bgp_neighbors_unnumbered_neighbor_local_as_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/local-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_local_as_local_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_local_as_local_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/no-prepend",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_local_as_no_prepend_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/replace-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_local_as_replace_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/enable",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_bfd_options_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/detect-multiplier",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_bfd_options_detect_multiplier_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_bfd_options_detect_multiplier_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/required-min-rx",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_bfd_options_required_min_rx_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_bfd_options_required_min_rx_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/desired-min-tx",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_bfd_options_desired_min_tx_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_bfd_options_desired_min_tx_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/session-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_bfd_options_session_type_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_bfd_options_session_type_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/check-cp-failure",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown",
-                       .cbs = {
-                               .apply_finish = bgp_neighbors_unnumbered_neighbor_admin_shutdown_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/enable",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/message",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/enable",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_graceful_restart_enable_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_graceful_restart_enable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/graceful-restart-helper",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_helper_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_helper_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/graceful-restart-disable",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/advertise-interval",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/connect-time",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_timers_connect_time_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_timers_connect_time_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/hold-time",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_timers_hold_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/keepalive",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_timers_keepalive_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/enabled",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_create,
-                               .destroy = bgp_peer_groups_peer_group_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ipv4-listen-range",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_ipv4_listen_range_create,
-                               .destroy = bgp_peer_groups_peer_group_ipv4_listen_range_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ipv6-listen-range",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_ipv6_listen_range_create,
-                               .destroy = bgp_peer_groups_peer_group_ipv6_listen_range_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/password",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_password_modify,
-                               .destroy = bgp_peer_groups_peer_group_password_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ttl-security",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_ttl_security_modify,
-                               .destroy = bgp_peer_groups_peer_group_ttl_security_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/solo",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_solo_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/enforce-first-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_enforce_first_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/description",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_description_modify,
-                               .destroy = bgp_peer_groups_peer_group_description_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/passive-mode",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_passive_mode_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/dynamic-capability",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_capability_options_dynamic_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/strict-capability",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_capability_options_strict_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/extended-nexthop-capability",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_capability_options_extended_nexthop_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/capability-negotiate",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_capability_options_capability_negotiate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/override-capability",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_capability_options_override_capability_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/update-source/ip",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_update_source_ip_modify,
-                               .destroy = bgp_peer_groups_peer_group_update_source_ip_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/update-source/interface",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_update_source_interface_modify,
-                               .destroy = bgp_peer_groups_peer_group_update_source_interface_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as",
-                       .cbs = {
-                               .apply_finish = bgp_peer_group_neighbor_remote_as_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_modify,
-                               .destroy = bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/enabled",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_ebgp_multihop_enabled_modify,
-                               .destroy = bgp_peer_groups_peer_group_ebgp_multihop_enabled_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/multihop-ttl",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_modify,
-                               .destroy = bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/disable-connected-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_ebgp_multihop_disable_connected_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as",
-                       .cbs = {
-                               .apply_finish = bgp_peer_groups_peer_group_local_as_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/local-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_local_as_local_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_local_as_local_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/no-prepend",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_local_as_no_prepend_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/replace-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_local_as_replace_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/enable",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_bfd_options_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/detect-multiplier",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_bfd_options_detect_multiplier_modify,
-                               .destroy = bgp_peer_groups_peer_group_bfd_options_detect_multiplier_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/required-min-rx",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_bfd_options_required_min_rx_modify,
-                               .destroy = bgp_peer_groups_peer_group_bfd_options_required_min_rx_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/desired-min-tx",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_bfd_options_desired_min_tx_modify,
-                               .destroy = bgp_peer_groups_peer_group_bfd_options_desired_min_tx_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/session-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_bfd_options_session_type_modify,
-                               .destroy = bgp_peer_groups_peer_group_bfd_options_session_type_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/check-cp-failure",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_bfd_options_check_cp_failure_modify,
-                               .destroy = bgp_peer_groups_peer_group_bfd_options_check_cp_failure_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown",
-                       .cbs = {
-                               .apply_finish = bgp_peer_groups_peer_group_admin_shutdown_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/enable",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_admin_shutdown_enable_modify,
-                               .destroy = bgp_peer_groups_peer_group_admin_shutdown_enable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/message",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_admin_shutdown_message_modify,
-                               .destroy = bgp_peer_groups_peer_group_admin_shutdown_message_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/enable",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_graceful_restart_enable_modify,
-                               .destroy = bgp_peer_groups_peer_group_graceful_restart_enable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/graceful-restart-helper",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_graceful_restart_graceful_restart_helper_modify,
-                               .destroy = bgp_peer_groups_peer_group_graceful_restart_graceful_restart_helper_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/graceful-restart-disable",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_modify,
-                               .destroy = bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/advertise-interval",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_timers_advertise_interval_modify,
-                               .destroy = bgp_peer_groups_peer_group_timers_advertise_interval_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/connect-time",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_timers_connect_time_modify,
-                               .destroy = bgp_peer_groups_peer_group_timers_connect_time_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/hold-time",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_timers_hold_time_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/keepalive",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_timers_keepalive_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/enabled",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_network_config_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_network_config,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/backdoor",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_backdoor_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/label-index",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_label_index_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_label_index_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_aggregate_route_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_aggregate_route,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/as-set",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_as_set_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/summary-only",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_summary_only_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/origin",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_origin_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/match-med",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_match_med_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/suppress-map",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_suppress_map_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_suppress_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_admin_distance_route_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_admin_distance_route,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route/distance",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_distance_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route/access-list-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_access_list_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_access_list_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_route_flap_dampening,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/enable",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/reach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/reuse-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reuse_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reuse_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/suppress-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_suppress_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_suppress_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/unreach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_unreach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_unreach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ebgp/maximum-paths",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ebgp_maximum_paths_modify,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_use_multiple_paths_ebgp_maximum_paths,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp/maximum-paths",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_maximum_paths_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp/cluster-length-list",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_cluster_length_list_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_ip_unicast_redistribution_list_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_redistribution_list,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list/metric",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_metric_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_metric_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list/rmap-policy-import",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_rmap_policy_import_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_rmap_policy_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_admin_distance_config,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/external",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_external_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/internal",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_internal_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/local",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_local_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rd",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rd_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rd_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rd,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/label",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/label-auto",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_auto_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_auto_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/nexthop",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_nexthop_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_nexthop_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_nexthop,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-vpn",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vpn_modify,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_import_vpn,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/export-vpn",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_vpn_modify,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_export_vpn,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-vrf-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vrf_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vrf_list_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_import_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_import_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_export_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rmap_export,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/redirect-rt",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_redirect_rt_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_redirect_rt_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-rt-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_rt_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_rt_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/export-rt-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_rt_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_rt_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rt-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rt_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rt_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_network_config_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_network_config,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/backdoor",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_backdoor_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/label-index",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_label_index_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_label_index_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_aggregate_route_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_aggregate_route,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/as-set",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_as_set_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/summary-only",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_summary_only_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/origin",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_origin_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/match-med",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_match_med_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/suppress-map",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_suppress_map_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_suppress_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_admin_distance_route_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_admin_distance_route,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route/distance",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_distance_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route/access-list-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_access_list_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_access_list_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_route_flap_dampening,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/enable",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/reach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/reuse-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reuse_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reuse_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/suppress-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_suppress_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_suppress_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/unreach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_unreach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_unreach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ebgp/maximum-paths",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ebgp_maximum_paths_modify,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_use_multiple_paths_ebgp_maximum_paths,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ibgp",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ibgp/maximum-paths",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_maximum_paths_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ibgp/cluster-length-list",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_cluster_length_list_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_ip_unicast_redistribution_list_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_redistribution_list,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list/metric",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_metric_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_metric_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list/rmap-policy-import",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_rmap_policy_import_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_rmap_policy_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_admin_distance_config,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/external",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_external_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/internal",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_internal_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/local",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_local_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rd",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rd_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rd_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/label",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/label-auto",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_auto_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_auto_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/nexthop",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_nexthop_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_nexthop_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-vpn",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vpn_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/export-vpn",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_vpn_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-vrf-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vrf_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vrf_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_import_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_import_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_export_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rmap_export,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/redirect-rt",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_redirect_rt_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_redirect_rt_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-rt-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_rt_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_rt_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/export-rt-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_rt_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_rt_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rt-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rt_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rt_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ebgp/maximum-paths",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ebgp_maximum_paths_modify,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_use_multiple_paths_ebgp_maximum_paths,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ibgp",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ibgp/maximum-paths",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_maximum_paths_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ibgp/cluster-length-list",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_route_flap_dampening,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/enable",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/reach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/reuse-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reuse_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reuse_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/suppress-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_suppress_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_suppress_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/unreach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_unreach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_unreach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ebgp/maximum-paths",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ebgp_maximum_paths_modify,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_use_multiple_paths_ebgp_maximum_paths,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ibgp",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ibgp/maximum-paths",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_maximum_paths_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ibgp/cluster-length-list",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_route_flap_dampening,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/enable",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/reach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/reuse-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reuse_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reuse_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/suppress-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_suppress_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_suppress_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/unreach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_unreach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_unreach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_network_config_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_network_config,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/backdoor",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_backdoor_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/label-index",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_label_index_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_label_index_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_aggregate_route_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/as-set",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_as_set_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/summary-only",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_summary_only_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/origin",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_origin_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/match-med",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_match_med_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/suppress-map",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_suppress_map_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_suppress_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_admin_distance_route_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_admin_distance_route,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route/distance",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_distance_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route/access-list-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_access_list_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_access_list_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/external",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_external_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/internal",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_internal_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/local",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_local_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_route_flap_dampening,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/enable",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/reach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/reuse-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reuse_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reuse_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/suppress-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_suppress_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_suppress_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/unreach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_unreach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_unreach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_network_config_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_network_config,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/backdoor",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_backdoor_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/label-index",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_label_index_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_label_index_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_aggregate_route_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/as-set",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_as_set_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/summary-only",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_summary_only_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/origin",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_origin_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/match-med",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_match_med_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/suppress-map",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_suppress_map_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_suppress_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safi_admin_distance_route_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_unicast_admin_distance_route,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route/distance",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_distance_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route/access-list-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_access_list_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_access_list_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish,
-                               .cli_show = cli_show_bgp_global_afi_safi_route_flap_dampening,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/enable",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_enable_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/reach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/reuse-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reuse_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reuse_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/suppress-above",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_suppress_above_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_suppress_above_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/unreach-decay",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_unreach_decay_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_unreach_decay_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/external",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_external_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/internal",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_internal_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/local",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_local_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-flowspec/flow-spec-config/interface",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_ipv4_flowspec_flow_spec_config_interface_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_ipv4_flowspec_flow_spec_config_interface_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config",
-                       .cbs = {
-                               .apply_finish = bgp_global_afi_safis_afi_safi_network_config_apply_finish,
-                               .create = bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_destroy,
-                               .cli_show = cli_show_bgp_global_afi_safi_network_config,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list/label-index",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_label_index_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list",
-                       .cbs = {
-                               .create = bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_create,
-                               .destroy = bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list/label-index",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_label_index_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list/rmap-policy-export",
-                       .cbs = {
-                               .modify = bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_rmap_policy_export_modify,
-                               .destroy = bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_rmap_policy_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-unicast/common-config/pre-policy",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_unicast_common_config_pre_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-unicast/common-config/post-policy",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_unicast_common_config_post_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-multicast/common-config/pre-policy",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_multicast_common_config_pre_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-multicast/common-config/post-policy",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_multicast_common_config_post_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-unicast/common-config/pre-policy",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_unicast_common_config_pre_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-unicast/common-config/post-policy",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_unicast_common_config_post_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-multicast/common-config/pre-policy",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_config_pre_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-multicast/common-config/post-policy",
-                       .cbs = {
-                               .modify = bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_config_post_policy_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate",
-                       .cbs = {
-                               .apply_finish = bgp_peer_group_afi_safi_default_originate_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list",
-                       .cbs = {
-                               .create = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy,
-                               .apply_finish = bgp_peer_group_afi_safi_prefix_limit_apply_finish,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-import",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy,
-                       }
-               },
-               {
-                       .xpath = "/frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-export",
-                       .cbs = {
-                               .modify = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify,
-                               .destroy = bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy,
-                       }
-               },
-               {
-                       .xpath = NULL,
-               },
-       }
-};
diff --git a/bgpd/bgp_nb.h b/bgpd/bgp_nb.h
deleted file mode 100644 (file)
index ec4a4b6..0000000
+++ /dev/null
@@ -1,4878 +0,0 @@
-/*
- * Bgp northbound callbacks api interfaces
- * Copyright (C) 2020  Nvidia
- *                    Chirag Shah
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef _FRR_BGP_NB_H_
-#define _FRR_BGP_NB_H_
-
-#include "northbound.h"
-
-extern const struct frr_yang_module_info frr_bgp_info;
-
-/* prototypes */
-int bgp_router_create(struct nb_cb_create_args *args);
-int bgp_router_destroy(struct nb_cb_destroy_args *args);
-int bgp_global_local_as_modify(struct nb_cb_modify_args *args);
-int bgp_global_router_id_modify(struct nb_cb_modify_args *args);
-int bgp_global_router_id_destroy(struct nb_cb_destroy_args *args);
-int bgp_global_confederation_identifier_modify(struct nb_cb_modify_args *args);
-int bgp_global_confederation_identifier_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_confederation_member_as_create(struct nb_cb_create_args *args);
-int bgp_global_confederation_member_as_destroy(struct nb_cb_destroy_args *args);
-int bgp_global_med_config_enable_med_admin_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_med_config_max_med_admin_modify(struct nb_cb_modify_args *args);
-int bgp_global_med_config_max_med_onstart_up_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_med_config_max_med_onstart_up_time_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_med_config_max_med_onstart_up_value_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_reflector_route_reflector_cluster_id_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_reflector_route_reflector_cluster_id_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_route_reflector_no_client_reflect_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_reflector_allow_outbound_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_always_compare_med_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_deterministic_med_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_confed_med_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_missing_as_worst_med_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_aspath_confed_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_ignore_as_path_length_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_external_compare_router_id_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_allow_multiple_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_multi_path_as_set_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_route_selection_options_multi_path_as_set_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_global_neighbor_config_dynamic_neighbors_limit_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_neighbor_config_dynamic_neighbors_limit_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_global_neighbor_config_log_neighbor_changes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_neighbor_config_packet_quanta_config_wpkt_quanta_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_neighbor_config_packet_quanta_config_rpkt_quanta_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_graceful_restart_enabled_modify(struct nb_cb_modify_args *args);
-int bgp_global_graceful_restart_enabled_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_graceful_restart_graceful_restart_disable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_graceful_restart_graceful_restart_disable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_graceful_restart_preserve_fw_entry_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_graceful_restart_restart_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_graceful_restart_stale_routes_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_graceful_restart_selection_deferral_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_graceful_restart_rib_stale_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_update_group_config_subgroup_pkt_queue_size_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_update_group_config_coalesce_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_config_timers_rmap_delay_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_config_timers_update_delay_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_config_timers_update_delay_time_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_global_config_timers_establish_wait_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_config_timers_establish_wait_time_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_global_config_timers_connect_retry_interval_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_config_timers_hold_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_global_config_timers_keepalive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_instance_type_view_modify(struct nb_cb_modify_args *args);
-int bgp_global_ebgp_multihop_connected_route_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_fast_external_failover_modify(struct nb_cb_modify_args *args);
-int bgp_global_local_pref_modify(struct nb_cb_modify_args *args);
-int bgp_global_default_shutdown_modify(struct nb_cb_modify_args *args);
-int bgp_global_ebgp_requires_policy_modify(struct nb_cb_modify_args *args);
-int bgp_global_suppress_duplicates_modify(struct nb_cb_modify_args *args);
-int bgp_global_show_hostname_modify(struct nb_cb_modify_args *args);
-int bgp_global_show_nexthop_hostname_modify(struct nb_cb_modify_args *args);
-int bgp_global_import_check_modify(struct nb_cb_modify_args *args);
-int bgp_global_graceful_shutdown_enable_modify(struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_create(struct nb_cb_create_args *args);
-int bgp_global_bmp_config_target_list_destroy(struct nb_cb_destroy_args *args);
-int bgp_global_bmp_config_target_list_incoming_session_session_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_bmp_config_target_list_incoming_session_session_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_bmp_config_target_list_outgoing_session_session_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_bmp_config_target_list_outgoing_session_session_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_bmp_config_target_list_outgoing_session_session_list_min_retry_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_outgoing_session_session_list_max_retry_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_mirror_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_stats_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_stats_time_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_bmp_config_target_list_ipv4_access_list_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_ipv4_access_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_bmp_config_target_list_ipv6_access_list_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_ipv6_access_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_create(
-       struct nb_cb_create_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_bmp_config_mirror_buffer_limit_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_mirror_buffer_limit_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_create(struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_destroy(struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_create(struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_destroy(struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_local_interface_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_local_interface_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_local_port_modify(struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_local_port_destroy(struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_peer_group_modify(struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_peer_group_destroy(struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_password_modify(struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_password_destroy(struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_ttl_security_modify(struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_ttl_security_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_solo_modify(struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_enforce_first_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_description_modify(struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_description_destroy(struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_passive_mode_modify(struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_capability_options_dynamic_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_capability_options_strict_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_capability_options_extended_nexthop_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_capability_options_capability_negotiate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_capability_options_override_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_update_source_ip_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_update_source_ip_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_update_source_interface_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_update_source_interface_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_ebgp_multihop_enabled_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_ebgp_multihop_enabled_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_ebgp_multihop_disable_connected_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_local_as_local_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_local_as_local_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_local_as_no_prepend_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_local_as_replace_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_bfd_options_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_bfd_options_detect_multiplier_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_bfd_options_detect_multiplier_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_bfd_options_required_min_rx_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_bfd_options_required_min_rx_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_bfd_options_desired_min_tx_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_bfd_options_desired_min_tx_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_bfd_options_session_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_bfd_options_session_type_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_bfd_options_check_cp_failure_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_bfd_options_check_cp_failure_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_admin_shutdown_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_admin_shutdown_enable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_admin_shutdown_message_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_admin_shutdown_message_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_graceful_restart_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_graceful_restart_enable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_graceful_restart_graceful_restart_helper_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_graceful_restart_graceful_restart_helper_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_timers_advertise_interval_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_timers_advertise_interval_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_timers_connect_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_timers_connect_time_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_timers_hold_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_timers_keepalive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_create(struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_destroy(struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_v6only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_peer_group_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_peer_group_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_password_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_password_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_ttl_security_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_ttl_security_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_solo_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_enforce_first_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_description_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_description_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_passive_mode_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_capability_options_dynamic_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_capability_options_strict_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_capability_options_extended_nexthop_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_capability_options_capability_negotiate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_capability_options_override_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_update_source_ip_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_update_source_ip_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_update_source_interface_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_update_source_interface_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_disable_connected_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_local_as_local_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_local_as_local_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_local_as_no_prepend_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_local_as_replace_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_detect_multiplier_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_detect_multiplier_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_required_min_rx_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_required_min_rx_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_desired_min_tx_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_desired_min_tx_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_session_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_session_type_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_enable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_helper_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_helper_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_timers_connect_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_timers_connect_time_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_timers_hold_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_timers_keepalive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_create(struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_destroy(struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_ipv4_listen_range_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_ipv4_listen_range_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_ipv6_listen_range_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_ipv6_listen_range_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_password_modify(struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_password_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_ttl_security_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_ttl_security_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_solo_modify(struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_enforce_first_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_description_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_description_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_passive_mode_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_capability_options_dynamic_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_capability_options_strict_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_capability_options_extended_nexthop_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_capability_options_capability_negotiate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_capability_options_override_capability_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_update_source_ip_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_update_source_ip_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_update_source_interface_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_update_source_interface_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_ebgp_multihop_enabled_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_ebgp_multihop_enabled_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_ebgp_multihop_disable_connected_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_local_as_local_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_local_as_local_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_local_as_no_prepend_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_local_as_replace_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_bfd_options_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_bfd_options_detect_multiplier_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_bfd_options_detect_multiplier_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_bfd_options_required_min_rx_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_bfd_options_required_min_rx_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_bfd_options_desired_min_tx_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_bfd_options_desired_min_tx_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_bfd_options_session_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_bfd_options_session_type_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_bfd_options_check_cp_failure_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_bfd_options_check_cp_failure_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_admin_shutdown_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_admin_shutdown_enable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_admin_shutdown_message_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_admin_shutdown_message_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_graceful_restart_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_graceful_restart_enable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_helper_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_helper_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_timers_advertise_interval_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_timers_advertise_interval_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_timers_connect_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_timers_connect_time_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_timers_hold_time_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_timers_keepalive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_backdoor_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_label_index_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_label_index_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_as_set_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_summary_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_origin_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_match_med_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_suppress_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_suppress_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_distance_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_access_list_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_access_list_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_metric_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_metric_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_rmap_policy_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_rmap_policy_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_external_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_internal_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_local_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rd_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rd_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_auto_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_auto_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_nexthop_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_nexthop_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vpn_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_vpn_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vrf_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vrf_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_redirect_rt_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_redirect_rt_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_rt_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_rt_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_rt_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_rt_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rt_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rt_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_backdoor_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_label_index_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_label_index_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_as_set_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_summary_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_origin_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_match_med_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_suppress_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_suppress_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_distance_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_access_list_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_access_list_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_metric_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_metric_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_rmap_policy_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_rmap_policy_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_external_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_internal_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_local_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rd_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rd_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_auto_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_auto_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_nexthop_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_nexthop_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vpn_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_vpn_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vrf_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vrf_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_redirect_rt_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_redirect_rt_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_rt_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_rt_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_rt_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_rt_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rt_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rt_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_backdoor_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_label_index_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_label_index_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_as_set_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_summary_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_origin_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_match_med_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_suppress_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_suppress_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_distance_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_access_list_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_access_list_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_external_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_internal_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_local_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_backdoor_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_label_index_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_label_index_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_as_set_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_summary_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_origin_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_match_med_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_suppress_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_suppress_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_distance_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_access_list_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_access_list_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_external_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_internal_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_local_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_flowspec_flow_spec_config_interface_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_ipv4_flowspec_flow_spec_config_interface_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_label_index_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_create(
-       struct nb_cb_create_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_label_index_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_unicast_common_config_pre_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_unicast_common_config_post_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_multicast_common_config_pre_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_multicast_common_config_post_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_unicast_common_config_pre_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_unicast_common_config_post_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_config_pre_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_config_post_policy_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args);
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args);
-
-/*
- * Callback registered with routing_nb lib to validate only
- * one instance of bgp instance is allowed
- */
-int routing_control_plane_protocols_name_validate(
-       struct nb_cb_create_args *args);
-
-/* Optional 'cli_show' callbacks. */
-void cli_show_router_bgp(struct vty *vty, struct lyd_node *dnode,
-                        bool show_defaults);
-void cli_show_router_bgp_router_id(struct vty *vty, struct lyd_node *dnode,
-                                  bool show_defaults);
-void cli_show_router_bgp_route_selection(struct vty *vty,
-                                        struct lyd_node *dnode,
-                                        bool show_defaults);
-void cli_show_router_bgp_ebgp_requires_policy(struct vty *vty,
-                                             struct lyd_node *dnode,
-                                             bool show_defaults);
-void cli_show_router_bgp_suppress_duplicates(struct vty *vty,
-                                             struct lyd_node *dnode,
-                                             bool show_defaults);
-void cli_show_router_bgp_default_shutdown(struct vty *vty,
-                                         struct lyd_node *dnode,
-                                         bool show_defaults);
-void cli_show_router_bgp_import_check(struct vty *vty, struct lyd_node *dnode,
-                                     bool show_defaults);
-void cli_show_router_bgp_show_hostname(struct vty *vty, struct lyd_node *dnode,
-                                      bool show_defaults);
-void cli_show_router_bgp_show_nexthop_hostname(struct vty *vty,
-                                              struct lyd_node *dnode,
-                                              bool show_defaults);
-void cli_show_router_bgp_fast_external_failover(struct vty *vty,
-                                               struct lyd_node *dnode,
-                                               bool show_defaults);
-void cli_show_router_global_neighbor_config(struct vty *vty,
-                                           struct lyd_node *dnode,
-                                           bool show_defaults);
-void cli_show_router_global_update_group_config_subgroup_pkt_queue_size(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_router_global_update_group_config_coalesce_time(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_router_global_ebgp_multihop_connected_route_check(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_router_bgp_local_pref(struct vty *vty, struct lyd_node *dnode,
-                                   bool show_defaults);
-void cli_show_router_bgp_route_reflector(struct vty *vty,
-                                        struct lyd_node *dnode,
-                                        bool show_defaults);
-void cli_show_router_bgp_confederation_identifier(struct vty *vty,
-                                                 struct lyd_node *dnode,
-                                                 bool show_defaults);
-void cli_show_router_bgp_confederation_member_as(struct vty *vty,
-                                                struct lyd_node *dnode,
-                                                bool show_defaults);
-void cli_show_router_bgp_graceful_shutdown(struct vty *vty,
-                                          struct lyd_node *dnode,
-                                          bool show_defaults);
-void cli_show_router_bgp_med_config(struct vty *vty, struct lyd_node *dnode,
-                                   bool show_defaults);
-void cli_show_bgp_global_afi_safi_header(struct vty *vty,
-                                        struct lyd_node *dnode,
-                                        bool show_defaults);
-void cli_show_bgp_global_afi_safi_header_end(struct vty *vty,
-                                            struct lyd_node *dnode);
-void cli_show_bgp_global_afi_safi_network_config(struct vty *vty,
-                                                struct lyd_node *dnode,
-                                                bool show_defaults);
-void cli_show_bgp_global_afi_safi_unicast_aggregate_route(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_admin_distance_config(struct vty *vty,
-                                                       struct lyd_node *dnode,
-                                                       bool show_defaults);
-void cli_show_bgp_global_afi_safi_route_flap_dampening(struct vty *vty,
-                                                      struct lyd_node *dnode,
-                                                      bool show_defaults);
-void cli_show_bgp_global_afi_safi_unicast_admin_distance_route(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_unicast_use_multiple_paths_ebgp_maximum_paths(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_redistribution_list(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_nexthop(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rd(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_import_vpn(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_export_vpn(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rmap_export(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults);
-
-void bgp_global_route_selection_options_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_med_config_apply_finish(struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safis_afi_safi_network_config_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safi_aggregate_route_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safi_admin_distance_route_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safi_ip_unicast_redistribution_list_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_neighbors_neighbor_local_as_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_neighbors_unnumbered_neighbor_local_as_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_peer_group_neighbor_remote_as_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_neighbors_neighbor_admin_shutdown_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_neighbors_unnumbered_neighbor_admin_shutdown_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_peer_groups_peer_group_admin_shutdown_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_peer_groups_peer_group_local_as_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_peer_group_afi_safi_prefix_limit_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_neighbor_afi_safi_default_originate_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-void bgp_peer_group_afi_safi_default_originate_apply_finish(
-       struct nb_cb_apply_finish_args *args);
-
-/* xpath macros */
-/* route-list */
-#define FRR_BGP_GLOBAL_XPATH                                                   \
-       "/frr-routing:routing/control-plane-protocols/"                        \
-       "control-plane-protocol[type='%s'][name='%s'][vrf='%s']/"              \
-       "frr-bgp:bgp"
-
-#define FRR_BGP_GLOBAL_AS_XPATH                                                \
-       "/frr-routing:routing/control-plane-protocols/"                        \
-       "control-plane-protocol[type='%s'][name='%s'][vrf='%s']/"              \
-       "frr-bgp:bgp/local-as"
-#define FRR_BGP_AFI_SAFI_REDIST_XPATH                                          \
-       "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/"                  \
-       "redistribution-list[route-type='%s'][route-instance='%s']"
-#define FRR_BGP_NEIGHBOR_NUM_XPATH "./neighbors/neighbor[remote-address='%s']%s"
-#define FRR_BGP_NEIGHBOR_UNNUM_XPATH                                           \
-       "./neighbors/unnumbered-neighbor[interface='%s']%s"
-#define FRR_BGP_PEER_GROUP_XPATH                                               \
-       "./peer-groups/peer-group[peer-group-name='%s']%s"
-#define FRR_BGP_NEIGHBOR_NUM_AFI_SAFI_XPATH                                    \
-       "./neighbors/neighbor[remote-address='%s']/afi-safis/afi-safi[afi-safi-name='%s']"
-#define FRR_BGP_NEIGHBOR_UNNUM_AFI_SAFI_XPATH                                  \
-       "./neighbors/neighbor[interface='%s']/afi-safis/afi-safi[afi-safi-name='%s']"
-#define FRR_BGP_PEER_GROUP_AFI_SAFI_XPATH                                      \
-       "./peer-groups/peer-group[peer-group-name='%s']/afi-safis/afi-safi[afi-safi-name='%s']"
-#define FRR_BGP_AF_XPATH "/afi-safis/afi-safi[afi-safi-name='%s']"
-
-#endif
diff --git a/bgpd/bgp_nb_config.c b/bgpd/bgp_nb_config.c
deleted file mode 100644 (file)
index ab22aee..0000000
+++ /dev/null
@@ -1,48547 +0,0 @@
-/*
- * Bgp northbound config callbacks
- * Copyright (C) 2020  Nvidia
- *                    Chirag Shah
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <zebra.h>
-
-#include "northbound.h"
-#include "libfrr.h"
-#include "log.h"
-#include "bgpd/bgp_nb.h"
-#include "bgpd/bgp_nb.h"
-#include "bgpd/bgpd.h"
-#include "bgpd/bgp_vty.h"
-#include "bgpd/bgp_mplsvpn.h"
-#include "bgpd/bgp_fsm.h"
-#include "bgpd/bgp_addpath.h"
-#include "bgpd/bgp_updgrp.h"
-#include "bgpd/bgp_io.h"
-#include "bgpd/bgp_damp.h"
-
-DEFINE_HOOK(bgp_snmp_init_stats, (struct bgp *bgp), (bgp));
-
-FRR_CFG_DEFAULT_ULONG(BGP_CONNECT_RETRY,
-        { .val_ulong = 10, .match_profile = "datacenter", },
-        { .val_ulong = 120 },
-);
-FRR_CFG_DEFAULT_ULONG(BGP_HOLDTIME,
-        { .val_ulong = 9, .match_profile = "datacenter", },
-        { .val_ulong = 180 },
-);
-FRR_CFG_DEFAULT_ULONG(BGP_KEEPALIVE,
-        { .val_ulong = 3, .match_profile = "datacenter", },
-        { .val_ulong = 60 },
-);
-
-int routing_control_plane_protocols_name_validate(
-       struct nb_cb_create_args *args)
-{
-       const char *name;
-
-       name = yang_dnode_get_string(args->dnode, "./name");
-       if (!strmatch(name, "bgp")) {
-               snprintf(args->errmsg, args->errmsg_len,
-                        "per vrf only one bgp instance is supported.");
-               return NB_ERR_VALIDATION;
-       }
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp
- */
-int bgp_router_create(struct nb_cb_create_args *args)
-{
-       const struct lyd_node *vrf_dnode;
-       struct bgp *bgp;
-       const char *vrf_name;
-       const char *name = NULL;
-       as_t as;
-       enum bgp_instance_type inst_type;
-       bool is_view_inst = false;
-       int ret;
-       int is_new_bgp = 0;
-
-       inst_type = BGP_INSTANCE_TYPE_DEFAULT;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               vrf_dnode = yang_dnode_get_parent(args->dnode,
-                                                 "control-plane-protocol");
-               vrf_name = yang_dnode_get_string(vrf_dnode, "./vrf");
-
-               if (strmatch(vrf_name, VRF_DEFAULT_NAME)) {
-                       name = NULL;
-               } else {
-                       name = vrf_name;
-                       inst_type = BGP_INSTANCE_TYPE_VRF;
-               }
-
-               as = yang_dnode_get_uint32(args->dnode, "./global/local-as");
-
-               is_view_inst = yang_dnode_get_bool(
-                       args->dnode, "./global/instance-type-view");
-               if (is_view_inst)
-                       inst_type = BGP_INSTANCE_TYPE_VIEW;
-
-               if (inst_type == BGP_INSTANCE_TYPE_DEFAULT)
-                       is_new_bgp = (bgp_lookup(as, name) == NULL);
-               else
-                       is_new_bgp = (bgp_lookup_by_name(name) == NULL);
-
-               ret = bgp_get_vty(&bgp, &as, name, inst_type);
-               if (ret) {
-                       switch (ret) {
-                       case BGP_ERR_AS_MISMATCH:
-                               snprintf(
-                                       args->errmsg, args->errmsg_len,
-                                       "BGP instance is already running; AS is %u",
-                                       as);
-                               break;
-                       case BGP_ERR_INSTANCE_MISMATCH:
-                               snprintf(args->errmsg, args->errmsg_len,
-                                        "BGP instance type mismatch");
-                               break;
-                       }
-
-                       UNSET_FLAG(bgp->vrf_flags, BGP_VRF_AUTO);
-
-                       nb_running_set_entry(args->dnode, bgp);
-
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               /*
-                * If we just instantiated the default instance, complete
-                * any pending VRF-VPN leaking that was configured via
-                * earlier "router bgp X vrf FOO" blocks.
-                */
-               if (is_new_bgp && inst_type == BGP_INSTANCE_TYPE_DEFAULT)
-                       vpn_leak_postchange_all();
-
-               /*
-                * Check if we need to export to other VRF(s).
-                * Leak the routes to importing bgp vrf instances,
-                * only when new bgp vrf instance is configured.
-                */
-               if (is_new_bgp)
-                       bgp_vpn_leak_export(bgp);
-
-               UNSET_FLAG(bgp->vrf_flags, BGP_VRF_AUTO);
-
-               nb_running_set_entry(args->dnode, bgp);
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_router_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-
-               if (!bgp)
-                       return NB_OK;
-
-               if (bgp->l3vni) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Please unconfigure l3vni %u", bgp->l3vni);
-                       return NB_ERR_VALIDATION;
-               }
-
-               /* Cannot delete default instance if vrf instances exist */
-               if (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
-                       struct listnode *node;
-                       struct bgp *tmp_bgp;
-
-                       for (ALL_LIST_ELEMENTS_RO(bm->bgp, node, tmp_bgp)) {
-                               if (tmp_bgp->inst_type != BGP_INSTANCE_TYPE_VRF)
-                                       continue;
-                               if (CHECK_FLAG(tmp_bgp->af_flags[AFI_IP]
-                                                               [SAFI_UNICAST],
-                                              BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT)
-                                   || CHECK_FLAG(
-                                              tmp_bgp->af_flags[AFI_IP6]
-                                                               [SAFI_UNICAST],
-                                              BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT)
-                                   || CHECK_FLAG(
-                                              tmp_bgp->af_flags[AFI_IP]
-                                                               [SAFI_UNICAST],
-                                              BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT)
-                                   || CHECK_FLAG(
-                                              tmp_bgp->af_flags[AFI_IP6]
-                                                               [SAFI_UNICAST],
-                                              BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT)
-                                   || CHECK_FLAG(
-                                              tmp_bgp->af_flags[AFI_IP]
-                                                               [SAFI_UNICAST],
-                                              BGP_CONFIG_VRF_TO_VRF_EXPORT)
-                                   || CHECK_FLAG(
-                                              tmp_bgp->af_flags[AFI_IP6]
-                                                               [SAFI_UNICAST],
-                                              BGP_CONFIG_VRF_TO_VRF_EXPORT)
-                                   || (bgp == bgp_get_evpn()
-                                       && (CHECK_FLAG(
-                                                   tmp_bgp->af_flags
-                                                           [AFI_L2VPN]
-                                                           [SAFI_EVPN],
-                                                   BGP_L2VPN_EVPN_ADV_IPV4_UNICAST)
-                                           || CHECK_FLAG(
-                                                      tmp_bgp->af_flags
-                                                              [AFI_L2VPN]
-                                                              [SAFI_EVPN],
-                                                      BGP_L2VPN_EVPN_ADV_IPV4_UNICAST_GW_IP)
-                                           || CHECK_FLAG(
-                                                      tmp_bgp->af_flags
-                                                              [AFI_L2VPN]
-                                                              [SAFI_EVPN],
-                                                      BGP_L2VPN_EVPN_ADV_IPV6_UNICAST)
-                                           || CHECK_FLAG(
-                                                      tmp_bgp->af_flags
-                                                              [AFI_L2VPN]
-                                                              [SAFI_EVPN],
-                                                      BGP_L2VPN_EVPN_ADV_IPV6_UNICAST_GW_IP)))
-                                   || (tmp_bgp->vnihash
-                                       && hashcount(tmp_bgp->vnihash))) {
-                                       snprintf(
-                                               args->errmsg, args->errmsg_len,
-                                               "Cannot delete default BGP instance. Dependent VRF instances exist\n");
-                                       return NB_ERR_VALIDATION;
-                               }
-                       }
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_unset_entry(args->dnode);
-
-               bgp_delete(bgp);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/local-as
- */
-int bgp_global_local_as_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               /*
-                * Changing AS number is not allowed, but we must allow it
-                * once, when the BGP instance is created the first time.
-                * If the instance already exists - return the validation
-                * error.
-                */
-               bgp = nb_running_get_entry_non_rec(
-                       lyd_parent(lyd_parent(args->dnode)), NULL, false);
-               if (bgp) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Changing AS number is not allowed");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/router-id
- */
-int bgp_global_router_id_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-       struct in_addr router_id;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       yang_dnode_get_ipv4(&router_id, args->dnode, NULL);
-       bgp_router_id_static_set(bgp, router_id);
-
-       return NB_OK;
-}
-
-int bgp_global_router_id_destroy(struct nb_cb_destroy_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-       struct in_addr router_id;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       router_id.s_addr = INADDR_ANY;
-       bgp_router_id_static_set(bgp, router_id);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/confederation/identifier
- */
-int bgp_global_confederation_identifier_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       as_t as;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               as = yang_dnode_get_uint32(args->dnode, NULL);
-               if (!as) {
-                       snprintf(args->errmsg, args->errmsg_len, "Invalid AS.");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               as = yang_dnode_get_uint32(args->dnode, NULL);
-
-               bgp_confederation_id_set(bgp, as);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_confederation_identifier_destroy(struct nb_cb_destroy_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       bgp_confederation_id_unset(bgp);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/confederation/member-as
- */
-int bgp_global_confederation_member_as_create(struct nb_cb_create_args *args)
-{
-       as_t my_as, as;
-       struct bgp *bgp;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               my_as = yang_dnode_get_uint32(args->dnode,
-                                             "../../../global/local-as");
-               as = yang_dnode_get_uint32(args->dnode, NULL);
-               if (my_as == as) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Local member-AS %u not allowed in confed peer list",
-                               my_as);
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               as = yang_dnode_get_uint32(args->dnode, NULL);
-
-               ret = bgp_confederation_peers_add(bgp, as);
-               if (ret == BGP_ERR_INVALID_AS) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Local member-AS not alloed in confed peer list");
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_confederation_member_as_destroy(struct nb_cb_destroy_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       as_t as;
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       as = yang_dnode_get_uint32(args->dnode, NULL);
-
-       bgp_confederation_peers_remove(bgp, as);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config
- */
-void bgp_global_med_config_apply_finish(struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       bgp_maxmed_update(bgp);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/enable-med-admin
- */
-int bgp_global_med_config_enable_med_admin_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       bgp->v_maxmed_admin = yang_dnode_get_bool(args->dnode, NULL);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-admin
- */
-int bgp_global_med_config_max_med_admin_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       uint32_t med_admin_val;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               med_admin_val = yang_dnode_get_uint32(args->dnode, NULL);
-
-               /* enable_med_admin is required to be enabled for max-med-admin
-                * non default value.
-                */
-               if (med_admin_val != BGP_MAXMED_VALUE_DEFAULT
-                   && !yang_dnode_get_bool(args->dnode,
-                                           "../enable-med-admin")) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "enable med admin is not set");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               med_admin_val = yang_dnode_get_uint32(args->dnode, NULL);
-
-               bgp->maxmed_admin_value = med_admin_val;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-onstart-up-time
- */
-int bgp_global_med_config_max_med_onstart_up_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               bgp->v_maxmed_onstartup =
-                       yang_dnode_get_uint32(args->dnode, NULL);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_med_config_max_med_onstart_up_time_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               /* Cancel max-med onstartup if its on */
-               if (bgp->t_maxmed_onstartup) {
-                       THREAD_OFF(bgp->t_maxmed_onstartup);
-                       bgp->maxmed_onstartup_over = 1;
-               }
-
-               bgp->v_maxmed_onstartup = BGP_MAXMED_ONSTARTUP_UNCONFIGURED;
-               /* Resetting onstartup value as part of dependent node is
-                * detroyed.
-                */
-               bgp->maxmed_onstartup_value = BGP_MAXMED_VALUE_DEFAULT;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/med-config/max-med-onstart-up-value
- */
-int bgp_global_med_config_max_med_onstart_up_value_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       uint32_t onstartup_val;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               onstartup_val = yang_dnode_get_uint32(args->dnode, NULL);
-
-               if (!yang_dnode_exists(args->dnode,
-                                      "../max-med-onstart-up-time")
-                   && onstartup_val != BGP_MAXMED_VALUE_DEFAULT) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "max-med-onstart-up-time is not set.");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               bgp->maxmed_onstartup_value =
-                       yang_dnode_get_uint32(args->dnode, NULL);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/route-reflector-cluster-id
- */
-int bgp_global_route_reflector_route_reflector_cluster_id_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-       struct in_addr cluster_id;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       /* cluster-id is either dotted-quad or a uint32 */
-       (void)inet_aton(lyd_get_value(args->dnode), &cluster_id);
-       bgp_cluster_id_set(bgp, &cluster_id);
-
-       if (bgp_clear_star_soft_out(bgp->name, args->errmsg, args->errmsg_len))
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-int bgp_global_route_reflector_route_reflector_cluster_id_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       bgp_cluster_id_unset(bgp);
-
-       if (bgp_clear_star_soft_out(bgp->name, args->errmsg, args->errmsg_len))
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/no-client-reflect
- */
-int bgp_global_route_reflector_no_client_reflect_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_NO_CLIENT_TO_CLIENT);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_NO_CLIENT_TO_CLIENT);
-
-       if (bgp_clear_star_soft_out(bgp->name, args->errmsg, args->errmsg_len))
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-reflector/allow-outbound-policy
- */
-int bgp_global_route_reflector_allow_outbound_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY);
-
-       update_group_announce_rrclients(bgp);
-
-       if (bgp_clear_star_soft_out(bgp->name, args->errmsg, args->errmsg_len))
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options
- */
-void bgp_global_route_selection_options_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       bgp_recalculate_all_bestpaths(bgp);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/always-compare-med
- */
-int bgp_global_route_selection_options_always_compare_med_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_ALWAYS_COMPARE_MED);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_ALWAYS_COMPARE_MED);
-
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/deterministic-med
- */
-int bgp_global_route_selection_options_deterministic_med_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       int bestpath_per_as_used;
-       afi_t afi;
-       safi_t safi;
-       struct peer *peer;
-       struct listnode *node;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-
-               if (!bgp)
-                       return NB_OK;
-
-               /* for deconfiguring deterministic-med case */
-               if (!yang_dnode_get_bool(args->dnode, NULL)
-                   && CHECK_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED)) {
-                       bestpath_per_as_used = 0;
-
-                       for (ALL_LIST_ELEMENTS_RO(bgp->peer, node, peer)) {
-                               FOREACH_AFI_SAFI (afi, safi)
-                                       if (bgp_addpath_dmed_required(
-                                                   peer->addpath_type[afi]
-                                                                     [safi])) {
-                                               bestpath_per_as_used = 1;
-                                               break;
-                                       }
-
-                               if (bestpath_per_as_used)
-                                       break;
-                       }
-
-                       if (bestpath_per_as_used) {
-                               snprintf(
-                                       args->errmsg, args->errmsg_len,
-                                       "bgp deterministic-med cannot be disabled while addpath-tx-bestpath-per-AS is in use");
-                               return NB_ERR_VALIDATION;
-                       }
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               if (yang_dnode_get_bool(args->dnode, NULL))
-                       SET_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED);
-               else
-                       UNSET_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/confed-med
- */
-int bgp_global_route_selection_options_confed_med_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_MED_CONFED);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_MED_CONFED);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/missing-as-worst-med
- */
-int bgp_global_route_selection_options_missing_as_worst_med_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_MED_MISSING_AS_WORST);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_MED_MISSING_AS_WORST);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/aspath-confed
- */
-int bgp_global_route_selection_options_aspath_confed_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/ignore-as-path-length
- */
-int bgp_global_route_selection_options_ignore_as_path_length_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_ASPATH_IGNORE);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_ASPATH_IGNORE);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/external-compare-router-id
- */
-int bgp_global_route_selection_options_external_compare_router_id_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_COMPARE_ROUTER_ID);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_COMPARE_ROUTER_ID);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/allow-multiple-as
- */
-int bgp_global_route_selection_options_allow_multiple_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               if (yang_dnode_get_bool(args->dnode, NULL)) {
-                       SET_FLAG(bgp->flags, BGP_FLAG_ASPATH_MULTIPATH_RELAX);
-                       if (yang_dnode_get_bool(args->dnode,
-                                               "../multi-path-as-set")) {
-                               SET_FLAG(bgp->flags,
-                                        BGP_FLAG_MULTIPATH_RELAX_AS_SET);
-                       } else {
-                               UNSET_FLAG(bgp->flags,
-                                          BGP_FLAG_MULTIPATH_RELAX_AS_SET);
-                       }
-               } else {
-                       UNSET_FLAG(bgp->flags, BGP_FLAG_ASPATH_MULTIPATH_RELAX);
-                       /* unset as-set */
-                       UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
-               }
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/route-selection-options/multi-path-as-set
- */
-int bgp_global_route_selection_options_multi_path_as_set_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               if (yang_dnode_get_bool(args->dnode, NULL))
-                       SET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
-               else
-                       UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_route_selection_options_multi_path_as_set_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               /* Only unset if it set, it is possible allow_multiple_as_modify
-                * unset this.
-                */
-               if (CHECK_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET)) {
-                       UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
-
-                       bgp_recalculate_all_bestpaths(bgp);
-               }
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/dynamic-neighbors-limit
- */
-int bgp_global_global_neighbor_config_dynamic_neighbors_limit_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-       uint32_t listen_limit;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       listen_limit = yang_dnode_get_uint32(args->dnode, NULL);
-
-       bgp_listen_limit_set(bgp, listen_limit);
-
-       return NB_OK;
-}
-
-int bgp_global_global_neighbor_config_dynamic_neighbors_limit_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       bgp_listen_limit_unset(bgp);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/log-neighbor-changes
- */
-int bgp_global_global_neighbor_config_log_neighbor_changes_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/packet-quanta-config/wpkt-quanta
- */
-int bgp_global_global_neighbor_config_packet_quanta_config_wpkt_quanta_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-       uint32_t quanta;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       quanta = yang_dnode_get_uint32(args->dnode, NULL);
-
-       if (atomic_load_explicit(&bgp->wpkt_quanta, memory_order_relaxed)
-           == BGP_WRITE_PACKET_MAX)
-               bgp_wpkt_quanta_config_vty(bgp, quanta, true);
-       else
-               bgp_wpkt_quanta_config_vty(bgp, quanta, false);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-neighbor-config/packet-quanta-config/rpkt-quanta
- */
-int bgp_global_global_neighbor_config_packet_quanta_config_rpkt_quanta_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-       uint32_t quanta;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       quanta = yang_dnode_get_uint32(args->dnode, NULL);
-
-       if (atomic_load_explicit(&bgp->rpkt_quanta, memory_order_relaxed)
-           == BGP_READ_PACKET_MAX)
-               bgp_rpkt_quanta_config_vty(bgp, quanta, true);
-       else
-               bgp_rpkt_quanta_config_vty(bgp, quanta, false);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/enabled
- */
-int bgp_global_graceful_restart_enabled_modify(struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_graceful_restart_enabled_destroy(struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/graceful-restart-disable
- */
-int bgp_global_graceful_restart_graceful_restart_disable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_graceful_restart_graceful_restart_disable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/preserve-fw-entry
- */
-int bgp_global_graceful_restart_preserve_fw_entry_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/restart-time
- */
-int bgp_global_graceful_restart_restart_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/stale-routes-time
- */
-int bgp_global_graceful_restart_stale_routes_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/selection-deferral-time
- */
-int bgp_global_graceful_restart_selection_deferral_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-restart/rib-stale-time
- */
-int bgp_global_graceful_restart_rib_stale_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-update-group-config/subgroup-pkt-queue-size
- */
-int bgp_global_global_update_group_config_subgroup_pkt_queue_size_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-       uint32_t max_size;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       max_size = yang_dnode_get_uint32(args->dnode, NULL);
-
-       bgp_default_subgroup_pkt_queue_max_set(bgp, max_size);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-update-group-config/coalesce-time
- */
-int bgp_global_global_update_group_config_coalesce_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-       uint32_t coalesce_time;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       coalesce_time = yang_dnode_get_uint32(args->dnode, NULL);
-
-       if (coalesce_time != BGP_DEFAULT_SUBGROUP_COALESCE_TIME) {
-               bgp->heuristic_coalesce = false;
-               bgp->coalesce_time = coalesce_time;
-       } else {
-               bgp->heuristic_coalesce = true;
-               bgp->coalesce_time = BGP_DEFAULT_SUBGROUP_COALESCE_TIME;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/rmap-delay-time
- */
-int bgp_global_global_config_timers_rmap_delay_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/update-delay-time
- */
-int bgp_global_global_config_timers_update_delay_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_global_config_timers_update_delay_time_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/establish-wait-time
- */
-int bgp_global_global_config_timers_establish_wait_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_global_config_timers_establish_wait_time_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/connect-retry-interval
- */
-int bgp_global_global_config_timers_connect_retry_interval_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/hold-time
- */
-int bgp_global_global_config_timers_hold_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       unsigned long keepalive = 0;
-       unsigned long holdtime = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               holdtime = yang_dnode_get_uint16(args->dnode, NULL);
-               /* Holdtime value check. */
-               if (holdtime < 3 && holdtime != 0) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "hold time value must be either 0 or greater than 3");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive");
-               holdtime = yang_dnode_get_uint16(args->dnode, NULL);
-
-               bgp_timers_set(bgp, keepalive, holdtime, DFLT_BGP_CONNECT_RETRY,
-                              BGP_DEFAULT_DELAYOPEN);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/global-config-timers/keepalive
- */
-int bgp_global_global_config_timers_keepalive_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       unsigned long keepalive = 0;
-       unsigned long holdtime = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
-               /* Holdtime value check. */
-               if (holdtime < 3 && holdtime != 0) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "hold time value must be either 0 or greater than 3");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               keepalive = yang_dnode_get_uint16(args->dnode, NULL);
-               holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
-
-               bgp_timers_set(bgp, keepalive, holdtime, DFLT_BGP_CONNECT_RETRY,
-                              BGP_DEFAULT_DELAYOPEN);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/instance-type-view
- */
-int bgp_global_instance_type_view_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               /*
-                * Changing instance type is not allowed, but we must allow it
-                * once, when the BGP instance is created the first time.
-                * If the instance already exists - return the validation
-                * error.
-                */
-               bgp = nb_running_get_entry_non_rec(
-                       lyd_parent(lyd_parent(args->dnode)), NULL, false);
-               if (bgp) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Changing instance type is not allowed");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/ebgp-multihop-connected-route-check
- */
-int bgp_global_ebgp_multihop_connected_route_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK);
-
-       if (bgp_clear_star_soft_in(bgp->name, args->errmsg, args->errmsg_len))
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/fast-external-failover
- */
-int bgp_global_fast_external_failover_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       if (!yang_dnode_get_bool(args->dnode, NULL)) {
-               SET_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER);
-       } else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/local-pref
- */
-int bgp_global_local_pref_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-       struct bgp *bgp;
-       uint32_t local_pref;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       local_pref = yang_dnode_get_uint32(args->dnode, NULL);
-
-       bgp_default_local_preference_set(bgp, local_pref);
-
-       if (bgp_clear_star_soft_in(bgp->name, args->errmsg, args->errmsg_len))
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/default-shutdown
- */
-int bgp_global_default_shutdown_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       bgp->autoshutdown = yang_dnode_get_bool(args->dnode, NULL);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/ebgp-requires-policy
- */
-int bgp_global_ebgp_requires_policy_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_EBGP_REQUIRES_POLICY);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_EBGP_REQUIRES_POLICY);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/suppress-duplicates
- */
-int bgp_global_suppress_duplicates_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_SUPPRESS_DUPLICATES);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_SUPPRESS_DUPLICATES);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/show-hostname
- */
-int bgp_global_show_hostname_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_SHOW_HOSTNAME);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_SHOW_HOSTNAME);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/show-nexthop-hostname
- */
-int bgp_global_show_nexthop_hostname_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_SHOW_NEXTHOP_HOSTNAME);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_SHOW_NEXTHOP_HOSTNAME);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/import-check
- */
-int bgp_global_import_check_modify(struct nb_cb_modify_args *args)
-{
-       if (args->event != NB_EV_APPLY)
-               return NB_OK;
-
-       struct bgp *bgp;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       if (yang_dnode_get_bool(args->dnode, NULL))
-               SET_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK);
-       else
-               UNSET_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK);
-
-       bgp_static_redo_import_check(bgp);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/graceful-shutdown/enable
- */
-int bgp_global_graceful_shutdown_enable_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               if (CHECK_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN)) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "%%Failed: per-vrf graceful-shutdown config not permitted with global graceful-shutdown");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               if (yang_dnode_get_bool(args->dnode, NULL))
-                       SET_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN);
-               else
-                       UNSET_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN);
-
-               bgp_static_redo_import_check(bgp);
-               bgp_redistribute_redo(bgp);
-
-               if (bgp_clear_star_soft_out(bgp->name, args->errmsg,
-                                           args->errmsg_len))
-                       return NB_ERR_INCONSISTENCY;
-
-               if (bgp_clear_star_soft_in(bgp->name, args->errmsg,
-                                          args->errmsg_len))
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list
- */
-int bgp_global_bmp_config_target_list_create(struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_bmp_config_target_list_destroy(struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/incoming-session/session-list
- */
-int bgp_global_bmp_config_target_list_incoming_session_session_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_bmp_config_target_list_incoming_session_session_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list
- */
-int bgp_global_bmp_config_target_list_outgoing_session_session_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_bmp_config_target_list_outgoing_session_session_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list/min-retry-time
- */
-int bgp_global_bmp_config_target_list_outgoing_session_session_list_min_retry_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/outgoing-session/session-list/max-retry-time
- */
-int bgp_global_bmp_config_target_list_outgoing_session_session_list_max_retry_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/mirror
- */
-int bgp_global_bmp_config_target_list_mirror_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/stats-time
- */
-int bgp_global_bmp_config_target_list_stats_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_bmp_config_target_list_stats_time_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/ipv4-access-list
- */
-int bgp_global_bmp_config_target_list_ipv4_access_list_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_bmp_config_target_list_ipv4_access_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/ipv6-access-list
- */
-int bgp_global_bmp_config_target_list_ipv6_access_list_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_bmp_config_target_list_ipv6_access_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/mirror-buffer-limit
- */
-int bgp_global_bmp_config_mirror_buffer_limit_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_bmp_config_mirror_buffer_limit_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi
- */
-int bgp_global_afi_safis_afi_safi_create(struct nb_cb_create_args *args)
-{
-       const struct lyd_node *vrf_dnode;
-       const char *vrf_name;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               vrf_dnode = yang_dnode_get_parent(args->dnode,
-                                                 "control-plane-protocol");
-               vrf_name = yang_dnode_get_string(vrf_dnode, "./vrf");
-               af_name = yang_dnode_get_string(args->dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if ((!strmatch(vrf_name, VRF_DEFAULT_NAME))
-                   && safi != SAFI_UNICAST && safi != SAFI_MULTICAST
-                   && safi != SAFI_EVPN) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Only Unicast/Multicast/EVPN SAFIs supported in non-core instances.");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_destroy(struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static struct peer *bgp_neighbor_peer_lookup(struct bgp *bgp,
-                                            const char *peer_str, char *errmsg,
-                                            size_t errmsg_len)
-{
-       struct peer *peer = NULL;
-       union sockunion su;
-
-       str2sockunion(peer_str, &su);
-       peer = peer_lookup(bgp, &su);
-       if (!peer) {
-               snprintf(errmsg, errmsg_len,
-                        "Specify remote-as or peer-group commands first");
-               return NULL;
-       }
-       if (peer_dynamic_neighbor(peer)) {
-               snprintf(errmsg, errmsg_len,
-                        "Operation not allowed on a dynamic neighbor\n");
-               return NULL;
-       }
-       return peer;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor
- */
-int bgp_neighbors_neighbor_create(struct nb_cb_create_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       union sockunion su;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "./remote-address");
-
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               str2sockunion(peer_str, &su);
-               if (peer_address_self_check(bgp, &su)) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Can not configure the local system as neighbor");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               /* Once bgp instance available check self peer addr */
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "./remote-address");
-               str2sockunion(peer_str, &su);
-               if (peer_address_self_check(bgp, &su)) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Can not configure the local system as neighbor");
-                       return NB_ERR_INCONSISTENCY;
-               }
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_destroy(struct nb_cb_destroy_args *args)
-{
-
-       struct bgp *bgp;
-       const char *peer_str;
-       union sockunion su;
-       struct peer *peer = NULL;
-       struct peer *other;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "./remote-address");
-               str2sockunion(peer_str, &su);
-
-               peer = peer_lookup(bgp, &su);
-               if (peer) {
-                       if (peer_dynamic_neighbor(peer)) {
-                               snprintf(
-                                       args->errmsg, args->errmsg_len,
-                                       "Operation not allowed on a dynamic neighbor");
-                               return NB_ERR_VALIDATION;
-                       }
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "./remote-address");
-               str2sockunion(peer_str, &su);
-
-               peer = peer_lookup(bgp, &su);
-               if (peer) {
-                       if (peer_dynamic_neighbor(peer)) {
-                               snprintf(
-                                       args->errmsg, args->errmsg_len,
-                                       "Operation not allowed on a dynamic neighbor");
-                               return NB_ERR_INCONSISTENCY;
-                       }
-
-                       other = peer->doppelganger;
-
-                       if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
-                               bgp_zebra_terminate_radv(peer->bgp, peer);
-
-                       peer_notify_unconfig(peer);
-                       peer_delete(peer);
-                       if (other && other->status != Deleted) {
-                               peer_notify_unconfig(other);
-                               peer_delete(other);
-                       }
-               }
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-interface
- */
-int bgp_neighbors_neighbor_local_interface_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *intf_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "BGP invalid peer %s", peer_str);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               if (peer->conf_if) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "BGP invalid peer %s", peer_str);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               intf_str = yang_dnode_get_string(args->dnode, NULL);
-
-               peer_interface_set(peer, intf_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_local_interface_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "BGP invalid peer %s", peer_str);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               if (peer->conf_if) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "BGP invalid peer %s", peer_str);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               peer_interface_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-port
- */
-int bgp_neighbors_neighbor_local_port_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t port;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "BGP invalid peer %s", peer_str);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               port = yang_dnode_get_uint16(args->dnode, NULL);
-               peer_port_set(peer, port);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_local_port_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t port;
-       struct servent *sp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "BGP invalid peer %s", peer_str);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               sp = getservbyname("bgp", "tcp");
-               port = (sp == NULL) ? BGP_PORT_DEFAULT : ntohs(sp->s_port);
-               peer_port_set(peer, port);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/peer-group
- */
-int bgp_neighbors_neighbor_peer_group_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *peer_grp_str;
-       struct peer *peer;
-       struct peer_group *group;
-       union sockunion su;
-       as_t as;
-       int ret = 0;
-       char prgrp_xpath[XPATH_MAXLEN];
-       const struct lyd_node *bgp_dnode;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               peer_grp_str = yang_dnode_get_string(args->dnode, NULL);
-               bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp");
-               snprintf(prgrp_xpath, sizeof(prgrp_xpath),
-                        FRR_BGP_PEER_GROUP_XPATH, peer_grp_str, "");
-
-               if (!yang_dnode_exists(bgp_dnode, prgrp_xpath)) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Configure the peer-group first %s",
-                                peer_grp_str);
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               str2sockunion(peer_str, &su);
-
-               peer_grp_str = yang_dnode_get_string(args->dnode, NULL);
-               group = peer_group_lookup(bgp, peer_grp_str);
-               if (!group) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Configure the peer-group first %s",
-                                peer_grp_str);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               ret = peer_group_bind(bgp, &su, peer, group, &as);
-
-               if (ret == BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Peer with AS %u cannot be in this peer-group, members must be all internal or all external\n",
-                               as);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_peer_group_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
-                       bgp_zebra_terminate_radv(peer->bgp, peer);
-
-               peer_notify_unconfig(peer);
-               ret = peer_delete(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/password
- */
-int bgp_neighbors_neighbor_password_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *passwrd_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               passwrd_str = yang_dnode_get_string(args->dnode, NULL);
-
-               peer_password_set(peer, passwrd_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_password_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_password_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ttl-security
- */
-int bgp_neighbors_neighbor_ttl_security_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-       uint8_t gtsm_hops;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL);
-               /*
-                * If 'neighbor swpX', then this is for directly connected
-                * peers, we should not accept a ttl-security hops value greater
-                * than 1.
-                */
-               if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "%d is directly connected peer, hops cannot exceed 1\n",
-                               gtsm_hops);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               ret = peer_ttl_security_hops_set(peer, gtsm_hops);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret))
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_ttl_security_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ttl_security_hops_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/solo
- */
-int bgp_neighbors_neighbor_solo_modify(struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/enforce-first-as
- */
-int bgp_neighbors_neighbor_enforce_first_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_ENFORCE_FIRST_AS, enable,
-                                   args->errmsg, args->errmsg_len);
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/description
- */
-int bgp_neighbors_neighbor_description_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *desc_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               desc_str = yang_dnode_get_string(args->dnode, NULL);
-
-               peer_description_set(peer, desc_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_description_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_description_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/passive-mode
- */
-int bgp_neighbors_neighbor_passive_mode_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE,
-                                       set, args->errmsg, args->errmsg_len)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/dynamic-capability
- */
-int bgp_neighbors_neighbor_capability_options_dynamic_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_DYNAMIC_CAPABILITY, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/strict-capability
- */
-int bgp_neighbors_neighbor_capability_options_strict_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_STRICT_CAP_MATCH, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/extended-nexthop-capability
- */
-int bgp_neighbors_neighbor_capability_options_extended_nexthop_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_CAPABILITY_ENHE, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/capability-negotiate
- */
-int bgp_neighbors_neighbor_capability_options_capability_negotiate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/capability-options/override-capability
- */
-int bgp_neighbors_neighbor_capability_options_override_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_OVERRIDE_CAPABILITY, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/update-source/ip
- */
-int bgp_neighbors_neighbor_update_source_ip_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str, *source_str;
-       struct peer *peer;
-       union sockunion su;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-
-               str2sockunion(source_str, &su);
-               peer_update_source_addr_set(peer, &su);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_update_source_ip_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_update_source_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/update-source/interface
- */
-int bgp_neighbors_neighbor_update_source_interface_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str, *source_str;
-       struct peer *peer;
-       struct prefix p;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-               if (str2prefix(source_str, &p)) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Invalid update-source, remove prefix length");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-
-               peer_update_source_if_set(peer, source_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_update_source_interface_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_update_source_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/neighbor-remote-as/remote-as-type
- */
-int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       int as_type = AS_SPECIFIED;
-       union sockunion su;
-       int ret;
-       as_t as = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               as_type = yang_dnode_get_enum(args->dnode, "../remote-as-type");
-               /* When remote-as-type is as-specified, the peer will be
-                * created in remote_as_modify callback */
-               if (yang_dnode_exists(args->dnode, "../remote-as"))
-                       return NB_OK;
-
-               str2sockunion(peer_str, &su);
-               ret = peer_remote_as(bgp, &su, NULL, &as, as_type);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_type_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/neighbor-remote-as/remote-as
- */
-int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       int as_type = AS_SPECIFIED;
-       union sockunion su;
-       int ret;
-       as_t as = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               as_type = yang_dnode_get_enum(args->dnode, "../remote-as-type");
-               as = yang_dnode_get_uint32(args->dnode, NULL);
-
-               str2sockunion(peer_str, &su);
-               ret = peer_remote_as(bgp, &su, NULL, &as, as_type);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_neighbor_remote_as_remote_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/enabled
- */
-int bgp_neighbors_neighbor_ebgp_multihop_enabled_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-       int ret = 0;
-       uint8_t ttl = MAXTTL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               if (peer->conf_if) {
-                       ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
-                       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
-                                            ret);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (set)
-                       ret = peer_ebgp_multihop_set(peer, ttl);
-               else
-                       ret = peer_ebgp_multihop_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_ebgp_multihop_enabled_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ebgp_multihop_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/multihop-ttl
- */
-int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-       uint8_t ttl = MAXTTL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               if (peer->conf_if) {
-                       ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
-                       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
-                                            ret);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               ttl = yang_dnode_get_uint8(args->dnode, NULL);
-
-               ret = peer_ebgp_multihop_set(peer, ttl);
-
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_ebgp_multihop_multihop_ttl_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ebgp_multihop_unset(peer);
-
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/ebgp-multihop/disable-connected-check
- */
-int bgp_neighbors_neighbor_ebgp_multihop_disable_connected_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (peer_flag_modify_nb(bgp, peer_str, peer,
-                                       PEER_FLAG_DISABLE_CONNECTED_CHECK, set,
-                                       args->errmsg, args->errmsg_len)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as
- */
-void bgp_neighbors_neighbor_local_as_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       int ret;
-       as_t as = 0;
-       const char *peer_str;
-       struct peer *peer = NULL;
-       bool no_prepend = 0;
-       bool replace_as = 0;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       peer_str = yang_dnode_get_string(args->dnode, "../remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       if (yang_dnode_exists(args->dnode, "./local-as"))
-               as = yang_dnode_get_uint32(args->dnode, "./local-as");
-       if (yang_dnode_exists(args->dnode, "./no-prepend"))
-               no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend");
-       if (yang_dnode_exists(args->dnode, "./replace-as"))
-               replace_as = yang_dnode_get_bool(args->dnode, "./replace-as");
-
-       if (!as && !no_prepend && !replace_as)
-               ret = peer_local_as_unset(peer);
-       else
-               ret = peer_local_as_set(peer, as, no_prepend, replace_as);
-       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/local-as
- */
-int bgp_neighbors_neighbor_local_as_local_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_local_as_local_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       int ret;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-
-
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               ret = peer_local_as_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/no-prepend
- */
-int bgp_neighbors_neighbor_local_as_no_prepend_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as/replace-as
- */
-int bgp_neighbors_neighbor_local_as_replace_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/enable
- */
-int bgp_neighbors_neighbor_bfd_options_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/detect-multiplier
- */
-int bgp_neighbors_neighbor_bfd_options_detect_multiplier_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_bfd_options_detect_multiplier_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/required-min-rx
- */
-int bgp_neighbors_neighbor_bfd_options_required_min_rx_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_bfd_options_required_min_rx_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/desired-min-tx
- */
-int bgp_neighbors_neighbor_bfd_options_desired_min_tx_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_bfd_options_desired_min_tx_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/session-type
- */
-int bgp_neighbors_neighbor_bfd_options_session_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_bfd_options_session_type_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/bfd-options/check-cp-failure
- */
-int bgp_neighbors_neighbor_bfd_options_check_cp_failure_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_bfd_options_check_cp_failure_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown
- */
-void bgp_neighbors_neighbor_admin_shutdown_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-       const char *message;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       peer_str = yang_dnode_get_string(args->dnode, "../remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       if (yang_dnode_exists(args->dnode, "./message")) {
-               message = yang_dnode_get_string(args->dnode, "./message");
-               peer_tx_shutdown_message_set(peer, message);
-       }
-       enable = yang_dnode_get_bool(args->dnode, "./enable");
-
-       peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable,
-                           args->errmsg, args->errmsg_len);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/enable
- */
-int bgp_neighbors_neighbor_admin_shutdown_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_admin_shutdown_enable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/admin-shutdown/message
- */
-int bgp_neighbors_neighbor_admin_shutdown_message_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_admin_shutdown_message_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/enable
- */
-int bgp_neighbors_neighbor_graceful_restart_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_graceful_restart_enable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/graceful-restart-helper
- */
-int bgp_neighbors_neighbor_graceful_restart_graceful_restart_helper_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_graceful_restart_graceful_restart_helper_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/graceful-restart/graceful-restart-disable
- */
-int bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_graceful_restart_graceful_restart_disable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/advertise-interval
- */
-int bgp_neighbors_neighbor_timers_advertise_interval_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t routeadv;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               routeadv = yang_dnode_get_uint16(args->dnode, NULL);
-
-               ret = peer_advertise_interval_set(peer, routeadv);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_timers_advertise_interval_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               ret = peer_advertise_interval_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/connect-time
- */
-int bgp_neighbors_neighbor_timers_connect_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t connect;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               connect = yang_dnode_get_uint16(args->dnode, NULL);
-
-               ret = peer_timers_connect_set(peer, connect);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_timers_connect_time_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-
-               ret = peer_timers_connect_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/hold-time
- */
-int bgp_neighbors_neighbor_timers_hold_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t keepalive = 0;
-       uint16_t holdtime = 0;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive");
-               holdtime = yang_dnode_get_uint16(args->dnode, NULL);
-
-               if (keepalive != BGP_DEFAULT_KEEPALIVE
-                   && holdtime != BGP_DEFAULT_HOLDTIME) {
-                       ret = peer_timers_set(peer, keepalive, holdtime);
-               } else
-                       ret = peer_timers_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/timers/keepalive
- */
-int bgp_neighbors_neighbor_timers_keepalive_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t keepalive = 0, curr_keep = 0;
-       uint16_t holdtime = 0;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../remote-address");
-               peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                               args->errmsg_len);
-               keepalive = yang_dnode_get_uint16(args->dnode, NULL);
-               holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
-
-               if (keepalive != BGP_DEFAULT_KEEPALIVE
-                   && holdtime != BGP_DEFAULT_HOLDTIME) {
-                       if (peer->holdtime == holdtime) {
-                               curr_keep = (keepalive < holdtime / 3
-                                                    ? keepalive
-                                                    : holdtime / 3);
-                               if (curr_keep == keepalive)
-                                       return NB_OK;
-                       }
-                       ret = peer_timers_set(peer, keepalive, holdtime);
-               } else
-                       ret = peer_timers_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/enabled
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       bool activate = false;
-       int ret = 0;
-       union sockunion su;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               af_name =
-                       yang_dnode_get_string(args->dnode, "../afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../../remote-address");
-               str2sockunion(peer_str, &su);
-               peer = peer_lookup(bgp, &su);
-
-               activate = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (activate)
-                       ret = peer_activate(peer, afi, safi);
-               else
-                       ret = peer_deactivate(peer, afi, safi);
-
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_enabled_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static struct peer *bgp_unnumbered_neighbor_peer_lookup(struct bgp *bgp,
-                                                       const char *peer_str,
-                                                       char *errmsg,
-                                                       size_t errmsg_len)
-{
-       struct peer *peer = NULL;
-
-       /* Not IP, could match either peer configured on interface or a
-        * group. */
-       peer = peer_lookup_by_conf_if(bgp, peer_str);
-       if (!peer) {
-               snprintf(errmsg, errmsg_len,
-                        "Specify remote-as or peer-group commands first");
-               return NULL;
-       }
-       if (peer_dynamic_neighbor(peer)) {
-               snprintf(errmsg, errmsg_len,
-                        "Operation not allowed on a dynamic neighbor\n");
-               return NULL;
-       }
-
-       return peer;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor
- */
-int bgp_neighbors_unnumbered_neighbor_create(struct nb_cb_create_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *peer_grp_str = NULL;
-       bool v6_only = false;
-       int as_type = AS_UNSPECIFIED;
-       as_t as = 0;
-       char prgrp_xpath[XPATH_MAXLEN];
-       const struct lyd_node *bgp_dnode;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               peer_str = yang_dnode_get_string(args->dnode, "./interface");
-               bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp");
-               snprintf(prgrp_xpath, sizeof(prgrp_xpath),
-                        FRR_BGP_PEER_GROUP_XPATH, peer_str, "");
-
-               if (yang_dnode_exists(bgp_dnode, prgrp_xpath)) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Name conflict with peer-group: %s", peer_str);
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "./interface");
-
-               if (yang_dnode_exists(args->dnode, "./peer-group"))
-                       peer_grp_str = yang_dnode_get_string(args->dnode,
-                                                            "./peer-group");
-
-               if (yang_dnode_exists(args->dnode, "./v6-only"))
-                       v6_only = yang_dnode_get_bool(args->dnode, "./v6-only");
-
-               if (yang_dnode_exists(args->dnode,
-                                     "./neighbor-remote-as/remote-as-type")) {
-                       as_type = yang_dnode_get_enum(
-                               args->dnode,
-                               "./neighbor-remote-as/remote-as-type");
-                       if (yang_dnode_exists(args->dnode,
-                                             "./neighbor-remote-as/remote-as"))
-                               as = yang_dnode_get_uint32(
-                                       args->dnode,
-                                       "./neighbor-remote-as/remote-as");
-               }
-
-               if (peer_conf_interface_create(bgp, peer_str, v6_only,
-                                              peer_grp_str, as_type, as,
-                                              args->errmsg, args->errmsg_len))
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-               peer_str = yang_dnode_get_string(args->dnode, "./interface");
-               /* look up for neighbor by interface name config. */
-               peer = peer_lookup_by_conf_if(bgp, peer_str);
-               if (peer) {
-                       /* Request zebra to terminate IPv6 RAs on this
-                        * interface. */
-                       if (peer->ifp)
-                               bgp_zebra_terminate_radv(peer->bgp, peer);
-                       peer_notify_unconfig(peer);
-                       peer_delete(peer);
-               } else {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Create the peer-group first");
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/v6only
- */
-int bgp_neighbors_unnumbered_neighbor_v6only_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       bool v6_only = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-
-               v6_only = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (peer_conf_interface_create(bgp, peer_str, v6_only, NULL,
-                                              AS_UNSPECIFIED, 0, args->errmsg,
-                                              args->errmsg_len))
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/peer-group
- */
-int bgp_neighbors_unnumbered_neighbor_peer_group_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *peer_grp_str;
-       struct peer *peer;
-       struct peer_group *group;
-       union sockunion su;
-       as_t as;
-       int ret = 0;
-       char prgrp_xpath[XPATH_MAXLEN];
-       const struct lyd_node *bgp_dnode;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               peer_grp_str = yang_dnode_get_string(args->dnode, NULL);
-               bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp");
-               snprintf(prgrp_xpath, sizeof(prgrp_xpath),
-                        FRR_BGP_PEER_GROUP_XPATH, peer_grp_str, "");
-
-               if (!yang_dnode_exists(bgp_dnode, prgrp_xpath)) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Configure the peer-group first %s",
-                                peer_grp_str);
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-
-               peer_grp_str = yang_dnode_get_string(args->dnode, NULL);
-               group = peer_group_lookup(bgp, peer_grp_str);
-               if (!group) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Configure the peer-group first\n");
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               ret = peer_group_bind(bgp, &su, peer, group, &as);
-               if (ret == BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Peer with AS %u cannot be in this peer-group, members must be all internal or all external\n",
-                               as);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_peer_group_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../remote-address");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-
-               if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
-                       bgp_zebra_terminate_radv(peer->bgp, peer);
-
-               peer_notify_unconfig(peer);
-               ret = peer_delete(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/password
- */
-int bgp_neighbors_unnumbered_neighbor_password_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *passwrd_str;
-       struct peer *peer = NULL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               passwrd_str = yang_dnode_get_string(args->dnode, NULL);
-               peer_password_set(peer, passwrd_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_password_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer = NULL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_password_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ttl-security
- */
-int bgp_neighbors_unnumbered_neighbor_ttl_security_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-       uint8_t gtsm_hops;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL);
-               /*
-                * If 'neighbor swpX', then this is for directly connected
-                * peers, we should not accept a ttl-security hops value greater
-                * than 1.
-                */
-               if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "%d is directly connected peer, hops cannot exceed 1\n",
-                               gtsm_hops);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               ret = peer_ttl_security_hops_set(peer, gtsm_hops);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_ttl_security_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ttl_security_hops_unset(peer);
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/solo
- */
-int bgp_neighbors_unnumbered_neighbor_solo_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/enforce-first-as
- */
-int bgp_neighbors_unnumbered_neighbor_enforce_first_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_ENFORCE_FIRST_AS, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/description
- */
-int bgp_neighbors_unnumbered_neighbor_description_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *desc_str;
-       struct peer *peer = NULL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               desc_str = yang_dnode_get_string(args->dnode, NULL);
-
-               peer_description_set(peer, desc_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_description_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer = NULL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_description_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/passive-mode
- */
-int bgp_neighbors_unnumbered_neighbor_passive_mode_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode, "../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE,
-                                       set, args->errmsg, args->errmsg_len)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/dynamic-capability
- */
-int bgp_neighbors_unnumbered_neighbor_capability_options_dynamic_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_DYNAMIC_CAPABILITY, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/strict-capability
- */
-int bgp_neighbors_unnumbered_neighbor_capability_options_strict_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_STRICT_CAP_MATCH, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/extended-nexthop-capability
- */
-int bgp_neighbors_unnumbered_neighbor_capability_options_extended_nexthop_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_CAPABILITY_ENHE, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/capability-negotiate
- */
-int bgp_neighbors_unnumbered_neighbor_capability_options_capability_negotiate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/capability-options/override-capability
- */
-int bgp_neighbors_unnumbered_neighbor_capability_options_override_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_OVERRIDE_CAPABILITY, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/update-source/ip
- */
-int bgp_neighbors_unnumbered_neighbor_update_source_ip_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str, *source_str;
-       struct peer *peer;
-       union sockunion su;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-
-               str2sockunion(source_str, &su);
-               peer_update_source_addr_set(peer, &su);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_update_source_ip_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_update_source_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/update-source/interface
- */
-int bgp_neighbors_unnumbered_neighbor_update_source_interface_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str, *source_str;
-       struct peer *peer;
-       struct prefix p;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-               if (str2prefix(source_str, &p)) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Invalid update-source, remove prefix length");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-
-               peer_update_source_if_set(peer, source_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_update_source_interface_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_update_source_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as
- */
-void bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       int as_type = AS_SPECIFIED;
-       int ret;
-       as_t as = 0;
-       struct peer *peer = NULL;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       peer_str = yang_dnode_get_string(args->dnode, "../interface");
-       as_type = yang_dnode_get_enum(args->dnode, "./remote-as-type");
-       if (yang_dnode_exists(args->dnode, "./remote-as"))
-               as = yang_dnode_get_uint32(args->dnode, "./remote-as");
-
-       peer = peer_lookup_by_conf_if(bgp, peer_str);
-
-       ret = peer_remote_as(bgp, NULL, peer_str, &as, as_type);
-
-       if (ret < 0 && !peer) {
-               snprintf(args->errmsg, args->errmsg_len,
-                        "Create the peer-group or interface first");
-               return;
-       }
-
-       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as-type
- */
-int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_type_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = peer_lookup_by_conf_if(bgp, peer_str);
-
-               /* remote-as set to 0 and as_type to unspecified */
-               if (peer)
-                       peer_as_change(peer, 0, AS_UNSPECIFIED);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/neighbor-remote-as/remote-as
- */
-int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_neighbor_remote_as_remote_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/enabled
- */
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-       int ret = 0;
-       uint8_t ttl = MAXTTL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = peer_lookup_by_conf_if(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               if (peer->conf_if) {
-                       ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
-                       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
-                                            ret);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (set)
-                       ret = peer_ebgp_multihop_set(peer, ttl);
-               else
-                       ret = peer_ebgp_multihop_unset(peer);
-
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_enabled_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = peer_lookup_by_conf_if(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ebgp_multihop_unset(peer);
-
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/multihop-ttl
- */
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-       uint8_t ttl = MAXTTL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = peer_lookup_by_conf_if(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               if (peer->conf_if) {
-                       ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
-                       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
-                                            ret);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               ttl = yang_dnode_get_uint8(args->dnode, NULL);
-
-               ret = peer_ebgp_multihop_set(peer, ttl);
-
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_multihop_ttl_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = peer_lookup_by_conf_if(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ebgp_multihop_unset(peer);
-
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/ebgp-multihop/disable-connected-check
- */
-int bgp_neighbors_unnumbered_neighbor_ebgp_multihop_disable_connected_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = peer_lookup_by_conf_if(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (peer_flag_modify_nb(bgp, peer_str, peer,
-                                       PEER_FLAG_DISABLE_CONNECTED_CHECK, set,
-                                       args->errmsg, args->errmsg_len)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/local-as
- */
-void bgp_neighbors_unnumbered_neighbor_local_as_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       int ret;
-       as_t as = 0;
-       const char *peer_str;
-       struct peer *peer = NULL;
-       bool no_prepend = 0;
-       bool replace_as = 0;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       peer_str = yang_dnode_get_string(args->dnode, "../interface");
-
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-
-       if (yang_dnode_exists(args->dnode, "./local-as"))
-               as = yang_dnode_get_uint32(args->dnode, "./local-as");
-       if (yang_dnode_exists(args->dnode, "./no-prepend"))
-               no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend");
-       if (yang_dnode_exists(args->dnode, "./replace-as"))
-               replace_as = yang_dnode_get_bool(args->dnode, "./replace-as");
-
-       if (!as && !no_prepend && !replace_as)
-               ret = peer_local_as_unset(peer);
-       else
-               ret = peer_local_as_set(peer, as, no_prepend, replace_as);
-
-       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/local-as
- */
-int bgp_neighbors_unnumbered_neighbor_local_as_local_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_local_as_local_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/no-prepend
- */
-int bgp_neighbors_unnumbered_neighbor_local_as_no_prepend_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/local-as/replace-as
- */
-int bgp_neighbors_unnumbered_neighbor_local_as_replace_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/enable
- */
-int bgp_neighbors_unnumbered_neighbor_bfd_options_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/detect-multiplier
- */
-int bgp_neighbors_unnumbered_neighbor_bfd_options_detect_multiplier_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_bfd_options_detect_multiplier_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/required-min-rx
- */
-int bgp_neighbors_unnumbered_neighbor_bfd_options_required_min_rx_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_bfd_options_required_min_rx_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/desired-min-tx
- */
-int bgp_neighbors_unnumbered_neighbor_bfd_options_desired_min_tx_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_bfd_options_desired_min_tx_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/session-type
- */
-int bgp_neighbors_unnumbered_neighbor_bfd_options_session_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_bfd_options_session_type_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/bfd-options/check-cp-failure
- */
-int bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_bfd_options_check_cp_failure_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown
- */
-void bgp_neighbors_unnumbered_neighbor_admin_shutdown_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-       const char *message;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       peer_str = yang_dnode_get_string(args->dnode, "../interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-
-       if (yang_dnode_exists(args->dnode, "./message")) {
-               message = yang_dnode_get_string(args->dnode, "./message");
-               peer_tx_shutdown_message_set(peer, message);
-       }
-       enable = yang_dnode_get_bool(args->dnode, "./enable");
-
-       peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable,
-                           args->errmsg, args->errmsg_len);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/enable
- */
-int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_admin_shutdown_enable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/admin-shutdown/message
- */
-int bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_admin_shutdown_message_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/enable
- */
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_enable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/graceful-restart-helper
- */
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_helper_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_helper_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/graceful-restart/graceful-restart-disable
- */
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_graceful_restart_graceful_restart_disable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/advertise-interval
- */
-int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t routeadv;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               routeadv = yang_dnode_get_uint16(args->dnode, NULL);
-
-               ret = peer_advertise_interval_set(peer, routeadv);
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_timers_advertise_interval_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-
-               ret = peer_advertise_interval_unset(peer);
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/connect-time
- */
-int bgp_neighbors_unnumbered_neighbor_timers_connect_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t connect;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               connect = yang_dnode_get_uint16(args->dnode, NULL);
-
-               ret = peer_timers_connect_set(peer, connect);
-               bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_timers_connect_time_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-               ret = peer_timers_connect_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/hold-time
- */
-int bgp_neighbors_unnumbered_neighbor_timers_hold_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t keepalive = 0;
-       uint16_t holdtime = 0;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-
-               keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive");
-               holdtime = yang_dnode_get_uint16(args->dnode, NULL);
-
-               if (keepalive != BGP_DEFAULT_KEEPALIVE
-                   && holdtime != BGP_DEFAULT_HOLDTIME) {
-                       ret = peer_timers_set(peer, keepalive, holdtime);
-               } else
-                       ret = peer_timers_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/timers/keepalive
- */
-int bgp_neighbors_unnumbered_neighbor_timers_keepalive_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t keepalive = 0, curr_keep = 0;
-       uint16_t holdtime = 0;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str =
-                       yang_dnode_get_string(args->dnode, "../../interface");
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-
-               keepalive = yang_dnode_get_uint16(args->dnode, NULL);
-               holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
-
-               if (keepalive != BGP_DEFAULT_KEEPALIVE
-                   && holdtime != BGP_DEFAULT_HOLDTIME) {
-                       if (peer->holdtime == holdtime) {
-                               curr_keep = (keepalive < holdtime / 3
-                                                    ? keepalive
-                                                    : holdtime / 3);
-                               if (curr_keep == keepalive)
-                                       return NB_OK;
-                       }
-                       ret = peer_timers_set(peer, keepalive, holdtime);
-               } else
-                       ret = peer_timers_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/enabled
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       bool activate = false;
-       int ret = 0;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               af_name =
-                       yang_dnode_get_string(args->dnode, "../afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../../interface");
-
-               peer = bgp_unnumbered_neighbor_peer_lookup(
-                       bgp, peer_str, args->errmsg, args->errmsg_len);
-
-               activate = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (activate)
-                       ret = peer_activate(peer, afi, safi);
-               else
-                       ret = peer_deactivate(peer, afi, safi);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_enabled_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static struct peer *bgp_peer_group_peer_lookup(struct bgp *bgp,
-                                              const char *peer_str)
-{
-       struct peer_group *group = NULL;
-
-       group = peer_group_lookup(bgp, peer_str);
-
-       if (group)
-               return group->conf;
-
-       return NULL;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group
- */
-int bgp_peer_groups_peer_group_create(struct nb_cb_create_args *args)
-{
-       const char *peer_grp_str;
-       struct peer *peer;
-       struct peer_group *group;
-       struct bgp *bgp;
-       char unnbr_xpath[XPATH_MAXLEN];
-       const struct lyd_node *bgp_dnode;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               peer_grp_str =
-                       yang_dnode_get_string(args->dnode, "./peer-group-name");
-               bgp_dnode = yang_dnode_get_parent(args->dnode, "bgp");
-               snprintf(unnbr_xpath, sizeof(unnbr_xpath),
-                        FRR_BGP_NEIGHBOR_UNNUM_XPATH, peer_grp_str, "");
-
-               if (yang_dnode_exists(bgp_dnode, unnbr_xpath)) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Name conflict with interface: %s",
-                                peer_grp_str);
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_grp_str =
-                       yang_dnode_get_string(args->dnode, "./peer-group-name");
-               peer = peer_lookup_by_conf_if(bgp, peer_grp_str);
-               if (peer) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Name conflict with interface:");
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               group = peer_group_get(bgp, peer_grp_str);
-               if (!group) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "BGP failed to find or create peer-group");
-                       return NB_ERR_INCONSISTENCY;
-               }
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_destroy(struct nb_cb_destroy_args *args)
-{
-       const char *peer_grp_str;
-       struct peer_group *group;
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_grp_str =
-                       yang_dnode_get_string(args->dnode, "./peer-group-name");
-
-               group = peer_group_lookup(bgp, peer_grp_str);
-               if (group) {
-                       peer_group_notify_unconfig(group);
-                       peer_group_delete(group);
-               }
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ipv4-listen-range
- */
-int bgp_peer_groups_peer_group_ipv4_listen_range_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_ipv4_listen_range_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ipv6-listen-range
- */
-int bgp_peer_groups_peer_group_ipv6_listen_range_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_ipv6_listen_range_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/password
- */
-int bgp_peer_groups_peer_group_password_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *passwrd_str;
-       struct peer *peer = NULL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               passwrd_str = yang_dnode_get_string(args->dnode, NULL);
-               peer_password_set(peer, passwrd_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_password_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer = NULL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               peer_password_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ttl-security
- */
-int bgp_peer_groups_peer_group_ttl_security_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-       uint8_t gtsm_hops;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               gtsm_hops = yang_dnode_get_uint8(args->dnode, NULL);
-               /*
-                * If 'neighbor swpX', then this is for directly connected
-                * peers, we should not accept a ttl-security hops value greater
-                * than 1.
-                */
-               if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "%d is directly connected peer, hops cannot exceed 1\n",
-                               gtsm_hops);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               ret = peer_ttl_security_hops_set(peer, gtsm_hops);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_ttl_security_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ttl_security_hops_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/solo
- */
-int bgp_peer_groups_peer_group_solo_modify(struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/enforce-first-as
- */
-int bgp_peer_groups_peer_group_enforce_first_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_ENFORCE_FIRST_AS, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/description
- */
-int bgp_peer_groups_peer_group_description_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *desc_str;
-       struct peer *peer = NULL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               desc_str = yang_dnode_get_string(args->dnode, NULL);
-
-               peer_description_set(peer, desc_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_description_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer = NULL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_description_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/passive-mode
- */
-int bgp_peer_groups_peer_group_passive_mode_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_PASSIVE,
-                                       set, args->errmsg, args->errmsg_len)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/dynamic-capability
- */
-int bgp_peer_groups_peer_group_capability_options_dynamic_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_DYNAMIC_CAPABILITY, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/strict-capability
- */
-int bgp_peer_groups_peer_group_capability_options_strict_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_STRICT_CAP_MATCH, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/extended-nexthop-capability
- */
-int bgp_peer_groups_peer_group_capability_options_extended_nexthop_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_CAPABILITY_ENHE, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/capability-negotiate
- */
-int bgp_peer_groups_peer_group_capability_options_capability_negotiate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/capability-options/override-capability
- */
-int bgp_peer_groups_peer_group_capability_options_override_capability_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               enable = yang_dnode_get_bool(args->dnode, NULL);
-
-               peer_flag_modify_nb(bgp, peer_str, peer,
-                                   PEER_FLAG_OVERRIDE_CAPABILITY, enable,
-                                   args->errmsg, args->errmsg_len);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/update-source/ip
- */
-int bgp_peer_groups_peer_group_update_source_ip_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str, *source_str;
-       struct peer *peer;
-       union sockunion su;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-
-               str2sockunion(source_str, &su);
-               peer_update_source_addr_set(peer, &su);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_update_source_ip_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_update_source_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/update-source/interface
- */
-int bgp_peer_groups_peer_group_update_source_interface_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str, *source_str;
-       struct peer *peer;
-       struct prefix p;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-               if (str2prefix(source_str, &p)) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Invalid update-source, remove prefix length");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               source_str = yang_dnode_get_string(args->dnode, NULL);
-
-               peer_update_source_if_set(peer, source_str);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_update_source_interface_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               peer_update_source_unset(peer);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as
- */
-void bgp_peer_group_neighbor_remote_as_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       int as_type = AS_SPECIFIED;
-       int ret;
-       as_t as = 0;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name");
-       as_type = yang_dnode_get_enum(args->dnode, "./remote-as-type");
-       if (yang_dnode_exists(args->dnode, "./remote-as"))
-               as = yang_dnode_get_uint32(args->dnode, "./remote-as");
-
-       ret = peer_group_remote_as(bgp, peer_str, &as, as_type);
-       if (ret < 0) {
-               snprintf(args->errmsg, args->errmsg_len,
-                        "Create the peer-group or interface first");
-               return;
-       }
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as-type
- */
-int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_type_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer_group *group;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               group = peer_group_lookup(bgp, peer_str);
-               if (group)
-                       peer_group_remote_as_delete(group);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/neighbor-remote-as/remote-as
- */
-int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_neighbor_remote_as_remote_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/enabled
- */
-int bgp_peer_groups_peer_group_ebgp_multihop_enabled_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-       int ret = 0;
-       uint8_t ttl = MAXTTL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               if (peer->conf_if) {
-                       ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
-                       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
-                                            ret);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (set)
-                       ret = peer_ebgp_multihop_set(peer, ttl);
-               else
-                       ret = peer_ebgp_multihop_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_ebgp_multihop_enabled_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ebgp_multihop_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/multihop-ttl
- */
-int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-       uint8_t ttl = MAXTTL;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               if (peer->conf_if) {
-                       ret = BGP_ERR_INVALID_FOR_DIRECT_PEER;
-                       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len,
-                                            ret);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               ttl = yang_dnode_get_uint8(args->dnode, NULL);
-
-               ret = peer_ebgp_multihop_set(peer, ttl);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_ebgp_multihop_multihop_ttl_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               ret = peer_ebgp_multihop_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/ebgp-multihop/disable-connected-check
- */
-int bgp_peer_groups_peer_group_ebgp_multihop_disable_connected_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool set = false;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               if (!peer)
-                       return NB_ERR_INCONSISTENCY;
-
-               set = yang_dnode_get_bool(args->dnode, NULL);
-
-               if (peer_flag_modify_nb(bgp, peer_str, peer,
-                                       PEER_FLAG_DISABLE_CONNECTED_CHECK, set,
-                                       args->errmsg, args->errmsg_len)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as
- */
-void bgp_peer_groups_peer_group_local_as_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       int ret;
-       as_t as = 0;
-       const char *peer_str;
-       struct peer *peer = NULL;
-       bool no_prepend = false;
-       bool replace_as = false;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name");
-
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       if (yang_dnode_exists(args->dnode, "./local-as"))
-               as = yang_dnode_get_uint32(args->dnode, "./local-as");
-
-       if (yang_dnode_exists(args->dnode, "./local-as"))
-               as = yang_dnode_get_uint32(args->dnode, "./local-as");
-       if (yang_dnode_exists(args->dnode, "./no-prepend"))
-               no_prepend = yang_dnode_get_bool(args->dnode, "./no-prepend");
-       if (yang_dnode_exists(args->dnode, "./replace-as"))
-               replace_as = yang_dnode_get_bool(args->dnode, "./replace-as");
-
-       if (!as && !no_prepend && !replace_as)
-               ret = peer_local_as_unset(peer);
-       else
-               ret = peer_local_as_set(peer, as, no_prepend, replace_as);
-
-       bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/local-as
- */
-int bgp_peer_groups_peer_group_local_as_local_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_local_as_local_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               ret = peer_local_as_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/no-prepend
- */
-int bgp_peer_groups_peer_group_local_as_no_prepend_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/local-as/replace-as
- */
-int bgp_peer_groups_peer_group_local_as_replace_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/enable
- */
-int bgp_peer_groups_peer_group_bfd_options_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/detect-multiplier
- */
-int bgp_peer_groups_peer_group_bfd_options_detect_multiplier_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_bfd_options_detect_multiplier_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/required-min-rx
- */
-int bgp_peer_groups_peer_group_bfd_options_required_min_rx_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_bfd_options_required_min_rx_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/desired-min-tx
- */
-int bgp_peer_groups_peer_group_bfd_options_desired_min_tx_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_bfd_options_desired_min_tx_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/session-type
- */
-int bgp_peer_groups_peer_group_bfd_options_session_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_bfd_options_session_type_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/bfd-options/check-cp-failure
- */
-int bgp_peer_groups_peer_group_bfd_options_check_cp_failure_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_bfd_options_check_cp_failure_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown
- */
-void bgp_peer_groups_peer_group_admin_shutdown_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       bool enable = false;
-       const char *message;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       peer_str = yang_dnode_get_string(args->dnode, "../peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       if (yang_dnode_exists(args->dnode, "./message")) {
-               message = yang_dnode_get_string(args->dnode, "./message");
-               peer_tx_shutdown_message_set(peer, message);
-       }
-       enable = yang_dnode_get_bool(args->dnode, "./enable");
-
-       peer_flag_modify_nb(bgp, peer_str, peer, PEER_FLAG_SHUTDOWN, enable,
-                           args->errmsg, args->errmsg_len);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/enable
- */
-int bgp_peer_groups_peer_group_admin_shutdown_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_admin_shutdown_enable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/admin-shutdown/message
- */
-int bgp_peer_groups_peer_group_admin_shutdown_message_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_admin_shutdown_message_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/enable
- */
-int bgp_peer_groups_peer_group_graceful_restart_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_graceful_restart_enable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/graceful-restart-helper
- */
-int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_helper_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_helper_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/graceful-restart/graceful-restart-disable
- */
-int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_graceful_restart_graceful_restart_disable_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/advertise-interval
- */
-int bgp_peer_groups_peer_group_timers_advertise_interval_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t routeadv;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               routeadv = yang_dnode_get_uint16(args->dnode, NULL);
-
-               ret = peer_advertise_interval_set(peer, routeadv);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_timers_advertise_interval_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               ret = peer_advertise_interval_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/connect-time
- */
-int bgp_peer_groups_peer_group_timers_connect_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t connect;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-               connect = yang_dnode_get_uint16(args->dnode, NULL);
-
-               ret = peer_timers_connect_set(peer, connect);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_timers_connect_time_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       int ret;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               ret = peer_timers_connect_unset(peer);
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/hold-time
- */
-int bgp_peer_groups_peer_group_timers_hold_time_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t keepalive = 0;
-       uint16_t holdtime = 0;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               keepalive = yang_dnode_get_uint16(args->dnode, "../keepalive");
-               holdtime = yang_dnode_get_uint16(args->dnode, NULL);
-
-               if (keepalive != BGP_DEFAULT_KEEPALIVE
-                   && holdtime != BGP_DEFAULT_HOLDTIME) {
-                       ret = peer_timers_set(peer, keepalive, holdtime);
-               } else
-                       ret = peer_timers_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/timers/keepalive
- */
-int bgp_peer_groups_peer_group_timers_keepalive_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       uint16_t keepalive = 0, curr_keep = 0;
-       uint16_t holdtime = 0;
-       int ret = 0;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               keepalive = yang_dnode_get_uint16(args->dnode, NULL);
-               holdtime = yang_dnode_get_uint16(args->dnode, "../hold-time");
-
-               if (keepalive != BGP_DEFAULT_KEEPALIVE
-                   && holdtime != BGP_DEFAULT_HOLDTIME) {
-                       if (peer->holdtime == holdtime) {
-                               curr_keep = (keepalive < holdtime / 3
-                                                    ? keepalive
-                                                    : holdtime / 3);
-                               if (curr_keep == keepalive) {
-                                       // zlog_debug("%s holdtime %u keepalive
-                                       // %u value is already set, skipping
-                                       // update.",
-                                       //   __func__, holdtime, keepalive);
-                                       return NB_OK;
-                               }
-                       }
-                       ret = peer_timers_set(peer, keepalive, holdtime);
-               } else
-                       ret = peer_timers_unset(peer);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/enabled
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       bool activate = false;
-       int ret = 0;
-       struct peer *peer;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               bgp = nb_running_get_entry(args->dnode, NULL, true);
-               af_name =
-                       yang_dnode_get_string(args->dnode, "../afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-               peer_str = yang_dnode_get_string(args->dnode,
-                                                "../../../peer-group-name");
-               peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-               activate = yang_dnode_get_bool(args->dnode, NULL);
-               if (activate)
-                       ret = peer_activate(peer, afi, safi);
-               else
-                       ret = peer_deactivate(peer, afi, safi);
-
-               if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret)
-                   < 0)
-                       return NB_ERR_INCONSISTENCY;
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_enabled_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-void bgp_global_afi_safis_afi_safi_network_config_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       struct prefix prefix;
-       bool is_backdoor = false;
-       uint32_t label_index = BGP_INVALID_LABEL_INDEX;
-       const char *rmap_name = NULL;
-       afi_t afi;
-       safi_t safi;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
-
-       is_backdoor = yang_dnode_get_bool(args->dnode, "./backdoor");
-
-       if (yang_dnode_exists(args->dnode, "./label-index"))
-               label_index =
-                       yang_dnode_get_uint32(args->dnode, "./label-index");
-
-       if (yang_dnode_exists(args->dnode, "./rmap-policy-export"))
-               rmap_name = yang_dnode_get_string(args->dnode,
-                                                 "./rmap-policy-export");
-
-       bgp_static_set(bgp, NULL, &prefix, afi, safi, rmap_name, is_backdoor,
-                      label_index, args->errmsg, args->errmsg_len);
-}
-
-static int bgp_global_afi_safis_afi_safi_network_config_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       struct prefix prefix;
-       uint32_t label_index = BGP_INVALID_LABEL_INDEX;
-       const char *rmap_name = NULL;
-       bool is_backdoor = false;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
-
-       if (yang_dnode_exists(args->dnode, "./rmap-policy-export"))
-               rmap_name = yang_dnode_get_string(args->dnode,
-                                                 "./rmap-policy-export");
-
-       if (yang_dnode_exists(args->dnode, "./label-index"))
-               label_index =
-                       yang_dnode_get_uint32(args->dnode, "./label-index");
-
-       if (yang_dnode_exists(args->dnode, "./backdoor"))
-               is_backdoor = yang_dnode_get_bool(args->dnode, "./backdoor");
-
-       ret = bgp_static_set(bgp, "no", &prefix, afi, safi, rmap_name,
-                            is_backdoor, label_index, args->errmsg,
-                            args->errmsg_len);
-       if (ret < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_create(
-       struct nb_cb_create_args *args)
-{
-       /* Handled in network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safis_afi_safi_network_config_destroy(
-                       args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/backdoor
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_backdoor_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in unicast_network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/label-index
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_label_index_modify(
-       struct nb_cb_modify_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       struct prefix prefix;
-       uint32_t label_index;
-       afi_t afi;
-       safi_t safi;
-       struct bgp_dest *dest;
-       struct bgp_static *bgp_static;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-               yang_dnode_get_prefix(&prefix, args->dnode, "../prefix");
-               apply_mask(&prefix);
-
-               label_index = yang_dnode_get_uint32(args->dnode, NULL);
-
-               dest = bgp_node_get(bgp->route[afi][safi], &prefix);
-               bgp_static = bgp_dest_get_bgp_static_info(dest);
-               if (bgp_static) {
-                       if (bgp_static->label_index != label_index) {
-                               snprintf(
-                                       args->errmsg, args->errmsg_len,
-                                       "Cannot change label-index: curr %u input %u\n",
-                                       bgp_static->label_index, label_index);
-                               return NB_ERR_VALIDATION;
-                       }
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_label_index_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       /* Handled in unicast_network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/network-config/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in unicast_network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_network_config_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       /* rmap destory alone is not supported by backend, the entire network
-        * config needs to be destroyed.
-        */
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-void bgp_global_afi_safi_aggregate_route_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       struct prefix prefix;
-       const char *rmap_name = NULL;
-       afi_t afi;
-       safi_t safi;
-       uint8_t as_set = 0;
-       int summary_only = 0;
-       uint8_t origin = BGP_ORIGIN_UNSPECIFIED;
-       bool match_med = false;
-       const char *suppress_map = NULL;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
-
-       if (yang_dnode_exists(args->dnode, "./as-set"))
-               as_set = yang_dnode_get_bool(args->dnode, "./as-set");
-
-       summary_only = yang_dnode_get_bool(args->dnode, "./summary-only");
-
-       if (yang_dnode_exists(args->dnode, "./rmap-policy-export"))
-               rmap_name = yang_dnode_get_string(args->dnode,
-                                                 "./rmap-policy-export");
-
-       origin = yang_dnode_get_enum(args->dnode, "./origin");
-       match_med = yang_dnode_get_bool(args->dnode, "./match-med");
-       if (yang_dnode_exists(args->dnode, "./suppress-map"))
-               suppress_map =
-                       yang_dnode_get_string(args->dnode, "./suppress-map");
-
-       bgp_aggregate_set(bgp, &prefix, afi, safi, rmap_name, summary_only,
-                         as_set, origin, match_med, suppress_map, args->errmsg,
-                         args->errmsg_len);
-}
-
-static int
-bgp_global_afi_safi_aggregate_route_destroy(struct nb_cb_destroy_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       struct prefix prefix;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       yang_dnode_get_prefix(&prefix, args->dnode, "./prefix");
-
-       ret = bgp_aggregate_unset(bgp, &prefix, afi, safi, args->errmsg,
-                                 args->errmsg_len);
-
-       if (ret < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_aggregate_route_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/as-set
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_as_set_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/summary-only
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_summary_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/origin
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_origin_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/match-med
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_match_med_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/aggregate-route/suppress-map
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_suppress_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_aggregate_route_suppress_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-void bgp_global_afi_safi_admin_distance_route_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       const char *prefix_str = NULL;
-       const char *access_list_str = NULL;
-       uint8_t distance;
-       afi_t afi;
-       safi_t safi;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       prefix_str = yang_dnode_get_string(args->dnode, "./prefix");
-       distance = yang_dnode_get_uint8(args->dnode, "./distance");
-       if (yang_dnode_exists(args->dnode, "./access-list-policy-export"))
-               access_list_str = yang_dnode_get_string(
-                       args->dnode, "./access-list-policy-export");
-
-       bgp_distance_set(distance, prefix_str, access_list_str, afi, safi,
-                        args->errmsg, args->errmsg_len);
-}
-
-static int bgp_global_afi_safi_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       const char *prefix_str = NULL;
-       const char *access_list_str = NULL;
-       uint8_t distance;
-       afi_t afi;
-       safi_t safi;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       prefix_str = yang_dnode_get_string(args->dnode, "./prefix");
-       distance = yang_dnode_get_uint8(args->dnode, "./distance");
-       if (yang_dnode_exists(args->dnode, "./access-list-policy-export"))
-               access_list_str = yang_dnode_get_string(
-                       args->dnode, "./access-list-policy-export");
-
-       if (bgp_distance_unset(distance, prefix_str, access_list_str, afi, safi,
-                              args->errmsg, args->errmsg_len)
-           != CMD_SUCCESS)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_admin_distance_route_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route/distance
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_distance_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance-route/access-list-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_access_list_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_route_access_list_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-void bgp_global_afi_safis_afi_safi_route_flap_dampening_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int half = DEFAULT_HALF_LIFE * 60;
-       int reuse = DEFAULT_REUSE;
-       int suppress = DEFAULT_SUPPRESS;
-       int max;
-       char ab_xpath[XPATH_MAXLEN];
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       if (!yang_dnode_get_bool(args->dnode, "./enable")) {
-               bgp_damp_disable(bgp, afi, safi);
-       } else {
-               half = yang_dnode_get_uint8(args->dnode, "./reach-decay");
-               half *= 60;
-               reuse = yang_dnode_get_uint16(args->dnode, "./reuse-above");
-
-               suppress =
-                       yang_dnode_get_uint16(args->dnode, "./suppress-above");
-
-               max = yang_dnode_get_uint8(args->dnode, "./unreach-decay");
-               yang_dnode_get_path(args->dnode, ab_xpath, sizeof(ab_xpath));
-               strlcat(ab_xpath, "/unreach-decay", sizeof(ab_xpath));
-               if (yang_get_default_uint8(ab_xpath) == max)
-                       max = half * 4;
-               else
-                       max *= 60;
-
-               bgp_damp_enable(bgp, afi, safi, half, reuse, suppress, max);
-       }
-}
-
-static int
-bgp_global_afi_safi_route_flap_validation(struct nb_cb_modify_args *args)
-{
-       int reuse;
-       int suppress;
-
-       if (yang_dnode_exists(args->dnode, "../suppress-above")
-           && yang_dnode_exists(args->dnode, "../reuse-above")) {
-               suppress =
-                       yang_dnode_get_uint16(args->dnode, "../suppress-above");
-               reuse = yang_dnode_get_uint16(args->dnode, "../reuse-above");
-               if (suppress < reuse) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Suppress value cannot be less than reuse value \n");
-                       return NB_ERR_VALIDATION;
-               }
-       }
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/enable
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               return bgp_global_afi_safi_route_flap_validation(args);
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/reach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/reuse-above
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       int reuse = DEFAULT_REUSE;
-       int suppress = DEFAULT_SUPPRESS;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               if (yang_dnode_exists(args->dnode, "../suppress-above"))
-                       suppress = yang_dnode_get_uint16(args->dnode,
-                                                        "../suppress-above");
-               reuse = yang_dnode_get_uint16(args->dnode, "../reuse-above");
-               if (suppress < reuse) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Suppress value cannot be less than reuse value \n");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/suppress-above
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/route-flap-dampening/unreach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int
-bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       uint16_t maxpaths, default_maxpaths;
-       int ret;
-       char xpath[XPATH_MAXLEN];
-       char afi_xpath[XPATH_MAXLEN];
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-       maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
-
-       snprintf(xpath, sizeof(xpath), FRR_BGP_GLOBAL_XPATH, "frr-bgp:bgp",
-                "bgp", bgp->name ? bgp->name : VRF_DEFAULT_NAME);
-       snprintf(
-               afi_xpath, sizeof(afi_xpath),
-               "/global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ebgp/maximum-paths",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(xpath, afi_xpath, sizeof(xpath));
-       default_maxpaths = yang_get_default_uint16(xpath);
-
-       ret = bgp_maxpaths_config_vty(bgp, afi, safi, BGP_PEER_EBGP, maxpaths,
-                                     0, maxpaths != default_maxpaths ? 1 : 0,
-                                     args->errmsg, args->errmsg_len);
-       if (ret != CMD_SUCCESS)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ebgp/maximum-paths
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       uint16_t maxpaths;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
-               if (maxpaths > multipath_num) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "maxpaths %u is out of range %u", maxpaths,
-                                multipath_num);
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp
- */
-void bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       uint16_t maxpaths, default_maxpaths;
-       char xpath[XPATH_MAXLEN];
-       char afi_xpath[XPATH_MAXLEN];
-       uint16_t options = 0;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       maxpaths = yang_dnode_get_uint16(args->dnode, "./maximum-paths");
-       if (yang_dnode_get_bool(args->dnode, "./cluster-length-list"))
-               options = BGP_FLAG_IBGP_MULTIPATH_SAME_CLUSTERLEN;
-
-       snprintf(xpath, sizeof(xpath), FRR_BGP_GLOBAL_XPATH, "frr-bgp:bgp",
-                "bgp", bgp->name ? bgp->name : VRF_DEFAULT_NAME);
-       snprintf(
-               afi_xpath, sizeof(afi_xpath),
-               "/global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ibgp/maximum-paths",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(xpath, afi_xpath, sizeof(xpath));
-       default_maxpaths = yang_get_default_uint16(xpath);
-
-       bgp_maxpaths_config_vty(bgp, afi, safi, BGP_PEER_IBGP, maxpaths,
-                               options, maxpaths != default_maxpaths ? 1 : 0,
-                               args->errmsg, args->errmsg_len);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp/maximum-paths
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       uint16_t maxpaths;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
-               if (maxpaths > multipath_num) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "maxpaths %u is out of range %u", maxpaths,
-                                multipath_num);
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/use-multiple-paths/ibgp/cluster-length-list
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-void bgp_global_afi_safi_ip_unicast_redistribution_list_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int route_type;
-       int route_instance;
-       struct bgp_redist *red;
-       bool changed = false;
-       struct route_map *route_map = NULL;
-       const char *rmap_name = NULL;
-       uint32_t metric = 0;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       route_type = yang_dnode_get_enum(args->dnode, "./route-type");
-       route_instance = yang_dnode_get_uint16(args->dnode, "./route-instance");
-
-       red = bgp_redist_add(bgp, afi, route_type, route_instance);
-
-       if (yang_dnode_exists(args->dnode, "./rmap-policy-import")) {
-               rmap_name = yang_dnode_get_string(args->dnode,
-                                                 "./rmap-policy-import");
-               route_map = route_map_lookup_by_name(rmap_name);
-
-               changed = bgp_redistribute_rmap_set(red, rmap_name, route_map);
-       }
-
-       if (yang_dnode_exists(args->dnode, "./metric")) {
-               metric = yang_dnode_get_uint32(args->dnode, "./metric");
-               changed |= bgp_redistribute_metric_set(bgp, red, afi,
-                                                      route_type, metric);
-       }
-
-       bgp_redistribute_set(bgp, afi, route_type, route_instance, changed);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int route_type;
-       int route_instance;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-               bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-               route_type = yang_dnode_get_enum(args->dnode, "./route-type");
-               route_instance =
-                       yang_dnode_get_uint16(args->dnode, "./route-instance");
-
-               bgp_redistribute_unset(bgp, afi, route_type, route_instance);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list/metric
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_metric_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_metric_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/redistribution-list/rmap-policy-import
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_rmap_policy_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_redistribution_list_rmap_policy_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int
-bgp_global_afi_safis_admin_distance_modify(struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       uint8_t distance_ebgp, distance_ibgp, distance_local;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       distance_ebgp = yang_dnode_get_uint8(args->dnode, "./external");
-       distance_ibgp = yang_dnode_get_uint8(args->dnode, "./internal");
-       distance_local = yang_dnode_get_uint8(args->dnode, "./local");
-
-       bgp->distance_ebgp[afi][safi] = distance_ebgp;
-       bgp->distance_ibgp[afi][safi] = distance_ibgp;
-       bgp->distance_local[afi][safi] = distance_local;
-
-       bgp_announce_routes_distance_update(bgp, afi, safi);
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance
- */
-void bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       bgp_global_afi_safis_admin_distance_modify(args);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/external
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_external_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/internal
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_internal_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/admin-distance/local
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_admin_distance_local_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_rd_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *rd_str = NULL;
-       struct prefix_rd prd;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       rd_str = yang_dnode_get_string(args->dnode, NULL);
-       if (!str2prefix_rd(rd_str, &prd)) {
-               snprintf(args->errmsg, args->errmsg_len, "Malformed rd %s\n",
-                        rd_str);
-               return NB_ERR_INCONSISTENCY;
-       }
-
-       /*
-        * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
-        */
-       vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
-                          bgp);
-
-       bgp->vpn_policy[afi].tovpn_rd = prd;
-       SET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_RD_SET);
-
-       /* post-change: re-export vpn routes */
-       vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
-                           bgp);
-
-       return NB_OK;
-}
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_rd_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *rd_str = NULL;
-       struct prefix_rd prd;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       rd_str = yang_dnode_get_string(args->dnode, NULL);
-       if (!str2prefix_rd(rd_str, &prd)) {
-               snprintf(args->errmsg, args->errmsg_len, "Malformed rd %s \n",
-                        rd_str);
-               return NB_ERR_INCONSISTENCY;
-       }
-
-       /*
-        * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
-        */
-       vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
-                          bgp);
-
-       UNSET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_RD_SET);
-
-       /* post-change: re-export vpn routes */
-       vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
-                           bgp);
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rd
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rd_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if (!vpn_policy_check_import(bgp, afi, safi, false,
-                                            args->errmsg, args->errmsg_len))
-                       return NB_ERR_VALIDATION;
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rd_modify(
-                       args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rd_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rd_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/label
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/label-auto
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_auto_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_label_auto_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       struct prefix p;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       yang_dnode_get_prefix(&p, args->dnode, NULL);
-
-       /*
-        * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
-        */
-       vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
-                          bgp);
-
-       bgp->vpn_policy[afi].tovpn_nexthop = p;
-       SET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_NEXTHOP_SET);
-
-       /* post-change: re-export vpn routes */
-       vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
-                           bgp);
-
-       return NB_OK;
-}
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       struct prefix p;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       yang_dnode_get_prefix(&p, args->dnode, NULL);
-
-       /*
-        * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
-        */
-       vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
-                          bgp);
-       UNSET_FLAG(bgp->vpn_policy[afi].flags,
-                  BGP_VPN_POLICY_TOVPN_NEXTHOP_SET);
-       /* post-change: re-export vpn routes */
-       vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi, bgp_get_default(),
-                           bgp);
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/nexthop
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_nexthop_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if (!vpn_policy_check_import(bgp, afi, safi, false,
-                                            args->errmsg, args->errmsg_len))
-                       return NB_ERR_VALIDATION;
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_modify(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_nexthop_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_import_export_vpn_modify(
-       struct nb_cb_modify_args *args, const char *direction_str,
-       bool is_enable)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int previous_state;
-       int flag;
-       vpn_policy_direction_t dir;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       if (!strcmp(direction_str, "import")) {
-               flag = BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT;
-               dir = BGP_VPN_POLICY_DIR_FROMVPN;
-       } else if (!strcmp(direction_str, "export")) {
-               flag = BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT;
-               dir = BGP_VPN_POLICY_DIR_TOVPN;
-       } else {
-               snprintf(args->errmsg, args->errmsg_len,
-                        "unknown direction %s\n", direction_str);
-               return NB_ERR_INCONSISTENCY;
-       }
-
-       previous_state = CHECK_FLAG(bgp->af_flags[afi][safi], flag);
-
-       if (is_enable) {
-               SET_FLAG(bgp->af_flags[afi][safi], flag);
-               if (!previous_state) {
-                       /* trigger export current vrf */
-                       vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
-               }
-       } else {
-               if (previous_state) {
-                       /* trigger un-export current vrf */
-                       vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
-               }
-               UNSET_FLAG(bgp->af_flags[afi][safi], flag);
-       }
-
-       hook_call(bgp_snmp_init_stats, bgp);
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-vpn
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vpn_modify(
-       struct nb_cb_modify_args *args)
-{
-       bool is_enable = false;
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               if (BGP_INSTANCE_TYPE_VRF != bgp->inst_type
-                   && BGP_INSTANCE_TYPE_DEFAULT != bgp->inst_type) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "import|export vpn valid only for bgp vrf or default instance");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               if (yang_dnode_get_bool(args->dnode, NULL))
-                       is_enable = true;
-
-               return bgp_global_afi_safi_ip_unicast_vpn_config_import_export_vpn_modify(
-                       args, "import", is_enable);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/export-vpn
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_vpn_modify(
-       struct nb_cb_modify_args *args)
-{
-       bool is_enable = false;
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               if (BGP_INSTANCE_TYPE_VRF != bgp->inst_type
-                   && BGP_INSTANCE_TYPE_DEFAULT != bgp->inst_type) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "import|export vpn valid only for bgp vrf or default instance");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               if (yang_dnode_get_bool(args->dnode, NULL))
-                       is_enable = true;
-
-               return bgp_global_afi_safi_ip_unicast_vpn_config_import_export_vpn_modify(
-                       args, "export", is_enable);
-       }
-
-       return NB_OK;
-}
-
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs_create(
-       struct nb_cb_create_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int ret = 0;
-       as_t as;
-       struct bgp *vrf_bgp, *bgp_default;
-       const char *import_name;
-       char *vname;
-       enum bgp_instance_type bgp_type = BGP_INSTANCE_TYPE_VRF;
-       struct listnode *node;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       as = bgp->as;
-       import_name = yang_dnode_get_string(args->dnode, "./vrf");
-
-       if (((BGP_INSTANCE_TYPE_DEFAULT == bgp->inst_type)
-            && (strcmp(import_name, VRF_DEFAULT_NAME) == 0))
-           || (bgp->name && (strcmp(import_name, bgp->name) == 0))) {
-               snprintf(args->errmsg, args->errmsg_len,
-                        "Cannot %s vrf %s into itself\n", "import",
-                        import_name);
-               return NB_ERR_INCONSISTENCY;
-       }
-
-       bgp_default = bgp_get_default();
-       if (!bgp_default) {
-               /* Auto-create assuming the same AS */
-               ret = bgp_get_vty(&bgp_default, &as, NULL,
-                                 BGP_INSTANCE_TYPE_DEFAULT);
-
-               if (ret) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "VRF default is not configured as a bgp instance");
-                       return NB_ERR_INCONSISTENCY;
-               }
-       }
-
-       vrf_bgp = bgp_lookup_by_name(import_name);
-       if (!vrf_bgp) {
-               if (strcmp(import_name, VRF_DEFAULT_NAME) == 0)
-                       vrf_bgp = bgp_default;
-               else
-                       /* Auto-create assuming the same AS */
-                       ret = bgp_get_vty(&vrf_bgp, &as, import_name, bgp_type);
-
-               if (ret) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "VRF %s is not configured as a bgp instance\n",
-                                import_name);
-                       return NB_ERR_INCONSISTENCY;
-               }
-       }
-
-       /* Already importing from "import_vrf"? */
-       for (ALL_LIST_ELEMENTS_RO(bgp->vpn_policy[afi].import_vrf, node,
-                                 vname)) {
-               if (strcmp(vname, import_name) == 0) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "already importing from vrf %s", import_name);
-                       return NB_ERR_INCONSISTENCY;
-               }
-       }
-
-       vrf_import_from_vrf(bgp, vrf_bgp, afi, safi);
-
-       return NB_OK;
-}
-
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_import_vrf_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int ret = 0;
-       as_t as;
-       struct bgp *vrf_bgp, *bgp_default;
-       const char *import_name;
-       enum bgp_instance_type bgp_type = BGP_INSTANCE_TYPE_VRF;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       as = bgp->as;
-       import_name = yang_dnode_get_string(args->dnode, "./vrf");
-
-       if (((BGP_INSTANCE_TYPE_DEFAULT == bgp->inst_type)
-            && (strcmp(import_name, VRF_DEFAULT_NAME) == 0))
-           || (bgp->name && (strcmp(import_name, bgp->name) == 0))) {
-               snprintf(args->errmsg, args->errmsg_len,
-                        "Cannot %s vrf %s into itself\n", "unimport",
-                        import_name);
-               return NB_ERR_INCONSISTENCY;
-       }
-
-       bgp_default = bgp_get_default();
-       if (!bgp_default) {
-               /* Auto-create assuming the same AS */
-               ret = bgp_get_vty(&bgp_default, &as, NULL,
-                                 BGP_INSTANCE_TYPE_DEFAULT);
-
-               if (ret) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len, "%s",
-                               "VRF default is not configured as a bgp instance");
-                       return NB_ERR_INCONSISTENCY;
-               }
-       }
-
-       vrf_bgp = bgp_lookup_by_name(import_name);
-       if (!vrf_bgp) {
-               if (strcmp(import_name, VRF_DEFAULT_NAME) == 0)
-                       vrf_bgp = bgp_default;
-               else
-                       /* Auto-create assuming the same AS */
-                       ret = bgp_get_vty(&vrf_bgp, &as, import_name, bgp_type);
-
-               if (ret) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "VRF %s is not configured as a bgp instance\n",
-                                import_name);
-                       return NB_ERR_INCONSISTENCY;
-               }
-       }
-
-       vrf_unimport_from_vrf(bgp, vrf_bgp, afi, safi);
-
-       return NB_OK;
-}
-
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-vrf-list
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vrf_list_create(
-       struct nb_cb_create_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if (!vpn_policy_check_import(bgp, afi, safi, true, args->errmsg,
-                                            args->errmsg_len))
-                       return NB_ERR_VALIDATION;
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs_create(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_vrf_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_import_vrf_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
-       struct nb_cb_modify_args *args, const char *dstr)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *rmap_str = NULL;
-       int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
-       vpn_policy_direction_t dir;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       if (!strcmp(dstr, "import")) {
-               rmap_str = yang_dnode_get_string(args->dnode, NULL);
-               dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
-       } else if (!strcmp(dstr, "export")) {
-               rmap_str = yang_dnode_get_string(args->dnode, NULL);
-               dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
-       } else if (!strcmp(dstr, "both")) {
-               dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
-               dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
-       }
-
-       for (dir = 0; dir < BGP_VPN_POLICY_DIR_MAX; ++dir) {
-               if (!dodir[dir])
-                       continue;
-
-               vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
-
-               if (bgp->vpn_policy[afi].rmap_name[dir])
-                       XFREE(MTYPE_ROUTE_MAP_NAME,
-                             bgp->vpn_policy[afi].rmap_name[dir]);
-               bgp->vpn_policy[afi].rmap_name[dir] =
-                       XSTRDUP(MTYPE_ROUTE_MAP_NAME, rmap_str);
-               bgp->vpn_policy[afi].rmap[dir] =
-                       route_map_lookup_by_name(rmap_str);
-               if (!bgp->vpn_policy[afi].rmap[dir])
-                       return NB_OK;
-
-
-               vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
-       }
-
-       return NB_OK;
-}
-
-static int bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args, const char *dstr)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
-       vpn_policy_direction_t dir;
-
-       af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-       if (!strcmp(dstr, "import")) {
-               dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
-       } else if (!strcmp(dstr, "export")) {
-               dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
-       } else if (!strcmp(dstr, "both")) {
-               dodir[BGP_VPN_POLICY_DIR_FROMVPN] = 1;
-               dodir[BGP_VPN_POLICY_DIR_TOVPN] = 1;
-       }
-
-       for (dir = 0; dir < BGP_VPN_POLICY_DIR_MAX; ++dir) {
-               if (!dodir[dir])
-                       continue;
-
-               vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
-
-               if (bgp->vpn_policy[afi].rmap_name[dir])
-                       XFREE(MTYPE_ROUTE_MAP_NAME,
-                             bgp->vpn_policy[afi].rmap_name[dir]);
-               bgp->vpn_policy[afi].rmap_name[dir] = NULL;
-               bgp->vpn_policy[afi].rmap[dir] = NULL;
-
-               vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rmap-import
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if (!vpn_policy_check_import(bgp, afi, safi, false,
-                                            args->errmsg, args->errmsg_len))
-                       return NB_ERR_VALIDATION;
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
-                       args, "import");
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if (!vpn_policy_check_import(bgp, afi, safi, false,
-                                            args->errmsg, args->errmsg_len))
-                       return NB_ERR_VALIDATION;
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
-                       args, "import");
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rmap-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
-                       args, "export");
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
-                       args, "export");
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/redirect-rt
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_redirect_rt_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_redirect_rt_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/import-rt-list
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_rt_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_import_rt_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/export-rt-list
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_rt_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_export_rt_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-unicast/vpn-config/rt-list
- */
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rt_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_unicast_vpn_config_rt_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_create(
-       struct nb_cb_create_args *args)
-{
-       /* Handled in network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safis_afi_safi_network_config_destroy(
-                       args);
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/backdoor
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_backdoor_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in unicast_network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/label-index
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_label_index_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in unicast_network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_label_index_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/network-config/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in unicast_network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_network_config_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_aggregate_route_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/as-set
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_as_set_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/summary-only
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_summary_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/origin
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_origin_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/match-med
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_match_med_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/aggregate-route/suppress-map
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_suppress_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_aggregate_route_suppress_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_admin_distance_route_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route/distance
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_distance_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance-route/access-list-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_access_list_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_route_access_list_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/enable
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               return bgp_global_afi_safi_route_flap_validation(args);
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/reach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/reuse-above
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       int reuse = DEFAULT_REUSE;
-       int suppress = DEFAULT_SUPPRESS;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               if (yang_dnode_exists(args->dnode, "../suppress-above"))
-                       suppress = yang_dnode_get_uint16(args->dnode,
-                                                        "../suppress-above");
-               reuse = yang_dnode_get_uint16(args->dnode, "../reuse-above");
-               if (suppress < reuse) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Suppress value cannot be less than reuse value \n");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/suppress-above
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/route-flap-dampening/unreach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ebgp/maximum-paths
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       uint16_t maxpaths;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
-               if (maxpaths > multipath_num) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "maxpaths %u is out of range %u", maxpaths,
-                                multipath_num);
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ibgp/maximum-paths
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/use-multiple-paths/ibgp/cluster-length-list
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       const struct lyd_node *af_dnode;
-       struct bgp *bgp;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int route_type;
-       int route_instance;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-               bgp = nb_running_get_entry(af_dnode, NULL, true);
-
-               route_type = yang_dnode_get_enum(args->dnode, "./route-type");
-               route_instance =
-                       yang_dnode_get_uint16(args->dnode, "./route-instance");
-
-               bgp_redistribute_unset(bgp, afi, route_type, route_instance);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list/metric
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_metric_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_metric_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/redistribution-list/rmap-policy-import
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_rmap_policy_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_redistribution_list_rmap_policy_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance
- */
-void bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       bgp_global_afi_safis_admin_distance_modify(args);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/external
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_external_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/internal
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_internal_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/admin-distance/local
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_admin_distance_local_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rd
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rd_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if (!vpn_policy_check_import(bgp, afi, safi, false,
-                                            args->errmsg, args->errmsg_len))
-                       return NB_ERR_VALIDATION;
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rd_modify(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rd_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rd_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/label
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/label-auto
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_auto_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_label_auto_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/nexthop
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_nexthop_modify(
-       struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if (!vpn_policy_check_import(bgp, afi, safi, false,
-                                            args->errmsg, args->errmsg_len))
-                       return NB_ERR_VALIDATION;
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_modify(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_nexthop_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_nexthop_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-vpn
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vpn_modify(
-       struct nb_cb_modify_args *args)
-{
-       bool is_enable = false;
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               if (bgp->inst_type != BGP_INSTANCE_TYPE_VRF
-                   && bgp->inst_type != BGP_INSTANCE_TYPE_DEFAULT) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "import|export vpn valid only for bgp vrf or default instance");
-                       return NB_ERR_VALIDATION;
-               }
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               if (yang_dnode_get_bool(args->dnode, NULL))
-                       is_enable = true;
-
-               return bgp_global_afi_safi_ip_unicast_vpn_config_import_export_vpn_modify(
-                       args, "import", is_enable);
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/export-vpn
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_vpn_modify(
-       struct nb_cb_modify_args *args)
-{
-       bool is_enable = false;
-       struct bgp *bgp;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-
-               if (bgp->inst_type != BGP_INSTANCE_TYPE_VRF
-                   && bgp->inst_type != BGP_INSTANCE_TYPE_DEFAULT) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "import|export vpn valid only for bgp vrf or default instance");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               if (yang_dnode_get_bool(args->dnode, NULL))
-                       is_enable = true;
-
-               return bgp_global_afi_safi_ip_unicast_vpn_config_import_export_vpn_modify(
-                       args, "export", is_enable);
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-vrf-list
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vrf_list_create(
-       struct nb_cb_create_args *args)
-{
-       struct bgp *bgp;
-       const struct lyd_node *af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               bgp = nb_running_get_entry(args->dnode, NULL, false);
-               if (!bgp)
-                       return NB_OK;
-               af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-               af_name = yang_dnode_get_string(af_dnode, "./afi-safi-name");
-               yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-               if (!vpn_policy_check_import(bgp, afi, safi, true, args->errmsg,
-                                            args->errmsg_len))
-                       return NB_ERR_VALIDATION;
-
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs_create(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_vrf_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_import_vrf_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rmap-import
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
-                       args, "import");
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
-                       args, "import");
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rmap-export
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_modify(
-                       args, "export");
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import_destroy(
-                       args, "export");
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/redirect-rt
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_redirect_rt_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_redirect_rt_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/import-rt-list
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_rt_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_import_rt_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/export-rt-list
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_rt_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_export_rt_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-unicast/vpn-config/rt-list
- */
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rt_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_unicast_vpn_config_rt_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ebgp/maximum-paths
- */
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       uint16_t maxpaths;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
-               if (maxpaths > multipath_num) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "maxpaths %u is out of range %u", maxpaths,
-                                multipath_num);
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ibgp/maximum-paths
- */
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/use-multiple-paths/ibgp/cluster-length-list
- */
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/enable
- */
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               return bgp_global_afi_safi_route_flap_validation(args);
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/reach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/reuse-above
- */
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/suppress-above
- */
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-labeled-unicast/route-flap-dampening/unreach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_labeled_unicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ebgp/maximum-paths
- */
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       uint16_t maxpaths;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
-               if (maxpaths > multipath_num) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "maxpaths %u is out of range %u", maxpaths,
-                                multipath_num);
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_ip_unicast_use_multiple_paths_ebgp_maximum_paths_modify(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ibgp/maximum-paths
- */
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_maximum_paths_modify(
-       struct nb_cb_modify_args *args)
-{
-       uint16_t maxpaths;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               maxpaths = yang_dnode_get_uint16(args->dnode, NULL);
-               if (maxpaths > multipath_num) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "maxpaths %u is out of range %u", maxpaths,
-                                multipath_num);
-                       return NB_ERR_VALIDATION;
-               }
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/use-multiple-paths/ibgp/cluster-length-list
- */
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_use_multiple_paths_ibgp_cluster_length_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/enable
- */
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               return bgp_global_afi_safi_route_flap_validation(args);
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/reach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/reuse-above
- */
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/suppress-above
- */
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-labeled-unicast/route-flap-dampening/unreach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_labeled_unicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_create(
-       struct nb_cb_create_args *args)
-{
-       /* Handled in network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safis_afi_safi_network_config_destroy(
-                       args);
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/backdoor
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_backdoor_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/label-index
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_label_index_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_label_index_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/network-config/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_network_config_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/as-set
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_as_set_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/summary-only
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_summary_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/origin
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_origin_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/match-med
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_match_med_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/aggregate-route/suppress-map
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_suppress_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_aggregate_route_suppress_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_admin_distance_route_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route/distance
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_distance_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance-route/access-list-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_access_list_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_route_access_list_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route/distance
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_distance_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route/access-list-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_access_list_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_access_list_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/enable
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               return bgp_global_afi_safi_route_flap_validation(args);
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/reach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/reuse-above
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/suppress-above
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/route-flap-dampening/unreach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance
- */
-void bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       bgp_global_afi_safis_admin_distance_modify(args);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/external
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_external_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/internal
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_internal_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance/local
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_admin_distance_local_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/enable
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_enable_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               return bgp_global_afi_safi_route_flap_validation(args);
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/reach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/reuse-above
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reuse_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_reuse_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/suppress-above
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_suppress_above_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_suppress_above_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/route-flap-dampening/unreach-decay
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_unreach_decay_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_route_flap_dampening_unreach_decay_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export
- */
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_create(
-       struct nb_cb_create_args *args)
-{
-       /* Handled in network_config_apply_finish callback */
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safis_afi_safi_network_config_destroy(
-                       args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/backdoor
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_backdoor_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/label-index
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_label_index_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_label_index_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/network-config/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_network_config_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/as-set
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_as_set_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/summary-only
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_summary_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/origin
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_origin_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/match-med
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_match_med_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/aggregate-route/suppress-map
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_suppress_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_aggregate_route_suppress_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance-route
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_route_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_global_afi_safi_admin_distance_route_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-multicast/admin-distance
- */
-void bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       bgp_global_afi_safis_admin_distance_modify(args);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/external
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_external_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/internal
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_internal_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv6-multicast/admin-distance/local
- */
-int bgp_global_afi_safis_afi_safi_ipv6_multicast_admin_distance_local_modify(
-       struct nb_cb_modify_args *args)
-{
-       /* Handled in admin_distance_apply_finish callback */
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/ipv4-flowspec/flow-spec-config/interface
- */
-int bgp_global_afi_safis_afi_safi_ipv4_flowspec_flow_spec_config_interface_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_ipv4_flowspec_flow_spec_config_interface_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config
- */
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list
- */
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list/label-index
- */
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_label_index_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv4-unicast/network-config/prefix-list/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv4_unicast_network_config_prefix_list_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config
- */
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list
- */
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list/label-index
- */
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_label_index_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/afi-safis/afi-safi/l3vpn-ipv6-unicast/network-config/prefix-list/rmap-policy-export
- */
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_rmap_policy_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_global_afi_safis_afi_safi_l3vpn_ipv6_unicast_network_config_prefix_list_rmap_policy_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-unicast/common-config/pre-policy
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_unicast_common_config_pre_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-unicast/common-config/post-policy
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_unicast_common_config_post_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-multicast/common-config/pre-policy
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_multicast_common_config_pre_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv4-multicast/common-config/post-policy
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv4_multicast_common_config_post_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-unicast/common-config/pre-policy
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_unicast_common_config_pre_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-unicast/common-config/post-policy
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_unicast_common_config_post_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-multicast/common-config/pre-policy
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_config_pre_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/global/bmp-config/target-list/afi-safis/afi-safi/ipv6-multicast/common-config/post-policy
- */
-int bgp_global_bmp_config_target_list_afi_safis_afi_safi_ipv6_multicast_common_config_post_policy_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_neighbor_afi_safi_flag_modify(struct nb_cb_modify_args *args,
-                                            uint32_t flags, bool set)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg,
-                                  args->errmsg_len)
-           < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int
-bgp_peer_afi_safi_default_originate_apply(struct nb_cb_apply_finish_args *args,
-                                         struct peer *peer, afi_t afi,
-                                         safi_t safi)
-{
-       bool originate = false;
-       int ret = 0;
-       struct route_map *route_map = NULL;
-       const char *rmap = NULL;
-
-       originate = yang_dnode_get_bool(args->dnode, "./originate");
-
-       if (yang_dnode_exists(args->dnode, "./route-map")) {
-               rmap = yang_dnode_get_string(args->dnode, "./route-map");
-               route_map = route_map_lookup_by_name(rmap);
-               if (!route_map) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "The route-map '%s' does not exist.", rmap);
-                       return -1;
-               }
-       }
-
-       // zlog_debug("%s: originate %u route-map %s", __func__, originate,
-       // rmap);
-       if (originate)
-               ret = peer_default_originate_set(peer, afi, safi, rmap,
-                                                route_map);
-       else
-               ret = peer_default_originate_unset(peer, afi, safi);
-
-       return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate
- */
-void bgp_neighbor_afi_safi_default_originate_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-       if (!peer)
-               return;
-
-       bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int
-bgp_neighbor_afi_safi_prefix_limit_list_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int direction;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-       if (!peer)
-               return NB_ERR_INCONSISTENCY;
-
-       direction = yang_dnode_get_enum(args->dnode, "./direction");
-
-       switch (direction) {
-       case 1:
-               peer_maximum_prefix_unset(peer, afi, safi);
-               break;
-       case 2:
-               UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
-               peer->pmax_out[afi][safi] = 0;
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-static void
-bgp_peer_afi_safi_maximum_prefix_set(struct nb_cb_apply_finish_args *args,
-                                    struct peer *peer, afi_t afi, safi_t safi)
-{
-       int direction;
-       uint32_t max;
-       uint8_t threshold = MAXIMUM_PREFIX_THRESHOLD_DEFAULT;
-       uint16_t restart = 0;
-       bool warning = false;
-       bool force;
-
-       max = yang_dnode_get_uint32(args->dnode, "./max-prefixes");
-       direction = yang_dnode_get_enum(args->dnode, "./direction");
-       switch (direction) {
-       case 1:
-               force = yang_dnode_get_bool(args->dnode, "./force-check");
-
-               if (yang_dnode_exists(args->dnode,
-                                     "./options/shutdown-threshold-pct"))
-                       threshold = yang_dnode_get_uint8(
-                               args->dnode,
-                               "./options/shutdown-threshold-pct");
-               if (yang_dnode_exists(args->dnode,
-                                     "./options/tw-shutdown-threshold-pct"))
-                       threshold = yang_dnode_get_uint8(
-                               args->dnode,
-                               "./options/tw-shutdown-threshold-pct");
-               if (yang_dnode_exists(args->dnode,
-                                     "./options/tr-shutdown-threshold-pct"))
-                       threshold = yang_dnode_get_uint8(
-                               args->dnode,
-                               "./options/tr-shutdown-threshold-pct");
-
-               if (yang_dnode_exists(args->dnode, "./options/warning-only"))
-                       warning = yang_dnode_get_bool(args->dnode,
-                                                     "./options/warning-only");
-               if (yang_dnode_exists(args->dnode, "./options/tw-warning-only"))
-                       warning = yang_dnode_get_bool(
-                               args->dnode, "./options/tw-warning-only");
-
-               if (yang_dnode_exists(args->dnode, "./options/restart-timer"))
-                       restart = yang_dnode_get_uint16(
-                               args->dnode, "./options/restart-timer");
-               if (yang_dnode_exists(args->dnode,
-                                     "./options/tr-restart-timer"))
-                       restart = yang_dnode_get_uint16(
-                               args->dnode, "./options/tr-restart-timer");
-
-               peer_maximum_prefix_set(peer, afi, safi, max, threshold,
-                                       warning, restart, force);
-
-               break;
-       case 2:
-               SET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
-               peer->pmax_out[afi][safi] = max;
-
-               break;
-       }
-}
-
-void bgp_neighbors_neighbor_afi_safi_prefix_limit_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-       if (!peer)
-               return;
-
-       bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_neighbor_afi_safi_weight_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       uint16_t weight;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       weight = yang_dnode_get_uint16(args->dnode, NULL);
-
-       ret = peer_weight_set(peer, afi, safi, weight);
-       if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-static int bgp_neighbor_afi_safi_weight_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       ret = peer_weight_unset(peer, afi, safi);
-       if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_neighbor_afi_safi_rmap_modify(struct nb_cb_modify_args *args,
-                                            int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *name_str;
-       struct route_map *route_map;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       name_str = yang_dnode_get_string(args->dnode, NULL);
-       route_map = route_map_lookup_by_name(name_str);
-       ret = peer_route_map_set(peer, afi, safi, direct, name_str, route_map);
-
-       return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-static int bgp_neighbor_afi_safi_rmap_destroy(struct nb_cb_destroy_args *args,
-                                             int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       ret = peer_route_map_unset(peer, afi, safi, direct);
-
-       return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-static int bgp_neighbor_afi_safi_plist_modify(struct nb_cb_modify_args *args,
-                                             int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *name_str;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       name_str = yang_dnode_get_string(args->dnode, NULL);
-       if (peer_prefix_list_set(peer, afi, safi, direct, name_str) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-static int bgp_neighbor_afi_safi_plist_destroy(struct nb_cb_destroy_args *args,
-                                              int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./remote-address");
-       peer = bgp_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                       args->errmsg_len);
-
-       if (peer_prefix_list_unset(peer, afi, safi, direct) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_neighbor_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int
-bgp_unnumbered_neighbor_afi_safi_flag_modify(struct nb_cb_modify_args *args,
-                                            uint32_t flags, bool set)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-
-       if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg,
-                                  args->errmsg_len)
-           < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate
- */
-void bgp_unnumbered_neighbor_afi_safi_default_originate_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-       if (!peer)
-               return;
-
-       bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/originate
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int direction;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-       if (!peer)
-               return NB_ERR_INCONSISTENCY;
-
-       direction = yang_dnode_get_enum(args->dnode, "./direction");
-
-       switch (direction) {
-       case 1:
-               peer_maximum_prefix_unset(peer, afi, safi);
-               break;
-       case 2:
-               UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
-               peer->pmax_out[afi][safi] = 0;
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-void bgp_unnumbered_neighbor_afi_safi_prefix_limit_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-       if (!peer)
-               return;
-
-       bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int
-bgp_unnumbered_neighbor_afi_safi_weight_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const char *af_name;
-       uint16_t weight;
-       afi_t afi;
-       safi_t safi;
-       const struct lyd_node *nbr_af_dnode;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-
-       weight = yang_dnode_get_uint16(args->dnode, NULL);
-
-       ret = peer_weight_set(peer, afi, safi, weight);
-       if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-static int
-bgp_unnumbered_neighbor_afi_safi_weight_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       bgp = nb_running_get_entry(args->dnode, NULL, true);
-       nbr_dnode = yang_dnode_get_parent(args->dnode, "unnumbered-neighbor");
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       ret = peer_weight_unset(peer, afi, safi);
-       if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int
-bgp_unnumbered_neighbor_afi_safi_rmap_modify(struct nb_cb_modify_args *args,
-                                            int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *name_str;
-       struct route_map *route_map;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-
-       name_str = yang_dnode_get_string(args->dnode, NULL);
-       route_map = route_map_lookup_by_name(name_str);
-       ret = peer_route_map_set(peer, afi, safi, direct, name_str, route_map);
-
-       return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-static int
-bgp_unnumbered_neighbor_afi_safi_rmap_destroy(struct nb_cb_destroy_args *args,
-                                             int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-
-       ret = peer_route_map_unset(peer, afi, safi, direct);
-
-       return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-static int
-bgp_unnumbered_neighbor_afi_safi_plist_modify(struct nb_cb_modify_args *args,
-                                             int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *name_str;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-
-       name_str = yang_dnode_get_string(args->dnode, NULL);
-       if (peer_prefix_list_set(peer, afi, safi, direct, name_str) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-static int
-bgp_unnumbered_neighbor_afi_safi_plist_destroy(struct nb_cb_destroy_args *args,
-                                              int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "unnumbered-neighbor");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./interface");
-       peer = bgp_unnumbered_neighbor_peer_lookup(bgp, peer_str, args->errmsg,
-                                                  args->errmsg_len);
-
-       if (peer_prefix_list_unset(peer, afi, safi, direct) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(args,
-                                                                    FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/originate
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(args,
-                                                                    FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/originate
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(args,
-                                                                    FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/originate
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(args,
-                                                                    FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(args,
-                                                                    FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_prefix_limit_list_destroy(
-                       args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(args,
-                                                                    FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_modify(args,
-                                                                   RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_rmap_destroy(args,
-                                                                    RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(args,
-                                                                    FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_modify(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_unnumbered_neighbor_afi_safi_plist_destroy(
-                       args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-import
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-export
- */
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_neighbors_unnumbered_neighbor_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_peer_group_afi_safi_flag_modify(struct nb_cb_modify_args *args,
-                                              uint32_t flags, bool set)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       if (peer_af_flag_modify_nb(peer, afi, safi, flags, set, args->errmsg,
-                                  args->errmsg_len)
-           < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/add-paths/path-type
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/neighbors/unnumbered-neighbor/afi-safis/afi-safi/ipv4-unicast/default-originate
- */
-void bgp_peer_group_afi_safi_default_originate_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-       if (!peer)
-               return;
-
-       bgp_peer_afi_safi_default_originate_apply(args, peer, afi, safi);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/originate
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/default-originate/route-map
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_peer_group_afi_safi_prefix_limit_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int direction;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-       if (!peer)
-               return NB_ERR_INCONSISTENCY;
-
-       direction = yang_dnode_get_enum(args->dnode, "./direction");
-
-       switch (direction) {
-       case 1:
-               peer_maximum_prefix_unset(peer, afi, safi);
-               break;
-       case 2:
-               UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
-               peer->pmax_out[afi][safi] = 0;
-               break;
-       }
-
-       return NB_OK;
-}
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-void bgp_peer_group_afi_safi_prefix_limit_apply_finish(
-       struct nb_cb_apply_finish_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-       if (!peer)
-               return;
-
-       bgp_peer_afi_safi_maximum_prefix_set(args, peer, afi, safi);
-}
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/private-as/remove-private-as-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_peer_group_afi_safi_weight_modify(struct nb_cb_modify_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       uint16_t weight;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       nbr_dnode = yang_dnode_get_parent(args->dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       weight = yang_dnode_get_uint16(args->dnode, NULL);
-
-       ret = peer_weight_set(peer, afi, safi, weight);
-       if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-static int
-bgp_peer_group_afi_safi_weight_destroy(struct nb_cb_destroy_args *args)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       ret = peer_weight_unset(peer, afi, safi);
-       if (bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/weight/weight-attribute
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-ext-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/send-community/send-large-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-send
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-receive
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/orf-capability/orf-both
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-static int bgp_peer_group_afi_safi_rmap_modify(struct nb_cb_modify_args *args,
-                                              int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *name_str;
-       struct route_map *route_map;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       name_str = yang_dnode_get_string(args->dnode, NULL);
-       route_map = route_map_lookup_by_name(name_str);
-       ret = peer_route_map_set(peer, afi, safi, direct, name_str, route_map);
-
-       return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-static int bgp_peer_group_afi_safi_rmap_destroy(struct nb_cb_destroy_args *args,
-                                               int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       int ret;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       ret = peer_route_map_unset(peer, afi, safi, direct);
-
-       return bgp_nb_errmsg_return(args->errmsg, args->errmsg_len, ret);
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-static int bgp_peer_group_afi_safi_plist_modify(struct nb_cb_modify_args *args,
-                                               int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-       const char *name_str;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       name_str = yang_dnode_get_string(args->dnode, NULL);
-       if (peer_prefix_list_set(peer, afi, safi, direct, name_str) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-static int
-bgp_peer_group_afi_safi_plist_destroy(struct nb_cb_destroy_args *args,
-                                     int direct)
-{
-       struct bgp *bgp;
-       const char *peer_str;
-       struct peer *peer;
-       const struct lyd_node *nbr_dnode;
-       const struct lyd_node *nbr_af_dnode;
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       nbr_af_dnode = yang_dnode_get_parent(args->dnode, "afi-safi");
-       af_name = yang_dnode_get_string(nbr_af_dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-       nbr_dnode = yang_dnode_get_parent(nbr_af_dnode, "peer-group");
-       bgp = nb_running_get_entry(nbr_dnode, NULL, true);
-       peer_str = yang_dnode_get_string(nbr_dnode, "./peer-group-name");
-       peer = bgp_peer_group_peer_lookup(bgp, peer_str);
-
-       if (peer_prefix_list_unset(peer, afi, safi, direct) < 0)
-               return NB_ERR_INCONSISTENCY;
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-unicast/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-local-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_local_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/add-paths/path-type
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/originate
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/default-originate/route-map
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-send
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-receive
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/orf-capability/orf-both
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/private-as/remove-private-as-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-ext-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/send-community/send-large-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/weight/weight-attribute
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-unicast/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/add-paths/path-type
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/originate
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/default-originate/route-map
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-send
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-receive
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/orf-capability/orf-both
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/force-check
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-all-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/private-as/remove-private-as-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-ext-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/send-community/send-large-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/weight/weight-attribute
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-multicast/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/add-paths/path-type
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/originate
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/default-originate/route-map
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-send
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-receive
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/orf-capability/orf-both
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/force-check
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-all-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/private-as/remove-private-as-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-ext-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/send-community/send-large-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/weight/weight-attribute
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-multicast/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_multicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/add-paths/path-type
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/originate
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/default-originate/route-map
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-send
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-receive
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/orf-capability/orf-both
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/private-as/remove-private-as-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-ext-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/send-community/send-large-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/weight/weight-attribute
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-labeled-unicast/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/add-paths/path-type
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/originate
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_originate_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/default-originate/route-map
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_default_originate_route_map_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-send
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_send_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-receive
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_receive_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/orf-capability/orf-both
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_orf_capability_orf_both_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/private-as/remove-private-as-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-ext-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/send-community/send-large-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/weight/weight-attribute
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-labeled-unicast/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_labeled_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/add-paths/path-type
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/private-as/remove-private-as-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-ext-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/send-community/send-large-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/weight/weight-attribute
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv4-unicast/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv4_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/add-paths/path-type
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_add_paths_path_type_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_create(
-       struct nb_cb_create_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_prefix_limit_list_destroy(args);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/max-prefixes
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_max_prefixes_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/force-check
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_force_check_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tr-restart-timer
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tr_restart_timer_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-shutdown-threshold-pct
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_shutdown_threshold_pct_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/prefix-limit/direction-list/options/tw-warning-only
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_prefix_limit_direction_list_options_tw_warning_only_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-all-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_all_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/private-as/remove-private-as-replace
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_private_as_remove_private_as_replace_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-ext-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_ext_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_EXT_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/send-community/send-large-community
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_send_community_send_large_community_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SEND_LARGE_COMMUNITY,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/weight/weight-attribute
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_modify(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_weight_weight_attribute_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_weight_destroy(args);
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l3vpn-ipv6-unicast/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l3vpn_ipv6_unicast_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/allow-own-origin-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_allow_own_origin_as_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/as-path-options/replace-peer-as
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_as_path_options_replace_peer_as_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_OVERRIDE,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/as-path-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_as_path_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_AS_PATH_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/next-hop-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_next_hop_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/attr-unchanged/med-unchanged
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_attr_unchanged_med_unchanged_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_MED_UNCHANGED,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/nexthop-self/next-hop-self-force
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_nexthop_self_next_hop_self_force_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_FORCE_NEXTHOP_SELF,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/l2vpn-evpn/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_l2vpn_evpn_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv4-flowspec/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv4_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/route-reflector/route-reflector-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_reflector_route_reflector_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_REFLECTOR_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/route-server/route-server-client
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_route_server_route_server_client_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_RSERVER_CLIENT,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/soft-reconfiguration
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_soft_reconfiguration_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               return NB_OK;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_flag_modify(
-                       args, PEER_FLAG_SOFT_RECONFIG,
-                       yang_dnode_get_bool(args->dnode, NULL));
-
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/rmap-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_modify(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_rmap_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_rmap_destroy(args, RMAP_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_IN);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/plist-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_modify(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_plist_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               return bgp_peer_group_afi_safi_plist_destroy(args, FILTER_OUT);
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/access-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_access_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/as-path-filter-list-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_as_path_filter_list_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-import
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_import_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-/*
- * XPath:
- * /frr-routing:routing/control-plane-protocols/control-plane-protocol/frr-bgp:bgp/peer-groups/peer-group/afi-safis/afi-safi/ipv6-flowspec/filter-config/unsuppress-map-export
- */
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_modify(
-       struct nb_cb_modify_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
-
-int bgp_peer_groups_peer_group_afi_safis_afi_safi_ipv6_flowspec_filter_config_unsuppress_map_export_destroy(
-       struct nb_cb_destroy_args *args)
-{
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-       case NB_EV_APPLY:
-               /* TODO: implement me. */
-               break;
-       }
-
-       return NB_OK;
-}
index 3c061ef1e0ece77a90256282224639d4a78cb0ff..3005eba27117c2924d2b45f9d1587b06a2878770 100644 (file)
@@ -611,8 +611,6 @@ static int bgp_accept(struct thread *thread)
 /* BGP socket bind. */
 static char *bgp_get_bound_name(struct peer *peer)
 {
-       char *name = NULL;
-
        if (!peer)
                return NULL;
 
@@ -628,14 +626,16 @@ static char *bgp_get_bound_name(struct peer *peer)
         * takes precedence over VRF. For IPv4 peering, explicit interface or
         * VRF are the situations to bind.
         */
-       if (peer->su.sa.sa_family == AF_INET6)
-               name = (peer->conf_if ? peer->conf_if
-                                     : (peer->ifname ? peer->ifname
-                                                     : peer->bgp->name));
-       else
-               name = peer->ifname ? peer->ifname : peer->bgp->name;
+       if (peer->su.sa.sa_family == AF_INET6 && peer->conf_if)
+               return peer->conf_if;
 
-       return name;
+       if (peer->ifname)
+               return peer->ifname;
+
+       if (peer->bgp->inst_type == BGP_INSTANCE_TYPE_VIEW)
+               return NULL;
+
+       return peer->bgp->name;
 }
 
 static int bgp_update_address(struct interface *ifp, const union sockunion *dst,
@@ -706,7 +706,8 @@ int bgp_connect(struct peer *peer)
        ifindex_t ifindex = 0;
 
        if (peer->conf_if && BGP_PEER_SU_UNSPEC(peer)) {
-               zlog_debug("Peer address not learnt: Returning from connect");
+               if (bgp_debug_neighbor_events(peer))
+                       zlog_debug("Peer address not learnt: Returning from connect");
                return 0;
        }
        frr_with_privs(&bgpd_privs) {
@@ -714,8 +715,13 @@ int bgp_connect(struct peer *peer)
                peer->fd = vrf_sockunion_socket(&peer->su, peer->bgp->vrf_id,
                                                bgp_get_bound_name(peer));
        }
-       if (peer->fd < 0)
+       if (peer->fd < 0) {
+               if (bgp_debug_neighbor_events(peer))
+                       zlog_debug("%s: Failure to create socket for connection to %s, error received: %s(%d)",
+                                  __func__, peer->host, safe_strerror(errno),
+                                  errno);
                return -1;
+       }
 
        set_nonblocking(peer->fd);
 
@@ -725,8 +731,13 @@ int bgp_connect(struct peer *peer)
 
        bgp_socket_set_buffer_size(peer->fd);
 
-       if (bgp_set_socket_ttl(peer, peer->fd) < 0)
+       if (bgp_set_socket_ttl(peer, peer->fd) < 0) {
+               if (bgp_debug_neighbor_events(peer))
+                       zlog_debug("%s: Failure to set socket ttl for connection to %s, error received: %s(%d)",
+                                  __func__, peer->host, safe_strerror(errno),
+                                  errno);
                return -1;
+       }
 
        sockopt_reuseaddr(peer->fd);
        sockopt_reuseport(peer->fd);
index eb00a4641c8393d6d43a2e3a288cfe94d2743dda..c77e240855a8f4ce0f43e949d2f09963d999a847 100644 (file)
@@ -160,7 +160,8 @@ void bgp_unlink_nexthop_by_peer(struct peer *peer)
  */
 int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
                            afi_t afi, safi_t safi, struct bgp_path_info *pi,
-                           struct peer *peer, int connected)
+                           struct peer *peer, int connected,
+                           const struct prefix *orig_prefix)
 {
        struct bgp_nexthop_cache_head *tree = NULL;
        struct bgp_nexthop_cache *bnc;
@@ -192,6 +193,16 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
                if (make_prefix(afi, pi, &p) < 0)
                        return 1;
 
+               if (!is_bgp_static_route && orig_prefix
+                   && prefix_same(&p, orig_prefix)) {
+                       if (BGP_DEBUG(nht, NHT)) {
+                               zlog_debug(
+                                       "%s(%pFX): prefix loops through itself",
+                                       __func__, &p);
+                       }
+                       return 0;
+               }
+
                srte_color = pi->attr->srte_color;
        } else if (peer) {
                /*
index e006aa4469cddd745e379d066a101072e5a8c27b..43f0aa26cf24f0f681f4fca9d3afa1fd855f1297 100644 (file)
@@ -42,7 +42,8 @@ extern void bgp_parse_nexthop_update(int command, vrf_id_t vrf_id);
 extern int bgp_find_or_add_nexthop(struct bgp *bgp_route,
                                   struct bgp *bgp_nexthop, afi_t a,
                                   safi_t safi, struct bgp_path_info *p,
-                                  struct peer *peer, int connected);
+                                  struct peer *peer, int connected,
+                                  const struct prefix *orig_prefix);
 
 /**
  * bgp_unlink_nexthop() - Unlink the nexthop object from the path structure.
index 94d905127dec84870c67710f816ebac00f41c0f8..113017559e8b0973d1685d0aba4504677dec7ba4 100644 (file)
@@ -1216,7 +1216,8 @@ int bgp_open_option_parse(struct peer *peer, uint8_t length, int *mp_capability)
 
        /* Extended Message Support */
        peer->max_packet_size =
-               CHECK_FLAG(peer->cap, PEER_CAP_EXTENDED_MESSAGE_RCV)
+               (CHECK_FLAG(peer->cap, PEER_CAP_EXTENDED_MESSAGE_RCV)
+                && CHECK_FLAG(peer->cap, PEER_CAP_EXTENDED_MESSAGE_ADV))
                        ? BGP_EXTENDED_MESSAGE_MAX_PACKET_SIZE
                        : BGP_STANDARD_MESSAGE_MAX_PACKET_SIZE;
 
index 3c01c3b486654aa012834fda5059956a4bc57f81..783115baaf7d2bf78c40f33dd685adc046acc7e8 100644 (file)
@@ -1353,6 +1353,16 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size)
                return BGP_Stop;
        }
 
+       /* Send notification message when Hold Time received in the OPEN message
+        * is smaller than configured minimum Hold Time. */
+       if (holdtime < peer->bgp->default_min_holdtime
+           && peer->bgp->default_min_holdtime != 0) {
+               bgp_notify_send_with_data(peer, BGP_NOTIFY_OPEN_ERR,
+                                         BGP_NOTIFY_OPEN_UNACEP_HOLDTIME,
+                                         (uint8_t *)holdtime_ptr, 2);
+               return BGP_Stop;
+       }
+
        /* From the rfc: A reasonable maximum time between KEEPALIVE messages
           would be one third of the Hold Time interval.  KEEPALIVE messages
           MUST NOT be sent more frequently than one per second.  An
index 27d868afa1934cb0559a45ca5a623e3ec81320f6..c10007a593977243a4b6623e657fc636194a1f9f 100644 (file)
@@ -2292,6 +2292,7 @@ static void bgp_pbr_policyroute_add_to_zebra_unit(struct bgp *bgp,
        struct bgp_pbr_rule *bpr;
        bool bpr_found = false;
        bool bpme_found = false;
+       struct vrf *vrf = NULL;
 
        if (!bpf)
                return;
@@ -2313,6 +2314,8 @@ static void bgp_pbr_policyroute_add_to_zebra_unit(struct bgp *bgp,
        bpa = hash_get(bgp->pbr_action_hash, &temp3,
                       bgp_pbr_action_alloc_intern);
 
+       if (nh)
+               vrf = vrf_lookup_by_id(nh->vrf_id);
        if (bpa->fwmark == 0) {
                /* drop is handled by iptable */
                if (nh && nh->type == NEXTHOP_TYPE_BLACKHOLE) {
@@ -2320,7 +2323,14 @@ static void bgp_pbr_policyroute_add_to_zebra_unit(struct bgp *bgp,
                        bpa->installed = true;
                } else {
                        bpa->fwmark = bgp_zebra_tm_get_id();
-                       bpa->table_id = bpa->fwmark;
+                       /* if action is redirect-vrf, then
+                        * use directly table_id of vrf
+                        */
+                       if (nh && vrf && !vrf_is_backend_netns()
+                           && bpf->vrf_id != vrf->vrf_id)
+                               bpa->table_id = vrf->data.l.table_id;
+                       else
+                               bpa->table_id = bpa->fwmark;
                        bpa->installed = false;
                }
                bpa->bgp = bgp;
index bd45314350aaf71f41ea4d4d6800e76e38fa43b0..b164d710a516104f71dfb241ec558a6cadd54e18 100644 (file)
@@ -88,9 +88,6 @@
 #include "bgpd/bgp_flowspec.h"
 #include "bgpd/bgp_flowspec_util.h"
 #include "bgpd/bgp_pbr.h"
-#include "northbound.h"
-#include "northbound_cli.h"
-#include "bgpd/bgp_nb.h"
 
 #ifndef VTYSH_EXTRACT_PL
 #include "bgpd/bgp_route_clippy.c"
@@ -221,6 +218,9 @@ void bgp_path_info_extra_free(struct bgp_path_info_extra **extra)
                return;
 
        e = *extra;
+       if (e->damp_info)
+               bgp_damp_info_free(e->damp_info, 0, e->damp_info->afi,
+                                  e->damp_info->safi);
 
        e->damp_info = NULL;
        if (e->parent) {
@@ -2276,7 +2276,9 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
            (cum_bw = bgp_path_info_mpath_cumbw(pi)) != 0 &&
            !CHECK_FLAG(attr->rmap_change_flags, BATTR_RMAP_LINK_BW_SET))
                attr->ecommunity = ecommunity_replace_linkbw(
-                                       bgp->as, attr->ecommunity, cum_bw);
+                       bgp->as, attr->ecommunity, cum_bw,
+                       CHECK_FLAG(peer->flags,
+                                  PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE));
 
        return true;
 }
@@ -3391,16 +3393,14 @@ static void bgp_rib_withdraw(struct bgp_dest *dest, struct bgp_path_info *pi,
        /* apply dampening, if result is suppressed, we'll be retaining
         * the bgp_path_info in the RIB for historical reference.
         */
-       if (peer->sort == BGP_PEER_EBGP) {
-               if (get_active_bdc_from_pi(pi, afi, safi)) {
-                       if (bgp_damp_withdraw(pi, dest, afi, safi, 0)
-                           == BGP_DAMP_SUPPRESSED) {
-                               bgp_aggregate_decrement(peer->bgp, p, pi, afi,
-                                                       safi);
-                               return;
-                       }
+       if (CHECK_FLAG(peer->bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)
+           && peer->sort == BGP_PEER_EBGP)
+               if ((bgp_damp_withdraw(pi, dest, afi, safi, 0))
+                   == BGP_DAMP_SUPPRESSED) {
+                       bgp_aggregate_decrement(peer->bgp, p, pi, afi,
+                                               safi);
+                       return;
                }
-       }
 
 #ifdef ENABLE_BGP_VNC
        if (safi == SAFI_MPLS_VPN) {
@@ -3604,6 +3604,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
        afi_t nh_afi;
        uint8_t pi_type = 0;
        uint8_t pi_sub_type = 0;
+       bool force_evpn_import = false;
 
        if (frrtrace_enabled(frr_bgp, process_update)) {
                char pfxprint[PREFIX2STR_BUFFER];
@@ -3663,7 +3664,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                if (aspath_loop_check(attr->aspath, peer->change_local_as)
                    > aspath_loop_count) {
                        peer->stat_pfx_aspath_loop++;
-                       reason = "as-path contains our own AS A;";
+                       reason = "as-path contains our own AS;";
                        goto filtered;
                }
        }
@@ -3848,7 +3849,8 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                        || memcmp(&(bgp_path_info_extra_get(pi))->label, label,
                                  num_labels * sizeof(mpls_label_t))
                                   == 0)) {
-                       if (get_active_bdc_from_pi(pi, afi, safi)
+                       if (CHECK_FLAG(bgp->af_flags[afi][safi],
+                                      BGP_CONFIG_DAMPENING)
                            && peer->sort == BGP_PEER_EBGP
                            && CHECK_FLAG(pi->flags, BGP_PATH_HISTORY)) {
                                if (bgp_debug_update(peer, p, NULL, 1)) {
@@ -3916,6 +3918,14 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                        }
 
                        bgp_path_info_restore(dest, pi);
+
+                       /*
+                        * If the BGP_PATH_REMOVED flag is set, then EVPN
+                        * routes would have been unimported already when a
+                        * prior BGP withdraw processing happened. Such routes
+                        * need to be imported again, so flag accordingly.
+                        */
+                       force_evpn_import = true;
                }
 
                /* Received Logging. */
@@ -3942,11 +3952,11 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                bgp_aggregate_decrement(bgp, p, pi, afi, safi);
 
                /* Update bgp route dampening information.  */
-               if (get_active_bdc_from_pi(pi, afi, safi)
+               if (CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)
                    && peer->sort == BGP_PEER_EBGP) {
                        /* This is implicit withdraw so we should update
-                        * dampening information.
-                        */
+                          dampening
+                          information.  */
                        if (!CHECK_FLAG(pi->flags, BGP_PATH_HISTORY))
                                bgp_damp_withdraw(pi, dest, afi, safi, 1);
                }
@@ -4069,7 +4079,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
 #endif
 
                /* Update bgp route dampening information.  */
-               if (get_active_bdc_from_pi(pi, afi, safi)
+               if (CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING)
                    && peer->sort == BGP_PEER_EBGP) {
                        /* Now we do normal update dampening.  */
                        ret = bgp_damp_update(pi, dest, afi, safi);
@@ -4103,7 +4113,8 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                        nh_afi = BGP_ATTR_NH_AFI(afi, pi->attr);
 
                        if (bgp_find_or_add_nexthop(bgp, bgp_nexthop, nh_afi,
-                                                   safi, pi, NULL, connected)
+                                                   safi, pi, NULL, connected,
+                                                   p)
                            || CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD))
                                bgp_path_info_set_flag(dest, pi,
                                                       BGP_PATH_VALID);
@@ -4137,7 +4148,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
 #endif
 
                /* If this is an EVPN route and some attribute has changed,
-                * process
+                * or we are explicitly told to perform a route import, process
                 * route for import. If the extended community has changed, we
                 * would
                 * have done the un-import earlier and the import would result
@@ -4148,7 +4159,8 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                 * updating
                 * the attributes for the route in the VNI(s).
                 */
-               if (safi == SAFI_EVPN && !same_attr &&
+               if (safi == SAFI_EVPN &&
+                   (!same_attr || force_evpn_import) &&
                    CHECK_FLAG(pi->flags, BGP_PATH_VALID))
                        bgp_evpn_import_route(bgp, afi, safi, p, pi);
 
@@ -4244,7 +4256,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
                nh_afi = BGP_ATTR_NH_AFI(afi, new->attr);
 
                if (bgp_find_or_add_nexthop(bgp, bgp, nh_afi, safi, new, NULL,
-                                           connected)
+                                           connected, p)
                    || CHECK_FLAG(peer->flags, PEER_FLAG_IS_RFAPI_HD))
                        bgp_path_info_set_flag(dest, new, BGP_PATH_VALID);
                else {
@@ -5683,7 +5695,7 @@ void bgp_static_update(struct bgp *bgp, const struct prefix *p,
 
                                if (bgp_find_or_add_nexthop(bgp, bgp_nexthop,
                                                            afi, safi, pi, NULL,
-                                                           0))
+                                                           0, p))
                                        bgp_path_info_set_flag(dest, pi,
                                                               BGP_PATH_VALID);
                                else {
@@ -5735,7 +5747,8 @@ void bgp_static_update(struct bgp *bgp, const struct prefix *p,
        /* Nexthop reachability check. */
        if (CHECK_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK)
            && (safi == SAFI_UNICAST || safi == SAFI_LABELED_UNICAST)) {
-               if (bgp_find_or_add_nexthop(bgp, bgp, afi, safi, new, NULL, 0))
+               if (bgp_find_or_add_nexthop(bgp, bgp, afi, safi, new, NULL, 0,
+                                           p))
                        bgp_path_info_set_flag(dest, new, BGP_PATH_VALID);
                else {
                        if (BGP_DEBUG(nht, NHT)) {
@@ -6023,16 +6036,28 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p,
 
 /* Configure static BGP network.  When user don't run zebra, static
    route should be installed as valid.  */
-int bgp_static_set(struct bgp *bgp, const char *negate, struct prefix *pfx,
-                  afi_t afi, safi_t safi, const char *rmap, int backdoor,
-                  uint32_t label_index, char *errmsg, size_t errmsg_len)
+static int bgp_static_set(struct vty *vty, const char *negate,
+                         const char *ip_str, afi_t afi, safi_t safi,
+                         const char *rmap, int backdoor, uint32_t label_index)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int ret;
        struct prefix p;
        struct bgp_static *bgp_static;
        struct bgp_dest *dest;
        uint8_t need_update = 0;
 
-       prefix_copy(&p, pfx);
+       /* Convert IP prefix string to struct prefix. */
+       ret = str2prefix(ip_str, &p);
+       if (!ret) {
+               vty_out(vty, "%% Malformed prefix\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       if (afi == AFI_IP6 && IN6_IS_ADDR_LINKLOCAL(&p.u.prefix6)) {
+               vty_out(vty, "%% Malformed prefix (link-local address)\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
        apply_mask(&p);
 
        if (negate) {
@@ -6041,27 +6066,26 @@ int bgp_static_set(struct bgp *bgp, const char *negate, struct prefix *pfx,
                dest = bgp_node_lookup(bgp->route[afi][safi], &p);
 
                if (!dest) {
-                       snprintf(errmsg, errmsg_len,
-                                "Can't find static route specified\n");
-                       return -1;
+                       vty_out(vty, "%% Can't find static route specified\n");
+                       return CMD_WARNING_CONFIG_FAILED;
                }
 
                bgp_static = bgp_dest_get_bgp_static_info(dest);
 
                if ((label_index != BGP_INVALID_LABEL_INDEX)
                    && (label_index != bgp_static->label_index)) {
-                       snprintf(errmsg, errmsg_len,
-                                "label-index doesn't match static route\n");
+                       vty_out(vty,
+                               "%% label-index doesn't match static route\n");
                        bgp_dest_unlock_node(dest);
-                       return -1;
+                       return CMD_WARNING_CONFIG_FAILED;
                }
 
                if ((rmap && bgp_static->rmap.name)
                    && strcmp(rmap, bgp_static->rmap.name)) {
-                       snprintf(errmsg, errmsg_len,
-                                "route-map name doesn't match static route\n");
+                       vty_out(vty,
+                               "%% route-map name doesn't match static route\n");
                        bgp_dest_unlock_node(dest);
-                       return -1;
+                       return CMD_WARNING_CONFIG_FAILED;
                }
 
                /* Update BGP RIB. */
@@ -6082,9 +6106,8 @@ int bgp_static_set(struct bgp *bgp, const char *negate, struct prefix *pfx,
                        /* Configuration change. */
                        /* Label index cannot be changed. */
                        if (bgp_static->label_index != label_index) {
-                               snprintf(errmsg, errmsg_len,
-                                        "cannot change label-index\n");
-                               return -1;
+                               vty_out(vty, "%% cannot change label-index\n");
+                               return CMD_WARNING_CONFIG_FAILED;
                        }
 
                        /* Check previous routes are installed into BGP.  */
@@ -6146,7 +6169,7 @@ int bgp_static_set(struct bgp *bgp, const char *negate, struct prefix *pfx,
                        bgp_static_update(bgp, &p, bgp_static, afi, safi);
        }
 
-       return 0;
+       return CMD_SUCCESS;
 }
 
 void bgp_static_add(struct bgp *bgp)
@@ -6598,27 +6621,25 @@ DEFUN (no_bgp_table_map,
                                   argv[idx_word]->arg);
 }
 
-DEFPY_YANG (bgp_network, bgp_network_cmd,
-           "[no] network \
-           <A.B.C.D/M$prefix|A.B.C.D$address [mask A.B.C.D$netmask]> \
-           [{route-map WORD$map_name|label-index (0-1048560)$label_index| \
-           backdoor$backdoor}]",
-           NO_STR
-           "Specify a network to announce via BGP\n"
-           "IPv4 prefix\n"
-           "Network number\n"
-           "Network mask\n"
-           "Network mask\n"
-           "Route-map to modify the attributes\n"
-           "Name of the route map\n"
-           "Label index to associate with the prefix\n"
-           "Label index value\n"
-           "Specify a BGP backdoor route\n")
-{
-       char addr_prefix_str[PREFIX_STRLEN];
-       char base_xpath[XPATH_MAXLEN];
-       afi_t afi;
-       safi_t safi;
+DEFPY(bgp_network,
+       bgp_network_cmd,
+       "[no] network \
+       <A.B.C.D/M$prefix|A.B.C.D$address [mask A.B.C.D$netmask]> \
+       [{route-map WORD$map_name|label-index (0-1048560)$label_index| \
+       backdoor$backdoor}]",
+       NO_STR
+       "Specify a network to announce via BGP\n"
+       "IPv4 prefix\n"
+       "Network number\n"
+       "Network mask\n"
+       "Network mask\n"
+       "Route-map to modify the attributes\n"
+       "Name of the route map\n"
+       "Label index to associate with the prefix\n"
+       "Label index value\n"
+       "Specify a BGP backdoor route\n")
+{
+       char addr_prefix_str[BUFSIZ];
 
        if (address_str) {
                int ret;
@@ -6632,102 +6653,27 @@ DEFPY_YANG (bgp_network, bgp_network_cmd,
                }
        }
 
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
-
-       if (no) {
-               nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-       } else {
-               nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-               if (map_name)
-                       nb_cli_enqueue_change(vty, "./rmap-policy-export",
-                                             NB_OP_CREATE, map_name);
-               else
-                       nb_cli_enqueue_change(vty, "./rmap-policy-export",
-                                             NB_OP_DESTROY, NULL);
-
-               if (label_index_str)
-                       nb_cli_enqueue_change(vty, "./label-index",
-                                             NB_OP_MODIFY, label_index_str);
-
-               nb_cli_enqueue_change(vty, "./backdoor", NB_OP_MODIFY,
-                                     backdoor ? "true" : "false");
-       }
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/network-config[prefix='%s']",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi),
-               address_str ? addr_prefix_str : prefix_str);
-
-       return nb_cli_apply_changes(vty, base_xpath);
-}
-
-DEFPY_YANG (ipv6_bgp_network,
-           ipv6_bgp_network_cmd,
-           "[no] network X:X::X:X/M$prefix \
-           [{route-map WORD$map_name|label-index (0-1048560)$label_index}]",
-           NO_STR
-           "Specify a network to announce via BGP\n"
-           "IPv6 prefix\n"
-           "Route-map to modify the attributes\n"
-           "Name of the route map\n"
-           "Label index to associate with the prefix\n"
-           "Label index value\n")
-{
-       char base_xpath[XPATH_MAXLEN];
-       afi_t afi;
-       safi_t safi;
-
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
-
-       if (no) {
-               nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-       } else {
-               nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-               if (map_name)
-                       nb_cli_enqueue_change(vty, "./rmap-policy-export",
-                                             NB_OP_MODIFY, map_name);
-               else
-                       nb_cli_enqueue_change(vty, "./rmap-policy-export",
-                                             NB_OP_DESTROY, NULL);
-
-               if (label_index_str)
-                       nb_cli_enqueue_change(vty, "./label-index",
-                                             NB_OP_MODIFY, label_index_str);
-       }
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/network-config[prefix='%s']",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi), prefix_str);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_static_set(
+               vty, no, address_str ? addr_prefix_str : prefix_str, AFI_IP,
+               bgp_node_safi(vty), map_name, backdoor ? 1 : 0,
+               label_index ? (uint32_t)label_index : BGP_INVALID_LABEL_INDEX);
 }
 
-void cli_show_bgp_global_afi_safi_network_config(struct vty *vty,
-                                                struct lyd_node *dnode,
-                                                bool show_defaults)
+DEFPY(ipv6_bgp_network,
+       ipv6_bgp_network_cmd,
+       "[no] network X:X::X:X/M$prefix \
+       [{route-map WORD$map_name|label-index (0-1048560)$label_index}]",
+       NO_STR
+       "Specify a network to announce via BGP\n"
+       "IPv6 prefix\n"
+       "Route-map to modify the attributes\n"
+       "Name of the route map\n"
+       "Label index to associate with the prefix\n"
+       "Label index value\n")
 {
-       vty_out(vty, "  network %s", yang_dnode_get_string(dnode, "./prefix"));
-
-       if (yang_dnode_exists(dnode, "./label-index"))
-               vty_out(vty, " label-index %s",
-                       yang_dnode_get_string(dnode, "./label-index"));
-
-       if (yang_dnode_exists(dnode, "./rmap-policy-export"))
-               vty_out(vty, " route-map %s",
-                       yang_dnode_get_string(dnode, "./rmap-policy-export"));
-
-       if (yang_dnode_get_bool(dnode, "./backdoor"))
-               vty_out(vty, " backdoor");
-
-       vty_out(vty, "\n");
+       return bgp_static_set(
+               vty, no, prefix_str, AFI_IP6, bgp_node_safi(vty), map_name, 0,
+               label_index ? (uint32_t)label_index : BGP_INVALID_LABEL_INDEX);
 }
 
 static struct bgp_aggregate *bgp_aggregate_new(void)
@@ -7803,32 +7749,35 @@ static const char *bgp_rpki_validation2str(enum rpki_states v_state)
        return "ERROR";
 }
 
-int bgp_aggregate_unset(struct bgp *bgp, struct prefix *prefix, afi_t afi,
-                       safi_t safi, char *errmsg, size_t errmsg_len)
+static int bgp_aggregate_unset(struct vty *vty, const char *prefix_str,
+                              afi_t afi, safi_t safi)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int ret;
+       struct prefix p;
        struct bgp_dest *dest;
        struct bgp_aggregate *aggregate;
 
-       /* If the bgp instance is being deleted or self peer is deleted
-        * then do not create aggregate route
-        */
-       if (CHECK_FLAG(bgp->flags, BGP_FLAG_DELETE_IN_PROGRESS)
-           || (bgp->peer_self == NULL))
-               return 0;
+       /* Convert string to prefix structure. */
+       ret = str2prefix(prefix_str, &p);
+       if (!ret) {
+               vty_out(vty, "Malformed prefix\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       apply_mask(&p);
 
-       apply_mask(prefix);
        /* Old configuration check. */
-       dest = bgp_node_lookup(bgp->aggregate[afi][safi], prefix);
+       dest = bgp_node_lookup(bgp->aggregate[afi][safi], &p);
        if (!dest) {
-               snprintf(errmsg, errmsg_len,
-                        "There is no aggregate-address configuration.\n");
-               return -1;
+               vty_out(vty,
+                       "%% There is no aggregate-address configuration.\n");
+               return CMD_WARNING_CONFIG_FAILED;
        }
 
        aggregate = bgp_dest_get_bgp_aggregate_info(dest);
-       bgp_aggregate_delete(bgp, prefix, afi, safi, aggregate);
-       bgp_aggregate_install(bgp, afi, safi, prefix, 0, NULL, NULL, NULL, NULL,
-                             0, aggregate);
+       bgp_aggregate_delete(bgp, &p, afi, safi, aggregate);
+       bgp_aggregate_install(bgp, afi, safi, &p, 0, NULL, NULL,
+                             NULL, NULL,  0, aggregate);
 
        /* Unlock aggregate address configuration. */
        bgp_dest_set_bgp_aggregate_info(dest, NULL);
@@ -7889,53 +7838,55 @@ int bgp_aggregate_unset(struct bgp *bgp, struct prefix *prefix, afi_t afi,
        bgp_dest_unlock_node(dest);
        bgp_dest_unlock_node(dest);
 
-       return 0;
+       return CMD_SUCCESS;
 }
 
-int bgp_aggregate_set(struct bgp *bgp, struct prefix *prefix, afi_t afi,
-                     safi_t safi, const char *rmap, uint8_t summary_only,
-                     uint8_t as_set, uint8_t origin, bool match_med,
-                     const char *suppress_map,
-                     char *errmsg, size_t errmsg_len)
+static int bgp_aggregate_set(struct vty *vty, const char *prefix_str, afi_t afi,
+                            safi_t safi, const char *rmap,
+                            uint8_t summary_only, uint8_t as_set,
+                            uint8_t origin, bool match_med,
+                            const char *suppress_map)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int ret;
+       struct prefix p;
        struct bgp_dest *dest;
        struct bgp_aggregate *aggregate;
        uint8_t as_set_new = as_set;
-       char buf[PREFIX2STR_BUFFER];
 
        if (suppress_map && summary_only) {
-               snprintf(errmsg, errmsg_len,
+               vty_out(vty,
                        "'summary-only' and 'suppress-map' can't be used at the same time\n");
-               return -1;
+               return CMD_WARNING_CONFIG_FAILED;
        }
 
-       apply_mask(prefix);
+       /* Convert string to prefix structure. */
+       ret = str2prefix(prefix_str, &p);
+       if (!ret) {
+               vty_out(vty, "Malformed prefix\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       apply_mask(&p);
 
-       if ((afi == AFI_IP && prefix->prefixlen == IPV4_MAX_BITLEN)
-           || (afi == AFI_IP6 && prefix->prefixlen == IPV6_MAX_BITLEN)) {
-               snprintf(
-                       errmsg, errmsg_len,
-                       "Specified prefix: %s will not result in any useful aggregation, disallowing\n",
-                       prefix2str(prefix, buf, PREFIX_STRLEN));
-               return -1;
+       if ((afi == AFI_IP && p.prefixlen == IPV4_MAX_BITLEN) ||
+           (afi == AFI_IP6 && p.prefixlen == IPV6_MAX_BITLEN)) {
+               vty_out(vty, "Specified prefix: %s will not result in any useful aggregation, disallowing\n",
+                       prefix_str);
+               return CMD_WARNING_CONFIG_FAILED;
        }
 
        /* Old configuration check. */
-       dest = bgp_node_get(bgp->aggregate[afi][safi], prefix);
+       dest = bgp_node_get(bgp->aggregate[afi][safi], &p);
        aggregate = bgp_dest_get_bgp_aggregate_info(dest);
 
        if (aggregate) {
-               snprintf(errmsg, errmsg_len,
-                        "There is already same aggregate network.\n");
+               vty_out(vty, "There is already same aggregate network.\n");
                /* try to remove the old entry */
-               ret = bgp_aggregate_unset(bgp, prefix, afi, safi, errmsg,
-                                         errmsg_len);
+               ret = bgp_aggregate_unset(vty, prefix_str, afi, safi);
                if (ret) {
-                       snprintf(errmsg, errmsg_len,
-                                "Error deleting aggregate.\n");
+                       vty_out(vty, "Error deleting aggregate.\n");
                        bgp_dest_unlock_node(dest);
-                       return -1;
+                       return CMD_WARNING_CONFIG_FAILED;
                }
        }
 
@@ -7958,8 +7909,7 @@ int bgp_aggregate_set(struct bgp *bgp, struct prefix *prefix, afi_t afi,
                        zlog_warn(
                                "%s: Ignoring as-set because `bgp reject-as-sets` is enabled.",
                                __func__);
-                       snprintf(
-                               errmsg, errmsg_len,
+                       vty_out(vty,
                                "Ignoring as-set because `bgp reject-as-sets` is enabled.\n");
                }
        }
@@ -7996,40 +7946,39 @@ int bgp_aggregate_set(struct bgp *bgp, struct prefix *prefix, afi_t afi,
        bgp_dest_set_bgp_aggregate_info(dest, aggregate);
 
        /* Aggregate address insert into BGP routing table. */
-       bgp_aggregate_route(bgp, prefix, afi, safi, aggregate);
+       bgp_aggregate_route(bgp, &p, afi, safi, aggregate);
 
-       return 0;
+       return CMD_SUCCESS;
 }
 
-DEFPY_YANG(
-       aggregate_addressv4, aggregate_addressv4_cmd,
-       "[no] aggregate-address <A.B.C.D/M$prefix|A.B.C.D$addr A.B.C.D$mask> [{"
-       "as-set$as_set_s"
-       "|summary-only$summary_only"
-       "|route-map WORD$rmap_name"
-       "|origin <egp|igp|incomplete>$origin_s"
-       "|matching-MED-only$match_med"
-       "|suppress-map WORD$suppress_map"
-       "}]",
-       NO_STR
-       "Configure BGP aggregate entries\n"
-       "Aggregate prefix\n"
-       "Aggregate address\n"
-       "Aggregate mask\n"
-       "Generate AS set path information\n"
-       "Filter more specific routes from updates\n"
-       "Apply route map to aggregate network\n"
-       "Route map name\n"
-       "BGP origin code\n"
-       "Remote EGP\n"
-       "Local IGP\n"
-       "Unknown heritage\n"
-       "Only aggregate routes with matching MED\n"
-       "Suppress the selected more specific routes\n"
-       "Route map with the route selectors\n")
-{
-       char base_xpath[XPATH_MAXLEN];
+DEFPY(aggregate_addressv4, aggregate_addressv4_cmd,
+      "[no] aggregate-address <A.B.C.D/M$prefix|A.B.C.D$addr A.B.C.D$mask> [{"
+      "as-set$as_set_s"
+      "|summary-only$summary_only"
+      "|route-map WORD$rmap_name"
+      "|origin <egp|igp|incomplete>$origin_s"
+      "|matching-MED-only$match_med"
+      "|suppress-map WORD$suppress_map"
+      "}]",
+      NO_STR
+      "Configure BGP aggregate entries\n"
+      "Aggregate prefix\n" "Aggregate address\n" "Aggregate mask\n"
+      "Generate AS set path information\n"
+      "Filter more specific routes from updates\n"
+      "Apply route map to aggregate network\n"
+      "Route map name\n"
+      "BGP origin code\n"
+      "Remote EGP\n"
+      "Local IGP\n"
+      "Unknown heritage\n"
+      "Only aggregate routes with matching MED\n"
+      "Suppress the selected more specific routes\n"
+      "Route map with the route selectors\n")
+{
+       const char *prefix_s = NULL;
        safi_t safi = bgp_node_safi(vty);
+       uint8_t origin = BGP_ORIGIN_UNSPECIFIED;
+       int as_set = AGGREGATE_AS_UNSET;
        char prefix_buf[PREFIX2STR_BUFFER];
 
        if (addr_str) {
@@ -8039,166 +7988,86 @@ DEFPY_YANG(
                        vty_out(vty, "%% Inconsistent address and mask\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
-       } else {
-               strlcpy(prefix_buf, prefix_str, sizeof(prefix_buf));
-       }
-
-       if (!no && origin_s)
-               nb_cli_enqueue_change(vty, "./origin", NB_OP_MODIFY, origin_s);
-
-       if (!no && as_set_s)
-               nb_cli_enqueue_change(vty, "./as-set", NB_OP_MODIFY, "true");
-       else
-               nb_cli_enqueue_change(vty, "./as-set", NB_OP_MODIFY, "false");
-
-       if (!no && summary_only)
-               nb_cli_enqueue_change(vty, "./summary-only", NB_OP_MODIFY,
-                                     "true");
-       else
-               nb_cli_enqueue_change(vty, "./summary-only", NB_OP_MODIFY,
-                                     "false");
-
-       if (!no && match_med)
-               nb_cli_enqueue_change(vty, "./match-med", NB_OP_MODIFY, "true");
-       else
-               nb_cli_enqueue_change(vty, "./match-med", NB_OP_MODIFY,
-                                     "false");
-
-       if (rmap_name)
-               nb_cli_enqueue_change(vty, "./rmap-policy-export", NB_OP_MODIFY,
-                                     rmap_name);
-       else
-               nb_cli_enqueue_change(vty, "./rmap-policy-export",
-                                     NB_OP_DESTROY, NULL);
+               prefix_s = prefix_buf;
+       } else
+               prefix_s = prefix_str;
 
-       if (suppress_map)
-               nb_cli_enqueue_change(vty, "./suppress-map", NB_OP_MODIFY,
-                                     suppress_map);
-       else
-               nb_cli_enqueue_change(vty, "./suppress-map", NB_OP_DESTROY,
-                                     NULL);
+       if (origin_s) {
+               if (strcmp(origin_s, "egp") == 0)
+                       origin = BGP_ORIGIN_EGP;
+               else if (strcmp(origin_s, "igp") == 0)
+                       origin = BGP_ORIGIN_IGP;
+               else if (strcmp(origin_s, "incomplete") == 0)
+                       origin = BGP_ORIGIN_INCOMPLETE;
+       }
 
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/aggregate-route[prefix='%s']",
-               yang_afi_safi_value2identity(AFI_IP, safi),
-               bgp_afi_safi_get_container_str(AFI_IP, safi), prefix_buf);
+       if (as_set_s)
+               as_set = AGGREGATE_AS_SET;
 
+       /* Handle configuration removal, otherwise installation. */
        if (no)
-               nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-       else
-               nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
-}
-
-DEFPY_YANG(aggregate_addressv6, aggregate_addressv6_cmd,
-          "[no] aggregate-address X:X::X:X/M$prefix [{"
-          "as-set$as_set_s"
-          "|summary-only$summary_only"
-          "|route-map WORD$rmap_name"
-          "|origin <egp|igp|incomplete>$origin_s"
-          "|matching-MED-only$match_med"
-          "|suppress-map WORD$suppress_map"
-          "}]",
-          NO_STR
-          "Configure BGP aggregate entries\n"
-          "Aggregate prefix\n"
-          "Generate AS set path information\n"
-          "Filter more specific routes from updates\n"
-          "Apply route map to aggregate network\n"
-          "Route map name\n"
-          "BGP origin code\n"
-          "Remote EGP\n"
-          "Local IGP\n"
-          "Unknown heritage\n"
-          "Only aggregate routes with matching MED\n"
-          "Suppress the selected more specific routes\n"
-          "Route map with the route selectors\n")
-{
-       char base_xpath[XPATH_MAXLEN];
-       safi_t safi = bgp_node_safi(vty);
-
-       if (!no && origin_s)
-               nb_cli_enqueue_change(vty, "./origin", NB_OP_MODIFY, origin_s);
-
-       if (!no && as_set_s)
-               nb_cli_enqueue_change(vty, "./as-set", NB_OP_MODIFY, "true");
-       else
-               nb_cli_enqueue_change(vty, "./as-set", NB_OP_MODIFY, "false");
-
-       if (!no && summary_only)
-               nb_cli_enqueue_change(vty, "./summary-only", NB_OP_MODIFY,
-                                     "true");
-       else
-               nb_cli_enqueue_change(vty, "./summary-only", NB_OP_MODIFY,
-                                     "false");
-
-       if (!no && match_med)
-               nb_cli_enqueue_change(vty, "./match-med", NB_OP_MODIFY, "true");
-       else
-               nb_cli_enqueue_change(vty, "./match-med", NB_OP_MODIFY,
-                                     "false");
-
-       if (rmap_name)
-               nb_cli_enqueue_change(vty, "./rmap-policy-export", NB_OP_MODIFY,
-                                     rmap_name);
-
-       if (suppress_map)
-               nb_cli_enqueue_change(vty, "./suppress-map", NB_OP_MODIFY,
-                                     suppress_map);
-       else
-               nb_cli_enqueue_change(vty, "./suppress-map", NB_OP_DESTROY,
-                                     NULL);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/aggregate-route[prefix='%s']",
-               yang_afi_safi_value2identity(AFI_IP6, safi),
-               bgp_afi_safi_get_container_str(AFI_IP6, safi), prefix_str);
-
+               return bgp_aggregate_unset(vty, prefix_s, AFI_IP, safi);
+
+       return bgp_aggregate_set(vty, prefix_s, AFI_IP, safi, rmap_name,
+                                summary_only != NULL, as_set, origin,
+                                match_med != NULL, suppress_map);
+}
+
+DEFPY(aggregate_addressv6, aggregate_addressv6_cmd,
+      "[no] aggregate-address X:X::X:X/M$prefix [{"
+      "as-set$as_set_s"
+      "|summary-only$summary_only"
+      "|route-map WORD$rmap_name"
+      "|origin <egp|igp|incomplete>$origin_s"
+      "|matching-MED-only$match_med"
+      "|suppress-map WORD$suppress_map"
+      "}]",
+      NO_STR
+      "Configure BGP aggregate entries\n"
+      "Aggregate prefix\n"
+      "Generate AS set path information\n"
+      "Filter more specific routes from updates\n"
+      "Apply route map to aggregate network\n"
+      "Route map name\n"
+      "BGP origin code\n"
+      "Remote EGP\n"
+      "Local IGP\n"
+      "Unknown heritage\n"
+      "Only aggregate routes with matching MED\n"
+      "Suppress the selected more specific routes\n"
+      "Route map with the route selectors\n")
+{
+       uint8_t origin = BGP_ORIGIN_UNSPECIFIED;
+       int as_set = AGGREGATE_AS_UNSET;
+
+       if (origin_s) {
+               if (strcmp(origin_s, "egp") == 0)
+                       origin = BGP_ORIGIN_EGP;
+               else if (strcmp(origin_s, "igp") == 0)
+                       origin = BGP_ORIGIN_IGP;
+               else if (strcmp(origin_s, "incomplete") == 0)
+                       origin = BGP_ORIGIN_INCOMPLETE;
+       }
+
+       if (as_set_s)
+               as_set = AGGREGATE_AS_SET;
+
+       /* Handle configuration removal, otherwise installation. */
        if (no)
-               nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-       else
-               nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
-}
+               return bgp_aggregate_unset(vty, prefix_str, AFI_IP6,
+                                          SAFI_UNICAST);
 
-void cli_show_bgp_global_afi_safi_unicast_aggregate_route(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       uint8_t origin;
-
-       vty_out(vty, "  aggregate-address %s",
-               yang_dnode_get_string(dnode, "./prefix"));
-
-       if (yang_dnode_get_bool(dnode, "./as-set"))
-               vty_out(vty, " as-set");
-
-       if (yang_dnode_get_bool(dnode, "./summary-only"))
-               vty_out(vty, " summary-only");
-
-       if (yang_dnode_exists(dnode, "./rmap-policy-export"))
-               vty_out(vty, " route-map %s",
-                       yang_dnode_get_string(dnode, "./rmap-policy-export"));
-
-       origin = yang_dnode_get_enum(dnode, "./origin");
-       if (origin != BGP_ORIGIN_UNSPECIFIED)
-               vty_out(vty, " origin %s", bgp_origin2str(origin));
-
-       if (yang_dnode_get_bool(dnode, "./match-med"))
-               vty_out(vty, " matching-MED-only");
-
-       vty_out(vty, "\n");
+       return bgp_aggregate_set(vty, prefix_str, AFI_IP6, SAFI_UNICAST,
+                                rmap_name, summary_only != NULL, as_set,
+                                origin, match_med != NULL, suppress_map);
 }
 
 /* Redistribute route treatment. */
 void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
                          const union g_addr *nexthop, ifindex_t ifindex,
-                         enum nexthop_types_t nhtype, uint32_t metric,
-                         uint8_t type, unsigned short instance,
-                         route_tag_t tag)
+                         enum nexthop_types_t nhtype, uint8_t distance,
+                         uint32_t metric, uint8_t type,
+                         unsigned short instance, route_tag_t tag)
 {
        struct bgp_path_info *new;
        struct bgp_path_info *bpi;
@@ -8245,6 +8114,7 @@ void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
        attr.nh_ifindex = ifindex;
 
        attr.med = metric;
+       attr.distance = distance;
        attr.flag |= ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC);
        attr.tag = tag;
 
@@ -9519,14 +9389,18 @@ void route_vty_out_overlay(struct vty *vty, const struct prefix *p,
 static void damp_route_vty_out(struct vty *vty, const struct prefix *p,
                               struct bgp_path_info *path, int display,
                               afi_t afi, safi_t safi, bool use_json,
-                              json_object *json)
+                              json_object *json_paths)
 {
-       struct attr *attr;
+       struct attr *attr = path->attr;
        int len;
        char timebuf[BGP_UPTIME_LEN];
+       json_object *json_path = NULL;
+
+       if (use_json)
+               json_path = json_object_new_object();
 
        /* short status lead text */
-       route_vty_short_status_out(vty, path, p, json);
+       route_vty_short_status_out(vty, path, p, json_path);
 
        /* print prefix and mask */
        if (!use_json) {
@@ -9534,147 +9408,125 @@ static void damp_route_vty_out(struct vty *vty, const struct prefix *p,
                        route_vty_out_route(path->net, p, vty, NULL, false);
                else
                        vty_out(vty, "%*s", 17, " ");
-       }
 
-       len = vty_out(vty, "%s", path->peer->host);
-       len = 17 - len;
-       if (len < 1) {
-               if (!use_json)
+               len = vty_out(vty, "%s", path->peer->host);
+               len = 17 - len;
+
+               if (len < 1)
                        vty_out(vty, "\n%*s", 34, " ");
-       } else {
-               if (use_json)
-                       json_object_int_add(json, "peerHost", len);
                else
                        vty_out(vty, "%*s", len, " ");
-       }
 
-       if (use_json)
-               bgp_damp_reuse_time_vty(vty, path, timebuf, BGP_UPTIME_LEN, afi,
-                                       safi, use_json, json);
-       else
                vty_out(vty, "%s ",
                        bgp_damp_reuse_time_vty(vty, path, timebuf,
                                                BGP_UPTIME_LEN, afi, safi,
-                                               use_json, json));
+                                               use_json, NULL));
 
-       /* Print attribute */
-       attr = path->attr;
-
-       /* Print aspath */
-       if (attr->aspath) {
-               if (use_json)
-                       json_object_string_add(json, "asPath",
-                                              attr->aspath->str);
-               else
+               if (attr->aspath)
                        aspath_print_vty(vty, "%s", attr->aspath, " ");
-       }
 
-       /* Print origin */
-       if (use_json)
-               json_object_string_add(json, "origin",
-                                      bgp_origin_str[attr->origin]);
-       else
                vty_out(vty, "%s", bgp_origin_str[attr->origin]);
 
-       if (!use_json)
                vty_out(vty, "\n");
+       } else {
+               bgp_damp_reuse_time_vty(vty, path, timebuf, BGP_UPTIME_LEN, afi,
+                                       safi, use_json, json_path);
+
+               if (attr->aspath)
+                       json_object_string_add(json_path, "asPath",
+                                              attr->aspath->str);
+
+               json_object_string_add(json_path, "origin",
+                                      bgp_origin_str[attr->origin]);
+               json_object_string_add(json_path, "peerHost", path->peer->host);
+
+               json_object_array_add(json_paths, json_path);
+       }
 }
 
 /* flap route */
 static void flap_route_vty_out(struct vty *vty, const struct prefix *p,
                               struct bgp_path_info *path, int display,
                               afi_t afi, safi_t safi, bool use_json,
-                              json_object *json)
+                              json_object *json_paths)
 {
-       struct attr *attr;
+       struct attr *attr = path->attr;
        struct bgp_damp_info *bdi;
        char timebuf[BGP_UPTIME_LEN];
        int len;
+       json_object *json_path = NULL;
 
        if (!path->extra)
                return;
 
+       if (use_json)
+               json_path = json_object_new_object();
+
        bdi = path->extra->damp_info;
 
        /* short status lead text */
-       route_vty_short_status_out(vty, path, p, json);
+       route_vty_short_status_out(vty, path, p, json_path);
 
-       /* print prefix and mask */
        if (!use_json) {
                if (!display)
                        route_vty_out_route(path->net, p, vty, NULL, false);
                else
                        vty_out(vty, "%*s", 17, " ");
-       }
 
-       len = vty_out(vty, "%s", path->peer->host);
-       len = 16 - len;
-       if (len < 1) {
-               if (!use_json)
+               len = vty_out(vty, "%s", path->peer->host);
+               len = 16 - len;
+               if (len < 1)
                        vty_out(vty, "\n%*s", 33, " ");
-       } else {
-               if (use_json)
-                       json_object_int_add(json, "peerHost", len);
                else
                        vty_out(vty, "%*s", len, " ");
-       }
 
-       len = vty_out(vty, "%d", bdi->flap);
-       len = 5 - len;
-       if (len < 1) {
-               if (!use_json)
+               len = vty_out(vty, "%d", bdi->flap);
+               len = 5 - len;
+               if (len < 1)
                        vty_out(vty, " ");
-       } else {
-               if (use_json)
-                       json_object_int_add(json, "bdiFlap", len);
                else
                        vty_out(vty, "%*s", len, " ");
-       }
 
-       if (use_json)
-               peer_uptime(bdi->start_time, timebuf, BGP_UPTIME_LEN, use_json,
-                           json);
-       else
                vty_out(vty, "%s ", peer_uptime(bdi->start_time, timebuf,
                                                BGP_UPTIME_LEN, 0, NULL));
 
-       if (CHECK_FLAG(path->flags, BGP_PATH_DAMPED)
-           && !CHECK_FLAG(path->flags, BGP_PATH_HISTORY)) {
-               if (use_json)
-                       bgp_damp_reuse_time_vty(vty, path, timebuf,
-                                               BGP_UPTIME_LEN, afi, safi,
-                                               use_json, json);
-               else
+               if (CHECK_FLAG(path->flags, BGP_PATH_DAMPED)
+                   && !CHECK_FLAG(path->flags, BGP_PATH_HISTORY))
                        vty_out(vty, "%s ",
                                bgp_damp_reuse_time_vty(vty, path, timebuf,
                                                        BGP_UPTIME_LEN, afi,
-                                                       safi, use_json, json));
-       } else {
-               if (!use_json)
+                                                       safi, use_json, NULL));
+               else
                        vty_out(vty, "%*s ", 8, " ");
-       }
 
-       /* Print attribute */
-       attr = path->attr;
-
-       /* Print aspath */
-       if (attr->aspath) {
-               if (use_json)
-                       json_object_string_add(json, "asPath",
-                                              attr->aspath->str);
-               else
+               if (attr->aspath)
                        aspath_print_vty(vty, "%s", attr->aspath, " ");
-       }
 
-       /* Print origin */
-       if (use_json)
-               json_object_string_add(json, "origin",
-                                      bgp_origin_str[attr->origin]);
-       else
                vty_out(vty, "%s", bgp_origin_str[attr->origin]);
 
-       if (!use_json)
                vty_out(vty, "\n");
+       } else {
+               json_object_string_add(json_path, "peerHost", path->peer->host);
+               json_object_int_add(json_path, "bdiFlap", bdi->flap);
+
+               peer_uptime(bdi->start_time, timebuf, BGP_UPTIME_LEN, use_json,
+                           json_path);
+
+               if (CHECK_FLAG(path->flags, BGP_PATH_DAMPED)
+                   && !CHECK_FLAG(path->flags, BGP_PATH_HISTORY))
+                       bgp_damp_reuse_time_vty(vty, path, timebuf,
+                                               BGP_UPTIME_LEN, afi, safi,
+                                               use_json, json_path);
+
+               if (attr->aspath)
+                       json_object_string_add(json_path, "asPath",
+                                              attr->aspath->str);
+
+               json_object_string_add(json_path, "origin",
+                                      bgp_origin_str[attr->origin]);
+
+               json_object_array_add(json_paths, json_path);
+       }
 }
 
 static void route_vty_out_advertised_to(struct vty *vty, struct peer *peer,
@@ -10589,7 +10441,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,
        }
 
        if (path->extra && path->extra->damp_info)
-               bgp_damp_info_vty(vty, bgp, path, afi, safi, json_path);
+               bgp_damp_info_vty(vty, path, afi, safi, json_path);
 
        /* Remote Label */
        if (path->extra && bgp_is_valid_label(&path->extra->label[0])
@@ -10878,13 +10730,14 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
                                                const char *com2alias =
                                                        bgp_community2alias(
                                                                communities[i]);
-                                               if (strncmp(alias, com2alias,
-                                                           strlen(com2alias))
-                                                   == 0) {
+                                               if (!found
+                                                   && strcmp(alias, com2alias)
+                                                              == 0)
                                                        found = true;
-                                                       break;
-                                               }
+                                               XFREE(MTYPE_TMP,
+                                                     communities[i]);
                                        }
+                                       XFREE(MTYPE_TMP, communities);
                                }
 
                                if (!found && pi->attr->lcommunity) {
@@ -10894,13 +10747,14 @@ static int bgp_show_table(struct vty *vty, struct bgp *bgp, safi_t safi,
                                                const char *com2alias =
                                                        bgp_community2alias(
                                                                communities[i]);
-                                               if (strncmp(alias, com2alias,
-                                                           strlen(com2alias))
-                                                   == 0) {
+                                               if (!found
+                                                   && strcmp(alias, com2alias)
+                                                              == 0)
                                                        found = true;
-                                                       break;
-                                               }
+                                               XFREE(MTYPE_TMP,
+                                                     communities[i]);
                                        }
+                                       XFREE(MTYPE_TMP, communities);
                                }
 
                                if (!found)
@@ -11867,7 +11721,7 @@ static int bgp_show_lcommunity_list(struct vty *vty, struct bgp *bgp,
 
 DEFUN (show_ip_bgp_large_community_list,
        show_ip_bgp_large_community_list_cmd,
-       "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] large-community-list <(1-500)|WORD> [exact-match] [json]",
+       "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] large-community-list <(1-500)|LCOMMUNITY_LIST_NAME> [exact-match] [json]",
        SHOW_STR
        IP_STR
        BGP_STR
@@ -12100,7 +11954,7 @@ DEFPY(show_ip_bgp, show_ip_bgp_cmd,
            |route-map WORD\
            |prefix-list WORD\
            |filter-list WORD\
-           |community-list <(1-500)|WORD> [exact-match]\
+           |community-list <(1-500)|COMMUNITY_LIST_NAME> [exact-match]\
            |A.B.C.D/M longer-prefixes\
            |X:X::X:X/M longer-prefixes\
          >",
@@ -12196,7 +12050,7 @@ DEFPY(show_ip_bgp_json, show_ip_bgp_json_cmd,
                      |route-filter-translated-v4] [exact-match]\
           |rpki <invalid|valid|notfound>\
           |version (1-4294967295)\
-          |alias WORD\
+          |alias ALIAS_NAME\
           ] [json$uj [detail$detail] | wide$wide]",
       SHOW_STR IP_STR BGP_STR BGP_INSTANCE_HELP_STR BGP_AFI_HELP_STR
              BGP_SAFI_WITH_LABEL_HELP_STR
@@ -14318,21 +14172,28 @@ static void bgp_distance_free(struct bgp_distance *bdistance)
        XFREE(MTYPE_BGP_DISTANCE, bdistance);
 }
 
-int bgp_distance_set(uint8_t distance, const char *ip_str,
-                    const char *access_list_str, afi_t afi, safi_t safi,
-                    char *errmsg, size_t errmsg_len)
+static int bgp_distance_set(struct vty *vty, const char *distance_str,
+                           const char *ip_str, const char *access_list_str)
 {
        int ret;
+       afi_t afi;
+       safi_t safi;
        struct prefix p;
+       uint8_t distance;
        struct bgp_dest *dest;
        struct bgp_distance *bdistance;
 
+       afi = bgp_node_afi(vty);
+       safi = bgp_node_safi(vty);
+
        ret = str2prefix(ip_str, &p);
        if (ret == 0) {
-               snprintf(errmsg, errmsg_len, "Malformed prefix\n");
+               vty_out(vty, "Malformed prefix\n");
                return CMD_WARNING_CONFIG_FAILED;
        }
 
+       distance = atoi(distance_str);
+
        /* Get BGP distance node. */
        dest = bgp_node_get(bgp_distance_table[afi][safi], &p);
        bdistance = bgp_dest_get_bgp_distance_info(dest);
@@ -14355,32 +14216,37 @@ int bgp_distance_set(uint8_t distance, const char *ip_str,
        return CMD_SUCCESS;
 }
 
-int bgp_distance_unset(uint8_t distance, const char *ip_str,
-                      const char *access_list_str, afi_t afi, safi_t safi,
-                      char *errmsg, size_t errmsg_len)
+static int bgp_distance_unset(struct vty *vty, const char *distance_str,
+                             const char *ip_str, const char *access_list_str)
 {
        int ret;
+       afi_t afi;
+       safi_t safi;
        struct prefix p;
+       int distance;
        struct bgp_dest *dest;
        struct bgp_distance *bdistance;
 
+       afi = bgp_node_afi(vty);
+       safi = bgp_node_safi(vty);
+
        ret = str2prefix(ip_str, &p);
        if (ret == 0) {
-               snprintf(errmsg, errmsg_len, "Malformed prefix\n");
+               vty_out(vty, "Malformed prefix\n");
                return CMD_WARNING_CONFIG_FAILED;
        }
 
        dest = bgp_node_lookup(bgp_distance_table[afi][safi], &p);
        if (!dest) {
-               snprintf(errmsg, errmsg_len, "Can't find specified prefix\n");
+               vty_out(vty, "Can't find specified prefix\n");
                return CMD_WARNING_CONFIG_FAILED;
        }
 
        bdistance = bgp_dest_get_bgp_distance_info(dest);
+       distance = atoi(distance_str);
 
        if (bdistance->distance != distance) {
-               snprintf(errmsg, errmsg_len,
-                        "Distance does not match configured\n");
+               vty_out(vty, "Distance does not match configured\n");
                bgp_dest_unlock_node(dest);
                return CMD_WARNING_CONFIG_FAILED;
        }
@@ -14468,8 +14334,9 @@ uint8_t bgp_distance_apply(const struct prefix *p, struct bgp_path_info *pinfo,
  * we should tell ZEBRA update the routes for a specific
  * AFI/SAFI to reflect changes in RIB.
  */
-void bgp_announce_routes_distance_update(struct bgp *bgp, afi_t update_afi,
-                                        safi_t update_safi)
+static void bgp_announce_routes_distance_update(struct bgp *bgp,
+                                               afi_t update_afi,
+                                               safi_t update_safi)
 {
        afi_t afi;
        safi_t safi;
@@ -14489,228 +14356,237 @@ void bgp_announce_routes_distance_update(struct bgp *bgp, afi_t update_afi,
        }
 }
 
-DEFUN_YANG(bgp_distance, bgp_distance_cmd,
-          "distance bgp (1-255) (1-255) (1-255)",
-          "Define an administrative distance\n"
-          "BGP distance\n"
-          "Distance for routes external to the AS\n"
-          "Distance for routes internal to the AS\n"
-          "Distance for local routes\n")
+DEFUN (bgp_distance,
+       bgp_distance_cmd,
+       "distance bgp (1-255) (1-255) (1-255)",
+       "Define an administrative distance\n"
+       "BGP distance\n"
+       "Distance for routes external to the AS\n"
+       "Distance for routes internal to the AS\n"
+       "Distance for local routes\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_number = 2;
        int idx_number_2 = 3;
        int idx_number_3 = 4;
+       int distance_ebgp = atoi(argv[idx_number]->arg);
+       int distance_ibgp = atoi(argv[idx_number_2]->arg);
+       int distance_local = atoi(argv[idx_number_3]->arg);
        afi_t afi;
        safi_t safi;
-       char xpath[XPATH_MAXLEN];
 
        afi = bgp_node_afi(vty);
        safi = bgp_node_safi(vty);
 
-       snprintf(
-               xpath, sizeof(xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/admin-distance/external",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-       nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, argv[idx_number]->arg);
-       snprintf(
-               xpath, sizeof(xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/admin-distance/internal",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-       nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY,
-                             argv[idx_number_2]->arg);
-       snprintf(
-               xpath, sizeof(xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/admin-distance/local",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY,
-                             argv[idx_number_3]->arg);
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-DEFUN_YANG(no_bgp_distance, no_bgp_distance_cmd,
-          "no distance bgp [(1-255) (1-255) (1-255)]",
-          NO_STR
-          "Define an administrative distance\n"
-          "BGP distance\n"
-          "Distance for routes external to the AS\n"
-          "Distance for routes internal to the AS\n"
-          "Distance for local routes\n")
-{
-       afi_t afi;
-       safi_t safi;
-       char xpath[XPATH_MAXLEN];
-
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
+       if (bgp->distance_ebgp[afi][safi] != distance_ebgp
+           || bgp->distance_ibgp[afi][safi] != distance_ibgp
+           || bgp->distance_local[afi][safi] != distance_local) {
+               bgp->distance_ebgp[afi][safi] = distance_ebgp;
+               bgp->distance_ibgp[afi][safi] = distance_ibgp;
+               bgp->distance_local[afi][safi] = distance_local;
+               bgp_announce_routes_distance_update(bgp, afi, safi);
+       }
+       return CMD_SUCCESS;
+}
 
-       snprintf(
-               xpath, sizeof(xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/admin-distance/external",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-       nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, NULL);
-       snprintf(
-               xpath, sizeof(xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/admin-distance/internal",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-       nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, NULL);
-       snprintf(
-               xpath, sizeof(xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/admin-distance/local",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, xpath, NB_OP_MODIFY, NULL);
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-void cli_show_bgp_global_afi_safi_admin_distance_config(struct vty *vty,
-                                                       struct lyd_node *dnode,
-                                                       bool show_defaults)
-{
-       uint8_t distance_ebgp, distance_ibgp, distance_local;
-
-       distance_ebgp = yang_dnode_get_uint8(dnode, "./external");
-       distance_ibgp = yang_dnode_get_uint8(dnode, "./internal");
-       distance_local = yang_dnode_get_uint8(dnode, "./local");
-
-       vty_out(vty, "  distance bgp %d %d %d\n", distance_ebgp, distance_ibgp,
-               distance_local);
-}
-
-DEFPY_YANG(bgp_distance_source,
-          bgp_distance_source_cmd,
-          "[no] distance (1-255) <A.B.C.D/M | X:X::X:X/M>$prefix [WORD$acl]",
-          NO_STR
-          "Define an administrative distance\n"
-          "Distance value\n"
-          "IPv4 source prefix\n"
-          "IPv6 source prefix\n"
-          "Access list name\n")
+DEFUN (no_bgp_distance,
+       no_bgp_distance_cmd,
+       "no distance bgp [(1-255) (1-255) (1-255)]",
+       NO_STR
+       "Define an administrative distance\n"
+       "BGP distance\n"
+       "Distance for routes external to the AS\n"
+       "Distance for routes internal to the AS\n"
+       "Distance for local routes\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        afi_t afi;
        safi_t safi;
-       char xpath[XPATH_MAXLEN];
 
        afi = bgp_node_afi(vty);
        safi = bgp_node_safi(vty);
 
-       if (!no) {
-               nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-               nb_cli_enqueue_change(vty, "./distance", NB_OP_MODIFY,
-                                     distance_str);
-               if (acl)
-                       nb_cli_enqueue_change(vty,
-                                             "./access-list-policy-export",
-                                             NB_OP_CREATE, acl);
-               else
-                       nb_cli_enqueue_change(vty,
-                                             "./access-list-policy-export",
-                                             NB_OP_DESTROY, NULL);
-       } else {
-               nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
+       if (bgp->distance_ebgp[afi][safi] != 0
+           || bgp->distance_ibgp[afi][safi] != 0
+           || bgp->distance_local[afi][safi] != 0) {
+               bgp->distance_ebgp[afi][safi] = 0;
+               bgp->distance_ibgp[afi][safi] = 0;
+               bgp->distance_local[afi][safi] = 0;
+               bgp_announce_routes_distance_update(bgp, afi, safi);
        }
+       return CMD_SUCCESS;
+}
 
-       snprintf(
-               xpath, sizeof(xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/admin-distance-route[prefix='%s']",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi), prefix_str);
 
-       return nb_cli_apply_changes(vty, xpath);
+DEFUN (bgp_distance_source,
+       bgp_distance_source_cmd,
+       "distance (1-255) A.B.C.D/M",
+       "Define an administrative distance\n"
+       "Administrative distance\n"
+       "IP source prefix\n")
+{
+       int idx_number = 1;
+       int idx_ipv4_prefixlen = 2;
+       bgp_distance_set(vty, argv[idx_number]->arg,
+                        argv[idx_ipv4_prefixlen]->arg, NULL);
+       return CMD_SUCCESS;
 }
 
-void cli_show_bgp_global_afi_safi_unicast_admin_distance_route(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
+DEFUN (no_bgp_distance_source,
+       no_bgp_distance_source_cmd,
+       "no distance (1-255) A.B.C.D/M",
+       NO_STR
+       "Define an administrative distance\n"
+       "Administrative distance\n"
+       "IP source prefix\n")
 {
-       vty_out(vty, "  distance %d %s %s\n",
-               yang_dnode_get_uint8(dnode, "./distance"),
-               yang_dnode_get_string(dnode, "./prefix"),
-               (yang_dnode_exists(dnode, "./access-list-policy-export"))
-                       ? yang_dnode_get_string(dnode,
-                                               "./access-list-policy-export")
-                       : "");
+       int idx_number = 2;
+       int idx_ipv4_prefixlen = 3;
+       bgp_distance_unset(vty, argv[idx_number]->arg,
+                          argv[idx_ipv4_prefixlen]->arg, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFPY_YANG(
-       bgp_dampening, bgp_dampening_cmd,
-       "[no] bgp dampening [(1-45)$halflife [(1-20000)$reuse (1-20000)$suppress (1-255)$max_suppress]]",
-       NO_STR
-       "BGP Specific commands\n"
-       "Enable route-flap dampening\n"
-       "Half-life time for the penalty\n"
-       "Value to start reusing a route\n"
-       "Value to start suppressing a route\n"
-       "Maximum duration to suppress a stable route\n")
+DEFUN (bgp_distance_source_access_list,
+       bgp_distance_source_access_list_cmd,
+       "distance (1-255) A.B.C.D/M WORD",
+       "Define an administrative distance\n"
+       "Administrative distance\n"
+       "IP source prefix\n"
+       "Access list name\n")
 {
-       afi_t afi;
-       safi_t safi;
-       char xpath[XPATH_MAXLEN];
+       int idx_number = 1;
+       int idx_ipv4_prefixlen = 2;
+       int idx_word = 3;
+       bgp_distance_set(vty, argv[idx_number]->arg,
+                        argv[idx_ipv4_prefixlen]->arg, argv[idx_word]->arg);
+       return CMD_SUCCESS;
+}
 
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
+DEFUN (no_bgp_distance_source_access_list,
+       no_bgp_distance_source_access_list_cmd,
+       "no distance (1-255) A.B.C.D/M WORD",
+       NO_STR
+       "Define an administrative distance\n"
+       "Administrative distance\n"
+       "IP source prefix\n"
+       "Access list name\n")
+{
+       int idx_number = 2;
+       int idx_ipv4_prefixlen = 3;
+       int idx_word = 4;
+       bgp_distance_unset(vty, argv[idx_number]->arg,
+                          argv[idx_ipv4_prefixlen]->arg, argv[idx_word]->arg);
+       return CMD_SUCCESS;
+}
 
-       if (!no) {
-               nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY, "true");
-               if (argc == 6) {
-                       nb_cli_enqueue_change(vty, "./reach-decay",
-                                             NB_OP_MODIFY, halflife_str);
-                       nb_cli_enqueue_change(vty, "./reuse-above",
-                                             NB_OP_MODIFY, reuse_str);
-                       nb_cli_enqueue_change(vty, "./suppress-above",
-                                             NB_OP_MODIFY, suppress_str);
-                       nb_cli_enqueue_change(vty, "./unreach-decay",
-                                             NB_OP_MODIFY, max_suppress_str);
-               } if (argc == 3) {
-                       nb_cli_enqueue_change(vty, "./reach-decay",
-                                             NB_OP_MODIFY, halflife_str);
-               }
-       } else {
-               nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY, "false");
-       }
+DEFUN (ipv6_bgp_distance_source,
+       ipv6_bgp_distance_source_cmd,
+       "distance (1-255) X:X::X:X/M",
+       "Define an administrative distance\n"
+       "Administrative distance\n"
+       "IP source prefix\n")
+{
+       bgp_distance_set(vty, argv[1]->arg, argv[2]->arg, NULL);
+       return CMD_SUCCESS;
+}
 
-       snprintf(
-               xpath, sizeof(xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/route-flap-dampening",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
+DEFUN (no_ipv6_bgp_distance_source,
+       no_ipv6_bgp_distance_source_cmd,
+       "no distance (1-255) X:X::X:X/M",
+       NO_STR
+       "Define an administrative distance\n"
+       "Administrative distance\n"
+       "IP source prefix\n")
+{
+       bgp_distance_unset(vty, argv[2]->arg, argv[3]->arg, NULL);
+       return CMD_SUCCESS;
+}
 
-       return nb_cli_apply_changes(vty, xpath);
+DEFUN (ipv6_bgp_distance_source_access_list,
+       ipv6_bgp_distance_source_access_list_cmd,
+       "distance (1-255) X:X::X:X/M WORD",
+       "Define an administrative distance\n"
+       "Administrative distance\n"
+       "IP source prefix\n"
+       "Access list name\n")
+{
+       bgp_distance_set(vty, argv[1]->arg, argv[2]->arg, argv[3]->arg);
+       return CMD_SUCCESS;
 }
 
-void cli_show_bgp_global_afi_safi_route_flap_dampening(struct vty *vty,
-                                                      struct lyd_node *dnode,
-                                                      bool show_defaults)
+DEFUN (no_ipv6_bgp_distance_source_access_list,
+       no_ipv6_bgp_distance_source_access_list_cmd,
+       "no distance (1-255) X:X::X:X/M WORD",
+       NO_STR
+       "Define an administrative distance\n"
+       "Administrative distance\n"
+       "IP source prefix\n"
+       "Access list name\n")
 {
-       if (!yang_dnode_get_bool(dnode, "./enable"))
-               return;
+       bgp_distance_unset(vty, argv[2]->arg, argv[3]->arg, argv[4]->arg);
+       return CMD_SUCCESS;
+}
 
+DEFUN (bgp_damp_set,
+       bgp_damp_set_cmd,
+       "bgp dampening [(1-45) [(1-20000) (1-20000) (1-255)]]",
+       "BGP Specific commands\n"
+       "Enable route-flap dampening\n"
+       "Half-life time for the penalty\n"
+       "Value to start reusing a route\n"
+       "Value to start suppressing a route\n"
+       "Maximum duration to suppress a stable route\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_half_life = 2;
+       int idx_reuse = 3;
+       int idx_suppress = 4;
+       int idx_max_suppress = 5;
        int half = DEFAULT_HALF_LIFE * 60;
        int reuse = DEFAULT_REUSE;
        int suppress = DEFAULT_SUPPRESS;
-       int max;
-
-       half = yang_dnode_get_uint8(dnode, "../reach-decay");
-       reuse = yang_dnode_get_uint16(dnode, "../reuse-above");
-       suppress = yang_dnode_get_uint16(dnode, "../suppress-above");
-       max = yang_dnode_get_uint8(dnode, "../unreach-decay");
-
-       if (half == DEFAULT_HALF_LIFE * 60 && reuse == DEFAULT_REUSE
-           && suppress == DEFAULT_SUPPRESS && max == half * 4)
-               vty_out(vty, "  bgp dampening\n");
-       else if (half != DEFAULT_HALF_LIFE * 60 && reuse == DEFAULT_REUSE
-                && suppress == DEFAULT_SUPPRESS && max == half * 4)
-               vty_out(vty, "  bgp dampening %u\n", half);
-       else
-               vty_out(vty, "  bgp dampening %u %d %d %d\n", half, reuse,
-                       suppress, max);
+       int max = 4 * half;
+
+       if (argc == 6) {
+               half = atoi(argv[idx_half_life]->arg) * 60;
+               reuse = atoi(argv[idx_reuse]->arg);
+               suppress = atoi(argv[idx_suppress]->arg);
+               max = atoi(argv[idx_max_suppress]->arg) * 60;
+       } else if (argc == 3) {
+               half = atoi(argv[idx_half_life]->arg) * 60;
+               max = 4 * half;
+       }
+
+       /*
+        * These can't be 0 but our SA doesn't understand the
+        * way our cli is constructed
+        */
+       assert(reuse);
+       assert(half);
+       if (suppress < reuse) {
+               vty_out(vty,
+                       "Suppress value cannot be less than reuse value \n");
+               return 0;
+       }
+
+       return bgp_damp_enable(bgp, bgp_node_afi(vty), bgp_node_safi(vty), half,
+                              reuse, suppress, max);
+}
+
+DEFUN (bgp_damp_unset,
+       bgp_damp_unset_cmd,
+       "no bgp dampening [(1-45) [(1-20000) (1-20000) (1-255)]]",
+       NO_STR
+       "BGP Specific commands\n"
+       "Enable route-flap dampening\n"
+       "Half-life time for the penalty\n"
+       "Value to start reusing a route\n"
+       "Value to start suppressing a route\n"
+       "Maximum duration to suppress a stable route\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       return bgp_damp_disable(bgp, bgp_node_afi(vty), bgp_node_safi(vty));
 }
 
 /* Display specified route of BGP table. */
@@ -14776,8 +14652,7 @@ static int bgp_clear_damp_route(struct vty *vty, const char *view_name,
                                        if (pi->extra && pi->extra->damp_info) {
                                                pi_temp = pi->next;
                                                bgp_damp_info_free(
-                                                       &pi->extra->damp_info,
-                                                       &bgp->damp[afi][safi],
+                                                       pi->extra->damp_info,
                                                        1, afi, safi);
                                                pi = pi_temp;
                                        } else
@@ -14798,24 +14673,8 @@ static int bgp_clear_damp_route(struct vty *vty, const char *view_name,
                                while (pi) {
                                        if (pi->extra && pi->extra->damp_info) {
                                                pi_temp = pi->next;
-                                               struct bgp_damp_info *bdi =
-                                                       pi->extra->damp_info;
-                                               if (bdi->lastrecord
-                                                   == BGP_RECORD_UPDATE) {
-                                                       bgp_aggregate_increment(
-                                                               bgp,
-                                                               &bdi->dest->p,
-                                                               bdi->path,
-                                                               bdi->afi,
-                                                               bdi->safi);
-                                                       bgp_process(bgp,
-                                                                   bdi->dest,
-                                                                   bdi->afi,
-                                                                   bdi->safi);
-                                               }
                                                bgp_damp_info_free(
-                                                       &pi->extra->damp_info,
-                                                       &bgp->damp[afi][safi],
+                                                       pi->extra->damp_info,
                                                        1, afi, safi);
                                                pi = pi_temp;
                                        } else
@@ -14838,9 +14697,7 @@ DEFUN (clear_ip_bgp_dampening,
        BGP_STR
        "Clear route flap dampening information\n")
 {
-       VTY_DECLVAR_CONTEXT(bgp, bgp);
-       bgp_damp_info_clean(bgp, &bgp->damp[AFI_IP][SAFI_UNICAST], AFI_IP,
-                           SAFI_UNICAST);
+       bgp_damp_info_clean(AFI_IP, SAFI_UNICAST);
        return CMD_SUCCESS;
 }
 
@@ -15260,27 +15117,54 @@ void bgp_route_init(void)
        install_element(BGP_NODE, &bgp_distance_cmd);
        install_element(BGP_NODE, &no_bgp_distance_cmd);
        install_element(BGP_NODE, &bgp_distance_source_cmd);
+       install_element(BGP_NODE, &no_bgp_distance_source_cmd);
+       install_element(BGP_NODE, &bgp_distance_source_access_list_cmd);
+       install_element(BGP_NODE, &no_bgp_distance_source_access_list_cmd);
        install_element(BGP_IPV4_NODE, &bgp_distance_cmd);
        install_element(BGP_IPV4_NODE, &no_bgp_distance_cmd);
        install_element(BGP_IPV4_NODE, &bgp_distance_source_cmd);
+       install_element(BGP_IPV4_NODE, &no_bgp_distance_source_cmd);
+       install_element(BGP_IPV4_NODE, &bgp_distance_source_access_list_cmd);
+       install_element(BGP_IPV4_NODE, &no_bgp_distance_source_access_list_cmd);
        install_element(BGP_IPV4M_NODE, &bgp_distance_cmd);
        install_element(BGP_IPV4M_NODE, &no_bgp_distance_cmd);
        install_element(BGP_IPV4M_NODE, &bgp_distance_source_cmd);
+       install_element(BGP_IPV4M_NODE, &no_bgp_distance_source_cmd);
+       install_element(BGP_IPV4M_NODE, &bgp_distance_source_access_list_cmd);
+       install_element(BGP_IPV4M_NODE,
+                       &no_bgp_distance_source_access_list_cmd);
        install_element(BGP_IPV6_NODE, &bgp_distance_cmd);
        install_element(BGP_IPV6_NODE, &no_bgp_distance_cmd);
-       install_element(BGP_IPV6_NODE, &bgp_distance_source_cmd);
+       install_element(BGP_IPV6_NODE, &ipv6_bgp_distance_source_cmd);
+       install_element(BGP_IPV6_NODE, &no_ipv6_bgp_distance_source_cmd);
+       install_element(BGP_IPV6_NODE,
+                       &ipv6_bgp_distance_source_access_list_cmd);
+       install_element(BGP_IPV6_NODE,
+                       &no_ipv6_bgp_distance_source_access_list_cmd);
        install_element(BGP_IPV6M_NODE, &bgp_distance_cmd);
        install_element(BGP_IPV6M_NODE, &no_bgp_distance_cmd);
-       install_element(BGP_IPV6M_NODE, &bgp_distance_source_cmd);
+       install_element(BGP_IPV6M_NODE, &ipv6_bgp_distance_source_cmd);
+       install_element(BGP_IPV6M_NODE, &no_ipv6_bgp_distance_source_cmd);
+       install_element(BGP_IPV6M_NODE,
+                       &ipv6_bgp_distance_source_access_list_cmd);
+       install_element(BGP_IPV6M_NODE,
+                       &no_ipv6_bgp_distance_source_access_list_cmd);
 
        /* BGP dampening */
-       install_element(BGP_NODE, &bgp_dampening_cmd);
-       install_element(BGP_IPV4_NODE, &bgp_dampening_cmd);
-       install_element(BGP_IPV4M_NODE, &bgp_dampening_cmd);
-       install_element(BGP_IPV4L_NODE, &bgp_dampening_cmd);
-       install_element(BGP_IPV6_NODE, &bgp_dampening_cmd);
-       install_element(BGP_IPV6M_NODE, &bgp_dampening_cmd);
-       install_element(BGP_IPV6L_NODE, &bgp_dampening_cmd);
+       install_element(BGP_NODE, &bgp_damp_set_cmd);
+       install_element(BGP_NODE, &bgp_damp_unset_cmd);
+       install_element(BGP_IPV4_NODE, &bgp_damp_set_cmd);
+       install_element(BGP_IPV4_NODE, &bgp_damp_unset_cmd);
+       install_element(BGP_IPV4M_NODE, &bgp_damp_set_cmd);
+       install_element(BGP_IPV4M_NODE, &bgp_damp_unset_cmd);
+       install_element(BGP_IPV4L_NODE, &bgp_damp_set_cmd);
+       install_element(BGP_IPV4L_NODE, &bgp_damp_unset_cmd);
+       install_element(BGP_IPV6_NODE, &bgp_damp_set_cmd);
+       install_element(BGP_IPV6_NODE, &bgp_damp_unset_cmd);
+       install_element(BGP_IPV6M_NODE, &bgp_damp_set_cmd);
+       install_element(BGP_IPV6M_NODE, &bgp_damp_unset_cmd);
+       install_element(BGP_IPV6L_NODE, &bgp_damp_set_cmd);
+       install_element(BGP_IPV6L_NODE, &bgp_damp_unset_cmd);
 
        /* Large Communities */
        install_element(VIEW_NODE, &show_ip_bgp_large_community_list_cmd);
index 3e3b018e830bc42a97b74f075b7bde50efa319be..75da2723e6242db2621f18624650196f60a7d873 100644 (file)
@@ -641,9 +641,9 @@ extern bool bgp_maximum_prefix_overflow(struct peer *, afi_t, safi_t, int);
 
 extern void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
                                 const union g_addr *nexthop, ifindex_t ifindex,
-                                enum nexthop_types_t nhtype, uint32_t metric,
-                                uint8_t type, unsigned short instance,
-                                route_tag_t tag);
+                                enum nexthop_types_t nhtype, uint8_t distance,
+                                uint32_t metric, uint8_t type,
+                                unsigned short instance, route_tag_t tag);
 extern void bgp_redistribute_delete(struct bgp *, struct prefix *, uint8_t,
                                    unsigned short);
 extern void bgp_redistribute_withdraw(struct bgp *, afi_t, int, unsigned short);
@@ -792,32 +792,5 @@ extern void bgp_aggregate_toggle_suppressed(struct bgp_aggregate *aggregate,
                                            struct bgp *bgp,
                                            const struct prefix *p, afi_t afi,
                                            safi_t safi, bool suppress);
-extern int bgp_static_set(struct bgp *bgp, const char *negate,
-                         struct prefix *pfx, afi_t afi, safi_t safi,
-                         const char *rmap, int backdoor, uint32_t label_index,
-                         char *errmsg, size_t errmsg_len);
-
-extern int bgp_aggregate_set(struct bgp *bgp, struct prefix *prefix, afi_t afi,
-                            safi_t safi, const char *rmap,
-                            uint8_t summary_only, uint8_t as_set,
-                            uint8_t origin, bool match_med,
-                            const char *suppress_map, char *errmsg,
-                            size_t errmsg_len);
-
-extern int bgp_aggregate_unset(struct bgp *bgp, struct prefix *prefix,
-                              afi_t afi, safi_t safi, char *errmsg,
-                              size_t errmsg_len);
-
-extern void bgp_announce_routes_distance_update(struct bgp *bgp,
-                                               afi_t update_afi,
-                                               safi_t update_safi);
-
-extern int bgp_distance_set(uint8_t distance, const char *ip_str,
-                           const char *access_list_str, afi_t afi, safi_t safi,
-                           char *errmsg, size_t errmsg_len);
-
-extern int bgp_distance_unset(uint8_t distance, const char *ip_str,
-                             const char *access_list_str, afi_t afi,
-                             safi_t safi, char *errmsg, size_t errmsg_len);
 extern void subgroup_announce_reset_nhop(uint8_t family, struct attr *attr);
 #endif /* _QUAGGA_BGP_ROUTE_H */
index 529abcbea07b35a393c578e71be6f5448be38c73..835576a0792e8125ff5a465a927113da0fed437d 100644 (file)
@@ -52,6 +52,7 @@
 #include "bgpd/bgp_zebra.h"
 #include "bgpd/bgp_regex.h"
 #include "bgpd/bgp_community.h"
+#include "bgpd/bgp_community_alias.h"
 #include "bgpd/bgp_clist.h"
 #include "bgpd/bgp_filter.h"
 #include "bgpd/bgp_mplsvpn.h"
@@ -365,38 +366,37 @@ static enum route_map_cmd_result_t
 route_match_script(void *rule, const struct prefix *prefix, void *object)
 {
        const char *scriptname = rule;
+       const char *routematch_function = "route_match";
        struct bgp_path_info *path = (struct bgp_path_info *)object;
 
-       struct frrscript *fs = frrscript_load(scriptname, NULL);
+       struct frrscript *fs = frrscript_new(scriptname);
 
-       if (!fs) {
-               zlog_err("Issue loading script rule; defaulting to no match");
+       if (frrscript_load(fs, routematch_function, NULL)) {
+               zlog_err(
+                       "Issue loading script or function; defaulting to no match");
                return RMAP_NOMATCH;
        }
 
-       enum frrlua_rm_status lrm_status = LUA_RM_FAILURE,
-                             status_nomatch = LUA_RM_NOMATCH,
-                             status_match = LUA_RM_MATCH,
-                             status_match_and_change = LUA_RM_MATCH_AND_CHANGE;
-
        struct attr newattr = *path->attr;
 
        int result = frrscript_call(
-               fs, ("RM_FAILURE", (long long *)&lrm_status),
-               ("RM_NOMATCH", (long long *)&status_nomatch),
-               ("RM_MATCH", (long long *)&status_match),
-               ("RM_MATCH_AND_CHANGE", (long long *)&status_match_and_change),
-               ("action", (long long *)&lrm_status), ("prefix", prefix),
-               ("attributes", &newattr), ("peer", path->peer));
+               fs, routematch_function, ("prefix", prefix),
+               ("attributes", &newattr), ("peer", path->peer),
+               ("RM_FAILURE", LUA_RM_FAILURE), ("RM_NOMATCH", LUA_RM_NOMATCH),
+               ("RM_MATCH", LUA_RM_MATCH),
+               ("RM_MATCH_AND_CHANGE", LUA_RM_MATCH_AND_CHANGE));
 
        if (result) {
                zlog_err("Issue running script rule; defaulting to no match");
                return RMAP_NOMATCH;
        }
 
+       long long *action = frrscript_get_result(fs, routematch_function,
+                                                "action", lua_tointegerp);
+
        int status = RMAP_NOMATCH;
 
-       switch (lrm_status) {
+       switch (*action) {
        case LUA_RM_FAILURE:
                zlog_err(
                        "Executing route-map match script '%s' failed; defaulting to no match",
@@ -427,7 +427,9 @@ route_match_script(void *rule, const struct prefix *prefix, void *object)
                break;
        }
 
-       frrscript_unload(fs);
+       XFREE(MTYPE_SCRIPT_RES, action);
+
+       frrscript_delete(fs);
 
        return status;
 }
@@ -1179,6 +1181,66 @@ static const struct route_map_rule_cmd route_match_vrl_source_vrf_cmd = {
        route_match_vrl_source_vrf_free
 };
 
+/* `match alias` */
+static enum route_map_cmd_result_t
+route_match_alias(void *rule, const struct prefix *prefix, void *object)
+{
+       char *alias = rule;
+       struct bgp_path_info *path = object;
+       char **communities;
+       int num;
+       bool found;
+
+       if (path->attr->community) {
+               found = false;
+               frrstr_split(path->attr->community->str, " ", &communities,
+                            &num);
+               for (int i = 0; i < num; i++) {
+                       const char *com2alias =
+                               bgp_community2alias(communities[i]);
+                       if (!found && strcmp(alias, com2alias) == 0)
+                               found = true;
+                       XFREE(MTYPE_TMP, communities[i]);
+               }
+               XFREE(MTYPE_TMP, communities);
+               if (found)
+                       return RMAP_MATCH;
+       }
+
+       if (path->attr->lcommunity) {
+               found = false;
+               frrstr_split(path->attr->lcommunity->str, " ", &communities,
+                            &num);
+               for (int i = 0; i < num; i++) {
+                       const char *com2alias =
+                               bgp_community2alias(communities[i]);
+                       if (!found && strcmp(alias, com2alias) == 0)
+                               found = true;
+                       XFREE(MTYPE_TMP, communities[i]);
+               }
+               XFREE(MTYPE_TMP, communities);
+               if (found)
+                       return RMAP_MATCH;
+       }
+
+       return RMAP_NOMATCH;
+}
+
+static void *route_match_alias_compile(const char *arg)
+{
+
+       return XSTRDUP(MTYPE_ROUTE_MAP_COMPILED, arg);
+}
+
+static void route_match_alias_free(void *rule)
+{
+       XFREE(MTYPE_ROUTE_MAP_COMPILED, rule);
+}
+
+static const struct route_map_rule_cmd route_match_alias_cmd = {
+       "alias", route_match_alias, route_match_alias_compile,
+       route_match_alias_free};
+
 /* `match local-preference LOCAL-PREF' */
 
 /* Match function return 1 if match is success else return zero. */
@@ -1987,9 +2049,8 @@ route_set_aspath_prepend(void *rule, const struct prefix *prefix, void *object)
                aspath_prepend(aspath, new);
        } else {
                as_t as = aspath_leftmost(new);
-               if (!as)
-                       as = path->peer->as;
-               new = aspath_add_seq_n(new, as, (uintptr_t)rule);
+               if (as)
+                       new = aspath_add_seq_n(new, as, (uintptr_t)rule);
        }
 
        path->attr->aspath = new;
@@ -2457,26 +2518,40 @@ static const struct route_map_rule_cmd route_set_community_delete_cmd = {
 
 /* `set extcommunity rt COMMUNITY' */
 
+struct rmap_ecom_set {
+       struct ecommunity *ecom;
+       bool none;
+};
+
 /* For community set mechanism.  Used by _rt and _soo. */
 static enum route_map_cmd_result_t
 route_set_ecommunity(void *rule, const struct prefix *prefix, void *object)
 {
-       struct ecommunity *ecom;
+       struct rmap_ecom_set *rcs;
        struct ecommunity *new_ecom;
        struct ecommunity *old_ecom;
        struct bgp_path_info *path;
+       struct attr *attr;
 
-       ecom = rule;
+       rcs = rule;
        path = object;
+       attr = path->attr;
 
-       if (!ecom)
+       if (rcs->none) {
+               attr->flag &= ~(ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
+               attr->ecommunity = NULL;
+               return RMAP_OKAY;
+       }
+
+       if (!rcs->ecom)
                return RMAP_OKAY;
 
        /* We assume additive for Extended Community. */
        old_ecom = path->attr->ecommunity;
 
        if (old_ecom) {
-               new_ecom = ecommunity_merge(ecommunity_dup(old_ecom), ecom);
+               new_ecom =
+                       ecommunity_merge(ecommunity_dup(old_ecom), rcs->ecom);
 
                /* old_ecom->refcnt = 1 => owned elsewhere, e.g.
                 * bgp_update_receive()
@@ -2485,7 +2560,7 @@ route_set_ecommunity(void *rule, const struct prefix *prefix, void *object)
                if (!old_ecom->refcnt)
                        ecommunity_free(&old_ecom);
        } else
-               new_ecom = ecommunity_dup(ecom);
+               new_ecom = ecommunity_dup(rcs->ecom);
 
        /* will be intern()'d or attr_flush()'d by bgp_update_main() */
        path->attr->ecommunity = new_ecom;
@@ -2495,24 +2570,55 @@ route_set_ecommunity(void *rule, const struct prefix *prefix, void *object)
        return RMAP_OKAY;
 }
 
-/* Compile function for set community. */
+static void *route_set_ecommunity_none_compile(const char *arg)
+{
+       struct rmap_ecom_set *rcs;
+       bool none = false;
+
+       if (strncmp(arg, "none", 4) == 0)
+               none = true;
+
+       rcs = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(struct rmap_ecom_set));
+       rcs->ecom = NULL;
+       rcs->none = none;
+
+       return rcs;
+}
+
 static void *route_set_ecommunity_rt_compile(const char *arg)
 {
+       struct rmap_ecom_set *rcs;
        struct ecommunity *ecom;
 
        ecom = ecommunity_str2com(arg, ECOMMUNITY_ROUTE_TARGET, 0);
        if (!ecom)
                return NULL;
-       return ecommunity_intern(ecom);
+
+       rcs = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(struct rmap_ecom_set));
+       rcs->ecom = ecommunity_intern(ecom);
+       rcs->none = false;
+
+       return rcs;
 }
 
 /* Free function for set community.  Used by _rt and _soo */
 static void route_set_ecommunity_free(void *rule)
 {
-       struct ecommunity *ecom = rule;
-       ecommunity_unintern(&ecom);
+       struct rmap_ecom_set *rcs = rule;
+
+       if (rcs->ecom)
+               ecommunity_unintern(&rcs->ecom);
+
+       XFREE(MTYPE_ROUTE_MAP_COMPILED, rcs);
 }
 
+static const struct route_map_rule_cmd route_set_ecommunity_none_cmd = {
+       "extcommunity",
+       route_set_ecommunity,
+       route_set_ecommunity_none_compile,
+       route_set_ecommunity_free,
+};
+
 /* Set community rule structure. */
 static const struct route_map_rule_cmd route_set_ecommunity_rt_cmd = {
        "extcommunity rt",
@@ -2526,13 +2632,18 @@ static const struct route_map_rule_cmd route_set_ecommunity_rt_cmd = {
 /* Compile function for set community. */
 static void *route_set_ecommunity_soo_compile(const char *arg)
 {
+       struct rmap_ecom_set *rcs;
        struct ecommunity *ecom;
 
        ecom = ecommunity_str2com(arg, ECOMMUNITY_SITE_ORIGIN, 0);
        if (!ecom)
                return NULL;
 
-       return ecommunity_intern(ecom);
+       rcs = XCALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(struct rmap_ecom_set));
+       rcs->ecom = ecommunity_intern(ecom);
+       rcs->none = false;
+
+       return rcs;
 }
 
 /* Set community rule structure. */
@@ -2597,7 +2708,9 @@ route_set_ecommunity_lb(void *rule, const struct prefix *prefix, void *object)
                bw_bytes *= mpath_count;
        }
 
-       encode_lb_extcomm(as, bw_bytes, rels->non_trans, &lb_eval);
+       encode_lb_extcomm(as, bw_bytes, rels->non_trans, &lb_eval,
+                         CHECK_FLAG(peer->flags,
+                                    PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE));
 
        /* add to route or merge with existing */
        old_ecom = path->attr->ecommunity;
@@ -4597,6 +4710,58 @@ DEFUN_YANG (no_match_local_pref,
        return nb_cli_apply_changes(vty, NULL);
 }
 
+DEFUN_YANG(match_alias, match_alias_cmd, "match alias ALIAS_NAME",
+          MATCH_STR
+          "Match BGP community alias name\n"
+          "BGP community alias name\n")
+{
+       const char *alias = argv[2]->arg;
+       struct community_alias ca1;
+       struct community_alias *lookup_alias;
+
+       const char *xpath =
+               "./match-condition[condition='frr-bgp-route-map:match-alias']";
+       char xpath_value[XPATH_MAXLEN];
+
+       memset(&ca1, 0, sizeof(ca1));
+       strlcpy(ca1.alias, alias, sizeof(ca1.alias));
+       lookup_alias = bgp_ca_alias_lookup(&ca1);
+       if (!lookup_alias) {
+               vty_out(vty, "%% BGP alias name '%s' does not exist\n", alias);
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL);
+       snprintf(xpath_value, sizeof(xpath_value),
+                "%s/rmap-match-condition/frr-bgp-route-map:alias", xpath);
+       nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, alias);
+
+       return nb_cli_apply_changes(vty, NULL);
+}
+
+
+DEFUN_YANG(no_match_alias, no_match_alias_cmd, "no match alias [ALIAS_NAME]",
+          NO_STR MATCH_STR
+          "Match BGP community alias name\n"
+          "BGP community alias name\n")
+{
+       int idx_alias = 3;
+       const char *xpath =
+               "./match-condition[condition='frr-bgp-route-map:match-alias']";
+       char xpath_value[XPATH_MAXLEN];
+
+       nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
+
+       if (argc <= idx_alias)
+               return nb_cli_apply_changes(vty, NULL);
+
+       snprintf(xpath_value, sizeof(xpath_value),
+                "%s/rmap-match-condition/frr-bgp-route-map:alias", xpath);
+       nb_cli_enqueue_change(vty, xpath_value, NB_OP_DESTROY,
+                             argv[idx_alias]->arg);
+
+       return nb_cli_apply_changes(vty, NULL);
+}
 
 DEFPY_YANG (match_community,
        match_community_cmd,
@@ -5105,7 +5270,7 @@ DEFUN_YANG (set_aspath_prepend_lastas,
            SET_STR
            "Transform BGP AS_PATH attribute\n"
            "Prepend to the as-path\n"
-           "Use the peer's AS-number\n"
+           "Use the last AS-number in the as-path\n"
            "Number of times to insert\n")
 {
        int idx_num = 4;
@@ -5636,6 +5801,37 @@ ALIAS_YANG (no_set_ecommunity_soo,
             "GP extended community attribute\n"
             "Site-of-Origin extended community\n")
 
+DEFUN_YANG(set_ecommunity_none, set_ecommunity_none_cmd,
+          "set extcommunity none",
+          SET_STR
+          "BGP extended community attribute\n"
+          "No extended community attribute\n")
+{
+       const char *xpath =
+               "./set-action[action='frr-bgp-route-map:set-extcommunity-none']";
+       char xpath_value[XPATH_MAXLEN];
+
+       nb_cli_enqueue_change(vty, xpath, NB_OP_CREATE, NULL);
+
+       snprintf(xpath_value, sizeof(xpath_value),
+                "%s/rmap-set-action/frr-bgp-route-map:extcommunity-none",
+                xpath);
+       nb_cli_enqueue_change(vty, xpath_value, NB_OP_MODIFY, "true");
+       return nb_cli_apply_changes(vty, NULL);
+}
+
+DEFUN_YANG(no_set_ecommunity_none, no_set_ecommunity_none_cmd,
+          "no set extcommunity none",
+          NO_STR SET_STR
+          "BGP extended community attribute\n"
+          "No extended community attribute\n")
+{
+       const char *xpath =
+               "./set-action[action='frr-bgp-route-map:set-extcommunity-none']";
+       nb_cli_enqueue_change(vty, xpath, NB_OP_DESTROY, NULL);
+       return nb_cli_apply_changes(vty, NULL);
+}
+
 DEFUN_YANG (set_ecommunity_lb,
            set_ecommunity_lb_cmd,
            "set extcommunity bandwidth <(1-25600)|cumulative|num-multipaths> [non-transitive]",
@@ -5648,7 +5844,7 @@ DEFUN_YANG (set_ecommunity_lb,
            "Attribute is set as non-transitive\n")
 {
        int idx_lb = 3;
-       int idx_non_transitive = 4;
+       int idx_non_transitive = 0;
        const char *xpath =
                "./set-action[action='frr-bgp-route-map:set-extcommunity-lb']";
        char xpath_lb_type[XPATH_MAXLEN];
@@ -5680,7 +5876,7 @@ DEFUN_YANG (set_ecommunity_lb,
                                      argv[idx_lb]->arg);
        }
 
-       if (argv[idx_non_transitive])
+       if (argv_find(argv, argc, "non-transitive", &idx_non_transitive))
                nb_cli_enqueue_change(vty, xpath_non_transitive, NB_OP_MODIFY,
                                      "true");
        else
@@ -6286,6 +6482,7 @@ void bgp_route_map_init(void)
        route_map_no_set_tag_hook(generic_set_delete);
 
        route_map_install_match(&route_match_peer_cmd);
+       route_map_install_match(&route_match_alias_cmd);
        route_map_install_match(&route_match_local_pref_cmd);
 #ifdef HAVE_SCRIPTING
        route_map_install_match(&route_match_script_cmd);
@@ -6339,6 +6536,7 @@ void bgp_route_map_init(void)
        route_map_install_set(&route_set_ecommunity_rt_cmd);
        route_map_install_set(&route_set_ecommunity_soo_cmd);
        route_map_install_set(&route_set_ecommunity_lb_cmd);
+       route_map_install_set(&route_set_ecommunity_none_cmd);
        route_map_install_set(&route_set_tag_cmd);
        route_map_install_set(&route_set_label_index_cmd);
 
@@ -6370,6 +6568,8 @@ void bgp_route_map_init(void)
        install_element(RMAP_NODE, &no_match_aspath_cmd);
        install_element(RMAP_NODE, &match_local_pref_cmd);
        install_element(RMAP_NODE, &no_match_local_pref_cmd);
+       install_element(RMAP_NODE, &match_alias_cmd);
+       install_element(RMAP_NODE, &no_match_alias_cmd);
        install_element(RMAP_NODE, &match_community_cmd);
        install_element(RMAP_NODE, &no_match_community_cmd);
        install_element(RMAP_NODE, &match_lcommunity_cmd);
@@ -6429,6 +6629,8 @@ void bgp_route_map_init(void)
        install_element(RMAP_NODE, &set_ecommunity_lb_cmd);
        install_element(RMAP_NODE, &no_set_ecommunity_lb_cmd);
        install_element(RMAP_NODE, &no_set_ecommunity_lb_short_cmd);
+       install_element(RMAP_NODE, &set_ecommunity_none_cmd);
+       install_element(RMAP_NODE, &no_set_ecommunity_none_cmd);
 #ifdef KEEP_OLD_VPN_COMMANDS
        install_element(RMAP_NODE, &set_vpn_nexthop_cmd);
        install_element(RMAP_NODE, &no_set_vpn_nexthop_cmd);
index 1254591b87d26b5694f8db6b501591cc76e51522..caf1553ec135e68537beafecf71d325105b7eb03 100644 (file)
@@ -38,6 +38,13 @@ const struct frr_yang_module_info frr_bgp_route_map_info = {
                                .destroy = lib_route_map_entry_match_condition_rmap_match_condition_local_preference_destroy,
                        }
                },
+               {
+                       .xpath = "/frr-route-map:lib/route-map/entry/match-condition/rmap-match-condition/frr-bgp-route-map:alias",
+                       .cbs = {
+                               .modify = lib_route_map_entry_match_condition_rmap_match_condition_alias_modify,
+                               .destroy = lib_route_map_entry_match_condition_rmap_match_condition_alias_destroy,
+                       }
+               },
                {
                        .xpath = "/frr-route-map:lib/route-map/entry/match-condition/rmap-match-condition/frr-bgp-route-map:script",
                        .cbs = {
@@ -344,6 +351,13 @@ const struct frr_yang_module_info frr_bgp_route_map_info = {
                                .destroy = lib_route_map_entry_set_action_rmap_set_action_comm_list_name_destroy,
                        }
                },
+               {
+                       .xpath = "/frr-route-map:lib/route-map/entry/set-action/rmap-set-action/frr-bgp-route-map:extcommunity-none",
+                       .cbs = {
+                               .modify = lib_route_map_entry_set_action_rmap_set_action_extcommunity_none_modify,
+                               .destroy = lib_route_map_entry_set_action_rmap_set_action_extcommunity_none_destroy,
+                       }
+               },
                {
                        .xpath = "/frr-route-map:lib/route-map/entry/set-action/rmap-set-action/frr-bgp-route-map:extcommunity-lb",
                        .cbs = {
index f0e492eb617da0de9af206d3dcf41c2ca58deb9b..e0b3a6926f77e2ab74bebc4d1fbe509f6097cf7d 100644 (file)
@@ -29,6 +29,10 @@ extern const struct frr_yang_module_info frr_bgp_route_map_info;
 /* prototypes */
 int lib_route_map_entry_match_condition_rmap_match_condition_local_preference_modify(struct nb_cb_modify_args *args);
 int lib_route_map_entry_match_condition_rmap_match_condition_local_preference_destroy(struct nb_cb_destroy_args *args);
+int lib_route_map_entry_match_condition_rmap_match_condition_alias_modify(
+       struct nb_cb_modify_args *args);
+int lib_route_map_entry_match_condition_rmap_match_condition_alias_destroy(
+       struct nb_cb_destroy_args *args);
 int lib_route_map_entry_match_condition_rmap_match_condition_script_modify(struct nb_cb_modify_args *args);
 int lib_route_map_entry_match_condition_rmap_match_condition_script_destroy(struct nb_cb_destroy_args *args);
 int lib_route_map_entry_match_condition_rmap_match_condition_origin_modify(struct nb_cb_modify_args *args);
@@ -130,6 +134,10 @@ int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_bandwidth_mod
 int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_bandwidth_destroy(struct nb_cb_destroy_args *args);
 int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_two_octet_as_specific_modify(struct nb_cb_modify_args *args);
 int lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_two_octet_as_specific_destroy(struct nb_cb_destroy_args *args);
+int lib_route_map_entry_set_action_rmap_set_action_extcommunity_none_modify(
+       struct nb_cb_modify_args *args);
+int lib_route_map_entry_set_action_rmap_set_action_extcommunity_none_destroy(
+       struct nb_cb_destroy_args *args);
 int lib_route_map_entry_set_action_rmap_set_action_evpn_gateway_ip_ipv4_modify(
        struct nb_cb_modify_args *args);
 int lib_route_map_entry_set_action_rmap_set_action_evpn_gateway_ip_ipv4_destroy(
index 88e3f6438f547299887441b85406f2a3ad6afc05..85676e6758a2ee5dade70319b7b1cb88897dc5be 100644 (file)
@@ -159,6 +159,62 @@ lib_route_map_entry_match_condition_rmap_match_condition_local_preference_destro
        return NB_OK;
 }
 
+/*
+ * XPath:
+ * /frr-route-map:lib/route-map/entry/match-condition/rmap-match-condition/frr-bgp-route-map:alias
+ */
+int lib_route_map_entry_match_condition_rmap_match_condition_alias_modify(
+       struct nb_cb_modify_args *args)
+{
+       struct routemap_hook_context *rhc;
+       const char *alias;
+       enum rmap_compile_rets ret;
+
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_PREPARE:
+       case NB_EV_ABORT:
+               break;
+       case NB_EV_APPLY:
+               /* Add configuration. */
+               rhc = nb_running_get_entry(args->dnode, NULL, true);
+               alias = yang_dnode_get_string(args->dnode, NULL);
+
+               /* Set destroy information. */
+               rhc->rhc_mhook = bgp_route_match_delete;
+               rhc->rhc_rule = "alias";
+               rhc->rhc_event = RMAP_EVENT_MATCH_DELETED;
+
+               ret = bgp_route_match_add(rhc->rhc_rmi, "alias", alias,
+                                         RMAP_EVENT_MATCH_ADDED, args->errmsg,
+                                         args->errmsg_len);
+
+               if (ret != RMAP_COMPILE_SUCCESS) {
+                       rhc->rhc_mhook = NULL;
+                       return NB_ERR_VALIDATION;
+               }
+
+               break;
+       }
+
+       return NB_OK;
+}
+
+int lib_route_map_entry_match_condition_rmap_match_condition_alias_destroy(
+       struct nb_cb_destroy_args *args)
+{
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_PREPARE:
+       case NB_EV_ABORT:
+               break;
+       case NB_EV_APPLY:
+               return lib_route_map_entry_match_destroy(args);
+       }
+
+       return NB_OK;
+}
+
 /*
  * XPath: /frr-route-map:lib/route-map/entry/match-condition/rmap-match-condition/frr-bgp-route-map:script
  */
@@ -2536,12 +2592,6 @@ lib_route_map_entry_set_action_rmap_set_action_comm_list_name_destroy(
        return NB_OK;
 }
 
-enum e_community_lb_type {
-       EXPLICIT_BANDWIDTH,
-       CUMULATIVE_BANDWIDTH,
-       COMPUTED_BANDWIDTH
-};
-
 /*
  * XPath:
  * /frr-route-map:lib/route-map/entry/set-action/rmap-set-action/frr-bgp-route-map:extcommunity-lb
@@ -2551,7 +2601,7 @@ lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_finish(
        struct nb_cb_apply_finish_args *args)
 {
        struct routemap_hook_context *rhc;
-       int lb_type;
+       enum ecommunity_lb_type lb_type;
        char str[VTY_BUFSIZ];
        uint16_t bandwidth;
 
@@ -2638,6 +2688,64 @@ lib_route_map_entry_set_action_rmap_set_action_extcommunity_lb_two_octet_as_spec
        return lib_route_map_entry_set_destroy(args);
 }
 
+/*
+ * XPath:
+ * /frr-route-map:lib/route-map/entry/set-action/rmap-set-action/frr-bgp-route-map:extcommunity-none
+ */
+int lib_route_map_entry_set_action_rmap_set_action_extcommunity_none_modify(
+       struct nb_cb_modify_args *args)
+{
+       struct routemap_hook_context *rhc;
+       bool none = false;
+       int rv;
+
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_PREPARE:
+       case NB_EV_ABORT:
+               break;
+       case NB_EV_APPLY:
+               /* Add configuration. */
+               rhc = nb_running_get_entry(args->dnode, NULL, true);
+               none = yang_dnode_get_bool(args->dnode, NULL);
+
+               /* Set destroy information. */
+               rhc->rhc_shook = generic_set_delete;
+               rhc->rhc_rule = "extcommunity";
+               rhc->rhc_event = RMAP_EVENT_SET_DELETED;
+
+               if (none) {
+                       rv = generic_set_add(rhc->rhc_rmi, "extcommunity",
+                                            "none", args->errmsg,
+                                            args->errmsg_len);
+                       if (rv != CMD_SUCCESS) {
+                               rhc->rhc_shook = NULL;
+                               return NB_ERR_INCONSISTENCY;
+                       }
+                       return NB_OK;
+               }
+
+               return NB_ERR_INCONSISTENCY;
+       }
+
+       return NB_OK;
+}
+
+int lib_route_map_entry_set_action_rmap_set_action_extcommunity_none_destroy(
+       struct nb_cb_destroy_args *args)
+{
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_PREPARE:
+       case NB_EV_ABORT:
+               break;
+       case NB_EV_APPLY:
+               return lib_route_map_entry_set_destroy(args);
+       }
+
+       return NB_OK;
+}
+
 /*
  * XPath:
  * /frr-route-map:lib/route-map/entry/set-action/rmap-set-action/frr-bgp-route-map:evpn-gateway-ip-ipv4
index 816ed88eecd01b99808d7e2bb7ddda05c48f88ae..ca3f93899b19d8ecccba0592fec297a337d80dc7 100644 (file)
@@ -388,33 +388,25 @@ static int bgpd_sync_callback(struct thread *thread)
        afi_t afi = (rec.prefix.ver == LRTR_IPV4) ? AFI_IP : AFI_IP6;
 
        for (ALL_LIST_ELEMENTS_RO(bm->bgp, node, bgp)) {
-               struct peer *peer;
-               struct listnode *peer_listnode;
-
-               for (ALL_LIST_ELEMENTS_RO(bgp->peer, peer_listnode, peer)) {
-                       safi_t safi;
-
-                       for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) {
-                               if (!peer->bgp->rib[afi][safi])
-                                       continue;
+               safi_t safi;
 
-                               struct bgp_dest *match;
-                               struct bgp_dest *node;
+               for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) {
+                       if (!bgp->rib[afi][safi])
+                               continue;
 
-                               match = bgp_table_subtree_lookup(
-                                       peer->bgp->rib[afi][safi], prefix);
-                               node = match;
+                       struct bgp_dest *match;
+                       struct bgp_dest *node;
 
-                               while (node) {
-                                       if (bgp_dest_has_bgp_path_info_data(
-                                                   node)) {
-                                               revalidate_bgp_node(node, afi,
-                                                                   safi);
-                                       }
+                       match = bgp_table_subtree_lookup(bgp->rib[afi][safi],
+                                                        prefix);
+                       node = match;
 
-                                       node = bgp_route_next_until(node,
-                                                                   match);
+                       while (node) {
+                               if (bgp_dest_has_bgp_path_info_data(node)) {
+                                       revalidate_bgp_node(node, afi, safi);
                                }
+
+                               node = bgp_route_next_until(node, match);
                        }
                }
        }
@@ -429,7 +421,6 @@ static void revalidate_bgp_node(struct bgp_dest *bgp_dest, afi_t afi,
        struct bgp_adj_in *ain;
 
        for (ain = bgp_dest->adj_in; ain; ain = ain->next) {
-               int ret;
                struct bgp_path_info *path =
                        bgp_dest_get_bgp_path_info(bgp_dest);
                mpls_label_t *label = NULL;
@@ -439,13 +430,10 @@ static void revalidate_bgp_node(struct bgp_dest *bgp_dest, afi_t afi,
                        label = path->extra->label;
                        num_labels = path->extra->num_labels;
                }
-               ret = bgp_update(ain->peer, bgp_dest_get_prefix(bgp_dest),
+               (void)bgp_update(ain->peer, bgp_dest_get_prefix(bgp_dest),
                                 ain->addpath_rx_id, ain->attr, afi, safi,
                                 ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, NULL, label,
                                 num_labels, 1, NULL);
-
-               if (ret < 0)
-                       return;
        }
 }
 
@@ -908,7 +896,13 @@ static int config_write(struct vty *vty)
 
        vty_out(vty, "!\n");
        vty_out(vty, "rpki\n");
-       vty_out(vty, "  rpki polling_period %d\n", polling_period);
+       vty_out(vty, " rpki polling_period %d\n", polling_period);
+
+       if (retry_interval != RETRY_INTERVAL_DEFAULT)
+               vty_out(vty, " rpki retry_interval %d\n", retry_interval);
+       if (expire_interval != EXPIRE_INTERVAL_DEFAULT)
+               vty_out(vty, " rpki expire_interval %d\n", expire_interval);
+
        for (ALL_LIST_ELEMENTS_RO(cache_list, cache_node, cache)) {
                switch (cache->type) {
                        struct tr_tcp_config *tcp_config;
@@ -917,13 +911,13 @@ static int config_write(struct vty *vty)
 #endif
                case TCP:
                        tcp_config = cache->tr_config.tcp_config;
-                       vty_out(vty, "  rpki cache %s %s ", tcp_config->host,
+                       vty_out(vty, " rpki cache %s %s ", tcp_config->host,
                                tcp_config->port);
                        break;
 #if defined(FOUND_SSH)
                case SSH:
                        ssh_config = cache->tr_config.ssh_config;
-                       vty_out(vty, "  rpki cache %s %u %s %s %s ",
+                       vty_out(vty, " rpki cache %s %u %s %s %s ",
                                ssh_config->host, ssh_config->port,
                                ssh_config->username,
                                ssh_config->client_privkey_path,
@@ -938,7 +932,7 @@ static int config_write(struct vty *vty)
 
                vty_out(vty, "preference %hhu\n", cache->preference);
        }
-       vty_out(vty, "  exit\n");
+       vty_out(vty, "exit\n");
 
        return 1;
 }
index 4baa730c8dacff6ca73e003e30f06583134e0817..868801c14e1857d7c012e514a3488aa520cace71 100644 (file)
@@ -326,7 +326,7 @@ static uint8_t *bgpVersion(struct variable *v, oid name[], size_t *length,
            == MATCH_FAILED)
                return NULL;
 
-       /* Retrun BGP version.  Zebra bgpd only support version 4. */
+       /* Return BGP version.  Zebra bgpd only support version 4. */
        version = (0x80 >> (BGP_VERSION_4 - 1));
 
        /* Return octet string length 1. */
index 576ced34734e3f99fec24781e3400df21f413c19..92b74dd7cc70d30f72c3a10a046a43ac2652bcd5 100644 (file)
 #include "bgpd/rfapi/bgp_rfapi_cfg.h"
 #endif
 
-#include "northbound.h"
-#include "northbound_cli.h"
-#include "bgpd/bgp_nb.h"
-
-
 FRR_CFG_DEFAULT_BOOL(BGP_IMPORT_CHECK,
        {
                .val_bool = false,
@@ -132,6 +127,7 @@ DEFINE_HOOK(bgp_inst_config_write,
                (struct bgp *bgp, struct vty *vty),
                (bgp, vty));
 DEFINE_HOOK(bgp_snmp_update_last_changed, (struct bgp *bgp), (bgp));
+DEFINE_HOOK(bgp_snmp_init_stats, (struct bgp *bgp), (bgp));
 
 static struct peer_group *listen_range_exists(struct bgp *bgp,
                                              struct prefix *range, int exact);
@@ -159,10 +155,6 @@ static int bgp_show_neighbor_graceful_restart_afi_all(struct vty *vty,
                                                      const char *ip_str,
                                                      afi_t afi, bool use_json);
 
-static int peer_and_group_lookup_nb(struct vty *vty, const char *peer_str,
-                                   char *base_xpath, int xpath_len,
-                                   char *abs_xpath);
-
 static enum node_type bgp_node_type(afi_t afi, safi_t safi)
 {
        switch (afi) {
@@ -290,41 +282,6 @@ static const char *get_afi_safi_json_str(afi_t afi, safi_t safi)
        return "Unknown";
 }
 
-/* return string maps to afi-safi specific container names
- * defined in bgp yang file.
- */
-const char *bgp_afi_safi_get_container_str(afi_t afi, safi_t safi)
-{
-       if (afi == AFI_IP) {
-               if (safi == SAFI_UNICAST)
-                       return "ipv4-unicast";
-               if (safi == SAFI_MULTICAST)
-                       return "ipv4-multicast";
-               if (safi == SAFI_LABELED_UNICAST)
-                       return "ipv4-labeled-unicast";
-               if (safi == SAFI_MPLS_VPN)
-                       return "l3vpn-ipv4-unicast";
-               if (safi == SAFI_FLOWSPEC)
-                       return "ipv4-flowspec";
-       } else if (afi == AFI_IP6) {
-               if (safi == SAFI_UNICAST)
-                       return "ipv6-unicast";
-               if (safi == SAFI_MULTICAST)
-                       return "ipv6-multicast";
-               if (safi == SAFI_LABELED_UNICAST)
-                       return "ipv6-labeled-unicast";
-               if (safi == SAFI_MPLS_VPN)
-                       return "l3vpn-ipv6-unicast";
-               if (safi == SAFI_FLOWSPEC)
-                       return "ipv6-flowspec";
-       } else if (afi == AFI_L2VPN) {
-               if (safi == SAFI_EVPN)
-                       return "l2vpn-evpn";
-       }
-
-       return "Unknown";
-}
-
 /* Utility function to get address family from current node.  */
 afi_t bgp_node_afi(struct vty *vty)
 {
@@ -678,7 +635,7 @@ int bgp_vty_find_and_parse_afi_safi_bgp(struct vty *vty,
        return *idx;
 }
 
-bool peer_address_self_check(struct bgp *bgp, union sockunion *su)
+static bool peer_address_self_check(struct bgp *bgp, union sockunion *su)
 {
        struct interface *ifp = NULL;
 
@@ -695,6 +652,49 @@ bool peer_address_self_check(struct bgp *bgp, union sockunion *su)
        return false;
 }
 
+/* Utility function for looking up peer from VTY.  */
+/* This is used only for configuration, so disallow if attempted on
+ * a dynamic neighbor.
+ */
+static struct peer *peer_lookup_vty(struct vty *vty, const char *ip_str)
+{
+       struct bgp *bgp = VTY_GET_CONTEXT(bgp);
+       int ret;
+       union sockunion su;
+       struct peer *peer;
+
+       if (!bgp) {
+               return NULL;
+       }
+
+       ret = str2sockunion(ip_str, &su);
+       if (ret < 0) {
+               peer = peer_lookup_by_conf_if(bgp, ip_str);
+               if (!peer) {
+                       if ((peer = peer_lookup_by_hostname(bgp, ip_str))
+                           == NULL) {
+                               vty_out(vty,
+                                       "%% Malformed address or name: %s\n",
+                                       ip_str);
+                               return NULL;
+                       }
+               }
+       } else {
+               peer = peer_lookup(bgp, &su);
+               if (!peer) {
+                       vty_out(vty,
+                               "%% Specify remote-as or peer-group commands first\n");
+                       return NULL;
+               }
+               if (peer_dynamic_neighbor(peer)) {
+                       vty_out(vty,
+                               "%% Operation not allowed on a dynamic neighbor\n");
+                       return NULL;
+               }
+       }
+       return peer;
+}
+
 /* Utility function for looking up peer or peer group.  */
 /* This is used only for configuration, so disallow if attempted on
  * a dynamic neighbor.
@@ -741,95 +741,6 @@ struct peer *peer_and_group_lookup_vty(struct vty *vty, const char *peer_str)
        return NULL;
 }
 
-int bgp_nb_errmsg_return(char *errmsg, size_t errmsg_len, int ret)
-{
-       const char *str = NULL;
-
-       switch (ret) {
-       case BGP_ERR_INVALID_VALUE:
-               str = "Invalid value";
-               break;
-       case BGP_ERR_INVALID_FLAG:
-               str = "Invalid flag";
-               break;
-       case BGP_ERR_PEER_GROUP_SHUTDOWN:
-               str = "Peer-group has been shutdown. Activate the peer-group first";
-               break;
-       case BGP_ERR_PEER_FLAG_CONFLICT:
-               str = "Can't set override-capability and strict-capability-match at the same time";
-               break;
-       case BGP_ERR_PEER_GROUP_NO_REMOTE_AS:
-               str = "Specify remote-as or peer-group remote AS first";
-               break;
-       case BGP_ERR_PEER_GROUP_CANT_CHANGE:
-               str = "Cannot change the peer-group. Deconfigure first";
-               break;
-       case BGP_ERR_PEER_GROUP_MISMATCH:
-               str = "Peer is not a member of this peer-group";
-               break;
-       case BGP_ERR_PEER_FILTER_CONFLICT:
-               str = "Prefix/distribute list can not co-exist";
-               break;
-       case BGP_ERR_NOT_INTERNAL_PEER:
-               str = "Invalid command. Not an internal neighbor";
-               break;
-       case BGP_ERR_REMOVE_PRIVATE_AS:
-               str = "remove-private-AS cannot be configured for IBGP peers";
-               break;
-       case BGP_ERR_LOCAL_AS_ALLOWED_ONLY_FOR_EBGP:
-               str = "Local-AS allowed only for EBGP peers";
-               break;
-       case BGP_ERR_CANNOT_HAVE_LOCAL_AS_SAME_AS:
-               str = "Cannot have local-as same as BGP AS number";
-               break;
-       case BGP_ERR_TCPSIG_FAILED:
-               str = "Error while applying TCP-Sig to session(s)";
-               break;
-       case BGP_ERR_NO_EBGP_MULTIHOP_WITH_TTLHACK:
-               str = "ebgp-multihop and ttl-security cannot be configured together";
-               break;
-       case BGP_ERR_NO_IBGP_WITH_TTLHACK:
-               str = "ttl-security only allowed for EBGP peers";
-               break;
-       case BGP_ERR_AS_OVERRIDE:
-               str = "as-override cannot be configured for IBGP peers";
-               break;
-       case BGP_ERR_INVALID_DYNAMIC_NEIGHBORS_LIMIT:
-               str = "Invalid limit for number of dynamic neighbors";
-               break;
-       case BGP_ERR_DYNAMIC_NEIGHBORS_RANGE_EXISTS:
-               str = "Dynamic neighbor listen range already exists";
-               break;
-       case BGP_ERR_INVALID_FOR_DYNAMIC_PEER:
-               str = "Operation not allowed on a dynamic neighbor";
-               break;
-       case BGP_ERR_INVALID_FOR_DIRECT_PEER:
-               str = "Operation not allowed on a directly connected neighbor";
-               break;
-       case BGP_ERR_PEER_SAFI_CONFLICT:
-               str = "Cannot activate peer for both 'ipv4 unicast' and 'ipv4 labeled-unicast'";
-               break;
-       case BGP_ERR_GR_INVALID_CMD:
-               str = "The Graceful Restart command used is not valid at this moment.";
-               break;
-       case BGP_ERR_GR_OPERATION_FAILED:
-               str = "The Graceful Restart Operation failed due to an err.";
-               break;
-       case BGP_ERR_PEER_GROUP_MEMBER:
-               str = "Peer-group member cannot override remote-as of peer-group";
-               break;
-       case BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT:
-               str = "Peer-group members must be all internal or all external";
-               break;
-       }
-       if (str) {
-               snprintf(errmsg, errmsg_len, "%s", str);
-               return -1;
-       }
-
-       return 0;
-}
-
 int bgp_vty_return(struct vty *vty, int ret)
 {
        const char *str = NULL;
@@ -921,19 +832,18 @@ enum clear_sort {
        clear_as
 };
 
-static void bgp_clear_vty_error(struct peer *peer, afi_t afi, safi_t safi,
-                               int error, char *errmsg, size_t errmsg_len)
+static void bgp_clear_vty_error(struct vty *vty, struct peer *peer, afi_t afi,
+                               safi_t safi, int error)
 {
        switch (error) {
        case BGP_ERR_AF_UNCONFIGURED:
-               snprintf(errmsg, errmsg_len,
-                        "%%BGP: Enable %s address family for the neighbor %s",
-                        get_afi_safi_str(afi, safi, false), peer->host);
+               vty_out(vty,
+                       "%%BGP: Enable %s address family for the neighbor %s\n",
+                       get_afi_safi_str(afi, safi, false), peer->host);
                break;
        case BGP_ERR_SOFT_RECONFIG_UNCONFIGURED:
-               snprintf(
-                       errmsg, errmsg_len,
-                       "%%BGP: Inbound soft reconfig for %s not possible as it\n      has neither refresh capability, nor inbound soft reconfig",
+               vty_out(vty,
+                       "%%BGP: Inbound soft reconfig for %s not possible as it\n      has neither refresh capability, nor inbound soft reconfig\n",
                        peer->host);
                break;
        default:
@@ -1007,9 +917,9 @@ static int bgp_peer_clear(struct peer *peer, afi_t afi, safi_t safi,
 }
 
 /* `clear ip bgp' functions. */
-static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
+static int bgp_clear(struct vty *vty, struct bgp *bgp, afi_t afi, safi_t safi,
                     enum clear_sort sort, enum bgp_clear_type stype,
-                    const char *arg, char *errmsg, size_t errmsg_len)
+                    const char *arg)
 {
        int ret = 0;
        bool found = false;
@@ -1035,8 +945,7 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                                                          stype);
 
                        if (ret < 0)
-                               bgp_clear_vty_error(peer, afi, safi, ret,
-                                                   errmsg, errmsg_len);
+                               bgp_clear_vty_error(vty, peer, afi, safi, ret);
                }
 
                if (gr_router_detected
@@ -1065,9 +974,8 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                        if (!peer) {
                                peer = peer_lookup_by_hostname(bgp, arg);
                                if (!peer) {
-                                       snprintf(
-                                               errmsg, errmsg_len,
-                                               "Malformed address or name: %s",
+                                       vty_out(vty,
+                                               "Malformed address or name: %s\n",
                                                arg);
                                        return CMD_WARNING;
                                }
@@ -1075,9 +983,9 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                } else {
                        peer = peer_lookup(bgp, &su);
                        if (!peer) {
-                               snprintf(errmsg, errmsg_len,
-                                        "%%BGP: Unknown neighbor - \"%s\"",
-                                        arg);
+                               vty_out(vty,
+                                       "%%BGP: Unknown neighbor - \"%s\"\n",
+                                       arg);
                                return CMD_WARNING;
                        }
                }
@@ -1092,8 +1000,7 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                        ret = BGP_ERR_AF_UNCONFIGURED;
 
                if (ret < 0)
-                       bgp_clear_vty_error(peer, afi, safi, ret, errmsg,
-                                           errmsg_len);
+                       bgp_clear_vty_error(vty, peer, afi, safi, ret);
 
                return CMD_SUCCESS;
        }
@@ -1104,8 +1011,7 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
 
                group = peer_group_lookup(bgp, arg);
                if (!group) {
-                       snprintf(errmsg, errmsg_len,
-                                "%%BGP: No such peer-group %s", arg);
+                       vty_out(vty, "%%BGP: No such peer-group %s\n", arg);
                        return CMD_WARNING;
                }
 
@@ -1113,16 +1019,14 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                        ret = bgp_peer_clear(peer, afi, safi, &nnode, stype);
 
                        if (ret < 0)
-                               bgp_clear_vty_error(peer, afi, safi, ret,
-                                                   errmsg, errmsg_len);
+                               bgp_clear_vty_error(vty, peer, afi, safi, ret);
                        else
                                found = true;
                }
 
                if (!found)
-                       snprintf(
-                               errmsg, errmsg_len,
-                               "%%BGP: No %s peer belonging to peer-group %s is configured",
+                       vty_out(vty,
+                               "%%BGP: No %s peer belonging to peer-group %s is configured\n",
                                get_afi_safi_str(afi, safi, false), arg);
 
                return CMD_SUCCESS;
@@ -1142,8 +1046,7 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                        ret = bgp_peer_clear(peer, afi, safi, &nnode, stype);
 
                        if (ret < 0)
-                               bgp_clear_vty_error(peer, afi, safi, ret,
-                                                   errmsg, errmsg_len);
+                               bgp_clear_vty_error(vty, peer, afi, safi, ret);
                        else
                                found = true;
                }
@@ -1157,9 +1060,9 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                }
 
                if (!found)
-                       snprintf(errmsg, errmsg_len,
-                                "%%BGP: No external %s peer is configured",
-                                get_afi_safi_str(afi, safi, false));
+                       vty_out(vty,
+                               "%%BGP: No external %s peer is configured\n",
+                               get_afi_safi_str(afi, safi, false));
 
                return CMD_SUCCESS;
        }
@@ -1180,8 +1083,7 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                        ret = bgp_peer_clear(peer, afi, safi, &nnode, stype);
 
                        if (ret < 0)
-                               bgp_clear_vty_error(peer, afi, safi, ret,
-                                                   errmsg, errmsg_len);
+                               bgp_clear_vty_error(vty, peer, afi, safi, ret);
                        else
                                found = true;
                }
@@ -1195,9 +1097,9 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
                }
 
                if (!found)
-                       snprintf(errmsg, errmsg_len,
-                                "%%BGP: No %s peer is configured with AS %s",
-                                get_afi_safi_str(afi, safi, false), arg);
+                       vty_out(vty,
+                               "%%BGP: No %s peer is configured with AS %s\n",
+                               get_afi_safi_str(afi, safi, false), arg);
 
                return CMD_SUCCESS;
        }
@@ -1205,9 +1107,9 @@ static int bgp_clear(struct bgp *bgp, afi_t afi, safi_t safi,
        return CMD_SUCCESS;
 }
 
-static int bgp_clear_vty(const char *name, afi_t afi, safi_t safi,
-                        enum clear_sort sort, enum bgp_clear_type stype,
-                        const char *arg, char *errmsg, size_t errmsg_len)
+static int bgp_clear_vty(struct vty *vty, const char *name, afi_t afi,
+                        safi_t safi, enum clear_sort sort,
+                        enum bgp_clear_type stype, const char *arg)
 {
        struct bgp *bgp;
 
@@ -1215,56 +1117,40 @@ static int bgp_clear_vty(const char *name, afi_t afi, safi_t safi,
        if (name) {
                bgp = bgp_lookup_by_name(name);
                if (bgp == NULL) {
-                       snprintf(errmsg, errmsg_len,
-                                "Can't find BGP instance %s", name);
+                       vty_out(vty, "Can't find BGP instance %s\n", name);
                        return CMD_WARNING;
                }
        } else {
                bgp = bgp_get_default();
                if (bgp == NULL) {
-                       snprintf(errmsg, errmsg_len,
-                                "No BGP process is configured");
+                       vty_out(vty, "No BGP process is configured\n");
                        return CMD_WARNING;
                }
        }
 
-       return bgp_clear(bgp, afi, safi, sort, stype, arg, errmsg, errmsg_len);
+       return bgp_clear(vty, bgp, afi, safi, sort, stype, arg);
 }
 
 /* clear soft inbound */
-int bgp_clear_star_soft_in(const char *name, char *errmsg, size_t errmsg_len)
+static void bgp_clear_star_soft_in(struct vty *vty, const char *name)
 {
        afi_t afi;
        safi_t safi;
-       int ret;
 
-       FOREACH_AFI_SAFI (afi, safi) {
-               ret = bgp_clear_vty(name, afi, safi, clear_all,
-                                   BGP_CLEAR_SOFT_IN, NULL, errmsg,
-                                   errmsg_len);
-               if (ret != CMD_SUCCESS)
-                       return -1;
-       }
-
-       return 0;
+       FOREACH_AFI_SAFI (afi, safi)
+               bgp_clear_vty(vty, name, afi, safi, clear_all,
+                             BGP_CLEAR_SOFT_IN, NULL);
 }
 
 /* clear soft outbound */
-int bgp_clear_star_soft_out(const char *name, char *errmsg, size_t errmsg_len)
+static void bgp_clear_star_soft_out(struct vty *vty, const char *name)
 {
        afi_t afi;
        safi_t safi;
-       int ret;
-
-       FOREACH_AFI_SAFI (afi, safi) {
-               ret = bgp_clear_vty(name, afi, safi, clear_all,
-                                   BGP_CLEAR_SOFT_OUT, NULL, errmsg,
-                                   errmsg_len);
-               if (ret != CMD_SUCCESS)
-                       return -1;
-       }
 
-       return 0;
+       FOREACH_AFI_SAFI (afi, safi)
+               bgp_clear_vty(vty, name, afi, safi, clear_all,
+                             BGP_CLEAR_SOFT_OUT, NULL);
 }
 
 
@@ -1373,31 +1259,30 @@ DEFUN (no_auto_summary,
 }
 
 /* "router bgp" commands. */
-DEFUN_YANG_NOSH(router_bgp,
-               router_bgp_cmd,
-               "router bgp [(1-4294967295)$instasn [<view|vrf> VIEWVRFNAME]]",
-               ROUTER_STR BGP_STR AS_STR BGP_INSTANCE_HELP_STR)
+DEFUN_NOSH (router_bgp,
+       router_bgp_cmd,
+       "router bgp [(1-4294967295)$instasn [<view|vrf> VIEWVRFNAME]]",
+       ROUTER_STR
+       BGP_STR
+       AS_STR
+       BGP_INSTANCE_HELP_STR)
 {
        int idx_asn = 2;
        int idx_view_vrf = 3;
        int idx_vrf = 4;
-       int ret = CMD_SUCCESS;
+       int is_new_bgp = 0;
+       int ret;
        as_t as;
        struct bgp *bgp;
        const char *name = NULL;
        enum bgp_instance_type inst_type;
-       char base_xpath[XPATH_MAXLEN];
-       const struct lyd_node *bgp_glb_dnode;
 
        // "router bgp" without an ASN
        if (argc == 2) {
                // Pending: Make VRF option available for ASN less config
-               snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_GLOBAL_XPATH,
-                        "frr-bgp:bgp", "bgp", VRF_DEFAULT_NAME);
+               bgp = bgp_get_default();
 
-               bgp_glb_dnode = yang_dnode_get(vty->candidate_config->dnode,
-                                              base_xpath);
-               if (!bgp_glb_dnode) {
+               if (bgp == NULL) {
                        vty_out(vty, "%% No BGP process is configured\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
@@ -1406,26 +1291,12 @@ DEFUN_YANG_NOSH(router_bgp,
                        vty_out(vty, "%% Please specify ASN and VRF\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
-
-               as = yang_dnode_get_uint32(bgp_glb_dnode, "./global/local-as");
-
-               VTY_PUSH_XPATH(BGP_NODE, base_xpath);
-
-               /*
-                * For backward compatibility with old commands we still
-                * need to use the qobj infrastructure.
-                */
-               bgp = bgp_lookup(as, NULL);
-               if (bgp)
-                       VTY_PUSH_CONTEXT(BGP_NODE, bgp);
-
-               return CMD_SUCCESS;
        }
 
        // "router bgp X"
        else {
-
                as = strtoul(argv[idx_asn]->arg, NULL, 10);
+
                inst_type = BGP_INSTANCE_TYPE_DEFAULT;
                if (argc > 3) {
                        name = argv[idx_vrf]->arg;
@@ -1435,63 +1306,70 @@ DEFUN_YANG_NOSH(router_bgp,
                                        name = NULL;
                                else
                                        inst_type = BGP_INSTANCE_TYPE_VRF;
-                       } else if (!strcmp(argv[idx_view_vrf]->text, "view")) {
+                       } else if (!strcmp(argv[idx_view_vrf]->text, "view"))
                                inst_type = BGP_INSTANCE_TYPE_VIEW;
-                       }
-               }
-               snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_GLOBAL_XPATH,
-                        "frr-bgp:bgp", "bgp", name ? name : VRF_DEFAULT_NAME);
-
-               nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-               nb_cli_enqueue_change(vty, "./global/local-as", NB_OP_MODIFY,
-                                     argv[idx_asn]->arg);
-               if (inst_type == BGP_INSTANCE_TYPE_VIEW) {
-                       nb_cli_enqueue_change(vty,
-                                             "./global/instance-type-view",
-                                             NB_OP_MODIFY, "true");
-               } else {
-                       nb_cli_enqueue_change(vty,
-                                             "./global/instance-type-view",
-                                             NB_OP_MODIFY, "false");
                }
 
-               ret = nb_cli_apply_changes_clear_pending(vty, base_xpath);
-               if (ret == CMD_SUCCESS) {
-                       VTY_PUSH_XPATH(BGP_NODE, base_xpath);
+               if (inst_type == BGP_INSTANCE_TYPE_DEFAULT)
+                       is_new_bgp = (bgp_lookup(as, name) == NULL);
 
-                       /*
-                        * For backward compatibility with old commands we still
-                        * need to use the qobj infrastructure.
-                        */
-                       bgp = bgp_lookup(as, name);
-                       if (bgp)
-                               VTY_PUSH_CONTEXT(BGP_NODE, bgp);
+               ret = bgp_get_vty(&bgp, &as, name, inst_type);
+               switch (ret) {
+               case BGP_ERR_AS_MISMATCH:
+                       vty_out(vty, "BGP is already running; AS is %u\n", as);
+                       return CMD_WARNING_CONFIG_FAILED;
+               case BGP_ERR_INSTANCE_MISMATCH:
+                       vty_out(vty,
+                               "BGP instance name and AS number mismatch\n");
+                       vty_out(vty,
+                               "BGP instance is already running; AS is %u\n",
+                               as);
+                       return CMD_WARNING_CONFIG_FAILED;
                }
+
+               /*
+                * If we just instantiated the default instance, complete
+                * any pending VRF-VPN leaking that was configured via
+                * earlier "router bgp X vrf FOO" blocks.
+                */
+               if (is_new_bgp && inst_type == BGP_INSTANCE_TYPE_DEFAULT)
+                       vpn_leak_postchange_all();
+
+               if (inst_type == BGP_INSTANCE_TYPE_VRF)
+                       bgp_vpn_leak_export(bgp);
+               /* Pending: handle when user tries to change a view to vrf n vv.
+                */
        }
 
-       return ret;
+       /* unset the auto created flag as the user config is now present */
+       UNSET_FLAG(bgp->vrf_flags, BGP_VRF_AUTO);
+       VTY_PUSH_CONTEXT(BGP_NODE, bgp);
+
+       return CMD_SUCCESS;
 }
 
 /* "no router bgp" commands. */
-DEFUN_YANG(no_router_bgp,
-          no_router_bgp_cmd,
-          "no router bgp [(1-4294967295)$instasn [<view|vrf> VIEWVRFNAME]]",
-          NO_STR ROUTER_STR BGP_STR AS_STR BGP_INSTANCE_HELP_STR)
+DEFUN (no_router_bgp,
+       no_router_bgp_cmd,
+       "no router bgp [(1-4294967295)$instasn [<view|vrf> VIEWVRFNAME]]",
+       NO_STR
+       ROUTER_STR
+       BGP_STR
+       AS_STR
+       BGP_INSTANCE_HELP_STR)
 {
+       int idx_asn = 3;
        int idx_vrf = 5;
+       as_t as;
+       struct bgp *bgp;
        const char *name = NULL;
-       char base_xpath[XPATH_MAXLEN];
-       const struct lyd_node *bgp_glb_dnode;
 
        // "no router bgp" without an ASN
        if (argc == 3) {
                // Pending: Make VRF option available for ASN less config
-               snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_GLOBAL_XPATH,
-                        "frr-bgp:bgp", "bgp", VRF_DEFAULT_NAME);
+               bgp = bgp_get_default();
 
-               bgp_glb_dnode = yang_dnode_get(vty->candidate_config->dnode,
-                                              base_xpath);
-               if (!bgp_glb_dnode) {
+               if (bgp == NULL) {
                        vty_out(vty, "%% No BGP process is configured\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
@@ -1500,72 +1378,114 @@ DEFUN_YANG(no_router_bgp,
                        vty_out(vty, "%% Please specify ASN and VRF\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
+
+               if (bgp->l3vni) {
+                       vty_out(vty, "%% Please unconfigure l3vni %u",
+                               bgp->l3vni);
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
        } else {
+               as = strtoul(argv[idx_asn]->arg, NULL, 10);
+
                if (argc > 4)
                        name = argv[idx_vrf]->arg;
-               else
-                       name = VRF_DEFAULT_NAME;
 
-               snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_GLOBAL_XPATH,
-                        "frr-bgp:bgp", "bgp", name);
-       }
+               /* Lookup bgp structure. */
+               bgp = bgp_lookup(as, name);
+               if (!bgp) {
+                       vty_out(vty, "%% Can't find BGP instance\n");
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
 
-       nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
+               if (bgp->l3vni) {
+                       vty_out(vty, "%% Please unconfigure l3vni %u\n",
+                               bgp->l3vni);
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
 
-       /* We want to finish any classic config after a no router */
-       return nb_cli_apply_changes_clear_pending(vty, base_xpath);
-}
+               /* Cannot delete default instance if vrf instances exist */
+               if (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
+                       struct listnode *node;
+                       struct bgp *tmp_bgp;
 
-void cli_show_router_bgp(struct vty *vty, struct lyd_node *dnode,
-                        bool show_defaults)
-{
-       const struct lyd_node *vrf_dnode;
-       const char *vrf_name;
-       as_t as;
+                       for (ALL_LIST_ELEMENTS_RO(bm->bgp, node, tmp_bgp)) {
+                               if (tmp_bgp->inst_type != BGP_INSTANCE_TYPE_VRF)
+                                       continue;
+                               if (CHECK_FLAG(tmp_bgp->af_flags[AFI_IP][SAFI_UNICAST],
+                                              BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT) ||
+                                   CHECK_FLAG(tmp_bgp->af_flags[AFI_IP6][SAFI_UNICAST],
+                                              BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT) ||
+                                   CHECK_FLAG(tmp_bgp->af_flags[AFI_IP][SAFI_UNICAST],
+                                              BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT) ||
+                                   CHECK_FLAG(tmp_bgp->af_flags[AFI_IP6][SAFI_UNICAST],
+                                              BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT) ||
+                                   CHECK_FLAG(tmp_bgp->af_flags[AFI_IP][SAFI_UNICAST],
+                                              BGP_CONFIG_VRF_TO_VRF_EXPORT) ||
+                                   CHECK_FLAG(tmp_bgp->af_flags[AFI_IP6][SAFI_UNICAST],
+                                              BGP_CONFIG_VRF_TO_VRF_EXPORT) ||
+                                   (bgp == bgp_get_evpn() &&
+                                   (CHECK_FLAG(tmp_bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                               BGP_L2VPN_EVPN_ADV_IPV4_UNICAST) ||
+                                    CHECK_FLAG(tmp_bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                               BGP_L2VPN_EVPN_ADV_IPV4_UNICAST_GW_IP) ||
+                                    CHECK_FLAG(tmp_bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                               BGP_L2VPN_EVPN_ADV_IPV6_UNICAST) ||
+                                    CHECK_FLAG(tmp_bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
+                                               BGP_L2VPN_EVPN_ADV_IPV6_UNICAST_GW_IP))) ||
+                                   (tmp_bgp->vnihash && hashcount(tmp_bgp->vnihash))) {
+                                       vty_out(vty,
+                                               "%% Cannot delete default BGP instance. Dependent VRF instances exist\n");
+                                       return CMD_WARNING_CONFIG_FAILED;
+                               }
+                       }
+               }
+       }
 
-       vrf_dnode = yang_dnode_get_parent(dnode, "control-plane-protocol");
-       vrf_name = yang_dnode_get_string(vrf_dnode, "./vrf");
-       as = yang_dnode_get_uint32(dnode, "./global/local-as");
+       bgp_delete(bgp);
 
-       vty_out(vty, "!\n");
-       vty_out(vty, "router bgp %u", as);
-       if (!strmatch(vrf_name, VRF_DEFAULT_NAME))
-               vty_out(vty, " vrf %s", vrf_name);
-       vty_out(vty, "\n");
+       return CMD_SUCCESS;
 }
 
+
 /* BGP router-id.  */
 
-DEFPY_YANG(bgp_router_id, bgp_router_id_cmd, "bgp router-id A.B.C.D",
-          BGP_STR
-          "Override configured router identifier\n"
-          "Manually configured router identifier\n")
+DEFPY (bgp_router_id,
+       bgp_router_id_cmd,
+       "bgp router-id A.B.C.D",
+       BGP_STR
+       "Override configured router identifier\n"
+       "Manually configured router identifier\n")
 {
-       nb_cli_enqueue_change(vty, "./global/router-id", NB_OP_MODIFY,
-                             router_id_str);
-
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp_router_id_static_set(bgp, router_id);
+       return CMD_SUCCESS;
 }
 
-DEFPY_YANG(no_bgp_router_id, no_bgp_router_id_cmd, "no bgp router-id [A.B.C.D]",
-          NO_STR BGP_STR
-          "Override configured router identifier\n"
-          "Manually configured router identifier\n")
+DEFPY (no_bgp_router_id,
+       no_bgp_router_id_cmd,
+       "no bgp router-id [A.B.C.D]",
+       NO_STR
+       BGP_STR
+       "Override configured router identifier\n"
+       "Manually configured router identifier\n")
 {
-       nb_cli_enqueue_change(vty, "./global/router-id", NB_OP_DESTROY,
-                             router_id_str ? router_id_str : NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
-}
+       if (router_id_str) {
+               if (!IPV4_ADDR_SAME(&bgp->router_id_static, &router_id)) {
+                       vty_out(vty, "%% BGP router-id doesn't match\n");
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
+       }
 
-void cli_show_router_bgp_router_id(struct vty *vty, struct lyd_node *dnode,
-                                  bool show_defaults)
-{
-       vty_out(vty, " bgp router-id %s\n", yang_dnode_get_string(dnode, NULL));
+       router_id.s_addr = 0;
+       bgp_router_id_static_set(bgp, router_id);
+
+       return CMD_SUCCESS;
 }
 
 DEFPY(bgp_community_alias, bgp_community_alias_cmd,
-      "[no$no] bgp community alias WORD$community WORD$alias",
+      "[no$no] bgp community alias WORD$community ALIAS_NAME$alias_name",
       NO_STR BGP_STR
       "Add community specific parameters\n"
       "Create an alias for a community\n"
@@ -1585,7 +1505,7 @@ DEFPY(bgp_community_alias, bgp_community_alias_cmd,
        memset(&ca1, 0, sizeof(ca1));
        memset(&ca2, 0, sizeof(ca2));
        strlcpy(ca1.community, community, sizeof(ca1.community));
-       strlcpy(ca1.alias, alias, sizeof(ca1.alias));
+       strlcpy(ca1.alias, alias_name, sizeof(ca1.alias));
 
        lookup_community = bgp_ca_community_lookup(&ca1);
        lookup_alias = bgp_ca_alias_lookup(&ca1);
@@ -1647,36 +1567,45 @@ DEFPY (bgp_suppress_fib_pending,
 
 
 /* BGP Cluster ID.  */
-DEFUN_YANG(bgp_cluster_id,
-          bgp_cluster_id_cmd,
-          "bgp cluster-id <A.B.C.D|(1-4294967295)>",
-          BGP_STR
-          "Configure Route-Reflector Cluster-id\n"
-          "Route-Reflector Cluster-id in IP address format\n"
-          "Route-Reflector Cluster-id as 32 bit quantity\n")
+DEFUN (bgp_cluster_id,
+       bgp_cluster_id_cmd,
+       "bgp cluster-id <A.B.C.D|(1-4294967295)>",
+       BGP_STR
+       "Configure Route-Reflector Cluster-id\n"
+       "Route-Reflector Cluster-id in IP address format\n"
+       "Route-Reflector Cluster-id as 32 bit quantity\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_ipv4 = 2;
+       int ret;
+       struct in_addr cluster;
 
-       nb_cli_enqueue_change(
-               vty, "./global/route-reflector/route-reflector-cluster-id",
-               NB_OP_MODIFY, argv[idx_ipv4]->arg);
-
-       return nb_cli_apply_changes(vty, NULL);
-}
+       ret = inet_aton(argv[idx_ipv4]->arg, &cluster);
+       if (!ret) {
+               vty_out(vty, "%% Malformed bgp cluster identifier\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       bgp_cluster_id_set(bgp, &cluster);
+       bgp_clear_star_soft_out(vty, bgp->name);
 
-DEFUN_YANG(no_bgp_cluster_id,
-          no_bgp_cluster_id_cmd,
-          "no bgp cluster-id [<A.B.C.D|(1-4294967295)>]",
-          NO_STR BGP_STR
-          "Configure Route-Reflector Cluster-id\n"
-          "Route-Reflector Cluster-id in IP address format\n"
-          "Route-Reflector Cluster-id as 32 bit quantity\n")
+       return CMD_SUCCESS;
+}
+
+DEFUN (no_bgp_cluster_id,
+       no_bgp_cluster_id_cmd,
+       "no bgp cluster-id [<A.B.C.D|(1-4294967295)>]",
+       NO_STR
+       BGP_STR
+       "Configure Route-Reflector Cluster-id\n"
+       "Route-Reflector Cluster-id in IP address format\n"
+       "Route-Reflector Cluster-id as 32 bit quantity\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/route-reflector/route-reflector-cluster-id",
-               NB_OP_DESTROY, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp_cluster_id_unset(bgp);
+       bgp_clear_star_soft_out(vty, bgp->name);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
 DEFPY (bgp_norib,
@@ -1730,86 +1659,87 @@ DEFPY (no_bgp_send_extra_data,
        return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_confederation_identifier,
-          bgp_confederation_identifier_cmd,
-          "bgp confederation identifier (1-4294967295)",
-          "BGP specific commands\n"
-          "AS confederation parameters\n"
-          "AS number\n"
-          "Set routing domain confederation AS\n")
+DEFUN (bgp_confederation_identifier,
+       bgp_confederation_identifier_cmd,
+       "bgp confederation identifier (1-4294967295)",
+       BGP_STR
+       "AS confederation parameters\n"
+       "AS number\n"
+       "Set routing domain confederation AS\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_number = 3;
+       as_t as;
 
-       nb_cli_enqueue_change(vty, "./global/confederation/identifier",
-                             NB_OP_MODIFY, argv[idx_number]->arg);
-
-       return nb_cli_apply_changes(vty, NULL);
-}
+       as = strtoul(argv[idx_number]->arg, NULL, 10);
 
-DEFUN_YANG(no_bgp_confederation_identifier,
-          no_bgp_confederation_identifier_cmd,
-          "no bgp confederation identifier [(1-4294967295)]",
-          NO_STR
-          "BGP specific commands\n"
-          "AS confederation parameters\n"
-          "AS number\n"
-          "Set routing domain confederation AS\n")
-{
-       nb_cli_enqueue_change(vty, "./global/confederation/identifier",
-                             NB_OP_DESTROY, NULL);
+       bgp_confederation_id_set(bgp, as);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_confederation_identifier(struct vty *vty,
-                                                 struct lyd_node *dnode,
-                                                 bool show_defaults)
+DEFUN (no_bgp_confederation_identifier,
+       no_bgp_confederation_identifier_cmd,
+       "no bgp confederation identifier [(1-4294967295)]",
+       NO_STR
+       BGP_STR
+       "AS confederation parameters\n"
+       "AS number\n"
+       "Set routing domain confederation AS\n")
 {
-       vty_out(vty, " bgp confederation identifier %u\n",
-               yang_dnode_get_uint32(dnode, NULL));
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp_confederation_id_unset(bgp);
+
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_confederation_peers,
-          bgp_confederation_peers_cmd,
-          "bgp confederation peers (1-4294967295)...",
-          "BGP specific commands\n"
-          "AS confederation parameters\n"
-          "Peer ASs in BGP confederation\n" AS_STR)
+DEFUN (bgp_confederation_peers,
+       bgp_confederation_peers_cmd,
+       "bgp confederation peers (1-4294967295)...",
+       BGP_STR
+       "AS confederation parameters\n"
+       "Peer ASs in BGP confederation\n"
+       AS_STR)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_asn = 3;
+       as_t as;
        int i;
 
-       for (i = idx_asn; i < argc; i++)
-               nb_cli_enqueue_change(vty, "./global/confederation/member-as",
-                                     NB_OP_CREATE, argv[i]->arg);
+       for (i = idx_asn; i < argc; i++) {
+               as = strtoul(argv[i]->arg, NULL, 10);
+
+               if (bgp->as == as) {
+                       vty_out(vty,
+                               "%% Local member-AS not allowed in confed peer list\n");
+                       continue;
+               }
 
-       return nb_cli_apply_changes(vty, NULL);
+               bgp_confederation_peers_add(bgp, as);
+       }
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_confederation_peers,
-          no_bgp_confederation_peers_cmd,
-          "no bgp confederation peers (1-4294967295)...",
-          NO_STR
-          "BGP specific commands\n"
-          "AS confederation parameters\n"
-          "Peer ASs in BGP confederation\n" AS_STR)
+DEFUN (no_bgp_confederation_peers,
+       no_bgp_confederation_peers_cmd,
+       "no bgp confederation peers (1-4294967295)...",
+       NO_STR
+       BGP_STR
+       "AS confederation parameters\n"
+       "Peer ASs in BGP confederation\n"
+       AS_STR)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_asn = 4;
+       as_t as;
        int i;
 
-       for (i = idx_asn; i < argc; i++)
-               nb_cli_enqueue_change(vty, "./global/confederation/member-as",
-                                     NB_OP_DESTROY, argv[i]->arg);
+       for (i = idx_asn; i < argc; i++) {
+               as = strtoul(argv[i]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-void cli_show_router_bgp_confederation_member_as(struct vty *vty,
-                                                struct lyd_node *dnode,
-                                                bool show_defaults)
-{
-       vty_out(vty, " bgp confederation peers %u \n",
-               yang_dnode_get_uint32(dnode, NULL));
+               bgp_confederation_peers_remove(bgp, as);
+       }
+       return CMD_SUCCESS;
 }
 
 /**
@@ -1817,16 +1747,23 @@ void cli_show_router_bgp_confederation_member_as(struct vty *vty,
  * @peer_type: BGP_PEER_EBGP or BGP_PEER_IBGP
  * @set: 1 for setting values, 0 for removing the max-paths config.
  */
-int bgp_maxpaths_config_vty(struct bgp *bgp, afi_t afi, safi_t safi,
-                           int peer_type, uint16_t maxpaths, uint16_t options,
-                           int set, char *errmsg, size_t errmsg_len)
+static int bgp_maxpaths_config_vty(struct vty *vty, int peer_type,
+                                  const char *mpaths, uint16_t options,
+                                  int set)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       uint16_t maxpaths = 0;
        int ret;
+       afi_t afi;
+       safi_t safi;
+
+       afi = bgp_node_afi(vty);
+       safi = bgp_node_safi(vty);
 
        if (set) {
+               maxpaths = strtol(mpaths, NULL, 10);
                if (maxpaths > multipath_num) {
-                       snprintf(
-                               errmsg, errmsg_len,
+                       vty_out(vty,
                                "%% Maxpaths Specified: %d is > than multipath num specified on bgp command line %d",
                                maxpaths, multipath_num);
                        return CMD_WARNING_CONFIG_FAILED;
@@ -1837,8 +1774,7 @@ int bgp_maxpaths_config_vty(struct bgp *bgp, afi_t afi, safi_t safi,
                ret = bgp_maximum_paths_unset(bgp, afi, safi, peer_type);
 
        if (ret < 0) {
-               snprintf(
-                       errmsg, errmsg_len,
+               vty_out(vty,
                        "%% Failed to %sset maximum-paths %s %u for afi %u, safi %u\n",
                        (set == 1) ? "" : "un",
                        (peer_type == BGP_PEER_EBGP) ? "ebgp" : "ibgp",
@@ -1851,129 +1787,107 @@ int bgp_maxpaths_config_vty(struct bgp *bgp, afi_t afi, safi_t safi,
        return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_med_config(struct vty *vty, struct lyd_node *dnode,
-                                   bool show_defaults)
+DEFUN (bgp_maxmed_admin,
+       bgp_maxmed_admin_cmd,
+       "bgp max-med administrative ",
+       BGP_STR
+       "Advertise routes with max-med\n"
+       "Administratively applied, for an indefinite period\n")
 {
-       if (yang_dnode_get_bool(dnode, "./enable-med-admin")) {
-               uint32_t med_admin_val;
-
-               vty_out(vty, " bgp max-med administrative");
-               med_admin_val = yang_dnode_get_uint32(dnode, "./max-med-admin");
-               if (med_admin_val != BGP_MAXMED_VALUE_DEFAULT)
-                       vty_out(vty, " %u", med_admin_val);
-               vty_out(vty, "\n");
-       }
-
-       if (yang_dnode_exists(dnode, "./max-med-onstart-up-time")) {
-               uint32_t onstartup_val;
-
-               vty_out(vty, " bgp max-med on-startup %u",
-                       yang_dnode_get_uint32(dnode,
-                                             "./max-med-onstart-up-time"));
-               onstartup_val = yang_dnode_get_uint32(
-                       dnode, "./max-med-onstart-up-value");
-               if (onstartup_val != BGP_MAXMED_VALUE_DEFAULT)
-                       vty_out(vty, " %u", onstartup_val);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
-               vty_out(vty, "\n");
-       }
-}
+       bgp->v_maxmed_admin = 1;
+       bgp->maxmed_admin_value = BGP_MAXMED_VALUE_DEFAULT;
 
-DEFUN_YANG(bgp_maxmed_admin,
-          bgp_maxmed_admin_cmd,
-          "bgp max-med administrative ",
-          BGP_STR
-          "Advertise routes with max-med\n"
-          "Administratively applied, for an indefinite period\n")
-{
-       nb_cli_enqueue_change(vty, "./global/med-config/enable-med-admin",
-                             NB_OP_MODIFY, "true");
+       bgp_maxmed_update(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_maxmed_admin_medv,
-          bgp_maxmed_admin_medv_cmd,
-          "bgp max-med administrative (0-4294967295)",
-          BGP_STR
-          "Advertise routes with max-med\n"
-          "Administratively applied, for an indefinite period\n"
-          "Max MED value to be used\n")
+DEFUN (bgp_maxmed_admin_medv,
+       bgp_maxmed_admin_medv_cmd,
+       "bgp max-med administrative (0-4294967295)",
+       BGP_STR
+       "Advertise routes with max-med\n"
+       "Administratively applied, for an indefinite period\n"
+       "Max MED value to be used\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_number = 3;
 
-       nb_cli_enqueue_change(vty, "./global/med-config/enable-med-admin",
-                             NB_OP_MODIFY, "true");
+       bgp->v_maxmed_admin = 1;
+       bgp->maxmed_admin_value = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       nb_cli_enqueue_change(vty, "./global/med-config/max-med-admin",
-                             NB_OP_MODIFY, argv[idx_number]->arg);
+       bgp_maxmed_update(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_maxmed_admin,
-          no_bgp_maxmed_admin_cmd,
-          "no bgp max-med administrative [(0-4294967295)]",
-          NO_STR BGP_STR
-          "Advertise routes with max-med\n"
-          "Administratively applied, for an indefinite period\n"
-          "Max MED value to be used\n")
+DEFUN (no_bgp_maxmed_admin,
+       no_bgp_maxmed_admin_cmd,
+       "no bgp max-med administrative [(0-4294967295)]",
+       NO_STR
+       BGP_STR
+       "Advertise routes with max-med\n"
+       "Administratively applied, for an indefinite period\n"
+       "Max MED value to be used\n")
 {
-       nb_cli_enqueue_change(vty, "./global/med-config/enable-med-admin",
-                             NB_OP_MODIFY, "false");
-
-       nb_cli_enqueue_change(vty, "./global/med-config/max-med-admin",
-                             NB_OP_MODIFY, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp->v_maxmed_admin = BGP_MAXMED_ADMIN_UNCONFIGURED;
+       bgp->maxmed_admin_value = BGP_MAXMED_VALUE_DEFAULT;
+       bgp_maxmed_update(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (bgp_maxmed_onstartup,
-           bgp_maxmed_onstartup_cmd,
-           "bgp max-med on-startup (5-86400) [(0-4294967295)]",
-           BGP_STR
-           "Advertise routes with max-med\n"
-           "Effective on a startup\n"
-           "Time (seconds) period for max-med\n"
-           "Max MED value to be used\n")
+DEFUN (bgp_maxmed_onstartup,
+       bgp_maxmed_onstartup_cmd,
+       "bgp max-med on-startup (5-86400) [(0-4294967295)]",
+       BGP_STR
+       "Advertise routes with max-med\n"
+       "Effective on a startup\n"
+       "Time (seconds) period for max-med\n"
+       "Max MED value to be used\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx = 0;
 
        argv_find(argv, argc, "(5-86400)", &idx);
-       nb_cli_enqueue_change(vty,
-                             "./global/med-config/max-med-onstart-up-time",
-                             NB_OP_MODIFY, argv[idx]->arg);
-
+       bgp->v_maxmed_onstartup = strtoul(argv[idx]->arg, NULL, 10);
        if (argv_find(argv, argc, "(0-4294967295)", &idx))
-               nb_cli_enqueue_change(
-                       vty, "./global/med-config/max-med-onstart-up-value",
-                       NB_OP_MODIFY, argv[idx]->arg);
+               bgp->maxmed_onstartup_value = strtoul(argv[idx]->arg, NULL, 10);
        else
-               nb_cli_enqueue_change(
-                       vty, "./global/med-config/max-med-onstart-up-value",
-                       NB_OP_MODIFY, NULL);
+               bgp->maxmed_onstartup_value = BGP_MAXMED_VALUE_DEFAULT;
+
+       bgp_maxmed_update(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_bgp_maxmed_onstartup,
-           no_bgp_maxmed_onstartup_cmd,
-           "no bgp max-med on-startup [(5-86400) [(0-4294967295)]]",
-           NO_STR BGP_STR
-           "Advertise routes with max-med\n"
-           "Effective on a startup\n"
-           "Time (seconds) period for max-med\n"
-           "Max MED value to be used\n")
+DEFUN (no_bgp_maxmed_onstartup,
+       no_bgp_maxmed_onstartup_cmd,
+       "no bgp max-med on-startup [(5-86400) [(0-4294967295)]]",
+       NO_STR
+       BGP_STR
+       "Advertise routes with max-med\n"
+       "Effective on a startup\n"
+       "Time (seconds) period for max-med\n"
+       "Max MED value to be used\n")
 {
-       nb_cli_enqueue_change(vty,
-                             "./global/med-config/max-med-onstart-up-time",
-                             NB_OP_DESTROY, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+
+       /* Cancel max-med onstartup if its on */
+       if (bgp->t_maxmed_onstartup) {
+               thread_cancel(&bgp->t_maxmed_onstartup);
+               bgp->maxmed_onstartup_over = 1;
+       }
 
-       nb_cli_enqueue_change(vty,
-                             "./global/med-config/max-med-onstart-up-value",
-                             NB_OP_MODIFY, NULL);
+       bgp->v_maxmed_onstartup = BGP_MAXMED_ONSTARTUP_UNCONFIGURED;
+       bgp->maxmed_onstartup_value = BGP_MAXMED_VALUE_DEFAULT;
 
-       return nb_cli_apply_changes(vty, NULL);
+       bgp_maxmed_update(bgp);
+
+       return CMD_SUCCESS;
 }
 
 static int bgp_global_update_delay_config_vty(struct vty *vty,
@@ -2157,16 +2071,22 @@ DEFPY (no_bgp_update_delay,
 }
 
 
-int bgp_wpkt_quanta_config_vty(struct bgp *bgp, uint32_t quanta, bool set)
+static int bgp_wpkt_quanta_config_vty(struct vty *vty, uint32_t quanta,
+                                     bool set)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+
        quanta = set ? quanta : BGP_WRITE_PACKET_MAX;
        atomic_store_explicit(&bgp->wpkt_quanta, quanta, memory_order_relaxed);
 
        return CMD_SUCCESS;
 }
 
-int bgp_rpkt_quanta_config_vty(struct bgp *bgp, uint32_t quanta, bool set)
+static int bgp_rpkt_quanta_config_vty(struct vty *vty, uint32_t quanta,
+                                     bool set)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+
        quanta = set ? quanta : BGP_READ_PACKET_MAX;
        atomic_store_explicit(&bgp->rpkt_quanta, quanta, memory_order_relaxed);
 
@@ -2197,46 +2117,24 @@ void bgp_config_write_rpkt_quanta(struct vty *vty, struct bgp *bgp)
  * Furthermore, the maximums used here should correspond to
  * BGP_WRITE_PACKET_MAX and BGP_READ_PACKET_MAX.
  */
-DEFPY_YANG (bgp_wpkt_quanta,
-           bgp_wpkt_quanta_cmd,
-           "[no] write-quanta (1-64)$quanta",
-           NO_STR
-           "How many packets to write to peer socket per run\n"
-           "Number of packets\n")
-{
-       if (!no)
-               nb_cli_enqueue_change(
-                       vty,
-                       "./global/global-neighbor-config/packet-quanta-config/wpkt-quanta",
-                       NB_OP_MODIFY, quanta_str);
-       else
-               nb_cli_enqueue_change(
-                       vty,
-                       "./global/global-neighbor-config/packet-quanta-config/wpkt-quanta",
-                       NB_OP_MODIFY, NULL);
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-DEFPY_YANG (bgp_rpkt_quanta,
-           bgp_rpkt_quanta_cmd,
-           "[no] read-quanta (1-10)$quanta",
-           NO_STR
-           "How many packets to read from peer socket per I/O cycle\n"
-           "Number of packets\n")
-{
-       if (!no)
-               nb_cli_enqueue_change(
-                       vty,
-                       "./global/global-neighbor-config/packet-quanta-config/rpkt-quanta",
-                       NB_OP_MODIFY, quanta_str);
-       else
-               nb_cli_enqueue_change(
-                       vty,
-                       "./global/global-neighbor-config/packet-quanta-config/rpkt-quanta",
-                       NB_OP_MODIFY, NULL);
+DEFPY (bgp_wpkt_quanta,
+       bgp_wpkt_quanta_cmd,
+       "[no] write-quanta (1-64)$quanta",
+       NO_STR
+       "How many packets to write to peer socket per run\n"
+       "Number of packets\n")
+{
+       return bgp_wpkt_quanta_config_vty(vty, quanta, !no);
+}
 
-       return nb_cli_apply_changes(vty, NULL);
+DEFPY (bgp_rpkt_quanta,
+       bgp_rpkt_quanta_cmd,
+       "[no] read-quanta (1-10)$quanta",
+       NO_STR
+       "How many packets to read from peer socket per I/O cycle\n"
+       "Number of packets\n")
+{
+       return bgp_rpkt_quanta_config_vty(vty, quanta, !no);
 }
 
 void bgp_config_write_coalesce_time(struct vty *vty, struct bgp *bgp)
@@ -2245,75 +2143,46 @@ void bgp_config_write_coalesce_time(struct vty *vty, struct bgp *bgp)
                vty_out(vty, " coalesce-time %u\n", bgp->coalesce_time);
 }
 
-void cli_show_router_global_update_group_config_coalesce_time(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       vty_out(vty, " coalesce-time %u\n", yang_dnode_get_uint32(dnode, NULL));
-}
-
 
-DEFUN_YANG (bgp_coalesce_time,
-           bgp_coalesce_time_cmd,
-           "coalesce-time (0-4294967295)",
-           "Subgroup coalesce timer\n"
-           "Subgroup coalesce timer value (in ms)\n")
+DEFUN (bgp_coalesce_time,
+       bgp_coalesce_time_cmd,
+       "coalesce-time (0-4294967295)",
+       "Subgroup coalesce timer\n"
+       "Subgroup coalesce timer value (in ms)\n")
 {
-       int idx = 0;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
+       int idx = 0;
        argv_find(argv, argc, "(0-4294967295)", &idx);
-       nb_cli_enqueue_change(
-               vty, "./global/global-update-group-config/coalesce-time",
-               NB_OP_MODIFY, argv[idx]->arg);
-
-       return nb_cli_apply_changes(vty, NULL);
+       bgp->heuristic_coalesce = false;
+       bgp->coalesce_time = strtoul(argv[idx]->arg, NULL, 10);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_coalesce_time,
-          no_bgp_coalesce_time_cmd,
-          "no coalesce-time (0-4294967295)",
-          NO_STR
-          "Subgroup coalesce timer\n"
-          "Subgroup coalesce timer value (in ms)\n")
+DEFUN (no_bgp_coalesce_time,
+       no_bgp_coalesce_time_cmd,
+       "no coalesce-time (0-4294967295)",
+       NO_STR
+       "Subgroup coalesce timer\n"
+       "Subgroup coalesce timer value (in ms)\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/global-update-group-config/coalesce-time",
-               NB_OP_MODIFY, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       bgp->heuristic_coalesce = true;
+       bgp->coalesce_time = BGP_DEFAULT_SUBGROUP_COALESCE_TIME;
+       return CMD_SUCCESS;
 }
 
 /* Maximum-paths configuration */
-DEFUN_YANG (bgp_maxpaths,
-           bgp_maxpaths_cmd,
-           "maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM),
-           "Forward packets over multiple paths\n"
-           "Number of paths\n")
+DEFUN (bgp_maxpaths,
+       bgp_maxpaths_cmd,
+       "maximum-paths " CMD_RANGE_STR(1, MULTIPATH_NUM),
+       "Forward packets over multiple paths\n"
+       "Number of paths\n")
 {
        int idx_number = 1;
-       char base_xpath[XPATH_MAXLEN];
-       afi_t afi;
-       safi_t safi;
-
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ebgp/maximum-paths",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-void cli_show_bgp_global_afi_safi_unicast_use_multiple_paths_ebgp_maximum_paths(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       vty_out(vty, "  maximum-paths %d\n",
-               yang_dnode_get_uint16(dnode, NULL));
+       return bgp_maxpaths_config_vty(vty, BGP_PEER_EBGP,
+                                      argv[idx_number]->arg, 0, 1);
 }
 
 ALIAS_HIDDEN(bgp_maxpaths, bgp_maxpaths_hidden_cmd,
@@ -2321,31 +2190,16 @@ ALIAS_HIDDEN(bgp_maxpaths, bgp_maxpaths_hidden_cmd,
             "Forward packets over multiple paths\n"
             "Number of paths\n")
 
-DEFUN_YANG (bgp_maxpaths_ibgp,
-           bgp_maxpaths_ibgp_cmd,
-           "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM),
-           "Forward packets over multiple paths\n"
-           "iBGP-multipath\n"
-           "Number of paths\n")
+DEFUN (bgp_maxpaths_ibgp,
+       bgp_maxpaths_ibgp_cmd,
+       "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM),
+       "Forward packets over multiple paths\n"
+       "iBGP-multipath\n"
+       "Number of paths\n")
 {
        int idx_number = 2;
-       char base_xpath[XPATH_MAXLEN];
-       afi_t afi;
-       safi_t safi;
-
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ibgp/maximum-paths",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       return nb_cli_apply_changes(vty, NULL);
+       return bgp_maxpaths_config_vty(vty, BGP_PEER_IBGP,
+                                      argv[idx_number]->arg, 0, 1);
 }
 
 ALIAS_HIDDEN(bgp_maxpaths_ibgp, bgp_maxpaths_ibgp_hidden_cmd,
@@ -2354,50 +2208,18 @@ ALIAS_HIDDEN(bgp_maxpaths_ibgp, bgp_maxpaths_ibgp_hidden_cmd,
             "iBGP-multipath\n"
             "Number of paths\n")
 
-DEFUN_YANG (bgp_maxpaths_ibgp_cluster,
-           bgp_maxpaths_ibgp_cluster_cmd,
-           "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM) " equal-cluster-length",
-           "Forward packets over multiple paths\n"
-           "iBGP-multipath\n"
-           "Number of paths\n"
-           "Match the cluster length\n")
+DEFUN (bgp_maxpaths_ibgp_cluster,
+       bgp_maxpaths_ibgp_cluster_cmd,
+       "maximum-paths ibgp " CMD_RANGE_STR(1, MULTIPATH_NUM) " equal-cluster-length",
+       "Forward packets over multiple paths\n"
+       "iBGP-multipath\n"
+       "Number of paths\n"
+       "Match the cluster length\n")
 {
        int idx_number = 2;
-       char base_xpath[XPATH_MAXLEN];
-       afi_t afi;
-       safi_t safi;
-
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ibgp/maximum-paths",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ibgp/cluster-length-list",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-void cli_show_bgp_global_afi_safi_ip_unicast_use_multiple_paths_ibgp_maximum_paths(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       vty_out(vty, "  maximum-paths ibgp %d",
-               yang_dnode_get_uint16(dnode, "./maximum-paths"));
-       if (yang_dnode_get_bool(dnode, "./cluster-length-list"))
-               vty_out(vty, " equal-cluster-length");
-       vty_out(vty, "\n");
+       return bgp_maxpaths_config_vty(
+               vty, BGP_PEER_IBGP, argv[idx_number]->arg,
+               BGP_FLAG_IBGP_MULTIPATH_SAME_CLUSTERLEN, 1);
 }
 
 ALIAS_HIDDEN(bgp_maxpaths_ibgp_cluster, bgp_maxpaths_ibgp_cluster_hidden_cmd,
@@ -2408,29 +2230,14 @@ ALIAS_HIDDEN(bgp_maxpaths_ibgp_cluster, bgp_maxpaths_ibgp_cluster_hidden_cmd,
             "Number of paths\n"
             "Match the cluster length\n")
 
-DEFUN_YANG (no_bgp_maxpaths,
-           no_bgp_maxpaths_cmd,
-           "no maximum-paths [" CMD_RANGE_STR(1, MULTIPATH_NUM) "]",
-           NO_STR
-           "Forward packets over multiple paths\n"
-           "Number of paths\n")
+DEFUN (no_bgp_maxpaths,
+       no_bgp_maxpaths_cmd,
+       "no maximum-paths [" CMD_RANGE_STR(1, MULTIPATH_NUM) "]",
+       NO_STR
+       "Forward packets over multiple paths\n"
+       "Number of paths\n")
 {
-       char base_xpath[XPATH_MAXLEN];
-       afi_t afi;
-       safi_t safi;
-
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ebgp/maximum-paths",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_MODIFY, NULL);
-
-       return nb_cli_apply_changes(vty, NULL);
+       return bgp_maxpaths_config_vty(vty, BGP_PEER_EBGP, NULL, 0, 0);
 }
 
 ALIAS_HIDDEN(no_bgp_maxpaths, no_bgp_maxpaths_hidden_cmd,
@@ -2438,39 +2245,16 @@ ALIAS_HIDDEN(no_bgp_maxpaths, no_bgp_maxpaths_hidden_cmd,
             "Forward packets over multiple paths\n"
             "Number of paths\n")
 
-DEFUN_YANG (no_bgp_maxpaths_ibgp,
-           no_bgp_maxpaths_ibgp_cmd,
-           "no maximum-paths ibgp [" CMD_RANGE_STR(1, MULTIPATH_NUM) " [equal-cluster-length]]",
-           NO_STR
-           "Forward packets over multiple paths\n"
-           "iBGP-multipath\n"
-           "Number of paths\n"
-           "Match the cluster length\n")
+DEFUN (no_bgp_maxpaths_ibgp,
+       no_bgp_maxpaths_ibgp_cmd,
+       "no maximum-paths ibgp [" CMD_RANGE_STR(1, MULTIPATH_NUM) " [equal-cluster-length]]",
+       NO_STR
+       "Forward packets over multiple paths\n"
+       "iBGP-multipath\n"
+       "Number of paths\n"
+       "Match the cluster length\n")
 {
-       char base_xpath[XPATH_MAXLEN];
-       afi_t afi;
-       safi_t safi;
-
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ibgp/maximum-paths",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_MODIFY, NULL);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/use-multiple-paths/ibgp/cluster-length-list",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, NULL);
+       return bgp_maxpaths_config_vty(vty, BGP_PEER_IBGP, NULL, 0, 0);
 }
 
 ALIAS_HIDDEN(no_bgp_maxpaths_ibgp, no_bgp_maxpaths_ibgp_hidden_cmd,
@@ -2502,217 +2286,188 @@ static void bgp_config_write_maxpaths(struct vty *vty, struct bgp *bgp,
 
 /* BGP timers.  */
 
-DEFUN_YANG (bgp_timers,
-           bgp_timers_cmd,
-           "timers bgp (0-65535) (0-65535)",
-           "Adjust routing timers\n"
-           "BGP timers\n"
-           "Keepalive interval\n"
-           "Holdtime\n")
+DEFUN (bgp_timers,
+       bgp_timers_cmd,
+       "timers bgp (0-65535) (0-65535)",
+       "Adjust routing timers\n"
+       "BGP timers\n"
+       "Keepalive interval\n"
+       "Holdtime\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_number = 2;
        int idx_number_2 = 3;
+       unsigned long keepalive = 0;
+       unsigned long holdtime = 0;
 
-       nb_cli_enqueue_change(vty, "./global/global-config-timers/keepalive",
-                             NB_OP_MODIFY, argv[idx_number]->arg);
-       nb_cli_enqueue_change(vty, "./global/global-config-timers/hold-time",
-                             NB_OP_MODIFY, argv[idx_number_2]->arg);
+       keepalive = strtoul(argv[idx_number]->arg, NULL, 10);
+       holdtime = strtoul(argv[idx_number_2]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, NULL);
-}
+       /* Holdtime value check. */
+       if (holdtime < 3 && holdtime != 0) {
+               vty_out(vty,
+                       "%% hold time value must be either 0 or greater than 3\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-DEFUN_YANG (no_bgp_timers,
-           no_bgp_timers_cmd,
-           "no timers bgp [(0-65535) (0-65535)]",
-           NO_STR
-           "Adjust routing timers\n"
-           "BGP timers\n"
-           "Keepalive interval\n"
-           "Holdtime\n")
-{
-       nb_cli_enqueue_change(vty, "./global/global-config-timers/keepalive",
-                             NB_OP_DESTROY, NULL);
-       nb_cli_enqueue_change(vty, "./global/global-config-timers/hold-time",
-                             NB_OP_DESTROY, NULL);
+       bgp_timers_set(bgp, keepalive, holdtime, DFLT_BGP_CONNECT_RETRY,
+                      BGP_DEFAULT_DELAYOPEN);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_route_reflector(struct vty *vty,
-                                        struct lyd_node *dnode,
-                                        bool show_defaults)
+DEFUN (no_bgp_timers,
+       no_bgp_timers_cmd,
+       "no timers bgp [(0-65535) (0-65535)]",
+       NO_STR
+       "Adjust routing timers\n"
+       "BGP timers\n"
+       "Keepalive interval\n"
+       "Holdtime\n")
 {
-       if (yang_dnode_get_bool(dnode, "./no-client-reflect"))
-               vty_out(vty, " no bgp client-to-client reflection\n");
-
-       if (yang_dnode_get_bool(dnode, "./allow-outbound-policy"))
-               vty_out(vty, " bgp route-reflector allow-outbound-policy\n");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp_timers_set(bgp, DFLT_BGP_KEEPALIVE, DFLT_BGP_HOLDTIME,
+                      DFLT_BGP_CONNECT_RETRY, BGP_DEFAULT_DELAYOPEN);
 
-       if (yang_dnode_exists(dnode, "./route-reflector-cluster-id"))
-               vty_out(vty, " bgp cluster-id %s\n",
-                       yang_dnode_get_string(dnode,
-                                             "./route-reflector-cluster-id"));
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_client_to_client_reflection,
-          bgp_client_to_client_reflection_cmd,
-          "bgp client-to-client reflection",
-          "BGP specific commands\n"
-          "Configure client to client route reflection\n"
-          "reflection of routes allowed\n")
+/* BGP minimum holdtime.  */
+
+DEFUN(bgp_minimum_holdtime, bgp_minimum_holdtime_cmd,
+      "bgp minimum-holdtime (1-65535)",
+      "BGP specific commands\n"
+      "BGP minimum holdtime\n"
+      "Seconds\n")
 {
-       nb_cli_enqueue_change(vty, "./global/route-reflector/no-client-reflect",
-                             NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_number = 2;
+       unsigned long min_holdtime;
 
-       return nb_cli_apply_changes(vty, NULL);
-}
+       min_holdtime = strtoul(argv[idx_number]->arg, NULL, 10);
 
-DEFUN_YANG(no_bgp_client_to_client_reflection,
-          no_bgp_client_to_client_reflection_cmd,
-          "no bgp client-to-client reflection",
-          NO_STR
-          "BGP specific commands\n"
-          "Configure client to client route reflection\n"
-          "reflection of routes allowed\n")
-{
-       nb_cli_enqueue_change(vty, "./global/route-reflector/no-client-reflect",
-                             NB_OP_MODIFY, "true");
+       bgp->default_min_holdtime = min_holdtime;
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_route_selection(struct vty *vty,
-                                        struct lyd_node *dnode,
-                                        bool show_defaults)
+DEFUN(no_bgp_minimum_holdtime, no_bgp_minimum_holdtime_cmd,
+      "no bgp minimum-holdtime [(1-65535)]",
+      NO_STR
+      "BGP specific commands\n"
+      "BGP minimum holdtime\n"
+      "Seconds\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
-       if (yang_dnode_get_bool(dnode, "./always-compare-med"))
-               vty_out(vty, " bgp always-compare-med\n");
-
-       if (yang_dnode_get_bool(dnode, "./ignore-as-path-length"))
-               vty_out(vty, " bgp bestpath as-path ignore\n");
-
-       if (yang_dnode_get_bool(dnode, "./aspath-confed"))
-               vty_out(vty, " bgp bestpath as-path confed\n");
-
-       if (yang_dnode_get_bool(dnode, "./external-compare-router-id"))
-               vty_out(vty, " bgp bestpath compare-routerid\n");
-
-       if (yang_dnode_get_bool(dnode, "./allow-multiple-as")) {
-               if (yang_dnode_get_bool(dnode, "./multi-path-as-set"))
-                       vty_out(vty,
-                               " bgp bestpath as-path multipath-relax as-set\n");
-               else
-                       vty_out(vty, " bgp bestpath as-path multipath-relax\n");
-       }
-
-       if (yang_dnode_get_bool(dnode, "./deterministic-med"))
-               vty_out(vty, " bgp deterministic-med\n");
+       bgp->default_min_holdtime = 0;
 
-       if (yang_dnode_get_bool(dnode, "./confed-med")
-           || yang_dnode_get_bool(dnode, "./missing-as-worst-med")) {
-               vty_out(vty, " bgp bestpath med");
-               if (yang_dnode_get_bool(dnode, "./confed-med"))
-                       vty_out(vty, " confed");
-               if (yang_dnode_get_bool(dnode, "./missing-as-worst-med"))
-                       vty_out(vty, " missing-as-worst");
-               vty_out(vty, "\n");
-       }
+       return CMD_SUCCESS;
 }
 
-/* "bgp always-compare-med" configuration. */
-DEFUN_YANG(bgp_always_compare_med,
-          bgp_always_compare_med_cmd,
-          "bgp always-compare-med",
-          "BGP specific commands\n"
-          "Allow comparing MED from different neighbors\n")
+DEFUN (bgp_client_to_client_reflection,
+       bgp_client_to_client_reflection_cmd,
+       "bgp client-to-client reflection",
+       BGP_STR
+       "Configure client to client route reflection\n"
+       "reflection of routes allowed\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/always-compare-med",
-               NB_OP_MODIFY, "true");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_NO_CLIENT_TO_CLIENT);
+       bgp_clear_star_soft_out(vty, bgp->name);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_always_compare_med,
-          no_bgp_always_compare_med_cmd,
-          "no bgp always-compare-med",
-          NO_STR
-          "BGP specific commands\n"
-          "Allow comparing MED from different neighbors\n")
+DEFUN (no_bgp_client_to_client_reflection,
+       no_bgp_client_to_client_reflection_cmd,
+       "no bgp client-to-client reflection",
+       NO_STR
+       BGP_STR
+       "Configure client to client route reflection\n"
+       "reflection of routes allowed\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/always-compare-med",
-               NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_NO_CLIENT_TO_CLIENT);
+       bgp_clear_star_soft_out(vty, bgp->name);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_suppress_duplicates,
-          bgp_suppress_duplicates_cmd,
-          "bgp suppress-duplicates",
-          "BGP specific commands\n"
-          "Suppress duplicate updates if the route actually not changed\n")
+/* "bgp always-compare-med" configuration. */
+DEFUN (bgp_always_compare_med,
+       bgp_always_compare_med_cmd,
+       "bgp always-compare-med",
+       BGP_STR
+       "Allow comparing MED from different neighbors\n")
 {
-       nb_cli_enqueue_change(vty, "./global/suppress-duplicates",
-                             NB_OP_MODIFY, "true");
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_ALWAYS_COMPARE_MED);
+       bgp_recalculate_all_bestpaths(bgp);
+
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_suppress_duplicates,
-          no_bgp_suppress_duplicates_cmd,
-          "no bgp suppress-duplicates",
-          NO_STR
-          "BGP specific commands\n"
-          "Suppress duplicate updates if the route actually not changed\n")
+DEFUN (no_bgp_always_compare_med,
+       no_bgp_always_compare_med_cmd,
+       "no bgp always-compare-med",
+       NO_STR
+       BGP_STR
+       "Allow comparing MED from different neighbors\n")
 {
-       nb_cli_enqueue_change(vty, "./global/suppress-duplicates",
-                             NB_OP_MODIFY, "false");
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_ALWAYS_COMPARE_MED);
+       bgp_recalculate_all_bestpaths(bgp);
+
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_suppress_duplicates(struct vty *vty,
-                                             struct lyd_node *dnode,
-                                             bool show_defaults)
+
+DEFUN(bgp_ebgp_requires_policy, bgp_ebgp_requires_policy_cmd,
+      "bgp ebgp-requires-policy",
+      BGP_STR
+      "Require in and out policy for eBGP peers (RFC8212)\n")
 {
-       if (yang_dnode_get_bool(dnode, NULL) != SAVE_BGP_SUPPRESS_DUPLICATES)
-               vty_out(vty, " bgp suppress-duplicates\n");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_EBGP_REQUIRES_POLICY);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_ebgp_requires_policy,
-          bgp_ebgp_requires_policy_cmd,
-          "bgp ebgp-requires-policy",
-          "BGP specific commands\n"
-          "Require in and out policy for eBGP peers (RFC8212)\n")
+DEFUN(no_bgp_ebgp_requires_policy, no_bgp_ebgp_requires_policy_cmd,
+      "no bgp ebgp-requires-policy",
+      NO_STR
+      BGP_STR
+      "Require in and out policy for eBGP peers (RFC8212)\n")
 {
-       nb_cli_enqueue_change(vty, "./global/ebgp-requires-policy",
-                             NB_OP_MODIFY, "true");
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_EBGP_REQUIRES_POLICY);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_ebgp_requires_policy,
-          no_bgp_ebgp_requires_policy_cmd,
-          "no bgp ebgp-requires-policy",
-          NO_STR
-          "BGP specific commands\n"
-          "Require in and out policy for eBGP peers (RFC8212)\n")
+DEFUN(bgp_suppress_duplicates, bgp_suppress_duplicates_cmd,
+      "bgp suppress-duplicates",
+      BGP_STR
+      "Suppress duplicate updates if the route actually not changed\n")
 {
-       nb_cli_enqueue_change(vty, "./global/ebgp-requires-policy",
-                             NB_OP_MODIFY, "false");
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_SUPPRESS_DUPLICATES);
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_ebgp_requires_policy(struct vty *vty,
-                                             struct lyd_node *dnode,
-                                             bool show_defaults)
+DEFUN(no_bgp_suppress_duplicates, no_bgp_suppress_duplicates_cmd,
+      "no bgp suppress-duplicates",
+      NO_STR
+      BGP_STR
+      "Suppress duplicate updates if the route actually not changed\n")
 {
-       if (yang_dnode_get_bool(dnode, NULL) != SAVE_BGP_EBGP_REQUIRES_POLICY)
-               vty_out(vty, " bgp ebgp-requires-policy\n");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_SUPPRESS_DUPLICATES);
+       return CMD_SUCCESS;
 }
 
 DEFUN(bgp_reject_as_sets, bgp_reject_as_sets_cmd,
       "bgp reject-as-sets",
-      "BGP specific commands\n"
+      BGP_STR
       "Reject routes with AS_SET or AS_CONFED_SET flag\n")
 {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
@@ -2738,7 +2493,7 @@ DEFUN(bgp_reject_as_sets, bgp_reject_as_sets_cmd,
 DEFUN(no_bgp_reject_as_sets, no_bgp_reject_as_sets_cmd,
       "no bgp reject-as-sets",
       NO_STR
-      "BGP specific commands\n"
+      BGP_STR
       "Reject routes with AS_SET or AS_CONFED_SET flag\n")
 {
        VTY_DECLVAR_CONTEXT(bgp, bgp);
@@ -2762,38 +2517,69 @@ DEFUN(no_bgp_reject_as_sets, no_bgp_reject_as_sets_cmd,
 }
 
 /* "bgp deterministic-med" configuration. */
-DEFUN_YANG (bgp_deterministic_med,
+DEFUN (bgp_deterministic_med,
        bgp_deterministic_med_cmd,
        "bgp deterministic-med",
-       "BGP specific commands\n"
+       BGP_STR
        "Pick the best-MED path among paths advertised from the neighboring AS\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/deterministic-med",
-               NB_OP_MODIFY, "true");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       if (!CHECK_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED)) {
+               SET_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED);
+               bgp_recalculate_all_bestpaths(bgp);
+       }
+
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_bgp_deterministic_med,
+DEFUN (no_bgp_deterministic_med,
        no_bgp_deterministic_med_cmd,
        "no bgp deterministic-med",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Pick the best-MED path among paths advertised from the neighboring AS\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/deterministic-med",
-               NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int bestpath_per_as_used;
+       afi_t afi;
+       safi_t safi;
+       struct peer *peer;
+       struct listnode *node, *nnode;
+
+       if (CHECK_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED)) {
+               bestpath_per_as_used = 0;
+
+               for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) {
+                       FOREACH_AFI_SAFI (afi, safi)
+                               if (bgp_addpath_dmed_required(
+                                       peer->addpath_type[afi][safi])) {
+                                       bestpath_per_as_used = 1;
+                                       break;
+                               }
+
+                       if (bestpath_per_as_used)
+                               break;
+               }
+
+               if (bestpath_per_as_used) {
+                       vty_out(vty,
+                               "bgp deterministic-med cannot be disabled while addpath-tx-bestpath-per-AS is in use\n");
+                       return CMD_WARNING_CONFIG_FAILED;
+               } else {
+                       UNSET_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED);
+                       bgp_recalculate_all_bestpaths(bgp);
+               }
+       }
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
 /* "bgp graceful-restart mode" configuration. */
 DEFUN (bgp_graceful_restart,
        bgp_graceful_restart_cmd,
        "bgp graceful-restart",
-       "BGP specific commands\n"
+       BGP_STR
        GR_CMD
       )
 {
@@ -2820,7 +2606,7 @@ DEFUN (no_bgp_graceful_restart,
        no_bgp_graceful_restart_cmd,
        "no bgp graceful-restart",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        NO_GR_CMD
       )
 {
@@ -2847,7 +2633,7 @@ DEFUN (no_bgp_graceful_restart,
 DEFUN (bgp_graceful_restart_stalepath_time,
        bgp_graceful_restart_stalepath_time_cmd,
        "bgp graceful-restart stalepath-time (1-4095)",
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart capability parameters\n"
        "Set the max time to hold onto restarting peer's stale paths\n"
        "Delay value (seconds)\n")
@@ -2864,7 +2650,7 @@ DEFUN (bgp_graceful_restart_stalepath_time,
 DEFUN (bgp_graceful_restart_restart_time,
        bgp_graceful_restart_restart_time_cmd,
        "bgp graceful-restart restart-time (1-4095)",
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart capability parameters\n"
        "Set the time to wait to delete stale routes before a BGP open message is received\n"
        "Delay value (seconds)\n")
@@ -2881,7 +2667,7 @@ DEFUN (bgp_graceful_restart_restart_time,
 DEFUN (bgp_graceful_restart_select_defer_time,
        bgp_graceful_restart_select_defer_time_cmd,
        "bgp graceful-restart select-defer-time (0-3600)",
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart capability parameters\n"
        "Set the time to defer the BGP route selection after restart\n"
        "Delay value (seconds, 0 - disable)\n")
@@ -2904,7 +2690,7 @@ DEFUN (no_bgp_graceful_restart_stalepath_time,
        no_bgp_graceful_restart_stalepath_time_cmd,
        "no bgp graceful-restart stalepath-time [(1-4095)]",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart capability parameters\n"
        "Set the max time to hold onto restarting peer's stale paths\n"
        "Delay value (seconds)\n")
@@ -2919,7 +2705,7 @@ DEFUN (no_bgp_graceful_restart_restart_time,
        no_bgp_graceful_restart_restart_time_cmd,
        "no bgp graceful-restart restart-time [(1-4095)]",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart capability parameters\n"
        "Set the time to wait to delete stale routes before a BGP open message is received\n"
        "Delay value (seconds)\n")
@@ -2934,7 +2720,7 @@ DEFUN (no_bgp_graceful_restart_select_defer_time,
        no_bgp_graceful_restart_select_defer_time_cmd,
        "no bgp graceful-restart select-defer-time [(0-3600)]",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart capability parameters\n"
        "Set the time to defer the BGP route selection after restart\n"
        "Delay value (seconds)\n")
@@ -2950,7 +2736,7 @@ DEFUN (no_bgp_graceful_restart_select_defer_time,
 DEFUN (bgp_graceful_restart_preserve_fw,
        bgp_graceful_restart_preserve_fw_cmd,
        "bgp graceful-restart preserve-fw-state",
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart capability parameters\n"
        "Sets F-bit indication that fib is preserved while doing Graceful Restart\n")
 {
@@ -2963,7 +2749,7 @@ DEFUN (no_bgp_graceful_restart_preserve_fw,
        no_bgp_graceful_restart_preserve_fw_cmd,
        "no bgp graceful-restart preserve-fw-state",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart capability parameters\n"
        "Unsets F-bit indication that fib is preserved while doing Graceful Restart\n")
 {
@@ -2975,7 +2761,7 @@ DEFUN (no_bgp_graceful_restart_preserve_fw,
 DEFUN (bgp_graceful_restart_disable,
        bgp_graceful_restart_disable_cmd,
        "bgp graceful-restart-disable",
-       "BGP specific commands\n"
+       BGP_STR
        GR_DISABLE)
 {
        int ret = BGP_GR_FAILURE;
@@ -3004,7 +2790,7 @@ DEFUN (no_bgp_graceful_restart_disable,
        no_bgp_graceful_restart_disable_cmd,
        "no bgp graceful-restart-disable",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        NO_GR_DISABLE
       )
 {
@@ -3257,7 +3043,7 @@ DEFUN (no_bgp_neighbor_graceful_restart_disable,
 DEFUN_HIDDEN (bgp_graceful_restart_disable_eor,
               bgp_graceful_restart_disable_eor_cmd,
               "bgp graceful-restart disable-eor",
-              "BGP specific commands\n"
+              BGP_STR
               "Graceful restart configuration parameters\n"
               "Disable EOR Check\n")
 {
@@ -3271,7 +3057,7 @@ DEFUN_HIDDEN (no_bgp_graceful_restart_disable_eor,
               no_bgp_graceful_restart_disable_eor_cmd,
               "no bgp graceful-restart disable-eor",
               NO_STR
-              "BGP specific commands\n"
+              BGP_STR
               "Graceful restart configuration parameters\n"
               "Disable EOR Check\n")
 {
@@ -3284,7 +3070,7 @@ DEFUN_HIDDEN (no_bgp_graceful_restart_disable_eor,
 DEFUN (bgp_graceful_restart_rib_stale_time,
        bgp_graceful_restart_rib_stale_time_cmd,
        "bgp graceful-restart rib-stale-time (1-3600)",
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart configuration parameters\n"
        "Specify the stale route removal timer in rib\n"
        "Delay value (seconds)\n")
@@ -3306,7 +3092,7 @@ DEFUN (no_bgp_graceful_restart_rib_stale_time,
        no_bgp_graceful_restart_rib_stale_time_cmd,
        "no bgp graceful-restart rib-stale-time [(1-3600)]",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Graceful restart configuration parameters\n"
        "Specify the stale route removal timer in rib\n"
        "Delay value (seconds)\n")
@@ -3321,18 +3107,13 @@ DEFUN (no_bgp_graceful_restart_rib_stale_time,
        return CMD_SUCCESS;
 }
 
-static inline int bgp_initiate_graceful_shut_unshut(struct bgp *bgp,
-                                                   char *errmsg,
-                                                   size_t errmsg_len)
+static inline void bgp_initiate_graceful_shut_unshut(struct vty *vty,
+                                                    struct bgp *bgp)
 {
        bgp_static_redo_import_check(bgp);
        bgp_redistribute_redo(bgp);
-       if (bgp_clear_star_soft_out(bgp->name, errmsg, errmsg_len) < 0)
-               return -1;
-       if (bgp_clear_star_soft_in(bgp->name, errmsg, errmsg_len) < 0)
-               return -1;
-
-       return 0;
+       bgp_clear_star_soft_out(vty, bgp->name);
+       bgp_clear_star_soft_in(vty, bgp->name);
 }
 
 static int bgp_global_graceful_shutdown_config_vty(struct vty *vty)
@@ -3340,7 +3121,6 @@ static int bgp_global_graceful_shutdown_config_vty(struct vty *vty)
        struct listnode *node, *nnode;
        struct bgp *bgp;
        bool vrf_cfg = false;
-       char errmsg[BUFSIZ] = {'\0'};
 
        if (CHECK_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN))
                return CMD_SUCCESS;
@@ -3366,13 +3146,8 @@ static int bgp_global_graceful_shutdown_config_vty(struct vty *vty)
        SET_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN);
 
        /* Initiate processing for all BGP instances. */
-       for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
-               if (bgp_initiate_graceful_shut_unshut(bgp, errmsg,
-                                                     sizeof(errmsg))
-                   < 0)
-                       if (strlen(errmsg))
-                               vty_out(vty, "%s\n", errmsg);
-       }
+       for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
+               bgp_initiate_graceful_shut_unshut(vty, bgp);
 
        return CMD_SUCCESS;
 }
@@ -3381,7 +3156,6 @@ static int bgp_global_graceful_shutdown_deconfig_vty(struct vty *vty)
 {
        struct listnode *node, *nnode;
        struct bgp *bgp;
-       char errmsg[BUFSIZ] = {'\0'};
 
        if (!CHECK_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN))
                return CMD_SUCCESS;
@@ -3390,13 +3164,8 @@ static int bgp_global_graceful_shutdown_deconfig_vty(struct vty *vty)
        UNSET_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN);
 
        /* Initiate processing for all BGP instances. */
-       for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) {
-               if (bgp_initiate_graceful_shut_unshut(bgp, errmsg,
-                                                     sizeof(errmsg))
-                   < 0)
-                       if (strlen(errmsg))
-                               vty_out(vty, "%s\n", errmsg);
-       }
+       for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp))
+               bgp_initiate_graceful_shut_unshut(vty, bgp);
 
        return CMD_SUCCESS;
 }
@@ -3411,13 +3180,24 @@ DEFUN (bgp_graceful_shutdown,
        if (vty->node == CONFIG_NODE)
                return bgp_global_graceful_shutdown_config_vty(vty);
 
-       nb_cli_enqueue_change(vty, "./global/graceful-shutdown/enable",
-                             NB_OP_MODIFY, "true");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+
+       /* if configured globally, per-instance config is not allowed */
+       if (CHECK_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN)) {
+               vty_out(vty,
+                       "%%Failed: per-vrf graceful-shutdown config not permitted with global graceful-shutdown\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       return nb_cli_apply_changes(vty, NULL);
+       if (!CHECK_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN)) {
+               SET_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN);
+               bgp_initiate_graceful_shut_unshut(vty, bgp);
+       }
+
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_bgp_graceful_shutdown,
+DEFUN (no_bgp_graceful_shutdown,
        no_bgp_graceful_shutdown_cmd,
        "no bgp graceful-shutdown",
        NO_STR
@@ -3427,199 +3207,185 @@ DEFUN_YANG (no_bgp_graceful_shutdown,
        if (vty->node == CONFIG_NODE)
                return bgp_global_graceful_shutdown_deconfig_vty(vty);
 
-       nb_cli_enqueue_change(vty, "./global/graceful-shutdown/enable",
-                             NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+
+       /* If configured globally, cannot remove from one bgp instance */
+       if (CHECK_FLAG(bm->flags, BM_FLAG_GRACEFUL_SHUTDOWN)) {
+               vty_out(vty,
+                       "%%Failed: bgp graceful-shutdown configured globally. Delete per-vrf not permitted\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       return nb_cli_apply_changes(vty, NULL);
-}
+       if (CHECK_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN)) {
+               UNSET_FLAG(bgp->flags, BGP_FLAG_GRACEFUL_SHUTDOWN);
+               bgp_initiate_graceful_shut_unshut(vty, bgp);
+       }
 
-void cli_show_router_bgp_graceful_shutdown(struct vty *vty,
-                                          struct lyd_node *dnode,
-                                          bool show_defaults)
-{
-       if (yang_dnode_get_bool(dnode, NULL))
-               vty_out(vty, " bgp graceful-shutdown\n");
+       return CMD_SUCCESS;
 }
 
 /* "bgp fast-external-failover" configuration. */
-DEFUN_YANG (bgp_fast_external_failover,
+DEFUN (bgp_fast_external_failover,
        bgp_fast_external_failover_cmd,
        "bgp fast-external-failover",
        BGP_STR
        "Immediately reset session if a link to a directly connected external peer goes down\n")
 {
-       nb_cli_enqueue_change(vty, "./global/fast-external-failover",
-                             NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_bgp_fast_external_failover,
+DEFUN (no_bgp_fast_external_failover,
        no_bgp_fast_external_failover_cmd,
        "no bgp fast-external-failover",
        NO_STR
        BGP_STR
        "Immediately reset session if a link to a directly connected external peer goes down\n")
 {
-       nb_cli_enqueue_change(vty, "./global/fast-external-failover",
-                             NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-void cli_show_router_bgp_fast_external_failover(struct vty *vty,
-                                               struct lyd_node *dnode,
-                                               bool show_defaults)
-{
-       if (!yang_dnode_get_bool(dnode, NULL))
-               vty_out(vty, " no bgp fast-external-failover\n");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER);
+       return CMD_SUCCESS;
 }
 
 /* "bgp bestpath compare-routerid" configuration.  */
-DEFUN_YANG(bgp_bestpath_compare_router_id,
-          bgp_bestpath_compare_router_id_cmd,
-          "bgp bestpath compare-routerid",
-          "BGP specific commands\n"
-          "Change the default bestpath selection\n"
-          "Compare router-id for identical EBGP paths\n")
+DEFUN (bgp_bestpath_compare_router_id,
+       bgp_bestpath_compare_router_id_cmd,
+       "bgp bestpath compare-routerid",
+       BGP_STR
+       "Change the default bestpath selection\n"
+       "Compare router-id for identical EBGP paths\n")
 {
-       nb_cli_enqueue_change(
-               vty,
-               "./global/route-selection-options/external-compare-router-id",
-               NB_OP_MODIFY, "true");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_COMPARE_ROUTER_ID);
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_bestpath_compare_router_id,
-          no_bgp_bestpath_compare_router_id_cmd,
-          "no bgp bestpath compare-routerid",
-          NO_STR
-          "BGP specific commands\n"
-          "Change the default bestpath selection\n"
-          "Compare router-id for identical EBGP paths\n")
+DEFUN (no_bgp_bestpath_compare_router_id,
+       no_bgp_bestpath_compare_router_id_cmd,
+       "no bgp bestpath compare-routerid",
+       NO_STR
+       BGP_STR
+       "Change the default bestpath selection\n"
+       "Compare router-id for identical EBGP paths\n")
 {
-       nb_cli_enqueue_change(
-               vty,
-               "./global/route-selection-options/external-compare-router-id",
-               NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_COMPARE_ROUTER_ID);
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
 /* "bgp bestpath as-path ignore" configuration.  */
-DEFUN_YANG(bgp_bestpath_aspath_ignore,
-          bgp_bestpath_aspath_ignore_cmd,
-          "bgp bestpath as-path ignore",
-          "BGP specific commands\n"
-          "Change the default bestpath selection\n"
-          "AS-path attribute\n"
-          "Ignore as-path length in selecting a route\n")
+DEFUN (bgp_bestpath_aspath_ignore,
+       bgp_bestpath_aspath_ignore_cmd,
+       "bgp bestpath as-path ignore",
+       BGP_STR
+       "Change the default bestpath selection\n"
+       "AS-path attribute\n"
+       "Ignore as-path length in selecting a route\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/ignore-as-path-length",
-               NB_OP_MODIFY, "true");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_ASPATH_IGNORE);
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_bestpath_aspath_ignore,
-          no_bgp_bestpath_aspath_ignore_cmd,
-          "no bgp bestpath as-path ignore",
-          NO_STR
-          "BGP specific commands\n"
-          "Change the default bestpath selection\n"
-          "AS-path attribute\n"
-          "Ignore as-path length in selecting a route\n")
+DEFUN (no_bgp_bestpath_aspath_ignore,
+       no_bgp_bestpath_aspath_ignore_cmd,
+       "no bgp bestpath as-path ignore",
+       NO_STR
+       BGP_STR
+       "Change the default bestpath selection\n"
+       "AS-path attribute\n"
+       "Ignore as-path length in selecting a route\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/ignore-as-path-length",
-               NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_ASPATH_IGNORE);
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
 /* "bgp bestpath as-path confed" configuration.  */
-DEFUN_YANG (bgp_bestpath_aspath_confed,
+DEFUN (bgp_bestpath_aspath_confed,
        bgp_bestpath_aspath_confed_cmd,
        "bgp bestpath as-path confed",
-       "BGP specific commands\n"
+       BGP_STR
        "Change the default bestpath selection\n"
        "AS-path attribute\n"
        "Compare path lengths including confederation sets & sequences in selecting a route\n")
 {
-       nb_cli_enqueue_change(vty,
-                             "./global/route-selection-options/aspath-confed",
-                             NB_OP_MODIFY, "true");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_ASPATH_CONFED);
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_bgp_bestpath_aspath_confed,
+DEFUN (no_bgp_bestpath_aspath_confed,
        no_bgp_bestpath_aspath_confed_cmd,
        "no bgp bestpath as-path confed",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Change the default bestpath selection\n"
        "AS-path attribute\n"
        "Compare path lengths including confederation sets & sequences in selecting a route\n")
 {
-       nb_cli_enqueue_change(vty,
-                             "./global/route-selection-options/aspath-confed",
-                             NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_ASPATH_CONFED);
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
 /* "bgp bestpath as-path multipath-relax" configuration.  */
-DEFUN_YANG (bgp_bestpath_aspath_multipath_relax,
+DEFUN (bgp_bestpath_aspath_multipath_relax,
        bgp_bestpath_aspath_multipath_relax_cmd,
        "bgp bestpath as-path multipath-relax [<as-set|no-as-set>]",
-       "BGP specific commands\n"
+       BGP_STR
        "Change the default bestpath selection\n"
        "AS-path attribute\n"
        "Allow load sharing across routes that have different AS paths (but same length)\n"
        "Generate an AS_SET\n"
        "Do not generate an AS_SET\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx = 0;
+       SET_FLAG(bgp->flags, BGP_FLAG_ASPATH_MULTIPATH_RELAX);
 
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/allow-multiple-as",
-               NB_OP_MODIFY, "true");
+       /* no-as-set is now the default behavior so we can silently
+        * ignore it */
        if (argv_find(argv, argc, "as-set", &idx))
-               nb_cli_enqueue_change(
-                       vty,
-                       "./global/route-selection-options/multi-path-as-set",
-                       NB_OP_MODIFY, "true");
+               SET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
        else
-               nb_cli_enqueue_change(
-                       vty,
-                       "./global/route-selection-options/multi-path-as-set",
-                       NB_OP_MODIFY, "false");
+               UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
 
-       return nb_cli_apply_changes(vty, NULL);
+       bgp_recalculate_all_bestpaths(bgp);
+
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_bgp_bestpath_aspath_multipath_relax,
+DEFUN (no_bgp_bestpath_aspath_multipath_relax,
        no_bgp_bestpath_aspath_multipath_relax_cmd,
        "no bgp bestpath as-path multipath-relax [<as-set|no-as-set>]",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Change the default bestpath selection\n"
        "AS-path attribute\n"
        "Allow load sharing across routes that have different AS paths (but same length)\n"
        "Generate an AS_SET\n"
        "Do not generate an AS_SET\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/allow-multiple-as",
-               NB_OP_MODIFY, "false");
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/multi-path-as-set",
-               NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_ASPATH_MULTIPATH_RELAX);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_MULTIPATH_RELAX_AS_SET);
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
 /* "bgp bestpath peer-type multipath-relax" configuration. */
@@ -3654,38 +3420,34 @@ DEFUN(no_bgp_bestpath_peer_type_multipath_relax,
 }
 
 /* "bgp log-neighbor-changes" configuration.  */
-DEFUN_YANG(bgp_log_neighbor_changes,
-          bgp_log_neighbor_changes_cmd,
-          "bgp log-neighbor-changes",
-          "BGP specific commands\n"
-          "Log neighbor up/down and reset reason\n")
+DEFUN (bgp_log_neighbor_changes,
+       bgp_log_neighbor_changes_cmd,
+       "bgp log-neighbor-changes",
+       BGP_STR
+       "Log neighbor up/down and reset reason\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/global-neighbor-config/log-neighbor-changes",
-               NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_log_neighbor_changes,
-          no_bgp_log_neighbor_changes_cmd,
-          "no bgp log-neighbor-changes",
-          NO_STR
-          "BGP specific commands\n"
-          "Log neighbor up/down and reset reason\n")
+DEFUN (no_bgp_log_neighbor_changes,
+       no_bgp_log_neighbor_changes_cmd,
+       "no bgp log-neighbor-changes",
+       NO_STR
+       BGP_STR
+       "Log neighbor up/down and reset reason\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/global-neighbor-config/log-neighbor-changes",
-               NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_LOG_NEIGHBOR_CHANGES);
+       return CMD_SUCCESS;
 }
 
 /* "bgp bestpath med" configuration. */
-DEFUN_YANG (bgp_bestpath_med,
+DEFUN (bgp_bestpath_med,
        bgp_bestpath_med_cmd,
        "bgp bestpath med <confed [missing-as-worst]|missing-as-worst [confed]>",
-       "BGP specific commands\n"
+       BGP_STR
        "Change the default bestpath selection\n"
        "MED attribute\n"
        "Compare MED among confederation paths\n"
@@ -3693,34 +3455,25 @@ DEFUN_YANG (bgp_bestpath_med,
        "Treat missing MED as the least preferred one\n"
        "Compare MED among confederation paths\n")
 {
-       int idx = 0;
-       bool confed = false;
-       bool worst_med = false;
-
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
+       int idx = 0;
        if (argv_find(argv, argc, "confed", &idx))
-               confed = true;
-
-       nb_cli_enqueue_change(vty,
-                             "./global/route-selection-options/confed-med",
-                             NB_OP_MODIFY, confed ? "true" : "false");
-
+               SET_FLAG(bgp->flags, BGP_FLAG_MED_CONFED);
        idx = 0;
        if (argv_find(argv, argc, "missing-as-worst", &idx))
-               worst_med = true;
+               SET_FLAG(bgp->flags, BGP_FLAG_MED_MISSING_AS_WORST);
 
-       nb_cli_enqueue_change(
-               vty, "./global/route-selection-options/missing-as-worst-med",
-               NB_OP_MODIFY, worst_med ? "true" : "false");
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_bgp_bestpath_med,
+DEFUN (no_bgp_bestpath_med,
        no_bgp_bestpath_med_cmd,
        "no bgp bestpath med <confed [missing-as-worst]|missing-as-worst [confed]>",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Change the default bestpath selection\n"
        "MED attribute\n"
        "Compare MED among confederation paths\n"
@@ -3728,28 +3481,25 @@ DEFUN_YANG (no_bgp_bestpath_med,
        "Treat missing MED as the least preferred one\n"
        "Compare MED among confederation paths\n")
 {
-       int idx = 0;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
+       int idx = 0;
        if (argv_find(argv, argc, "confed", &idx))
-               nb_cli_enqueue_change(
-                       vty, "./global/route-selection-options/confed-med",
-                       NB_OP_MODIFY, "false");
-
+               UNSET_FLAG(bgp->flags, BGP_FLAG_MED_CONFED);
        idx = 0;
        if (argv_find(argv, argc, "missing-as-worst", &idx))
-               nb_cli_enqueue_change(
-                       vty,
-                       "./global/route-selection-options/missing-as-worst-med",
-                       NB_OP_MODIFY, "false");
+               UNSET_FLAG(bgp->flags, BGP_FLAG_MED_MISSING_AS_WORST);
+
+       bgp_recalculate_all_bestpaths(bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
 /* "bgp bestpath bandwidth" configuration. */
 DEFPY (bgp_bestpath_bw,
        bgp_bestpath_bw_cmd,
        "bgp bestpath bandwidth <ignore|skip-missing|default-weight-for-missing>$bw_cfg",
-       "BGP specific commands\n"
+       BGP_STR
        "Change the default bestpath selection\n"
        "Link Bandwidth attribute\n"
        "Ignore link bandwidth (i.e., do regular ECMP, not weighted)\n"
@@ -3787,7 +3537,7 @@ DEFPY (no_bgp_bestpath_bw,
        no_bgp_bestpath_bw_cmd,
        "no bgp bestpath bandwidth [<ignore|skip-missing|default-weight-for-missing>$bw_cfg]",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Change the default bestpath selection\n"
        "Link Bandwidth attribute\n"
        "Ignore link bandwidth (i.e., do regular ECMP, not weighted)\n"
@@ -3822,7 +3572,7 @@ DEFPY(bgp_default_afi_safi, bgp_default_afi_safi_cmd,
       "ipv6-flowspec|"
       "l2vpn-evpn>$afi_safi",
       NO_STR
-      "BGP specific commands\n"
+      BGP_STR
       "Configure BGP defaults\n"
       "Activate ipv4-unicast for a peer by default\n"
       "Activate ipv4-multicast for a peer by default\n"
@@ -3867,286 +3617,237 @@ DEFPY(bgp_default_afi_safi, bgp_default_afi_safi_cmd,
 }
 
 /* Display hostname in certain command outputs */
-DEFUN_YANG (bgp_default_show_hostname,
+DEFUN (bgp_default_show_hostname,
        bgp_default_show_hostname_cmd,
        "bgp default show-hostname",
-       "BGP specific commands\n"
+       BGP_STR
        "Configure BGP defaults\n"
        "Show hostname in certain command outputs\n")
 {
-       nb_cli_enqueue_change(vty, "./global/show-hostname", NB_OP_MODIFY,
-                             "true");
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-DEFUN_YANG(no_bgp_default_show_hostname,
-          no_bgp_default_show_hostname_cmd,
-          "no bgp default show-hostname",
-          NO_STR
-          "BGP specific commands\n"
-          "Configure BGP defaults\n"
-          "Show hostname in certain command outputs\n")
-{
-       nb_cli_enqueue_change(vty, "./global/show-hostname", NB_OP_MODIFY,
-                             "false");
-
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_SHOW_HOSTNAME);
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_show_hostname(struct vty *vty, struct lyd_node *dnode,
-                                      bool show_defaults)
+DEFUN (no_bgp_default_show_hostname,
+       no_bgp_default_show_hostname_cmd,
+       "no bgp default show-hostname",
+       NO_STR
+       BGP_STR
+       "Configure BGP defaults\n"
+       "Show hostname in certain command outputs\n")
 {
-       if (yang_dnode_get_bool(dnode, NULL) != SAVE_BGP_SHOW_HOSTNAME)
-               vty_out(vty, " bgp default show-hostname\n");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_SHOW_HOSTNAME);
+       return CMD_SUCCESS;
 }
 
 /* Display hostname in certain command outputs */
-DEFUN_YANG(bgp_default_show_nexthop_hostname,
-          bgp_default_show_nexthop_hostname_cmd,
-          "bgp default show-nexthop-hostname",
-          "BGP specific commands\n"
-          "Configure BGP defaults\n"
-          "Show hostname for nexthop in certain command outputs\n")
+DEFUN (bgp_default_show_nexthop_hostname,
+       bgp_default_show_nexthop_hostname_cmd,
+       "bgp default show-nexthop-hostname",
+       BGP_STR
+       "Configure BGP defaults\n"
+       "Show hostname for nexthop in certain command outputs\n")
 {
-       nb_cli_enqueue_change(vty, "./global/show-nexthop-hostname",
-                             NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_SHOW_NEXTHOP_HOSTNAME);
+       return CMD_SUCCESS;
 }
 
 DEFUN (no_bgp_default_show_nexthop_hostname,
        no_bgp_default_show_nexthop_hostname_cmd,
        "no bgp default show-nexthop-hostname",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Configure BGP defaults\n"
        "Show hostname for nexthop in certain command outputs\n")
 {
-       nb_cli_enqueue_change(vty, "./global/show-nexthop-hostname",
-                             NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-void cli_show_router_bgp_show_nexthop_hostname(struct vty *vty,
-                                              struct lyd_node *dnode,
-                                              bool show_defaults)
-{
-       if (yang_dnode_get_bool(dnode, NULL) != SAVE_BGP_SHOW_HOSTNAME)
-               vty_out(vty, " bgp default show-nexthop-hostname\n");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_SHOW_NEXTHOP_HOSTNAME);
+       return CMD_SUCCESS;
 }
 
 /* "bgp network import-check" configuration.  */
-DEFUN_YANG(bgp_network_import_check,
-          bgp_network_import_check_cmd,
-          "bgp network import-check",
-          "BGP specific commands\n"
-          "BGP network command\n"
-          "Check BGP network route exists in IGP\n")
+DEFUN (bgp_network_import_check,
+       bgp_network_import_check_cmd,
+       "bgp network import-check",
+       BGP_STR
+       "BGP network command\n"
+       "Check BGP network route exists in IGP\n")
 {
-       nb_cli_enqueue_change(vty, "./global/import-check", NB_OP_MODIFY,
-                             "true");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       if (!CHECK_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK)) {
+               SET_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK);
+               bgp_static_redo_import_check(bgp);
+       }
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
 ALIAS_HIDDEN(bgp_network_import_check, bgp_network_import_check_exact_cmd,
             "bgp network import-check exact",
-            "BGP specific commands\n"
+            BGP_STR
             "BGP network command\n"
             "Check BGP network route exists in IGP\n"
             "Match route precisely\n")
 
-DEFUN_YANG(no_bgp_network_import_check,
-          no_bgp_network_import_check_cmd,
-          "no bgp network import-check",
-          NO_STR
-          "BGP specific commands\n"
-          "BGP network command\n"
-          "Check BGP network route exists in IGP\n")
+DEFUN (no_bgp_network_import_check,
+       no_bgp_network_import_check_cmd,
+       "no bgp network import-check",
+       NO_STR
+       BGP_STR
+       "BGP network command\n"
+       "Check BGP network route exists in IGP\n")
 {
-       nb_cli_enqueue_change(vty, "./global/import-check", NB_OP_MODIFY,
-                             "false");
-
-       return nb_cli_apply_changes(vty, NULL);
-}
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       if (CHECK_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK)) {
+               UNSET_FLAG(bgp->flags, BGP_FLAG_IMPORT_CHECK);
+               bgp_static_redo_import_check(bgp);
+       }
 
-void cli_show_router_bgp_import_check(struct vty *vty, struct lyd_node *dnode,
-                                     bool show_defaults)
-{
-       if (yang_dnode_get_bool(dnode, NULL) != SAVE_BGP_IMPORT_CHECK)
-               vty_out(vty, " bgp network import-check\n");
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_default_local_preference,
-          bgp_default_local_preference_cmd,
-          "bgp default local-preference (0-4294967295)",
-          "BGP specific commands\n"
-          "Configure BGP defaults\n"
-          "local preference (higher=more preferred)\n"
-          "Configure default local preference value\n")
+DEFUN (bgp_default_local_preference,
+       bgp_default_local_preference_cmd,
+       "bgp default local-preference (0-4294967295)",
+       BGP_STR
+       "Configure BGP defaults\n"
+       "local preference (higher=more preferred)\n"
+       "Configure default local preference value\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_number = 3;
+       uint32_t local_pref;
 
-       nb_cli_enqueue_change(vty, "./global/local-pref", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       return nb_cli_apply_changes(vty, NULL);
-}
+       local_pref = strtoul(argv[idx_number]->arg, NULL, 10);
 
-DEFUN_YANG(no_bgp_default_local_preference,
-          no_bgp_default_local_preference_cmd,
-          "no bgp default local-preference [(0-4294967295)]",
-          NO_STR
-          "BGP specific commands\n"
-          "Configure BGP defaults\n"
-          "local preference (higher=more preferred)\n"
-          "Configure default local preference value\n")
-{
-       nb_cli_enqueue_change(vty, "./global/local-pref", NB_OP_MODIFY, NULL);
+       bgp_default_local_preference_set(bgp, local_pref);
+       bgp_clear_star_soft_in(vty, bgp->name);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_local_pref(struct vty *vty, struct lyd_node *dnode,
-                                   bool show_defaults)
+DEFUN (no_bgp_default_local_preference,
+       no_bgp_default_local_preference_cmd,
+       "no bgp default local-preference [(0-4294967295)]",
+       NO_STR
+       BGP_STR
+       "Configure BGP defaults\n"
+       "local preference (higher=more preferred)\n"
+       "Configure default local preference value\n")
 {
-       vty_out(vty, " bgp default local-preference %u\n",
-               yang_dnode_get_uint32(dnode, NULL));
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp_default_local_preference_unset(bgp);
+       bgp_clear_star_soft_in(vty, bgp->name);
+
+       return CMD_SUCCESS;
 }
 
 
-DEFUN_YANG(bgp_default_subgroup_pkt_queue_max,
-          bgp_default_subgroup_pkt_queue_max_cmd,
-          "bgp default subgroup-pkt-queue-max (20-100)",
-          "BGP specific commands\n"
-          "Configure BGP defaults\n"
-          "subgroup-pkt-queue-max\n"
-          "Configure subgroup packet queue max\n")
+DEFUN (bgp_default_subgroup_pkt_queue_max,
+       bgp_default_subgroup_pkt_queue_max_cmd,
+       "bgp default subgroup-pkt-queue-max (20-100)",
+       BGP_STR
+       "Configure BGP defaults\n"
+       "subgroup-pkt-queue-max\n"
+       "Configure subgroup packet queue max\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_number = 3;
+       uint32_t max_size;
 
-       nb_cli_enqueue_change(
-               vty,
-               "./global/global-update-group-config/subgroup-pkt-queue-size",
-               NB_OP_MODIFY, argv[idx_number]->arg);
+       max_size = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-DEFUN_YANG(no_bgp_default_subgroup_pkt_queue_max,
-          no_bgp_default_subgroup_pkt_queue_max_cmd,
-          "no bgp default subgroup-pkt-queue-max [(20-100)]",
-          NO_STR
-          "BGP specific commands\n"
-          "Configure BGP defaults\n"
-          "subgroup-pkt-queue-max\n"
-          "Configure subgroup packet queue max\n")
-{
-       nb_cli_enqueue_change(
-               vty,
-               "./global/global-update-group-config/subgroup-pkt-queue-size",
-               NB_OP_MODIFY, NULL);
+       bgp_default_subgroup_pkt_queue_max_set(bgp, max_size);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_global_update_group_config_subgroup_pkt_queue_size(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
+DEFUN (no_bgp_default_subgroup_pkt_queue_max,
+       no_bgp_default_subgroup_pkt_queue_max_cmd,
+       "no bgp default subgroup-pkt-queue-max [(20-100)]",
+       NO_STR
+       BGP_STR
+       "Configure BGP defaults\n"
+       "subgroup-pkt-queue-max\n"
+       "Configure subgroup packet queue max\n")
 {
-       vty_out(vty, " bgp default subgroup-pkt-queue-max %u\n",
-               yang_dnode_get_uint32(dnode, NULL));
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp_default_subgroup_pkt_queue_max_unset(bgp);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_rr_allow_outbound_policy,
-          bgp_rr_allow_outbound_policy_cmd,
-          "bgp route-reflector allow-outbound-policy",
-          "BGP specific commands\n"
-          "Allow modifications made by out route-map\n"
-          "on ibgp neighbors\n")
-{
-       nb_cli_enqueue_change(vty,
-                             "./global/route-reflector/allow-outbound-policy",
-                             NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, NULL);
-}
 
-DEFUN_YANG(no_bgp_rr_allow_outbound_policy,
-          no_bgp_rr_allow_outbound_policy_cmd,
-          "no bgp route-reflector allow-outbound-policy",
-          NO_STR
-          "BGP specific commands\n"
-          "Allow modifications made by out route-map\n"
-          "on ibgp neighbors\n")
+DEFUN (bgp_rr_allow_outbound_policy,
+       bgp_rr_allow_outbound_policy_cmd,
+       "bgp route-reflector allow-outbound-policy",
+       BGP_STR
+       "Allow modifications made by out route-map\n"
+       "on ibgp neighbors\n")
 {
-       nb_cli_enqueue_change(vty,
-                             "./global/route-reflector/allow-outbound-policy",
-                             NB_OP_MODIFY, "false");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
-       return nb_cli_apply_changes(vty, NULL);
-}
+       if (!CHECK_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY)) {
+               SET_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY);
+               update_group_announce_rrclients(bgp);
+               bgp_clear_star_soft_out(vty, bgp->name);
+       }
 
+       return CMD_SUCCESS;
+}
 
-void cli_show_router_global_neighbor_config(struct vty *vty,
-                                           struct lyd_node *dnode,
-                                           bool show_defaults)
+DEFUN (no_bgp_rr_allow_outbound_policy,
+       no_bgp_rr_allow_outbound_policy_cmd,
+       "no bgp route-reflector allow-outbound-policy",
+       NO_STR
+       BGP_STR
+       "Allow modifications made by out route-map\n"
+       "on ibgp neighbors\n")
 {
-       uint32_t write_quanta, read_quanta;
-
-       if (yang_dnode_get_bool(dnode, "./log-neighbor-changes"))
-               vty_out(vty, " bgp log-neighbor-changes\n");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
 
-       if (yang_dnode_exists(dnode, "./dynamic-neighbors-limit")) {
-               uint32_t listen_limit = yang_dnode_get_uint32(
-                       dnode, "./dynamic-neighbors-limit");
-               vty_out(vty, " bgp listen limit %u\n", listen_limit);
+       if (CHECK_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY)) {
+               UNSET_FLAG(bgp->flags, BGP_FLAG_RR_ALLOW_OUTBOUND_POLICY);
+               update_group_announce_rrclients(bgp);
+               bgp_clear_star_soft_out(vty, bgp->name);
        }
 
-       write_quanta = yang_dnode_get_uint32(
-               dnode, "./packet-quanta-config/wpkt-quanta");
-       if (write_quanta != BGP_WRITE_PACKET_MAX)
-               vty_out(vty, " write-quanta %d\n", write_quanta);
-
-       read_quanta = yang_dnode_get_uint32(
-               dnode, "./packet-quanta-config/rpkt-quanta");
-
-       if (read_quanta != BGP_READ_PACKET_MAX)
-               vty_out(vty, " read-quanta %d\n", read_quanta);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_listen_limit,
-          bgp_listen_limit_cmd,
-          "bgp listen limit (1-65535)",
-          "BGP specific commands\n"
-          "BGP Dynamic Neighbors listen commands\n"
-          "Maximum number of BGP Dynamic Neighbors that can be created\n"
-          "Configure Dynamic Neighbors listen limit value\n")
+DEFUN (bgp_listen_limit,
+       bgp_listen_limit_cmd,
+       "bgp listen limit (1-65535)",
+       BGP_STR
+       "BGP Dynamic Neighbors listen commands\n"
+       "Maximum number of BGP Dynamic Neighbors that can be created\n"
+       "Configure Dynamic Neighbors listen limit value\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_number = 3;
+       int listen_limit;
+
+       listen_limit = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       nb_cli_enqueue_change(
-               vty, "./global/global-neighbor-config/dynamic-neighbors-limit",
-               NB_OP_MODIFY, argv[idx_number]->arg);
+       bgp_listen_limit_set(bgp, listen_limit);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_bgp_listen_limit,
-          no_bgp_listen_limit_cmd,
-          "no bgp listen limit [(1-65535)]",
-          NO_STR
-          "BGP specific commands\n"
-          "BGP Dynamic Neighbors listen commands\n"
-          "Maximum number of BGP Dynamic Neighbors that can be created\n"
-          "Configure Dynamic Neighbors listen limit value\n")
+DEFUN (no_bgp_listen_limit,
+       no_bgp_listen_limit_cmd,
+       "no bgp listen limit [(1-65535)]",
+       NO_STR
+       BGP_STR
+       "BGP Dynamic Neighbors listen commands\n"
+       "Maximum number of BGP Dynamic Neighbors that can be created\n"
+       "Configure Dynamic Neighbors listen limit value\n")
 {
-       nb_cli_enqueue_change(
-               vty, "./global/global-neighbor-config/dynamic-neighbors-limit",
-               NB_OP_DESTROY, NULL);
-
-       return nb_cli_apply_changes(vty, NULL);
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp_listen_limit_unset(bgp);
+       return CMD_SUCCESS;
 }
 
 
@@ -4184,7 +3885,7 @@ static struct peer_group *listen_range_exists(struct bgp *bgp,
 DEFUN (bgp_listen_range,
        bgp_listen_range_cmd,
        "bgp listen range <A.B.C.D/M|X:X::X:X/M> peer-group PGNAME",
-       "BGP specific commands\n"
+       BGP_STR
        "Configure BGP dynamic neighbors listen range\n"
        "Configure BGP dynamic neighbors listen range\n"
        NEIGHBOR_ADDR_STR
@@ -4255,7 +3956,7 @@ DEFUN (no_bgp_listen_range,
        no_bgp_listen_range_cmd,
        "no bgp listen range <A.B.C.D/M|X:X::X:X/M> peer-group PGNAME",
        NO_STR
-       "BGP specific commands\n"
+       BGP_STR
        "Unconfigure BGP dynamic neighbors listen range\n"
        "Unconfigure BGP dynamic neighbors listen range\n"
        NEIGHBOR_ADDR_STR
@@ -4326,86 +4027,135 @@ void bgp_config_write_listen(struct vty *vty, struct bgp *bgp)
 }
 
 
-DEFUN_YANG(bgp_disable_connected_route_check,
-          bgp_disable_connected_route_check_cmd,
-          "bgp disable-ebgp-connected-route-check",
-          "BGP specific commands\n"
-          "Disable checking if nexthop is connected on ebgp sessions\n")
-{
-       nb_cli_enqueue_change(vty,
-                             "./global/ebgp-multihop-connected-route-check",
-                             NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, NULL);
-}
-
-DEFUN_YANG(no_bgp_disable_connected_route_check,
-          no_bgp_disable_connected_route_check_cmd,
-          "no bgp disable-ebgp-connected-route-check",
-          NO_STR
-          "BGP specific commands\n"
-          "Disable checking if nexthop is connected on ebgp sessions\n")
+DEFUN (bgp_disable_connected_route_check,
+       bgp_disable_connected_route_check_cmd,
+       "bgp disable-ebgp-connected-route-check",
+       BGP_STR
+       "Disable checking if nexthop is connected on ebgp sessions\n")
 {
-       nb_cli_enqueue_change(vty,
-                             "./global/ebgp-multihop-connected-route-check",
-                             NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, NULL);
-}
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       SET_FLAG(bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK);
+       bgp_clear_star_soft_in(vty, bgp->name);
 
-void cli_show_router_global_ebgp_multihop_connected_route_check(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       if (yang_dnode_get_bool(dnode, NULL))
-               vty_out(vty, " bgp disable-ebgp-connected-route-check\n");
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(bgp_default_shutdown,
-          bgp_default_shutdown_cmd,
-          "[no] bgp default shutdown",
-          NO_STR BGP_STR
-          "Configure BGP defaults\n"
-          "Apply administrative shutdown to newly configured peers\n")
+DEFUN (no_bgp_disable_connected_route_check,
+       no_bgp_disable_connected_route_check_cmd,
+       "no bgp disable-ebgp-connected-route-check",
+       NO_STR
+       BGP_STR
+       "Disable checking if nexthop is connected on ebgp sessions\n")
 {
-       nb_cli_enqueue_change(vty, "./global/default-shutdown", NB_OP_MODIFY,
-                             strmatch(argv[0]->text, "no") ? "false" : "true");
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       UNSET_FLAG(bgp->flags, BGP_FLAG_DISABLE_NH_CONNECTED_CHK);
+       bgp_clear_star_soft_in(vty, bgp->name);
 
-       return nb_cli_apply_changes(vty, NULL);
+       return CMD_SUCCESS;
 }
 
-void cli_show_router_bgp_default_shutdown(struct vty *vty,
-                                         struct lyd_node *dnode,
-                                         bool show_defaults)
-{
-       if (yang_dnode_get_bool(dnode, NULL))
-               vty_out(vty, " bgp default shutdown\n");
-}
 
-DEFPY(bgp_shutdown_msg, bgp_shutdown_msg_cmd, "bgp shutdown message MSG...",
-      BGP_STR
-      "Administrative shutdown of the BGP instance\n"
-      "Add a shutdown message (RFC 8203)\n"
-      "Shutdown message\n")
+static int peer_remote_as_vty(struct vty *vty, const char *peer_str,
+                             const char *as_str)
 {
-       char *msgstr = NULL;
-
        VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int ret;
+       as_t as;
+       int as_type = AS_SPECIFIED;
+       union sockunion su;
 
-       if (argc > 3)
-               msgstr = argv_concat(argv, argc, 3);
-
-       bgp_shutdown_enable(bgp, msgstr);
-       XFREE(MTYPE_TMP, msgstr);
+       if (as_str[0] == 'i') {
+               as = 0;
+               as_type = AS_INTERNAL;
+       } else if (as_str[0] == 'e') {
+               as = 0;
+               as_type = AS_EXTERNAL;
+       } else {
+               /* Get AS number.  */
+               as = strtoul(as_str, NULL, 10);
+       }
 
-       return CMD_SUCCESS;
-}
+       /* If peer is peer group or interface peer, call proper function. */
+       ret = str2sockunion(peer_str, &su);
+       if (ret < 0) {
+               struct peer *peer;
 
-DEFPY(bgp_shutdown, bgp_shutdown_cmd, "bgp shutdown",
-      BGP_STR "Administrative shutdown of the BGP instance\n")
-{
-       VTY_DECLVAR_CONTEXT(bgp, bgp);
+               /* Check if existing interface peer */
+               peer = peer_lookup_by_conf_if(bgp, peer_str);
 
-       bgp_shutdown_enable(bgp, NULL);
+               ret = peer_remote_as(bgp, NULL, peer_str, &as, as_type);
+
+               /* if not interface peer, check peer-group settings */
+               if (ret < 0 && !peer) {
+                       ret = peer_group_remote_as(bgp, peer_str, &as, as_type);
+                       if (ret < 0) {
+                               vty_out(vty,
+                                       "%% Create the peer-group or interface first\n");
+                               return CMD_WARNING_CONFIG_FAILED;
+                       }
+                       return CMD_SUCCESS;
+               }
+       } else {
+               if (peer_address_self_check(bgp, &su)) {
+                       vty_out(vty,
+                               "%% Can not configure the local system as neighbor\n");
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
+               ret = peer_remote_as(bgp, &su, NULL, &as, as_type);
+       }
+
+       /* This peer belongs to peer group.  */
+       switch (ret) {
+       case BGP_ERR_PEER_GROUP_MEMBER:
+               vty_out(vty,
+                       "%% Peer-group member cannot override remote-as of peer-group\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       case BGP_ERR_PEER_GROUP_PEER_TYPE_DIFFERENT:
+               vty_out(vty,
+                       "%% Peer-group members must be all internal or all external\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       return bgp_vty_return(vty, ret);
+}
+
+DEFUN (bgp_default_shutdown,
+       bgp_default_shutdown_cmd,
+       "[no] bgp default shutdown",
+       NO_STR
+       BGP_STR
+       "Configure BGP defaults\n"
+       "Apply administrative shutdown to newly configured peers\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp->autoshutdown = !strmatch(argv[0]->text, "no");
+       return CMD_SUCCESS;
+}
+
+DEFPY(bgp_shutdown_msg, bgp_shutdown_msg_cmd, "bgp shutdown message MSG...",
+      BGP_STR
+      "Administrative shutdown of the BGP instance\n"
+      "Add a shutdown message (RFC 8203)\n"
+      "Shutdown message\n")
+{
+       char *msgstr = NULL;
+
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+
+       if (argc > 3)
+               msgstr = argv_concat(argv, argc, 3);
+
+       bgp_shutdown_enable(bgp, msgstr);
+       XFREE(MTYPE_TMP, msgstr);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(bgp_shutdown, bgp_shutdown_cmd, "bgp shutdown",
+      BGP_STR "Administrative shutdown of the BGP instance\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+
+       bgp_shutdown_enable(bgp, NULL);
 
        return CMD_SUCCESS;
 }
@@ -4425,67 +4175,52 @@ ALIAS(no_bgp_shutdown, no_bgp_shutdown_msg_cmd,
       "Administrative shutdown of the BGP instance\n"
       "Add a shutdown message (RFC 8203)\n" "Shutdown message\n")
 
-DEFUN_YANG(neighbor_remote_as,
-          neighbor_remote_as_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> remote-as <(1-4294967295)|internal|external>",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Specify a BGP neighbor\n" AS_STR
-          "Internal BGP peer\n"
-          "External BGP peer\n")
+DEFUN (neighbor_remote_as,
+       neighbor_remote_as_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> remote-as <(1-4294967295)|internal|external>",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Specify a BGP neighbor\n"
+       AS_STR
+       "Internal BGP peer\n"
+       "External BGP peer\n")
 {
        int idx_peer = 1;
        int idx_remote_as = 3;
-       char base_xpath[XPATH_MAXLEN];
-       char unnbr_xpath[XPATH_MAXLEN];
-       char prgrp_xpath[XPATH_MAXLEN];
-       union sockunion su;
-       const char *as_type_str = "as-specified";
-
-       if (str2sockunion(argv[idx_peer]->arg, &su) < 0) {
-               snprintf(unnbr_xpath, sizeof(unnbr_xpath),
-                        FRR_BGP_NEIGHBOR_UNNUM_XPATH, argv[idx_peer]->arg, "");
-
-               snprintf(prgrp_xpath, sizeof(prgrp_xpath),
-                        FRR_BGP_PEER_GROUP_XPATH, argv[idx_peer]->arg, "");
-
-               if (yang_dnode_existsf(vty->candidate_config->dnode, "%s%s",
-                                      VTY_CURR_XPATH, unnbr_xpath + 1)) {
-                       strlcpy(base_xpath, unnbr_xpath, sizeof(base_xpath));
-               } else if (yang_dnode_existsf(vty->candidate_config->dnode,
-                                             "%s%s", VTY_CURR_XPATH,
-                                             prgrp_xpath + 1)) {
-                       snprintf(base_xpath, sizeof(base_xpath),
-                                FRR_BGP_PEER_GROUP_XPATH, argv[idx_peer]->arg,
-                                "");
-               } else {
-                       vty_out(vty,
-                               "%% Create the peer-group or interface first\n");
-                       return CMD_WARNING_CONFIG_FAILED;
-               }
-       } else {
-               snprintf(base_xpath, sizeof(base_xpath),
-                        FRR_BGP_NEIGHBOR_NUM_XPATH, argv[idx_peer]->arg, "");
-       }
+       return peer_remote_as_vty(vty, argv[idx_peer]->arg,
+                                 argv[idx_remote_as]->arg);
+}
+/* Enable fast convergence of bgp sessions. If this is enabled, bgp
+ * sessions do not wait for hold timer expiry to bring down the sessions
+ * when nexthop becomes unreachable
+ */
+DEFUN(bgp_fast_convergence, bgp_fast_convergence_cmd, "bgp fast-convergence",
+      BGP_STR "Fast convergence for bgp sessions\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp->fast_convergence = true;
 
-       if (argv[idx_remote_as]->arg[0] == 'i') {
-               as_type_str = "internal";
-       } else if (argv[idx_remote_as]->arg[0] == 'e') {
-               as_type_str = "external";
-       } else {
-               nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as",
-                                     NB_OP_MODIFY, argv[idx_remote_as]->arg);
-       }
-       nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as-type",
-                             NB_OP_MODIFY, as_type_str);
+       return CMD_SUCCESS;
+}
+
+DEFUN(no_bgp_fast_convergence, no_bgp_fast_convergence_cmd,
+      "no bgp fast-convergence",
+      NO_STR BGP_STR "Fast convergence for bgp sessions\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       bgp->fast_convergence = false;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return CMD_SUCCESS;
 }
 
-int peer_conf_interface_create(struct bgp *bgp, const char *conf_if,
-                              bool v6only, const char *peer_group_name,
-                              int as_type, as_t as, char *errmsg,
-                              size_t errmsg_len)
+static int peer_conf_interface_get(struct vty *vty, const char *conf_if,
+                                  int v6only,
+                                  const char *peer_group_name,
+                                  const char *as_str)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       as_t as = 0;
+       int as_type = AS_UNSPECIFIED;
        struct peer *peer;
        struct peer_group *group;
        int ret = 0;
@@ -4493,23 +4228,33 @@ int peer_conf_interface_create(struct bgp *bgp, const char *conf_if,
        group = peer_group_lookup(bgp, conf_if);
 
        if (group) {
-               snprintf(errmsg, errmsg_len,
-                        "Name conflict with peer-group \n");
-               return -1;
+               vty_out(vty, "%% Name conflict with peer-group \n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       if (as_str) {
+               if (as_str[0] == 'i') {
+                       as_type = AS_INTERNAL;
+               } else if (as_str[0] == 'e') {
+                       as_type = AS_EXTERNAL;
+               } else {
+                       /* Get AS number.  */
+                       as = strtoul(as_str, NULL, 10);
+                       as_type = AS_SPECIFIED;
+               }
        }
 
        peer = peer_lookup_by_conf_if(bgp, conf_if);
        if (peer) {
-               if (as_type != AS_UNSPECIFIED)
+               if (as_str)
                        ret = peer_remote_as(bgp, NULL, conf_if, &as, as_type);
        } else {
                peer = peer_create(NULL, conf_if, bgp, bgp->as, as, as_type,
                                   NULL);
 
                if (!peer) {
-                       snprintf(errmsg, errmsg_len,
-                                "BGP failed to create peer\n");
-                       return -1;
+                       vty_out(vty, "%% BGP failed to create peer\n");
+                       return CMD_WARNING_CONFIG_FAILED;
                }
 
                if (v6only)
@@ -4552,405 +4297,371 @@ int peer_conf_interface_create(struct bgp *bgp, const char *conf_if,
        if (peer_group_name) {
                group = peer_group_lookup(bgp, peer_group_name);
                if (!group) {
-                       snprintf(errmsg, errmsg_len,
-                                "Configure the peer-group first\n");
-                       return -1;
+                       vty_out(vty, "%% Configure the peer-group first\n");
+                       return CMD_WARNING_CONFIG_FAILED;
                }
 
                ret = peer_group_bind(bgp, NULL, peer, group, &as);
        }
 
-       return bgp_nb_errmsg_return(errmsg, errmsg_len, ret);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG(neighbor_interface_config,
-          neighbor_interface_config_cmd,
-          "neighbor WORD interface [peer-group PGNAME]",
-          NEIGHBOR_STR
-          "Interface name or neighbor tag\n"
-          "Enable BGP on interface\n"
-          "Member of the peer-group\n"
-          "Peer-group name\n")
+DEFUN (neighbor_interface_config,
+       neighbor_interface_config_cmd,
+       "neighbor WORD interface [peer-group PGNAME]",
+       NEIGHBOR_STR
+       "Interface name or neighbor tag\n"
+       "Enable BGP on interface\n"
+       "Member of the peer-group\n"
+       "Peer-group name\n")
 {
        int idx_word = 1;
        int idx_peer_group_word = 4;
-       char base_xpath[XPATH_MAXLEN];
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH,
-                argv[idx_word]->arg, "");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
        if (argc > idx_peer_group_word)
-               nb_cli_enqueue_change(vty, "./peer-group", NB_OP_MODIFY,
-                                     argv[idx_peer_group_word]->arg);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+               return peer_conf_interface_get(
+                       vty, argv[idx_word]->arg, 0,
+                       argv[idx_peer_group_word]->arg, NULL);
+       else
+               return peer_conf_interface_get(vty, argv[idx_word]->arg, 0,
+                                              NULL, NULL);
 }
 
-DEFUN_YANG(neighbor_interface_config_v6only,
-          neighbor_interface_config_v6only_cmd,
-          "neighbor WORD interface v6only [peer-group PGNAME]",
-          NEIGHBOR_STR
-          "Interface name or neighbor tag\n"
-          "Enable BGP on interface\n"
-          "Enable BGP with v6 link-local only\n"
-          "Member of the peer-group\n"
-          "Peer-group name\n")
+DEFUN (neighbor_interface_config_v6only,
+       neighbor_interface_config_v6only_cmd,
+       "neighbor WORD interface v6only [peer-group PGNAME]",
+       NEIGHBOR_STR
+       "Interface name or neighbor tag\n"
+       "Enable BGP on interface\n"
+       "Enable BGP with v6 link-local only\n"
+       "Member of the peer-group\n"
+       "Peer-group name\n")
 {
        int idx_word = 1;
        int idx_peer_group_word = 5;
-       char base_xpath[XPATH_MAXLEN];
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH,
-                argv[idx_word]->arg, "");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
        if (argc > idx_peer_group_word)
-               nb_cli_enqueue_change(vty, "./peer-group", NB_OP_MODIFY,
-                                     argv[idx_peer_group_word]->arg);
-
-       nb_cli_enqueue_change(vty, "./v6only", NB_OP_MODIFY, "true");
+               return peer_conf_interface_get(
+                       vty, argv[idx_word]->arg, 1,
+                       argv[idx_peer_group_word]->arg, NULL);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_conf_interface_get(vty, argv[idx_word]->arg, 1, NULL, NULL);
 }
 
 
-DEFUN_YANG(
-       neighbor_interface_config_remote_as,
-       neighbor_interface_config_remote_as_cmd,
-       "neighbor WORD interface remote-as <(1-4294967295)|internal|external>",
-       NEIGHBOR_STR
-       "Interface name or neighbor tag\n"
-       "Enable BGP on interface\n"
-       "Specify a BGP neighbor\n" AS_STR
-       "Internal BGP peer\n"
-       "External BGP peer\n")
+DEFUN (neighbor_interface_config_remote_as,
+       neighbor_interface_config_remote_as_cmd,
+       "neighbor WORD interface remote-as <(1-4294967295)|internal|external>",
+       NEIGHBOR_STR
+       "Interface name or neighbor tag\n"
+       "Enable BGP on interface\n"
+       "Specify a BGP neighbor\n"
+       AS_STR
+       "Internal BGP peer\n"
+       "External BGP peer\n")
 {
        int idx_word = 1;
        int idx_remote_as = 4;
-       char base_xpath[XPATH_MAXLEN];
-       const char *as_type_str = "as-specified";
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH,
-                argv[idx_word]->arg, "");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       if (argv[idx_remote_as]->arg[0] == 'i') {
-               as_type_str = "internal";
-       } else if (argv[idx_remote_as]->arg[0] == 'e') {
-               as_type_str = "external";
-       } else {
-               nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as",
-                                     NB_OP_MODIFY, argv[idx_remote_as]->arg);
-       }
-       nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as-type",
-                             NB_OP_MODIFY, as_type_str);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_conf_interface_get(vty, argv[idx_word]->arg, 0, NULL,
+                                      argv[idx_remote_as]->arg);
 }
 
-DEFUN_YANG(
-       neighbor_interface_v6only_config_remote_as,
-       neighbor_interface_v6only_config_remote_as_cmd,
-       "neighbor WORD interface v6only remote-as <(1-4294967295)|internal|external>",
-       NEIGHBOR_STR
-       "Interface name or neighbor tag\n"
-       "Enable BGP with v6 link-local only\n"
-       "Enable BGP on interface\n"
-       "Specify a BGP neighbor\n" AS_STR
-       "Internal BGP peer\n"
-       "External BGP peer\n")
+DEFUN (neighbor_interface_v6only_config_remote_as,
+       neighbor_interface_v6only_config_remote_as_cmd,
+       "neighbor WORD interface v6only remote-as <(1-4294967295)|internal|external>",
+       NEIGHBOR_STR
+       "Interface name or neighbor tag\n"
+       "Enable BGP with v6 link-local only\n"
+       "Enable BGP on interface\n"
+       "Specify a BGP neighbor\n"
+       AS_STR
+       "Internal BGP peer\n"
+       "External BGP peer\n")
 {
        int idx_word = 1;
        int idx_remote_as = 5;
-       char base_xpath[XPATH_MAXLEN];
-       const char *as_type_str = "as-specified";
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH,
-                argv[idx_word]->arg, "");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       nb_cli_enqueue_change(vty, "./v6only", NB_OP_MODIFY, "true");
-
-       if (argv[idx_remote_as]->arg[0] == 'i') {
-               as_type_str = "internal";
-       } else if (argv[idx_remote_as]->arg[0] == 'e') {
-               as_type_str = "external";
-       } else {
-               nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as",
-                                     NB_OP_MODIFY, argv[idx_remote_as]->arg);
-       }
-       nb_cli_enqueue_change(vty, "./neighbor-remote-as/remote-as-type",
-                             NB_OP_MODIFY, as_type_str);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_conf_interface_get(vty, argv[idx_word]->arg, 1, NULL,
+                                      argv[idx_remote_as]->arg);
 }
 
-DEFUN_YANG(neighbor_peer_group, neighbor_peer_group_cmd,
-          "neighbor WORD peer-group",
-          NEIGHBOR_STR
-          "Interface name or neighbor tag\n"
-          "Configure peer-group\n")
+DEFUN (neighbor_peer_group,
+       neighbor_peer_group_cmd,
+       "neighbor WORD peer-group",
+       NEIGHBOR_STR
+       "Interface name or neighbor tag\n"
+       "Configure peer-group\n")
 {
-       char base_xpath[XPATH_MAXLEN];
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_word = 1;
+       struct peer *peer;
+       struct peer_group *group;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_PEER_GROUP_XPATH,
-                argv[idx_word]->arg, "");
+       peer = peer_lookup_by_conf_if(bgp, argv[idx_word]->arg);
+       if (peer) {
+               vty_out(vty, "%% Name conflict with interface: \n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       group = peer_group_get(bgp, argv[idx_word]->arg);
+       if (!group) {
+               vty_out(vty, "%% BGP failed to find or create peer-group\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_neighbor,
-          no_neighbor_cmd,
-          "no neighbor <WORD|<A.B.C.D|X:X::X:X> [remote-as <(1-4294967295)|internal|external>]>",
-          NO_STR NEIGHBOR_STR
-          NEIGHBOR_ADDR_STR2
-          "Specify a BGP neighbor\n" AS_STR
-          "Internal BGP peer\n"
-          "External BGP peer\n")
+DEFUN (no_neighbor,
+       no_neighbor_cmd,
+       "no neighbor <WORD|<A.B.C.D|X:X::X:X> [remote-as <(1-4294967295)|internal|external>]>",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Specify a BGP neighbor\n"
+       AS_STR
+       "Internal BGP peer\n"
+       "External BGP peer\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char num_xpath[XPATH_MAXLEN];
-       char unnbr_xpath[XPATH_MAXLEN];
-       char prgrp_xpath[XPATH_MAXLEN];
+       int ret;
        union sockunion su;
+       struct peer_group *group;
+       struct peer *peer;
+       struct peer *other;
 
-       if (str2sockunion(argv[idx_peer]->arg, &su) == 0) {
-               snprintf(num_xpath, sizeof(num_xpath),
-                        FRR_BGP_NEIGHBOR_NUM_XPATH, argv[idx_peer]->arg, "");
-               if (yang_dnode_existsf(vty->candidate_config->dnode, "%s%s",
-                                      VTY_CURR_XPATH, num_xpath + 1)) {
-                       strlcpy(base_xpath, num_xpath, sizeof(base_xpath));
+       ret = str2sockunion(argv[idx_peer]->arg, &su);
+       if (ret < 0) {
+               /* look up for neighbor by interface name config. */
+               peer = peer_lookup_by_conf_if(bgp, argv[idx_peer]->arg);
+               if (peer) {
+                       /* Request zebra to terminate IPv6 RAs on this
+                        * interface. */
+                       if (peer->ifp)
+                               bgp_zebra_terminate_radv(peer->bgp, peer);
+                       peer_notify_unconfig(peer);
+                       peer_delete(peer);
+                       return CMD_SUCCESS;
                }
-       } else {
-               snprintf(unnbr_xpath, sizeof(unnbr_xpath),
-                        FRR_BGP_NEIGHBOR_UNNUM_XPATH, argv[idx_peer]->arg, "");
-
-               snprintf(prgrp_xpath, sizeof(prgrp_xpath),
-                        FRR_BGP_PEER_GROUP_XPATH, argv[idx_peer]->arg, "");
-
-               if (yang_dnode_existsf(vty->candidate_config->dnode, "%s%s",
-                                      VTY_CURR_XPATH, unnbr_xpath + 1)) {
-                       strlcpy(base_xpath, unnbr_xpath, sizeof(base_xpath));
-               } else if (yang_dnode_existsf(vty->candidate_config->dnode,
-                                             "%s%s", VTY_CURR_XPATH,
-                                             prgrp_xpath + 1)) {
-                       strlcpy(base_xpath, prgrp_xpath, sizeof(base_xpath));
+
+               group = peer_group_lookup(bgp, argv[idx_peer]->arg);
+               if (group) {
+                       peer_group_notify_unconfig(group);
+                       peer_group_delete(group);
                } else {
-                       vty_out(vty,
-                               "%% Create the peer-group or interface first\n");
+                       vty_out(vty, "%% Create the peer-group first\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
-       }
-
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_DESTROY, NULL);
+       } else {
+               peer = peer_lookup(bgp, &su);
+               if (peer) {
+                       if (peer_dynamic_neighbor(peer)) {
+                               vty_out(vty,
+                                       "%% Operation not allowed on a dynamic neighbor\n");
+                               return CMD_WARNING_CONFIG_FAILED;
+                       }
 
-       /*
-        * Need to commit any pending so this command doesn't merge with a
-        * create into a modify, which BGP can't handle
-        */
-       return nb_cli_apply_changes_clear_pending(vty, NULL);
-}
-
-DEFUN_YANG(no_neighbor_interface_config,
-          no_neighbor_interface_config_cmd,
-          "no neighbor WORD interface [v6only] [peer-group PGNAME] [remote-as <(1-4294967295)|internal|external>]",
-          NO_STR NEIGHBOR_STR
-          "Interface name\n"
-          "Configure BGP on interface\n"
-          "Enable BGP with v6 link-local only\n"
-          "Member of the peer-group\n"
-          "Peer-group name\n"
-          "Specify a BGP neighbor\n" AS_STR
-          "Internal BGP peer\n"
-          "External BGP peer\n")
-{
-       int idx_word = 2;
-       char base_xpath[XPATH_MAXLEN];
+                       other = peer->doppelganger;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH,
-                argv[idx_word]->arg, "");
+                       if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
+                               bgp_zebra_terminate_radv(peer->bgp, peer);
 
-       nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
+                       peer_notify_unconfig(peer);
+                       peer_delete(peer);
+                       if (other && other->status != Deleted) {
+                               peer_notify_unconfig(other);
+                               peer_delete(other);
+                       }
+               }
+       }
 
-       /*
-        * Need to commit any pending so this command doesn't merge with a
-        * create into a modify, which BGP can't handle
-        */
-       return nb_cli_apply_changes_clear_pending(vty, base_xpath);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_neighbor_peer_group,
-          no_neighbor_peer_group_cmd,
-          "no neighbor WORD peer-group",
-          NO_STR NEIGHBOR_STR
-          "Neighbor tag\n"
-          "Configure peer-group\n")
+DEFUN (no_neighbor_interface_config,
+       no_neighbor_interface_config_cmd,
+       "no neighbor WORD interface [v6only] [peer-group PGNAME] [remote-as <(1-4294967295)|internal|external>]",
+       NO_STR
+       NEIGHBOR_STR
+       "Interface name\n"
+       "Configure BGP on interface\n"
+       "Enable BGP with v6 link-local only\n"
+       "Member of the peer-group\n"
+       "Peer-group name\n"
+       "Specify a BGP neighbor\n"
+       AS_STR
+       "Internal BGP peer\n"
+       "External BGP peer\n")
 {
-       char base_xpath[XPATH_MAXLEN];
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_word = 2;
+       struct peer *peer;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_PEER_GROUP_XPATH,
-                argv[idx_word]->arg, "");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-
-       /*
-        * Need to commit any pending so this command doesn't merge with a
-        * create into a modify, which BGP can't handle
-        */
-       return nb_cli_apply_changes_clear_pending(vty, base_xpath);
+       /* look up for neighbor by interface name config. */
+       peer = peer_lookup_by_conf_if(bgp, argv[idx_word]->arg);
+       if (peer) {
+               /* Request zebra to terminate IPv6 RAs on this interface. */
+               if (peer->ifp)
+                       bgp_zebra_terminate_radv(peer->bgp, peer);
+               peer_notify_unconfig(peer);
+               peer_delete(peer);
+       } else {
+               vty_out(vty, "%% Create the bgp interface first\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_neighbor_interface_peer_group_remote_as,
-          no_neighbor_interface_peer_group_remote_as_cmd,
-          "no neighbor WORD remote-as <(1-4294967295)|internal|external>",
-          NO_STR NEIGHBOR_STR
-          "Interface name or neighbor tag\n"
-          "Specify a BGP neighbor\n" AS_STR
-          "Internal BGP peer\n"
-          "External BGP peer\n")
+DEFUN (no_neighbor_peer_group,
+       no_neighbor_peer_group_cmd,
+       "no neighbor WORD peer-group",
+       NO_STR
+       NEIGHBOR_STR
+       "Neighbor tag\n"
+       "Configure peer-group\n")
 {
-       int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char unnbr_xpath[XPATH_MAXLEN];
-       char prgrp_xpath[XPATH_MAXLEN];
-
-       snprintf(unnbr_xpath, sizeof(unnbr_xpath), FRR_BGP_NEIGHBOR_UNNUM_XPATH,
-                argv[idx_peer]->arg, "");
-
-       snprintf(prgrp_xpath, sizeof(prgrp_xpath), FRR_BGP_PEER_GROUP_XPATH,
-                argv[idx_peer]->arg, "");
-
-       if (yang_dnode_existsf(vty->candidate_config->dnode, "%s%s",
-                              VTY_CURR_XPATH, unnbr_xpath + 1)) {
-               strlcpy(base_xpath, unnbr_xpath, sizeof(base_xpath));
-       } else if (yang_dnode_existsf(vty->candidate_config->dnode, "%s%s",
-                                     VTY_CURR_XPATH, prgrp_xpath + 1)) {
-               strlcpy(base_xpath, prgrp_xpath, sizeof(base_xpath));
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_word = 2;
+       struct peer_group *group;
+
+       group = peer_group_lookup(bgp, argv[idx_word]->arg);
+       if (group) {
+               peer_group_notify_unconfig(group);
+               peer_group_delete(group);
        } else {
-               vty_out(vty, "%% Create the peer-group or interface first\n");
+               vty_out(vty, "%% Create the peer-group first\n");
                return CMD_WARNING_CONFIG_FAILED;
        }
+       return CMD_SUCCESS;
+}
 
-       strlcat(base_xpath, "/neighbor-remote-as/remote-as-type",
-               sizeof(base_xpath));
+DEFUN (no_neighbor_interface_peer_group_remote_as,
+       no_neighbor_interface_peer_group_remote_as_cmd,
+       "no neighbor WORD remote-as <(1-4294967295)|internal|external>",
+       NO_STR
+       NEIGHBOR_STR
+       "Interface name or neighbor tag\n"
+       "Specify a BGP neighbor\n"
+       AS_STR
+       "Internal BGP peer\n"
+       "External BGP peer\n")
+{
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_word = 2;
+       struct peer_group *group;
+       struct peer *peer;
 
-       nb_cli_enqueue_change(vty, base_xpath, NB_OP_DESTROY, NULL);
+       /* look up for neighbor by interface name config. */
+       peer = peer_lookup_by_conf_if(bgp, argv[idx_word]->arg);
+       if (peer) {
+               peer_as_change(peer, 0, AS_UNSPECIFIED);
+               return CMD_SUCCESS;
+       }
 
-       /*
-        * Need to commit any pending so this command doesn't merge with a
-        * create into a modify, which BGP can't handle
-        */
-       return nb_cli_apply_changes_clear_pending(vty, NULL);
+       group = peer_group_lookup(bgp, argv[idx_word]->arg);
+       if (group)
+               peer_group_remote_as_delete(group);
+       else {
+               vty_out(vty, "%% Create the peer-group or interface first\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(neighbor_local_as,
-          neighbor_local_as_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295)",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Specify a local-as number\n"
-          "AS number used as local AS\n")
+DEFUN (neighbor_local_as,
+       neighbor_local_as_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295)",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Specify a local-as number\n"
+       "AS number used as local AS\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       int ret;
+       as_t as;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./local-as/local-as", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       as = strtoul(argv[idx_number]->arg, NULL, 10);
+       ret = peer_local_as_set(peer, as, 0, 0);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG(
-       neighbor_local_as_no_prepend, neighbor_local_as_no_prepend_cmd,
-       "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295) no-prepend",
-       NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-       "Specify a local-as number\n"
-       "AS number used as local AS\n"
-       "Do not prepend local-as to updates from ebgp peers\n")
+DEFUN (neighbor_local_as_no_prepend,
+       neighbor_local_as_no_prepend_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295) no-prepend",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Specify a local-as number\n"
+       "AS number used as local AS\n"
+       "Do not prepend local-as to updates from ebgp peers\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       int ret;
+       as_t as;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./local-as/local-as", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-       nb_cli_enqueue_change(vty, "./local-as/no-prepend", NB_OP_MODIFY,
-                             "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       as = strtoul(argv[idx_number]->arg, NULL, 10);
+       ret = peer_local_as_set(peer, as, 1, 0);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG(
-       neighbor_local_as_no_prepend_replace_as,
-       neighbor_local_as_no_prepend_replace_as_cmd,
-       "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295) no-prepend replace-as",
-       NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-       "Specify a local-as number\n"
-       "AS number used as local AS\n"
-       "Do not prepend local-as to updates from ebgp peers\n"
-       "Do not prepend local-as to updates from ibgp peers\n")
+DEFUN (neighbor_local_as_no_prepend_replace_as,
+       neighbor_local_as_no_prepend_replace_as_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> local-as (1-4294967295) no-prepend replace-as",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Specify a local-as number\n"
+       "AS number used as local AS\n"
+       "Do not prepend local-as to updates from ebgp peers\n"
+       "Do not prepend local-as to updates from ibgp peers\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       int ret;
+       as_t as;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./local-as/local-as", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-       nb_cli_enqueue_change(vty, "./local-as/no-prepend", NB_OP_MODIFY,
-                             "true");
-       nb_cli_enqueue_change(vty, "./local-as/replace-as", NB_OP_MODIFY,
-                             "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       as = strtoul(argv[idx_number]->arg, NULL, 10);
+       ret = peer_local_as_set(peer, as, 1, 1);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG(no_neighbor_local_as,
-          no_neighbor_local_as_cmd,
-          "no neighbor <A.B.C.D|X:X::X:X|WORD> local-as [(1-4294967295) [no-prepend [replace-as]]]",
-          NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Specify a local-as number\n"
-          "AS number used as local AS\n"
-          "Do not prepend local-as to updates from ebgp peers\n"
-          "Do not prepend local-as to updates from ibgp peers\n")
+DEFUN (no_neighbor_local_as,
+       no_neighbor_local_as_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> local-as [(1-4294967295) [no-prepend [replace-as]]]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Specify a local-as number\n"
+       "AS number used as local AS\n"
+       "Do not prepend local-as to updates from ebgp peers\n"
+       "Do not prepend local-as to updates from ibgp peers\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       int ret;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./local-as/local-as", NB_OP_DESTROY, NULL);
-       nb_cli_enqueue_change(vty, "./local-as/no-prepend", NB_OP_MODIFY,
-                             "false");
-       nb_cli_enqueue_change(vty, "./local-as/replace-as", NB_OP_MODIFY,
-                             "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       ret = peer_local_as_unset(peer);
+       return bgp_vty_return(vty, ret);
 }
 
 
@@ -4993,70 +4704,65 @@ DEFUN (no_neighbor_solo,
        return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG(neighbor_password,
-          neighbor_password_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> password LINE",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Set a password\n"
-          "The password\n")
+DEFUN (neighbor_password,
+       neighbor_password_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> password LINE",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Set a password\n"
+       "The password\n")
 {
        int idx_peer = 1;
        int idx_line = 3;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       int ret;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./password", NB_OP_MODIFY,
-                             argv[idx_line]->arg);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       ret = peer_password_set(peer, argv[idx_line]->arg);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG(no_neighbor_password,
-          no_neighbor_password_cmd,
-          "no neighbor <A.B.C.D|X:X::X:X|WORD> password [LINE]",
-          NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Set a password\n"
-          "The password\n")
+DEFUN (no_neighbor_password,
+       no_neighbor_password_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> password [LINE]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Set a password\n"
+       "The password\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       int ret;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./password", NB_OP_DESTROY, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       ret = peer_password_unset(peer);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG(neighbor_activate,
-          neighbor_activate_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> activate",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Enable the Address Family for this Neighbor\n")
+DEFUN (neighbor_activate,
+       neighbor_activate_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> activate",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Enable the Address Family for this Neighbor\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
+       int ret;
+       struct peer *peer;
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./enabled", NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       ret = peer_activate(peer, bgp_node_afi(vty), bgp_node_safi(vty));
+       return bgp_vty_return(vty, ret);
 }
 
 ALIAS_HIDDEN(neighbor_activate, neighbor_activate_hidden_cmd,
@@ -5064,30 +4770,25 @@ ALIAS_HIDDEN(neighbor_activate, neighbor_activate_hidden_cmd,
             NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Enable the Address Family for this Neighbor\n")
 
-DEFUN_YANG(no_neighbor_activate,
-          no_neighbor_activate_cmd,
-          "no neighbor <A.B.C.D|X:X::X:X|WORD> activate",
-          NO_STR NEIGHBOR_STR
-          NEIGHBOR_ADDR_STR2
-          "Enable the Address Family for this Neighbor\n")
+DEFUN (no_neighbor_activate,
+       no_neighbor_activate_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> activate",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Enable the Address Family for this Neighbor\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
+       int ret;
+       struct peer *peer;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       /* Lookup peer. */
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./enabled", NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       ret = peer_deactivate(peer, bgp_node_afi(vty), bgp_node_safi(vty));
+       return bgp_vty_return(vty, ret);
 }
 
 ALIAS_HIDDEN(no_neighbor_activate, no_neighbor_activate_hidden_cmd,
@@ -5160,30 +4861,39 @@ ALIAS_HIDDEN(neighbor_set_peer_group, neighbor_set_peer_group_hidden_cmd,
             "Member of the peer-group\n"
             "Peer-group name\n")
 
-DEFUN_YANG (no_neighbor_set_peer_group,
-           no_neighbor_set_peer_group_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> peer-group PGNAME",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Member of the peer-group\n"
-           "Peer-group name\n")
+DEFUN (no_neighbor_set_peer_group,
+       no_neighbor_set_peer_group_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> peer-group PGNAME",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Member of the peer-group\n"
+       "Peer-group name\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
+       int idx_word = 4;
+       int ret;
+       struct peer *peer;
+       struct peer_group *group;
+
+       peer = peer_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       group = peer_group_lookup(bgp, argv[idx_word]->arg);
+       if (!group) {
+               vty_out(vty, "%% Configure the peer-group first\n");
                return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       nb_cli_enqueue_change(vty, "./peer-group", NB_OP_DESTROY, NULL);
+       if (CHECK_FLAG(peer->flags, PEER_FLAG_CAPABILITY_ENHE))
+               bgp_zebra_terminate_radv(peer->bgp, peer);
 
-       /*
-        * Need to commit any pending so this command doesn't merge with a
-        * create into a modify, which BGP can't handle
-        */
-       return nb_cli_apply_changes_clear_pending(vty, base_xpath);
+       peer_notify_unconfig(peer);
+       ret = peer_delete(peer);
+
+       return bgp_vty_return(vty, ret);
 }
 
 ALIAS_HIDDEN(no_neighbor_set_peer_group, no_neighbor_set_peer_group_hidden_cmd,
@@ -5235,136 +4945,79 @@ static int peer_flag_unset_vty(struct vty *vty, const char *ip_str,
        return peer_flag_modify_vty(vty, ip_str, flag, 0);
 }
 
-int peer_flag_modify_nb(struct bgp *bgp, const char *ip_str, struct peer *peer,
-                       uint32_t flag, bool set, char *errmsg,
-                       size_t errmsg_len)
-{
-       int ret;
-
-       /*
-        * If 'neighbor <interface>', then this is for directly connected peers,
-        * we should not accept disable-connected-check.
-        */
-       if (peer->conf_if && (flag == PEER_FLAG_DISABLE_CONNECTED_CHECK)) {
-               snprintf(
-                       errmsg, errmsg_len,
-                       "%s is directly connected peer, cannot accept disable-connected-check\n",
-                       ip_str);
-               return -1;
-       }
-
-       if (!set && flag == PEER_FLAG_SHUTDOWN)
-               peer_tx_shutdown_message_unset(peer);
-
-       if (set)
-               ret = peer_flag_set(peer, flag);
-       else
-               ret = peer_flag_unset(peer, flag);
-
-       return bgp_nb_errmsg_return(errmsg, errmsg_len, ret);
-}
-
 /* neighbor passive. */
-DEFUN_YANG(neighbor_passive,
-          neighbor_passive_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> passive",
-          NEIGHBOR_STR
-          NEIGHBOR_ADDR_STR2
-          "Don't send open messages to this neighbor\n")
+DEFUN (neighbor_passive,
+       neighbor_passive_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> passive",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Don't send open messages to this neighbor\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./passive-mode", NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg, PEER_FLAG_PASSIVE);
 }
 
-DEFUN_YANG(no_neighbor_passive,
-          no_neighbor_passive_cmd,
-          "no neighbor <A.B.C.D|X:X::X:X|WORD> passive",
-          NO_STR NEIGHBOR_STR
-          NEIGHBOR_ADDR_STR2
-          "Don't send open messages to this neighbor\n")
+DEFUN (no_neighbor_passive,
+       no_neighbor_passive_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> passive",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Don't send open messages to this neighbor\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./passive-mode", NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg, PEER_FLAG_PASSIVE);
 }
 
 /* neighbor shutdown. */
-DEFUN_YANG(neighbor_shutdown_msg,
-          neighbor_shutdown_msg_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Administratively shut down this neighbor\n"
-          "Add a shutdown message (RFC 8203)\n"
-          "Shutdown message\n")
+DEFUN (neighbor_shutdown_msg,
+       neighbor_shutdown_msg_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Administratively shut down this neighbor\n"
+       "Add a shutdown message (RFC 8203)\n"
+       "Shutdown message\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
 
        if (argc >= 5) {
+               struct peer *peer =
+                       peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
                char *message;
 
+               if (!peer)
+                       return CMD_WARNING_CONFIG_FAILED;
                message = argv_concat(argv, argc, 4);
-               nb_cli_enqueue_change(vty, "./admin-shutdown/message",
-                                     NB_OP_MODIFY, message);
+               peer_tx_shutdown_message_set(peer, message);
+               XFREE(MTYPE_TMP, message);
        }
 
-       nb_cli_enqueue_change(vty, "./admin-shutdown/enable", NB_OP_MODIFY,
-                             "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg, PEER_FLAG_SHUTDOWN);
 }
 
-ALIAS_YANG(neighbor_shutdown_msg, neighbor_shutdown_cmd,
+ALIAS(neighbor_shutdown_msg, neighbor_shutdown_cmd,
       "neighbor <A.B.C.D|X:X::X:X|WORD> shutdown",
       NEIGHBOR_STR NEIGHBOR_ADDR_STR2
       "Administratively shut down this neighbor\n")
 
-DEFUN_YANG(no_neighbor_shutdown_msg,
-          no_neighbor_shutdown_msg_cmd,
-          "no neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...",
-          NO_STR NEIGHBOR_STR
-          NEIGHBOR_ADDR_STR2
-          "Administratively shut down this neighbor\n"
-          "Remove a shutdown message (RFC 8203)\n"
-          "Shutdown message\n")
+DEFUN (no_neighbor_shutdown_msg,
+       no_neighbor_shutdown_msg_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> shutdown message MSG...",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Administratively shut down this neighbor\n"
+       "Remove a shutdown message (RFC 8203)\n"
+       "Shutdown message\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./admin-shutdown/enable", NB_OP_MODIFY,
-                             "false");
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                  PEER_FLAG_SHUTDOWN);
 }
 
-ALIAS_YANG(no_neighbor_shutdown_msg, no_neighbor_shutdown_cmd,
+ALIAS(no_neighbor_shutdown_msg, no_neighbor_shutdown_cmd,
       "no neighbor <A.B.C.D|X:X::X:X|WORD> shutdown",
       NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
       "Administratively shut down this neighbor\n")
@@ -5428,49 +5081,31 @@ DEFUN(no_neighbor_shutdown_rtt,
 }
 
 /* neighbor capability dynamic. */
-DEFUN_YANG (neighbor_capability_dynamic,
-           neighbor_capability_dynamic_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> capability dynamic",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Advertise capability to the peer\n"
-           "Advertise dynamic capability to this neighbor\n")
+DEFUN (neighbor_capability_dynamic,
+       neighbor_capability_dynamic_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> capability dynamic",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Advertise capability to the peer\n"
+       "Advertise dynamic capability to this neighbor\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./capability-options/dynamic-capability",
-                             NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg,
+                                PEER_FLAG_DYNAMIC_CAPABILITY);
 }
 
-DEFUN_YANG (no_neighbor_capability_dynamic,
-           no_neighbor_capability_dynamic_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> capability dynamic",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Advertise capability to the peer\n"
-           "Advertise dynamic capability to this neighbor\n")
+DEFUN (no_neighbor_capability_dynamic,
+       no_neighbor_capability_dynamic_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> capability dynamic",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Advertise capability to the peer\n"
+       "Advertise dynamic capability to this neighbor\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./capability-options/dynamic-capability",
-                             NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                  PEER_FLAG_DYNAMIC_CAPABILITY);
 }
 
 /* neighbor dont-capability-negotiate */
@@ -5500,65 +5135,31 @@ DEFUN (no_neighbor_dont_capability_negotiate,
 }
 
 /* neighbor capability extended next hop encoding */
-DEFUN_YANG (neighbor_capability_enhe,
-           neighbor_capability_enhe_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> capability extended-nexthop",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Advertise capability to the peer\n"
-           "Advertise extended next-hop capability to the peer\n")
+DEFUN (neighbor_capability_enhe,
+       neighbor_capability_enhe_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> capability extended-nexthop",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Advertise capability to the peer\n"
+       "Advertise extended next-hop capability to the peer\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(
-               vty, "./capability-options/extended-nexthop-capability",
-               NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg,
+                                PEER_FLAG_CAPABILITY_ENHE);
 }
 
-DEFUN_YANG (no_neighbor_capability_enhe,
-           no_neighbor_capability_enhe_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> capability extended-nexthop",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Advertise capability to the peer\n"
-           "Advertise extended next-hop capability to the peer\n")
+DEFUN (no_neighbor_capability_enhe,
+       no_neighbor_capability_enhe_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> capability extended-nexthop",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Advertise capability to the peer\n"
+       "Advertise extended next-hop capability to the peer\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(
-               vty, "./capability-options/extended-nexthop-capability",
-               NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
-}
-
-int peer_af_flag_modify_nb(struct peer *peer, afi_t afi, safi_t safi,
-                          uint32_t flag, int set, char *errmsg,
-                          size_t errmsg_len)
-{
-       int ret;
-
-       if (set)
-               ret = peer_af_flag_set(peer, afi, safi, flag);
-       else
-               ret = peer_af_flag_unset(peer, afi, safi, flag);
-
-       return bgp_nb_errmsg_return(errmsg, errmsg_len, ret);
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                  PEER_FLAG_CAPABILITY_ENHE);
 }
 
 static int peer_af_flag_modify_vty(struct vty *vty, const char *peer_str,
@@ -5697,35 +5298,16 @@ ALIAS_HIDDEN(
        "Capability to SEND the ORF to this neighbor\n")
 
 /* neighbor next-hop-self. */
-DEFUN_YANG (neighbor_nexthop_self,
-           neighbor_nexthop_self_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Disable the next hop calculation for this neighbor\n")
+DEFUN (neighbor_nexthop_self,
+       neighbor_nexthop_self_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Disable the next hop calculation for this neighbor\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/nexthop-self/next-hop-self",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty), PEER_FLAG_NEXTHOP_SELF);
 }
 
 ALIAS_HIDDEN(neighbor_nexthop_self, neighbor_nexthop_self_hidden_cmd,
@@ -5734,36 +5316,18 @@ ALIAS_HIDDEN(neighbor_nexthop_self, neighbor_nexthop_self_hidden_cmd,
             "Disable the next hop calculation for this neighbor\n")
 
 /* neighbor next-hop-self. */
-DEFUN_YANG(neighbor_nexthop_self_force,
-          neighbor_nexthop_self_force_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self force",
-          NEIGHBOR_STR
-          NEIGHBOR_ADDR_STR2
-          "Disable the next hop calculation for this neighbor\n"
-          "Set the next hop to self for reflected routes\n")
+DEFUN (neighbor_nexthop_self_force,
+       neighbor_nexthop_self_force_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self force",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Disable the next hop calculation for this neighbor\n"
+       "Set the next hop to self for reflected routes\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/nexthop-self/next-hop-self-force",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_FORCE_NEXTHOP_SELF);
 }
 
 ALIAS_HIDDEN(neighbor_nexthop_self_force,
@@ -5780,36 +5344,18 @@ ALIAS_HIDDEN(neighbor_nexthop_self_force,
             "Disable the next hop calculation for this neighbor\n"
             "Set the next hop to self for reflected routes\n")
 
-DEFUN_YANG (no_neighbor_nexthop_self,
-           no_neighbor_nexthop_self_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Disable the next hop calculation for this neighbor\n")
+DEFUN (no_neighbor_nexthop_self,
+       no_neighbor_nexthop_self_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Disable the next hop calculation for this neighbor\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/nexthop-self/next-hop-self",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_NEXTHOP_SELF);
 }
 
 ALIAS_HIDDEN(no_neighbor_nexthop_self, no_neighbor_nexthop_self_hidden_cmd,
@@ -5817,37 +5363,19 @@ ALIAS_HIDDEN(no_neighbor_nexthop_self, no_neighbor_nexthop_self_hidden_cmd,
             NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Disable the next hop calculation for this neighbor\n")
 
-DEFUN_YANG (no_neighbor_nexthop_self_force,
-           no_neighbor_nexthop_self_force_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self force",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Disable the next hop calculation for this neighbor\n"
-           "Set the next hop to self for reflected routes\n")
+DEFUN (no_neighbor_nexthop_self_force,
+       no_neighbor_nexthop_self_force_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> next-hop-self force",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Disable the next hop calculation for this neighbor\n"
+       "Set the next hop to self for reflected routes\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/nexthop-self/next-hop-self-force",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_FORCE_NEXTHOP_SELF);
 }
 
 ALIAS_HIDDEN(no_neighbor_nexthop_self_force,
@@ -5865,35 +5393,16 @@ ALIAS_HIDDEN(no_neighbor_nexthop_self_force,
             "Set the next hop to self for reflected routes\n")
 
 /* neighbor as-override */
-DEFUN_YANG (neighbor_as_override,
-           neighbor_as_override_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> as-override",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Override ASNs in outbound updates if aspath equals remote-as\n")
+DEFUN (neighbor_as_override,
+       neighbor_as_override_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> as-override",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Override ASNs in outbound updates if aspath equals remote-as\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/as-path-options/replace-peer-as",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty), PEER_FLAG_AS_OVERRIDE);
 }
 
 ALIAS_HIDDEN(neighbor_as_override, neighbor_as_override_hidden_cmd,
@@ -5901,36 +5410,18 @@ ALIAS_HIDDEN(neighbor_as_override, neighbor_as_override_hidden_cmd,
             NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Override ASNs in outbound updates if aspath equals remote-as\n")
 
-DEFUN_YANG (no_neighbor_as_override,
-           no_neighbor_as_override_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> as-override",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Override ASNs in outbound updates if aspath equals remote-as\n")
+DEFUN (no_neighbor_as_override,
+       no_neighbor_as_override_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> as-override",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Override ASNs in outbound updates if aspath equals remote-as\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/as-path-options/replace-peer-as",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_AS_OVERRIDE);
 }
 
 ALIAS_HIDDEN(no_neighbor_as_override, no_neighbor_as_override_hidden_cmd,
@@ -5939,35 +5430,17 @@ ALIAS_HIDDEN(no_neighbor_as_override, no_neighbor_as_override_hidden_cmd,
             "Override ASNs in outbound updates if aspath equals remote-as\n")
 
 /* neighbor remove-private-AS. */
-DEFUN_YANG (neighbor_remove_private_as,
-           neighbor_remove_private_as_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Remove private ASNs in outbound updates\n")
+DEFUN (neighbor_remove_private_as,
+       neighbor_remove_private_as_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Remove private ASNs in outbound updates\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/private-as/remove-private-as",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_REMOVE_PRIVATE_AS);
 }
 
 ALIAS_HIDDEN(neighbor_remove_private_as, neighbor_remove_private_as_hidden_cmd,
@@ -5975,36 +5448,18 @@ ALIAS_HIDDEN(neighbor_remove_private_as, neighbor_remove_private_as_hidden_cmd,
             NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Remove private ASNs in outbound updates\n")
 
-DEFUN_YANG (neighbor_remove_private_as_all,
-           neighbor_remove_private_as_all_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Remove private ASNs in outbound updates\n"
-           "Apply to all AS numbers\n")
+DEFUN (neighbor_remove_private_as_all,
+       neighbor_remove_private_as_all_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Remove private ASNs in outbound updates\n"
+       "Apply to all AS numbers\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/private-as/remove-private-as-all",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_REMOVE_PRIVATE_AS_ALL);
 }
 
 ALIAS_HIDDEN(neighbor_remove_private_as_all,
@@ -6014,36 +5469,18 @@ ALIAS_HIDDEN(neighbor_remove_private_as_all,
             "Remove private ASNs in outbound updates\n"
             "Apply to all AS numbers")
 
-DEFUN_YANG (neighbor_remove_private_as_replace_as,
-           neighbor_remove_private_as_replace_as_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS replace-AS",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Remove private ASNs in outbound updates\n"
-           "Replace private ASNs with our ASN in outbound updates\n")
+DEFUN (neighbor_remove_private_as_replace_as,
+       neighbor_remove_private_as_replace_as_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS replace-AS",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Remove private ASNs in outbound updates\n"
+       "Replace private ASNs with our ASN in outbound updates\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/private-as/remove-private-as-replace",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE);
 }
 
 ALIAS_HIDDEN(neighbor_remove_private_as_replace_as,
@@ -6053,37 +5490,19 @@ ALIAS_HIDDEN(neighbor_remove_private_as_replace_as,
             "Remove private ASNs in outbound updates\n"
             "Replace private ASNs with our ASN in outbound updates\n")
 
-DEFUN_YANG (neighbor_remove_private_as_all_replace_as,
-           neighbor_remove_private_as_all_replace_as_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all replace-AS",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Remove private ASNs in outbound updates\n"
-           "Apply to all AS numbers\n"
-           "Replace private ASNs with our ASN in outbound updates\n")
+DEFUN (neighbor_remove_private_as_all_replace_as,
+       neighbor_remove_private_as_all_replace_as_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all replace-AS",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Remove private ASNs in outbound updates\n"
+       "Apply to all AS numbers\n"
+       "Replace private ASNs with our ASN in outbound updates\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/private-as/remove-private-as-all-replace",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE);
 }
 
 ALIAS_HIDDEN(
@@ -6095,36 +5514,18 @@ ALIAS_HIDDEN(
        "Apply to all AS numbers\n"
        "Replace private ASNs with our ASN in outbound updates\n")
 
-DEFUN_YANG (no_neighbor_remove_private_as,
-           no_neighbor_remove_private_as_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Remove private ASNs in outbound updates\n")
+DEFUN (no_neighbor_remove_private_as,
+       no_neighbor_remove_private_as_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Remove private ASNs in outbound updates\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/private-as/remove-private-as",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_REMOVE_PRIVATE_AS);
 }
 
 ALIAS_HIDDEN(no_neighbor_remove_private_as,
@@ -6133,37 +5534,19 @@ ALIAS_HIDDEN(no_neighbor_remove_private_as,
             NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Remove private ASNs in outbound updates\n")
 
-DEFUN_YANG (no_neighbor_remove_private_as_all,
-           no_neighbor_remove_private_as_all_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Remove private ASNs in outbound updates\n"
-           "Apply to all AS numbers\n")
-{
-       int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/private-as/remove-private-as-all",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+DEFUN (no_neighbor_remove_private_as_all,
+       no_neighbor_remove_private_as_all_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Remove private ASNs in outbound updates\n"
+       "Apply to all AS numbers\n")
+{
+       int idx_peer = 2;
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_REMOVE_PRIVATE_AS_ALL);
 }
 
 ALIAS_HIDDEN(no_neighbor_remove_private_as_all,
@@ -6173,37 +5556,19 @@ ALIAS_HIDDEN(no_neighbor_remove_private_as_all,
             "Remove private ASNs in outbound updates\n"
             "Apply to all AS numbers\n")
 
-DEFUN_YANG (no_neighbor_remove_private_as_replace_as,
-           no_neighbor_remove_private_as_replace_as_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS replace-AS",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Remove private ASNs in outbound updates\n"
-           "Replace private ASNs with our ASN in outbound updates\n")
+DEFUN (no_neighbor_remove_private_as_replace_as,
+       no_neighbor_remove_private_as_replace_as_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS replace-AS",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Remove private ASNs in outbound updates\n"
+       "Replace private ASNs with our ASN in outbound updates\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/private-as/remove-private-as-replace",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_REMOVE_PRIVATE_AS_REPLACE);
 }
 
 ALIAS_HIDDEN(no_neighbor_remove_private_as_replace_as,
@@ -6213,38 +5578,20 @@ ALIAS_HIDDEN(no_neighbor_remove_private_as_replace_as,
             "Remove private ASNs in outbound updates\n"
             "Replace private ASNs with our ASN in outbound updates\n")
 
-DEFUN_YANG (no_neighbor_remove_private_as_all_replace_as,
-           no_neighbor_remove_private_as_all_replace_as_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all replace-AS",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Remove private ASNs in outbound updates\n"
-           "Apply to all AS numbers\n"
-           "Replace private ASNs with our ASN in outbound updates\n")
+DEFUN (no_neighbor_remove_private_as_all_replace_as,
+       no_neighbor_remove_private_as_all_replace_as_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> remove-private-AS all replace-AS",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Remove private ASNs in outbound updates\n"
+       "Apply to all AS numbers\n"
+       "Replace private ASNs with our ASN in outbound updates\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/private-as/remove-private-as-all-replace",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_REMOVE_PRIVATE_AS_ALL_REPLACE);
 }
 
 ALIAS_HIDDEN(
@@ -6258,36 +5605,18 @@ ALIAS_HIDDEN(
 
 
 /* neighbor send-community. */
-DEFUN_YANG (neighbor_send_community,
-           neighbor_send_community_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> send-community",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Send Community attribute to this neighbor\n")
+DEFUN (neighbor_send_community,
+       neighbor_send_community_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> send-community",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Send Community attribute to this neighbor\n")
 {
        int idx_peer = 1;
-       char *peer_str = argv[idx_peer]->arg;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char std_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, peer_str, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(std_xpath, sizeof(std_xpath),
-                "./%s/send-community/send-community",
-                bgp_afi_safi_get_container_str(afi, safi));
 
-       nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_SEND_COMMUNITY);
 }
 
 ALIAS_HIDDEN(neighbor_send_community, neighbor_send_community_hidden_cmd,
@@ -6295,37 +5624,19 @@ ALIAS_HIDDEN(neighbor_send_community, neighbor_send_community_hidden_cmd,
             NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Send Community attribute to this neighbor\n")
 
-DEFUN_YANG (no_neighbor_send_community,
-           no_neighbor_send_community_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> send-community",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Send Community attribute to this neighbor\n")
+DEFUN (no_neighbor_send_community,
+       no_neighbor_send_community_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> send-community",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Send Community attribute to this neighbor\n")
 {
        int idx_peer = 2;
-       char *peer_str = argv[idx_peer]->arg;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char std_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, peer_str, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(std_xpath, sizeof(std_xpath),
-                "./%s/send-community/send-community",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_SEND_COMMUNITY);
 }
 
 ALIAS_HIDDEN(no_neighbor_send_community, no_neighbor_send_community_hidden_cmd,
@@ -6334,95 +5645,52 @@ ALIAS_HIDDEN(no_neighbor_send_community, no_neighbor_send_community_hidden_cmd,
             "Send Community attribute to this neighbor\n")
 
 /* neighbor send-community extended. */
-DEFUN_YANG (neighbor_send_community_type,
-           neighbor_send_community_type_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> send-community <both|all|extended|standard|large>",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Send Community attribute to this neighbor\n"
-           "Send Standard and Extended Community attributes\n"
-           "Send Standard, Large and Extended Community attributes\n"
-           "Send Extended Community attributes\n"
-           "Send Standard Community attributes\n"
-           "Send Large Community attributes\n")
+DEFUN (neighbor_send_community_type,
+       neighbor_send_community_type_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> send-community <both|all|extended|standard|large>",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Send Community attribute to this neighbor\n"
+       "Send Standard and Extended Community attributes\n"
+       "Send Standard, Large and Extended Community attributes\n"
+       "Send Extended Community attributes\n"
+       "Send Standard Community attributes\n"
+       "Send Large Community attributes\n")
 {
        const char *type = argv[argc - 1]->text;
        char *peer_str = argv[1]->arg;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char std_xpath[XPATH_MAXLEN];
-       char ext_xpath[XPATH_MAXLEN];
-       char lrg_xpath[XPATH_MAXLEN];
+       struct peer *peer;
        afi_t afi = bgp_node_afi(vty);
        safi_t safi = bgp_node_safi(vty);
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, peer_str, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, peer_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       if (strmatch(type, "standard")) {
-               snprintf(std_xpath, sizeof(std_xpath),
-                        "./%s/send-community/send-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "true");
-       }
-
-       if (strmatch(type, "extended")) {
-               snprintf(ext_xpath, sizeof(ext_xpath),
-                        "./%s/send-community/send-ext-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "true");
-       }
+       if (strmatch(type, "standard"))
+               return peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                           PEER_FLAG_SEND_COMMUNITY);
 
-       if (strmatch(type, "large")) {
-               snprintf(lrg_xpath, sizeof(lrg_xpath),
-                        "./%s/send-community/send-large-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
+       if (strmatch(type, "extended"))
+               return peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                           PEER_FLAG_SEND_EXT_COMMUNITY);
 
-               nb_cli_enqueue_change(vty, lrg_xpath, NB_OP_MODIFY, "true");
-       }
+       if (strmatch(type, "large"))
+               return peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                           PEER_FLAG_SEND_LARGE_COMMUNITY);
 
        if (strmatch(type, "both")) {
-               snprintf(std_xpath, sizeof(std_xpath),
-                        "./%s/send-community/send-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "true");
-
-               snprintf(ext_xpath, sizeof(ext_xpath),
-                        "./%s/send-community/send-ext-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "true");
-       }
-
-       if (strmatch(type, "all")) {
-               snprintf(std_xpath, sizeof(std_xpath),
-                        "./%s/send-community/send-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "true");
-
-               snprintf(ext_xpath, sizeof(ext_xpath),
-                        "./%s/send-community/send-ext-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "true");
-
-               snprintf(lrg_xpath, sizeof(lrg_xpath),
-                        "./%s/send-community/send-large-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, lrg_xpath, NB_OP_MODIFY, "true");
+               return peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                           PEER_FLAG_SEND_COMMUNITY)
+                      | peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_SEND_EXT_COMMUNITY);
        }
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                   PEER_FLAG_SEND_COMMUNITY)
+              | peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                     PEER_FLAG_SEND_EXT_COMMUNITY)
+              | peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                     PEER_FLAG_SEND_LARGE_COMMUNITY);
 }
 
 ALIAS_HIDDEN(
@@ -6436,96 +5704,55 @@ ALIAS_HIDDEN(
        "Send Standard Community attributes\n"
        "Send Large Community attributes\n")
 
-DEFUN_YANG (no_neighbor_send_community_type,
-           no_neighbor_send_community_type_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> send-community <both|all|extended|standard|large>",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Send Community attribute to this neighbor\n"
-           "Send Standard and Extended Community attributes\n"
-           "Send Standard, Large and Extended Community attributes\n"
-           "Send Extended Community attributes\n"
-           "Send Standard Community attributes\n"
-           "Send Large Community attributes\n")
+DEFUN (no_neighbor_send_community_type,
+       no_neighbor_send_community_type_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> send-community <both|all|extended|standard|large>",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Send Community attribute to this neighbor\n"
+       "Send Standard and Extended Community attributes\n"
+       "Send Standard, Large and Extended Community attributes\n"
+       "Send Extended Community attributes\n"
+       "Send Standard Community attributes\n"
+       "Send Large Community attributes\n")
 {
        const char *type = argv[argc - 1]->text;
        char *peer_str = argv[2]->arg;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char std_xpath[XPATH_MAXLEN];
-       char ext_xpath[XPATH_MAXLEN];
-       char lrg_xpath[XPATH_MAXLEN];
+       struct peer *peer;
        afi_t afi = bgp_node_afi(vty);
        safi_t safi = bgp_node_safi(vty);
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, peer_str, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, peer_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       if (strmatch(type, "standard")) {
-               snprintf(std_xpath, sizeof(std_xpath),
-                        "./%s/send-community/send-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "false");
-       }
-
-       if (strmatch(type, "extended")) {
-               snprintf(ext_xpath, sizeof(ext_xpath),
-                        "./%s/send-community/send-ext-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "false");
-       }
+       if (strmatch(type, "standard"))
+               return peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_SEND_COMMUNITY);
 
-       if (strmatch(type, "large")) {
-               snprintf(lrg_xpath, sizeof(lrg_xpath),
-                        "./%s/send-community/send-large-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
+       if (strmatch(type, "extended"))
+               return peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_SEND_EXT_COMMUNITY);
 
-               nb_cli_enqueue_change(vty, lrg_xpath, NB_OP_MODIFY, "false");
-       }
+       if (strmatch(type, "large"))
+               return peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_SEND_LARGE_COMMUNITY);
 
        if (strmatch(type, "both")) {
-               snprintf(std_xpath, sizeof(std_xpath),
-                        "./%s/send-community/send-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "false");
-
-               snprintf(ext_xpath, sizeof(ext_xpath),
-                        "./%s/send-community/send-ext-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
 
-               nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "false");
-       }
-
-       if (strmatch(type, "all")) {
-               snprintf(std_xpath, sizeof(std_xpath),
-                        "./%s/send-community/send-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, std_xpath, NB_OP_MODIFY, "false");
-
-               snprintf(ext_xpath, sizeof(ext_xpath),
-                        "./%s/send-community/send-ext-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, ext_xpath, NB_OP_MODIFY, "false");
-
-               snprintf(lrg_xpath, sizeof(lrg_xpath),
-                        "./%s/send-community/send-large-community",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-               nb_cli_enqueue_change(vty, lrg_xpath, NB_OP_MODIFY, "false");
+               return peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_SEND_COMMUNITY)
+                      | peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                               PEER_FLAG_SEND_EXT_COMMUNITY);
        }
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                     PEER_FLAG_SEND_COMMUNITY)
+              | peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                       PEER_FLAG_SEND_EXT_COMMUNITY)
+              | peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                       PEER_FLAG_SEND_LARGE_COMMUNITY);
 }
 
 ALIAS_HIDDEN(
@@ -6541,34 +5768,18 @@ ALIAS_HIDDEN(
        "Send Large Community attributes\n")
 
 /* neighbor soft-reconfig. */
-DEFUN_YANG (neighbor_soft_reconfiguration,
-           neighbor_soft_reconfiguration_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> soft-reconfiguration inbound",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Per neighbor soft reconfiguration\n"
-           "Allow inbound soft reconfiguration for this neighbor\n")
+DEFUN (neighbor_soft_reconfiguration,
+       neighbor_soft_reconfiguration_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> soft-reconfiguration inbound",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Per neighbor soft reconfiguration\n"
+       "Allow inbound soft reconfiguration for this neighbor\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char soft_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(soft_xpath, sizeof(soft_xpath), "./%s/soft-reconfiguration",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, soft_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_SOFT_RECONFIG);
 }
 
 ALIAS_HIDDEN(neighbor_soft_reconfiguration,
@@ -6578,34 +5789,19 @@ ALIAS_HIDDEN(neighbor_soft_reconfiguration,
             "Per neighbor soft reconfiguration\n"
             "Allow inbound soft reconfiguration for this neighbor\n")
 
-DEFUN_YANG (no_neighbor_soft_reconfiguration,
-           no_neighbor_soft_reconfiguration_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> soft-reconfiguration inbound",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Per neighbor soft reconfiguration\n"
-           "Allow inbound soft reconfiguration for this neighbor\n")
+DEFUN (no_neighbor_soft_reconfiguration,
+       no_neighbor_soft_reconfiguration_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> soft-reconfiguration inbound",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Per neighbor soft reconfiguration\n"
+       "Allow inbound soft reconfiguration for this neighbor\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char soft_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       snprintf(soft_xpath, sizeof(soft_xpath), "./%s/soft-reconfiguration",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, soft_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_SOFT_RECONFIG);
 }
 
 ALIAS_HIDDEN(no_neighbor_soft_reconfiguration,
@@ -6615,35 +5811,24 @@ ALIAS_HIDDEN(no_neighbor_soft_reconfiguration,
             "Per neighbor soft reconfiguration\n"
             "Allow inbound soft reconfiguration for this neighbor\n")
 
-DEFUN_YANG (neighbor_route_reflector_client,
-           neighbor_route_reflector_client_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> route-reflector-client",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Configure a neighbor as Route Reflector client\n")
+DEFUN (neighbor_route_reflector_client,
+       neighbor_route_reflector_client_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> route-reflector-client",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Configure a neighbor as Route Reflector client\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
+       struct peer *peer;
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/route-reflector/route-reflector-client",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_REFLECTOR_CLIENT);
 }
 
 ALIAS_HIDDEN(neighbor_route_reflector_client,
@@ -6652,36 +5837,18 @@ ALIAS_HIDDEN(neighbor_route_reflector_client,
             NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Configure a neighbor as Route Reflector client\n")
 
-DEFUN_YANG (no_neighbor_route_reflector_client,
-           no_neighbor_route_reflector_client_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> route-reflector-client",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Configure a neighbor as Route Reflector client\n")
+DEFUN (no_neighbor_route_reflector_client,
+       no_neighbor_route_reflector_client_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> route-reflector-client",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Configure a neighbor as Route Reflector client\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/route-reflector/route-reflector-client",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_REFLECTOR_CLIENT);
 }
 
 ALIAS_HIDDEN(no_neighbor_route_reflector_client,
@@ -6691,35 +5858,22 @@ ALIAS_HIDDEN(no_neighbor_route_reflector_client,
             "Configure a neighbor as Route Reflector client\n")
 
 /* neighbor route-server-client. */
-DEFUN_YANG (neighbor_route_server_client,
-           neighbor_route_server_client_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> route-server-client",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Configure a neighbor as Route Server client\n")
+DEFUN (neighbor_route_server_client,
+       neighbor_route_server_client_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> route-server-client",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Configure a neighbor as Route Server client\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
+       struct peer *peer;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/route-server/route-server-client",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "true");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                   bgp_node_safi(vty),
+                                   PEER_FLAG_RSERVER_CLIENT);
 }
 
 ALIAS_HIDDEN(neighbor_route_server_client,
@@ -6728,36 +5882,18 @@ ALIAS_HIDDEN(neighbor_route_server_client,
             NEIGHBOR_STR NEIGHBOR_ADDR_STR2
             "Configure a neighbor as Route Server client\n")
 
-DEFUN_YANG (no_neighbor_route_server_client,
-           no_neighbor_route_server_client_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> route-server-client",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Configure a neighbor as Route Server client\n")
+DEFUN (no_neighbor_route_server_client,
+       no_neighbor_route_server_client_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> route-server-client",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Configure a neighbor as Route Server client\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "./%s/route-server/route-server-client",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_af_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                     bgp_node_afi(vty), bgp_node_safi(vty),
+                                     PEER_FLAG_RSERVER_CLIENT);
 }
 
 ALIAS_HIDDEN(no_neighbor_route_server_client,
@@ -6795,35 +5931,28 @@ DEFUN (no_neighbor_nexthop_local_unchanged,
                                      PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED);
 }
 
-DEFUN_YANG (neighbor_attr_unchanged,
-           neighbor_attr_unchanged_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> attribute-unchanged [{as-path|next-hop|med}]",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "BGP attribute is propagated unchanged to this neighbor\n"
-           "As-path attribute\n"
-           "Nexthop attribute\n"
-           "Med attribute\n")
+DEFUN (neighbor_attr_unchanged,
+       neighbor_attr_unchanged_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> attribute-unchanged [{as-path|next-hop|med}]",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "BGP attribute is propagated unchanged to this neighbor\n"
+       "As-path attribute\n"
+       "Nexthop attribute\n"
+       "Med attribute\n")
 {
        int idx = 0;
        char *peer_str = argv[1]->arg;
+       struct peer *peer;
        bool aspath = false;
        bool nexthop = false;
        bool med = false;
        afi_t afi = bgp_node_afi(vty);
        safi_t safi = bgp_node_safi(vty);
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char as_xpath[XPATH_MAXLEN];
-       char nxthop_xpath[XPATH_MAXLEN];
-       char med_xpath[XPATH_MAXLEN];
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, peer_str, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       int ret = 0;
+
+       peer = peer_and_group_lookup_vty(vty, peer_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
        if (argv_find(argv, argc, "as-path", &idx))
@@ -6837,45 +5966,52 @@ DEFUN_YANG (neighbor_attr_unchanged,
        if (argv_find(argv, argc, "med", &idx))
                med = true;
 
-       snprintf(as_xpath, sizeof(as_xpath),
-                "./%s/attr-unchanged/as-path-unchanged",
-                bgp_afi_safi_get_container_str(afi, safi));
-       snprintf(nxthop_xpath, sizeof(nxthop_xpath),
-                "./%s/attr-unchanged/next-hop-unchanged",
-                bgp_afi_safi_get_container_str(afi, safi));
-       snprintf(med_xpath, sizeof(med_xpath),
-                "./%s/attr-unchanged/med-unchanged",
-                bgp_afi_safi_get_container_str(afi, safi));
-
        /* no flags means all of them! */
        if (!aspath && !nexthop && !med) {
-               nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY, "true");
-               nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY, "true");
-               nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY, "true");
+               ret = peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                          PEER_FLAG_AS_PATH_UNCHANGED);
+               ret |= peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                           PEER_FLAG_NEXTHOP_UNCHANGED);
+               ret |= peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                           PEER_FLAG_MED_UNCHANGED);
        } else {
-               if (!aspath)
-                       nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY,
-                                             "false");
-               else
-                       nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY,
-                                             "true");
-
-               if (!nexthop)
-                       nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY,
-                                             "false");
-               else
-                       nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY,
-                                             "true");
+               if (!aspath) {
+                       if (peer_af_flag_check(peer, afi, safi,
+                                              PEER_FLAG_AS_PATH_UNCHANGED)) {
+                               ret |= peer_af_flag_unset_vty(
+                                       vty, peer_str, afi, safi,
+                                       PEER_FLAG_AS_PATH_UNCHANGED);
+                       }
+               } else
+                       ret |= peer_af_flag_set_vty(
+                               vty, peer_str, afi, safi,
+                               PEER_FLAG_AS_PATH_UNCHANGED);
+
+               if (!nexthop) {
+                       if (peer_af_flag_check(peer, afi, safi,
+                                              PEER_FLAG_NEXTHOP_UNCHANGED)) {
+                               ret |= peer_af_flag_unset_vty(
+                                       vty, peer_str, afi, safi,
+                                       PEER_FLAG_NEXTHOP_UNCHANGED);
+                       }
+               } else
+                       ret |= peer_af_flag_set_vty(
+                               vty, peer_str, afi, safi,
+                               PEER_FLAG_NEXTHOP_UNCHANGED);
 
-               if (!med)
-                       nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY,
-                                             "false");
-               else
-                       nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY,
-                                             "true");
+               if (!med) {
+                       if (peer_af_flag_check(peer, afi, safi,
+                                              PEER_FLAG_MED_UNCHANGED)) {
+                               ret |= peer_af_flag_unset_vty(
+                                       vty, peer_str, afi, safi,
+                                       PEER_FLAG_MED_UNCHANGED);
+                       }
+               } else
+                       ret |= peer_af_flag_set_vty(vty, peer_str, afi, safi,
+                                                   PEER_FLAG_MED_UNCHANGED);
        }
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return ret;
 }
 
 ALIAS_HIDDEN(
@@ -6887,36 +6023,29 @@ ALIAS_HIDDEN(
        "Nexthop attribute\n"
        "Med attribute\n")
 
-DEFUN_YANG (no_neighbor_attr_unchanged,
-           no_neighbor_attr_unchanged_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> attribute-unchanged [{as-path|next-hop|med}]",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "BGP attribute is propagated unchanged to this neighbor\n"
-           "As-path attribute\n"
-           "Nexthop attribute\n"
-           "Med attribute\n")
+DEFUN (no_neighbor_attr_unchanged,
+       no_neighbor_attr_unchanged_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> attribute-unchanged [{as-path|next-hop|med}]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "BGP attribute is propagated unchanged to this neighbor\n"
+       "As-path attribute\n"
+       "Nexthop attribute\n"
+       "Med attribute\n")
 {
        int idx = 0;
        char *peer_str = argv[2]->arg;
+       struct peer *peer;
        bool aspath = false;
        bool nexthop = false;
        bool med = false;
        afi_t afi = bgp_node_afi(vty);
        safi_t safi = bgp_node_safi(vty);
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char as_xpath[XPATH_MAXLEN];
-       char nxthop_xpath[XPATH_MAXLEN];
-       char med_xpath[XPATH_MAXLEN];
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, peer_str, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       int ret = 0;
+
+       peer = peer_and_group_lookup_vty(vty, peer_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
        if (argv_find(argv, argc, "as-path", &idx))
@@ -6930,33 +6059,27 @@ DEFUN_YANG (no_neighbor_attr_unchanged,
        if (argv_find(argv, argc, "med", &idx))
                med = true;
 
-       snprintf(as_xpath, sizeof(as_xpath),
-                "./%s/attr-unchanged/as-path-unchanged",
-                bgp_afi_safi_get_container_str(afi, safi));
-       snprintf(nxthop_xpath, sizeof(nxthop_xpath),
-                "./%s/attr-unchanged/next-hop-unchanged",
-                bgp_afi_safi_get_container_str(afi, safi));
-       snprintf(med_xpath, sizeof(med_xpath),
-                "./%s/attr-unchanged/med-unchanged",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       /* no flags means all of them! */
-       if (!aspath && !nexthop && !med) {
-               nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY, "false");
-               nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY, "false");
-               nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY, "false");
-       }
+       if (!aspath && !nexthop && !med) // no flags means all of them!
+               return peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_AS_PATH_UNCHANGED)
+                      | peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                               PEER_FLAG_NEXTHOP_UNCHANGED)
+                      | peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                               PEER_FLAG_MED_UNCHANGED);
 
        if (aspath)
-               nb_cli_enqueue_change(vty, as_xpath, NB_OP_MODIFY, "false");
+               ret |= peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_AS_PATH_UNCHANGED);
 
        if (nexthop)
-               nb_cli_enqueue_change(vty, nxthop_xpath, NB_OP_MODIFY, "false");
+               ret |= peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_NEXTHOP_UNCHANGED);
 
        if (med)
-               nb_cli_enqueue_change(vty, med_xpath, NB_OP_MODIFY, "false");
+               ret |= peer_af_flag_unset_vty(vty, peer_str, afi, safi,
+                                             PEER_FLAG_MED_UNCHANGED);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return ret;
 }
 
 ALIAS_HIDDEN(
@@ -6968,318 +6091,274 @@ ALIAS_HIDDEN(
        "Nexthop attribute\n"
        "Med attribute\n")
 
-/* neighbor ebgp-multihop. */
-DEFUN_YANG (neighbor_ebgp_multihop,
-           neighbor_ebgp_multihop_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Allow EBGP neighbors not on directly connected networks\n")
+/* EBGP multihop configuration. */
+static int peer_ebgp_multihop_set_vty(struct vty *vty, const char *ip_str,
+                                     const char *ttl_str)
 {
-       int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       unsigned int ttl;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./ebgp-multihop/enabled", NB_OP_MODIFY,
-                             "true");
+       if (peer->conf_if)
+               return bgp_vty_return(vty, BGP_ERR_INVALID_FOR_DIRECT_PEER);
+
+       if (!ttl_str)
+               ttl = MAXTTL;
+       else
+               ttl = strtoul(ttl_str, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_vty_return(vty, peer_ebgp_multihop_set(peer, ttl));
 }
 
-DEFUN_YANG (neighbor_ebgp_multihop_ttl,
-           neighbor_ebgp_multihop_ttl_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop (1-255)",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Allow EBGP neighbors not on directly connected networks\n"
-           "maximum hop count\n")
+static int peer_ebgp_multihop_unset_vty(struct vty *vty, const char *ip_str)
 {
-       int idx_peer = 1;
-       int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./ebgp-multihop/multihop-ttl", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_vty_return(vty, peer_ebgp_multihop_unset(peer));
 }
 
-DEFUN_YANG (no_neighbor_ebgp_multihop,
-           no_neighbor_ebgp_multihop_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop [(1-255)]",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Allow EBGP neighbors not on directly connected networks\n"
-           "maximum hop count\n")
+/* neighbor ebgp-multihop. */
+DEFUN (neighbor_ebgp_multihop,
+       neighbor_ebgp_multihop_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Allow EBGP neighbors not on directly connected networks\n")
 {
-       int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
+       int idx_peer = 1;
+       return peer_ebgp_multihop_set_vty(vty, argv[idx_peer]->arg, NULL);
+}
 
-       if (argc > 4)
-               nb_cli_enqueue_change(vty, "./ebgp-multihop/multihop-ttl",
-                                     NB_OP_DESTROY, NULL);
-       else
-               nb_cli_enqueue_change(vty, "./ebgp-multihop/enabled",
-                                     NB_OP_MODIFY, "false");
+DEFUN (neighbor_ebgp_multihop_ttl,
+       neighbor_ebgp_multihop_ttl_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop (1-255)",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Allow EBGP neighbors not on directly connected networks\n"
+       "maximum hop count\n")
+{
+       int idx_peer = 1;
+       int idx_number = 3;
+       return peer_ebgp_multihop_set_vty(vty, argv[idx_peer]->arg,
+                                         argv[idx_number]->arg);
+}
 
-       return nb_cli_apply_changes(vty, base_xpath);
+DEFUN (no_neighbor_ebgp_multihop,
+       no_neighbor_ebgp_multihop_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> ebgp-multihop [(1-255)]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Allow EBGP neighbors not on directly connected networks\n"
+       "maximum hop count\n")
+{
+       int idx_peer = 2;
+       return peer_ebgp_multihop_unset_vty(vty, argv[idx_peer]->arg);
 }
 
 
 /* disable-connected-check */
-DEFUN_YANG (neighbor_disable_connected_check,
-           neighbor_disable_connected_check_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> <disable-connected-check|enforce-multihop>",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "one-hop away EBGP peer using loopback address\n"
-           "Enforce EBGP neighbors perform multihop\n")
+DEFUN (neighbor_disable_connected_check,
+       neighbor_disable_connected_check_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> <disable-connected-check|enforce-multihop>",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "one-hop away EBGP peer using loopback address\n"
+       "Enforce EBGP neighbors perform multihop\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg,
+                                PEER_FLAG_DISABLE_CONNECTED_CHECK);
+}
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
+DEFUN (no_neighbor_disable_connected_check,
+       no_neighbor_disable_connected_check_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> <disable-connected-check|enforce-multihop>",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "one-hop away EBGP peer using loopback address\n"
+       "Enforce EBGP neighbors perform multihop\n")
+{
+       int idx_peer = 2;
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                  PEER_FLAG_DISABLE_CONNECTED_CHECK);
+}
 
-       nb_cli_enqueue_change(vty, "./ebgp-multihop/disable-connected-check",
-                             NB_OP_MODIFY, "true");
+/* link-bw-encoding-ieee */
+DEFUN(neighbor_link_bw_encoding_ieee, neighbor_link_bw_encoding_ieee_cmd,
+      "neighbor <A.B.C.D|X:X::X:X|WORD> disable-link-bw-encoding-ieee",
+      NEIGHBOR_STR NEIGHBOR_ADDR_STR2
+      "Enable IEEE floating-point encoding for extended community bandwidth\n")
+{
+       int idx_peer = 1;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg,
+                                PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE);
 }
 
-DEFUN_YANG (no_neighbor_disable_connected_check,
-           no_neighbor_disable_connected_check_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> <disable-connected-check|enforce-multihop>",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "one-hop away EBGP peer using loopback address\n"
-           "Enforce EBGP neighbors perform multihop\n")
+DEFUN(no_neighbor_link_bw_encoding_ieee, no_neighbor_link_bw_encoding_ieee_cmd,
+      "no neighbor <A.B.C.D|X:X::X:X|WORD> disable-link-bw-encoding-ieee",
+      NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
+      "Enable IEEE floating-point encoding for extended community bandwidth\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./ebgp-multihop/disable-connected-check",
-                             NB_OP_MODIFY, "false");
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                  PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE);
 }
 
 
 /* enforce-first-as */
-DEFUN_YANG (neighbor_enforce_first_as,
-           neighbor_enforce_first_as_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> enforce-first-as",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Enforce the first AS for EBGP routes\n")
+DEFUN (neighbor_enforce_first_as,
+       neighbor_enforce_first_as_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> enforce-first-as",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Enforce the first AS for EBGP routes\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./enforce-first-as", NB_OP_MODIFY, "true");
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg,
+                                PEER_FLAG_ENFORCE_FIRST_AS);
 }
 
-DEFUN_YANG (no_neighbor_enforce_first_as,
-           no_neighbor_enforce_first_as_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> enforce-first-as",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Enforce the first AS for EBGP routes\n")
+DEFUN (no_neighbor_enforce_first_as,
+       no_neighbor_enforce_first_as_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> enforce-first-as",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Enforce the first AS for EBGP routes\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./enforce-first-as", NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                  PEER_FLAG_ENFORCE_FIRST_AS);
 }
 
-static int peer_and_group_lookup_nb(struct vty *vty, const char *peer_str,
-                                   char *base_xpath, int xpath_len,
-                                   char *xpath)
-{
-       union sockunion su;
-       char num_xpath[XPATH_MAXLEN];
-       char unnbr_xpath[XPATH_MAXLEN];
-       char prgrp_xpath[XPATH_MAXLEN];
-
-       if (str2sockunion(peer_str, &su) == 0) {
-               snprintf(num_xpath, sizeof(num_xpath),
-                        "/neighbors/neighbor[remote-address='%s']", peer_str);
-               if (yang_dnode_existsf(vty->candidate_config->dnode, "%s%s",
-                                      VTY_CURR_XPATH, num_xpath)) {
-                       snprintf(base_xpath, xpath_len,
-                                FRR_BGP_NEIGHBOR_NUM_XPATH, peer_str,
-                                xpath ? xpath : "");
-               } else {
-                       vty_out(vty,
-                               "%% Specify remote-as or peer-group commands first\n");
-                       return -1;
-               }
-
-       } else {
-               snprintf(unnbr_xpath, sizeof(unnbr_xpath),
-                        "/neighbors/unnumbered-neighbor[interface='%s']",
-                        peer_str);
-
-               snprintf(prgrp_xpath, sizeof(prgrp_xpath),
-                        "/peer-groups/peer-group[peer-group-name='%s']",
-                        peer_str);
-
-               if (yang_dnode_existsf(vty->candidate_config->dnode, "%s%s",
-                                      VTY_CURR_XPATH, unnbr_xpath)) {
-                       snprintf(base_xpath, xpath_len,
-                                FRR_BGP_NEIGHBOR_UNNUM_XPATH, peer_str,
-                                xpath ? xpath : "");
-               } else if (yang_dnode_existsf(vty->candidate_config->dnode,
-                                             "%s%s", VTY_CURR_XPATH,
-                                             prgrp_xpath)) {
-                       snprintf(base_xpath, xpath_len,
-                                FRR_BGP_PEER_GROUP_XPATH, peer_str,
-                                xpath ? xpath : "");
-               } else {
-                       vty_out(vty,
-                               "%% Create the peer-group or interface first\n");
-                       return -1;
-               }
-       }
-
-       return 0;
-}
 
-DEFUN_YANG (neighbor_description,
-           neighbor_description_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> description LINE...",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Neighbor specific description\n"
-           "Up to 80 characters describing this neighbor\n")
+DEFUN (neighbor_description,
+       neighbor_description_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> description LINE...",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Neighbor specific description\n"
+       "Up to 80 characters describing this neighbor\n")
 {
        int idx_peer = 1;
        int idx_line = 3;
-       int ret;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
        char *str;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
        str = argv_concat(argv, argc, idx_line);
 
-       nb_cli_enqueue_change(vty, "./description", NB_OP_MODIFY, str);
-
-       ret = nb_cli_apply_changes(vty, base_xpath);
+       peer_description_set(peer, str);
 
        XFREE(MTYPE_TMP, str);
 
-       return ret;
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_neighbor_description,
-           no_neighbor_description_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> description",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Neighbor specific description\n")
+DEFUN (no_neighbor_description,
+       no_neighbor_description_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> description",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Neighbor specific description\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./description", NB_OP_DESTROY, NULL);
+       peer_description_unset(peer);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return CMD_SUCCESS;
 }
 
-ALIAS_YANG(no_neighbor_description, no_neighbor_description_comment_cmd,
+ALIAS(no_neighbor_description, no_neighbor_description_comment_cmd,
       "no neighbor <A.B.C.D|X:X::X:X|WORD> description LINE...",
       NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
       "Neighbor specific description\n"
       "Up to 80 characters describing this neighbor\n")
 
+/* Neighbor update-source. */
+static int peer_update_source_vty(struct vty *vty, const char *peer_str,
+                                 const char *source_str)
+{
+       struct peer *peer;
+       struct prefix p;
+       union sockunion su;
+
+       peer = peer_and_group_lookup_vty(vty, peer_str);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       if (peer->conf_if)
+               return CMD_WARNING;
+
+       if (source_str) {
+               if (str2sockunion(source_str, &su) == 0)
+                       peer_update_source_addr_set(peer, &su);
+               else {
+                       if (str2prefix(source_str, &p)) {
+                               vty_out(vty,
+                                       "%% Invalid update-source, remove prefix length \n");
+                               return CMD_WARNING_CONFIG_FAILED;
+                       } else
+                               peer_update_source_if_set(peer, source_str);
+               }
+       } else
+               peer_update_source_unset(peer);
+
+       return CMD_SUCCESS;
+}
+
 #define BGP_UPDATE_SOURCE_HELP_STR                                             \
        "IPv4 address\n"                                                       \
        "IPv6 address\n"                                                       \
        "Interface name (requires zebra to be running)\n"
 
-DEFUN_YANG (neighbor_update_source,
-           neighbor_update_source_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> update-source <A.B.C.D|X:X::X:X|WORD>",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Source of routing updates\n"
-           BGP_UPDATE_SOURCE_HELP_STR)
+DEFUN (neighbor_update_source,
+       neighbor_update_source_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> update-source <A.B.C.D|X:X::X:X|WORD>",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Source of routing updates\n"
+       BGP_UPDATE_SOURCE_HELP_STR)
 {
        int idx_peer = 1;
        int idx_peer_2 = 3;
-       union sockunion su;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       if (str2sockunion(argv[idx_peer_2]->arg, &su) == 0)
-               nb_cli_enqueue_change(vty, "./update-source/ip", NB_OP_MODIFY,
+       return peer_update_source_vty(vty, argv[idx_peer]->arg,
                                      argv[idx_peer_2]->arg);
-       else
-               nb_cli_enqueue_change(vty, "./update-source/interface",
-                                     NB_OP_MODIFY, argv[idx_peer_2]->arg);
-
-       return nb_cli_apply_changes(vty, base_xpath);
 }
 
-DEFUN_YANG (no_neighbor_update_source,
-           no_neighbor_update_source_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> update-source [<A.B.C.D|X:X::X:X|WORD>]",
-           NO_STR NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Source of routing updates\n"
-           BGP_UPDATE_SOURCE_HELP_STR)
+DEFUN (no_neighbor_update_source,
+       no_neighbor_update_source_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> update-source [<A.B.C.D|X:X::X:X|WORD>]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Source of routing updates\n"
+       BGP_UPDATE_SOURCE_HELP_STR)
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./update-source/ip", NB_OP_DESTROY, NULL);
-       nb_cli_enqueue_change(vty, "./update-source/interface", NB_OP_DESTROY,
-                             NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_update_source_vty(vty, argv[idx_peer]->arg, NULL);
 }
 
 static int peer_default_originate_set_vty(struct vty *vty, const char *peer_str,
@@ -7374,76 +6453,103 @@ ALIAS_HIDDEN(
        "route-map name\n")
 
 
-/* Set specified peer's BGP port.  */
-DEFUN_YANG (neighbor_port,
-           neighbor_port_cmd,
-           "neighbor <A.B.C.D|X:X::X:X> port (0-65535)",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR
-           "Neighbor's BGP port\n"
-           "TCP port number\n")
+/* Set neighbor's BGP port.  */
+static int peer_port_vty(struct vty *vty, const char *ip_str, int afi,
+                        const char *port_str)
 {
-       int idx_ip = 1;
-       int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       uint16_t port;
+       struct servent *sp;
+
+       peer = peer_lookup_vty(vty, ip_str);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       if (!port_str) {
+               sp = getservbyname("bgp", "tcp");
+               port = (sp == NULL) ? BGP_PORT_DEFAULT : ntohs(sp->s_port);
+       } else {
+               port = strtoul(port_str, NULL, 10);
+       }
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_NUM_XPATH,
-                argv[idx_ip]->arg, "");
+       peer_port_set(peer, port);
 
-       nb_cli_enqueue_change(vty, "./local-port", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
+       return CMD_SUCCESS;
+}
 
-       return nb_cli_apply_changes(vty, base_xpath);
+/* Set specified peer's BGP port.  */
+DEFUN (neighbor_port,
+       neighbor_port_cmd,
+       "neighbor <A.B.C.D|X:X::X:X> port (0-65535)",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR
+       "Neighbor's BGP port\n"
+       "TCP port number\n")
+{
+       int idx_ip = 1;
+       int idx_number = 3;
+       return peer_port_vty(vty, argv[idx_ip]->arg, AFI_IP,
+                            argv[idx_number]->arg);
 }
 
-DEFUN_YANG (no_neighbor_port,
-           no_neighbor_port_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X> port [(0-65535)]",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR
-           "Neighbor's BGP port\n"
-           "TCP port number\n")
+DEFUN (no_neighbor_port,
+       no_neighbor_port_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X> port [(0-65535)]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR
+       "Neighbor's BGP port\n"
+       "TCP port number\n")
 {
        int idx_ip = 2;
-       char base_xpath[XPATH_MAXLEN];
+       return peer_port_vty(vty, argv[idx_ip]->arg, AFI_IP, NULL);
+}
+
+
+/* neighbor weight. */
+static int peer_weight_set_vty(struct vty *vty, const char *ip_str, afi_t afi,
+                              safi_t safi, const char *weight_str)
+{
+       int ret;
+       struct peer *peer;
+       unsigned long weight;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_NUM_XPATH,
-                argv[idx_ip]->arg, "");
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./local-port", NB_OP_DESTROY, NULL);
+       weight = strtoul(weight_str, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       ret = peer_weight_set(peer, afi, safi, weight);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG (neighbor_weight,
-           neighbor_weight_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> weight (0-65535)",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Set default weight for routes from this neighbor\n"
-           "default weight\n")
+static int peer_weight_unset_vty(struct vty *vty, const char *ip_str, afi_t afi,
+                                safi_t safi)
 {
-       int idx_peer = 1;
-       int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
+       int ret;
+       struct peer *peer;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       snprintf(attr_xpath, sizeof(attr_xpath), "./%s/weight/weight-attribute",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_MODIFY,
-                             argv[idx_number]->arg);
+       ret = peer_weight_unset(peer, afi, safi);
+       return bgp_vty_return(vty, ret);
+}
 
-       return nb_cli_apply_changes(vty, base_xpath);
+DEFUN (neighbor_weight,
+       neighbor_weight_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> weight (0-65535)",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Set default weight for routes from this neighbor\n"
+       "default weight\n")
+{
+       int idx_peer = 1;
+       int idx_number = 3;
+       return peer_weight_set_vty(vty, argv[idx_peer]->arg, bgp_node_afi(vty),
+                                  bgp_node_safi(vty), argv[idx_number]->arg);
 }
 
 ALIAS_HIDDEN(neighbor_weight, neighbor_weight_hidden_cmd,
@@ -7452,34 +6558,18 @@ ALIAS_HIDDEN(neighbor_weight, neighbor_weight_hidden_cmd,
             "Set default weight for routes from this neighbor\n"
             "default weight\n")
 
-DEFUN_YANG (no_neighbor_weight,
-           no_neighbor_weight_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> weight [(0-65535)]",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Set default weight for routes from this neighbor\n"
-           "default weight\n")
+DEFUN (no_neighbor_weight,
+       no_neighbor_weight_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> weight [(0-65535)]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Set default weight for routes from this neighbor\n"
+       "default weight\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath), "./%s/weight/weight-attribute",
-                bgp_afi_safi_get_container_str(afi, safi));
-
-       nb_cli_enqueue_change(vty, attr_xpath, NB_OP_DESTROY, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_weight_unset_vty(vty, argv[idx_peer]->arg,
+                                    bgp_node_afi(vty), bgp_node_safi(vty));
 }
 
 ALIAS_HIDDEN(no_neighbor_weight, no_neighbor_weight_hidden_cmd,
@@ -7490,189 +6580,183 @@ ALIAS_HIDDEN(no_neighbor_weight, no_neighbor_weight_hidden_cmd,
 
 
 /* Override capability negotiation. */
-DEFUN_YANG (neighbor_override_capability,
-           neighbor_override_capability_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> override-capability",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Override capability negotiation result\n")
+DEFUN (neighbor_override_capability,
+       neighbor_override_capability_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> override-capability",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Override capability negotiation result\n")
 {
        int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg,
+                                PEER_FLAG_OVERRIDE_CAPABILITY);
+}
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
+DEFUN (no_neighbor_override_capability,
+       no_neighbor_override_capability_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> override-capability",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Override capability negotiation result\n")
+{
+       int idx_peer = 2;
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                  PEER_FLAG_OVERRIDE_CAPABILITY);
+}
 
-       nb_cli_enqueue_change(
-               vty, "./capability-options/override-capability",
-               NB_OP_MODIFY, "true");
+DEFUN (neighbor_strict_capability,
+       neighbor_strict_capability_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> strict-capability-match",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Strict capability negotiation match\n")
+{
+       int idx_peer = 1;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_set_vty(vty, argv[idx_peer]->arg,
+                                PEER_FLAG_STRICT_CAP_MATCH);
 }
 
-DEFUN_YANG (no_neighbor_override_capability,
-           no_neighbor_override_capability_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> override-capability",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Override capability negotiation result\n")
+DEFUN (no_neighbor_strict_capability,
+       no_neighbor_strict_capability_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> strict-capability-match",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Strict capability negotiation match\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(
-               vty, "./capability-options/override-capability",
-               NB_OP_MODIFY, "false");
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_flag_unset_vty(vty, argv[idx_peer]->arg,
+                                  PEER_FLAG_STRICT_CAP_MATCH);
 }
 
-DEFUN_YANG (neighbor_strict_capability,
-           neighbor_strict_capability_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> strict-capability-match",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Strict capability negotiation match\n")
+static int peer_timers_set_vty(struct vty *vty, const char *ip_str,
+                              const char *keep_str, const char *hold_str)
 {
-       int idx_peer = 1;
-       char base_xpath[XPATH_MAXLEN];
+       int ret;
+       struct peer *peer;
+       uint32_t keepalive;
+       uint32_t holdtime;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(
-               vty, "./capability-options/strict-capability",
-               NB_OP_MODIFY, "true");
+       keepalive = strtoul(keep_str, NULL, 10);
+       holdtime = strtoul(hold_str, NULL, 10);
+
+       ret = peer_timers_set(peer, keepalive, holdtime);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG (no_neighbor_strict_capability,
-           no_neighbor_strict_capability_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> strict-capability-match",
-           NO_STR
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "Strict capability negotiation match\n")
+static int peer_timers_unset_vty(struct vty *vty, const char *ip_str)
 {
-       int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
+       int ret;
+       struct peer *peer;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(
-               vty, "./capability-options/strict-capability",
-               NB_OP_MODIFY, "false");
+       ret = peer_timers_unset(peer);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG (neighbor_timers,
-           neighbor_timers_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> timers (0-65535) (0-65535)",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "BGP per neighbor timers\n"
-           "Keepalive interval\n"
-           "Holdtime\n")
+DEFUN (neighbor_timers,
+       neighbor_timers_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> timers (0-65535) (0-65535)",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "BGP per neighbor timers\n"
+       "Keepalive interval\n"
+       "Holdtime\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
        int idx_number_2 = 4;
-       char base_xpath[XPATH_MAXLEN];
+       return peer_timers_set_vty(vty, argv[idx_peer]->arg,
+                                  argv[idx_number]->arg,
+                                  argv[idx_number_2]->arg);
+}
+
+DEFUN (no_neighbor_timers,
+       no_neighbor_timers_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> timers [(0-65535) (0-65535)]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "BGP per neighbor timers\n"
+       "Keepalive interval\n"
+       "Holdtime\n")
+{
+       int idx_peer = 2;
+       return peer_timers_unset_vty(vty, argv[idx_peer]->arg);
+}
+
+
+static int peer_timers_connect_set_vty(struct vty *vty, const char *ip_str,
+                                      const char *time_str)
+{
+       int ret;
+       struct peer *peer;
+       uint32_t connect;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./timers/keepalive", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
+       connect = strtoul(time_str, NULL, 10);
 
-       nb_cli_enqueue_change(vty, "./timers/hold-time", NB_OP_MODIFY,
-                             argv[idx_number_2]->arg);
+       ret = peer_timers_connect_set(peer, connect);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG (no_neighbor_timers,
-           no_neighbor_timers_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> timers [(0-65535) (0-65535)]",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "BGP per neighbor timers\n"
-           "Keepalive interval\n"
-           "Holdtime\n")
+static int peer_timers_connect_unset_vty(struct vty *vty, const char *ip_str)
 {
-       int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
+       int ret;
+       struct peer *peer;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./timers/hold-time", NB_OP_DESTROY, NULL);
+       ret = peer_timers_connect_unset(peer);
 
-       nb_cli_enqueue_change(vty, "./timers/keepalive", NB_OP_DESTROY, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG (neighbor_timers_connect,
-           neighbor_timers_connect_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> timers connect (1-65535)",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "BGP per neighbor timers\n"
-           "BGP connect timer\n"
-           "Connect timer\n")
+DEFUN (neighbor_timers_connect,
+       neighbor_timers_connect_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> timers connect (1-65535)",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "BGP per neighbor timers\n"
+       "BGP connect timer\n"
+       "Connect timer\n")
 {
        int idx_peer = 1;
        int idx_number = 4;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./timers/connect-time", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_timers_connect_set_vty(vty, argv[idx_peer]->arg,
+                                          argv[idx_number]->arg);
 }
 
-DEFUN_YANG (no_neighbor_timers_connect,
-           no_neighbor_timers_connect_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> timers connect [(1-65535)]",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "BGP per neighbor timers\n"
-           "BGP connect timer\n"
-           "Connect timer\n")
+DEFUN (no_neighbor_timers_connect,
+       no_neighbor_timers_connect_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> timers connect [(1-65535)]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "BGP per neighbor timers\n"
+       "BGP connect timer\n"
+       "Connect timer\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./timers/connect-time", NB_OP_DESTROY,
-                             NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_timers_connect_unset_vty(vty, argv[idx_peer]->arg);
 }
 
 DEFPY (neighbor_timers_delayopen,
@@ -7720,50 +6804,56 @@ DEFPY (no_neighbor_timers_delayopen,
        if (peer_timers_delayopen_unset(peer))
                return CMD_WARNING_CONFIG_FAILED;
 
-       return CMD_SUCCESS;
+       return CMD_SUCCESS;
+}
+
+static int peer_advertise_interval_vty(struct vty *vty, const char *ip_str,
+                                      const char *time_str, int set)
+{
+       int ret;
+       struct peer *peer;
+       uint32_t routeadv = 0;
+
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       if (time_str)
+               routeadv = strtoul(time_str, NULL, 10);
+
+       if (set)
+               ret = peer_advertise_interval_set(peer, routeadv);
+       else
+               ret = peer_advertise_interval_unset(peer);
+
+       return bgp_vty_return(vty, ret);
 }
 
-DEFUN_YANG (neighbor_advertise_interval,
-           neighbor_advertise_interval_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> advertisement-interval (0-600)",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Minimum interval between sending BGP routing updates\n"
-           "time in seconds\n")
+DEFUN (neighbor_advertise_interval,
+       neighbor_advertise_interval_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> advertisement-interval (0-600)",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Minimum interval between sending BGP routing updates\n"
+       "time in seconds\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./timers/advertise-interval", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_advertise_interval_vty(vty, argv[idx_peer]->arg,
+                                          argv[idx_number]->arg, 1);
 }
 
-DEFUN_YANG (no_neighbor_advertise_interval,
-           no_neighbor_advertise_interval_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> advertisement-interval [(0-600)]",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Minimum interval between sending BGP routing updates\n"
-           "time in seconds\n")
+DEFUN (no_neighbor_advertise_interval,
+       no_neighbor_advertise_interval_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> advertisement-interval [(0-600)]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Minimum interval between sending BGP routing updates\n"
+       "time in seconds\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       nb_cli_enqueue_change(vty, "./timers/advertise-interval", NB_OP_DESTROY,
-                             NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_advertise_interval_vty(vty, argv[idx_peer]->arg, NULL, 0);
 }
 
 
@@ -7815,42 +6905,52 @@ DEFUN (no_bgp_set_route_map_delay_timer,
        return CMD_SUCCESS;
 }
 
-DEFUN_YANG (neighbor_interface,
-           neighbor_interface_cmd,
-           "neighbor <A.B.C.D|X:X::X:X> interface WORD",
-           NEIGHBOR_STR NEIGHBOR_ADDR_STR
-           "Interface\n"
-           "Interface name\n")
+/* neighbor interface */
+static int peer_interface_vty(struct vty *vty, const char *ip_str,
+                             const char *str)
 {
-       int idx_ip = 1;
-       int idx_word = 3;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_NUM_XPATH,
-                argv[idx_ip]->arg, "");
+       peer = peer_lookup_vty(vty, ip_str);
+       if (!peer || peer->conf_if) {
+               vty_out(vty, "%% BGP invalid peer %s\n", ip_str);
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       nb_cli_enqueue_change(vty, "./local-interface", NB_OP_MODIFY,
-                             argv[idx_word]->arg);
+       if (str)
+               peer_interface_set(peer, str);
+       else
+               peer_interface_unset(peer);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG (no_neighbor_interface,
-           no_neighbor_interface_cmd,
-           "no neighbor <A.B.C.D|X:X::X:X|WORD> interface WORD",
-           NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-           "Interface\n"
-           "Interface name\n")
+DEFUN (neighbor_interface,
+       neighbor_interface_cmd,
+       "neighbor <A.B.C.D|X:X::X:X> interface WORD",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR
+       "Interface\n"
+       "Interface name\n")
 {
-       int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
+       int idx_ip = 1;
+       int idx_word = 3;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_NEIGHBOR_NUM_XPATH,
-                argv[idx_peer]->arg, "");
+       return peer_interface_vty(vty, argv[idx_ip]->arg, argv[idx_word]->arg);
+}
 
-       nb_cli_enqueue_change(vty, "./local-interface", NB_OP_DESTROY, NULL);
+DEFUN (no_neighbor_interface,
+       no_neighbor_interface_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X> interface WORD",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR
+       "Interface\n"
+       "Interface name\n")
+{
+       int idx_peer = 2;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_interface_vty(vty, argv[idx_peer]->arg, NULL);
 }
 
 DEFUN (neighbor_distribute_list,
@@ -7941,44 +7041,69 @@ ALIAS_HIDDEN(
        "Filter outgoing updates\n")
 
 /* Set prefix list to the peer. */
-DEFPY_YANG(
-       neighbor_prefix_list, neighbor_prefix_list_cmd,
-       "[no$no] neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor_str prefix-list WORD$prefix_str <in|out>$direction",
-       NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-       "Filter updates to/from this neighbor\n"
-       "Name of a prefix list\n"
-       "Filter incoming updates\n"
-       "Filter outgoing updates\n")
+static int peer_prefix_list_set_vty(struct vty *vty, const char *ip_str,
+                                   afi_t afi, safi_t safi,
+                                   const char *name_str,
+                                   const char *direct_str)
 {
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char plist_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
+       int ret;
+       int direct = FILTER_IN;
+       struct peer *peer;
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, neighbor_str, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       if (strmatch(direction, "in"))
-               snprintf(plist_xpath, sizeof(plist_xpath),
-                        "./%s/filter-config/plist-import",
-                        bgp_afi_safi_get_container_str(afi, safi));
-       else if (strmatch(direction, "out"))
-               snprintf(plist_xpath, sizeof(plist_xpath),
-                        "./%s/filter-config/plist-export",
-                        bgp_afi_safi_get_container_str(afi, safi));
-
-       if (!no)
-               nb_cli_enqueue_change(vty, plist_xpath, NB_OP_MODIFY,
-                                     prefix_str);
-       else
-               nb_cli_enqueue_change(vty, plist_xpath, NB_OP_DESTROY, NULL);
+       /* Check filter direction. */
+       if (strncmp(direct_str, "i", 1) == 0)
+               direct = FILTER_IN;
+       else if (strncmp(direct_str, "o", 1) == 0)
+               direct = FILTER_OUT;
+
+       ret = peer_prefix_list_set(peer, afi, safi, direct, name_str);
+
+       return bgp_vty_return(vty, ret);
+}
+
+static int peer_prefix_list_unset_vty(struct vty *vty, const char *ip_str,
+                                     afi_t afi, safi_t safi,
+                                     const char *direct_str)
+{
+       int ret;
+       struct peer *peer;
+       int direct = FILTER_IN;
+
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       /* Check filter direction. */
+       if (strncmp(direct_str, "i", 1) == 0)
+               direct = FILTER_IN;
+       else if (strncmp(direct_str, "o", 1) == 0)
+               direct = FILTER_OUT;
+
+       ret = peer_prefix_list_unset(peer, afi, safi, direct);
+
+       return bgp_vty_return(vty, ret);
+}
+
+DEFUN (neighbor_prefix_list,
+       neighbor_prefix_list_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> prefix-list WORD <in|out>",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Filter updates to/from this neighbor\n"
+       "Name of a prefix list\n"
+       "Filter incoming updates\n"
+       "Filter outgoing updates\n")
+{
+       int idx_peer = 1;
+       int idx_word = 3;
+       int idx_in_out = 4;
+       return peer_prefix_list_set_vty(
+               vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty),
+               argv[idx_word]->arg, argv[idx_in_out]->arg);
 }
 
 ALIAS_HIDDEN(neighbor_prefix_list, neighbor_prefix_list_hidden_cmd,
@@ -7989,6 +7114,32 @@ ALIAS_HIDDEN(neighbor_prefix_list, neighbor_prefix_list_hidden_cmd,
             "Filter incoming updates\n"
             "Filter outgoing updates\n")
 
+DEFUN (no_neighbor_prefix_list,
+       no_neighbor_prefix_list_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> prefix-list WORD <in|out>",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Filter updates to/from this neighbor\n"
+       "Name of a prefix list\n"
+       "Filter incoming updates\n"
+       "Filter outgoing updates\n")
+{
+       int idx_peer = 2;
+       int idx_in_out = 5;
+       return peer_prefix_list_unset_vty(vty, argv[idx_peer]->arg,
+                                         bgp_node_afi(vty), bgp_node_safi(vty),
+                                         argv[idx_in_out]->arg);
+}
+
+ALIAS_HIDDEN(no_neighbor_prefix_list, no_neighbor_prefix_list_hidden_cmd,
+            "no neighbor <A.B.C.D|X:X::X:X|WORD> prefix-list WORD <in|out>",
+            NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
+            "Filter updates to/from this neighbor\n"
+            "Name of a prefix list\n"
+            "Filter incoming updates\n"
+            "Filter outgoing updates\n")
+
 static int peer_aslist_set_vty(struct vty *vty, const char *ip_str, afi_t afi,
                               safi_t safi, const char *name_str,
                               const char *direct_str)
@@ -8166,54 +7317,106 @@ ALIAS_HIDDEN(neighbor_advertise_map, neighbor_advertise_map_hidden_cmd,
             "Name of the exist or non exist map\n")
 
 /* Set route-map to the peer. */
-DEFPY_YANG(
-       neighbor_route_map, neighbor_route_map_cmd,
-       "[no$no] neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor_str route-map WORD$rmap_str  <in|out>$direction",
-       NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-       "Apply route map to neighbor\n"
-       "Name of route map\n"
-       "Apply map to incoming routes\n"
-       "Apply map to outbound routes\n")
-{
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char rmap_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
+static int peer_route_map_set_vty(struct vty *vty, const char *ip_str,
+                                 afi_t afi, safi_t safi, const char *name_str,
+                                 const char *direct_str)
+{
+       int ret;
+       struct peer *peer;
+       int direct = RMAP_IN;
+       struct route_map *route_map;
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, neighbor_str, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       if (strmatch(direction, "in"))
-               snprintf(rmap_xpath, sizeof(rmap_xpath),
-                        "./%s/filter-config/rmap-import",
-                        bgp_afi_safi_get_container_str(afi, safi));
-       else if (strmatch(direction, "out"))
-               snprintf(rmap_xpath, sizeof(rmap_xpath),
-                        "./%s/filter-config/rmap-export",
-                        bgp_afi_safi_get_container_str(afi, safi));
+       /* Check filter direction. */
+       if (strncmp(direct_str, "in", 2) == 0)
+               direct = RMAP_IN;
+       else if (strncmp(direct_str, "o", 1) == 0)
+               direct = RMAP_OUT;
+
+       route_map = route_map_lookup_warn_noexist(vty, name_str);
+       ret = peer_route_map_set(peer, afi, safi, direct, name_str, route_map);
 
-       if (!no) {
-               if (!yang_dnode_existsf(
-                           vty->candidate_config->dnode,
-                           "/frr-route-map:lib/route-map[name='%s']",
-                           rmap_str)) {
-                       if (vty_shell_serv(vty))
-                               vty_out(vty,
-                                       "The route-map '%s' does not exist.\n",
-                                       rmap_str);
-               }
-               nb_cli_enqueue_change(vty, rmap_xpath, NB_OP_MODIFY, rmap_str);
-       } else
-               nb_cli_enqueue_change(vty, rmap_xpath, NB_OP_DESTROY, NULL);
+       return bgp_vty_return(vty, ret);
+}
+
+static int peer_route_map_unset_vty(struct vty *vty, const char *ip_str,
+                                   afi_t afi, safi_t safi,
+                                   const char *direct_str)
+{
+       int ret;
+       struct peer *peer;
+       int direct = RMAP_IN;
+
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       /* Check filter direction. */
+       if (strncmp(direct_str, "in", 2) == 0)
+               direct = RMAP_IN;
+       else if (strncmp(direct_str, "o", 1) == 0)
+               direct = RMAP_OUT;
+
+       ret = peer_route_map_unset(peer, afi, safi, direct);
+
+       return bgp_vty_return(vty, ret);
+}
+
+DEFUN (neighbor_route_map,
+       neighbor_route_map_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> route-map WORD <in|out>",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Apply route map to neighbor\n"
+       "Name of route map\n"
+       "Apply map to incoming routes\n"
+       "Apply map to outbound routes\n")
+{
+       int idx_peer = 1;
+       int idx_word = 3;
+       int idx_in_out = 4;
+       return peer_route_map_set_vty(
+               vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty),
+               argv[idx_word]->arg, argv[idx_in_out]->arg);
+}
+
+ALIAS_HIDDEN(neighbor_route_map, neighbor_route_map_hidden_cmd,
+            "neighbor <A.B.C.D|X:X::X:X|WORD> route-map WORD <in|out>",
+            NEIGHBOR_STR NEIGHBOR_ADDR_STR2
+            "Apply route map to neighbor\n"
+            "Name of route map\n"
+            "Apply map to incoming routes\n"
+            "Apply map to outbound routes\n")
+
+DEFUN (no_neighbor_route_map,
+       no_neighbor_route_map_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> route-map WORD <in|out>",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Apply route map to neighbor\n"
+       "Name of route map\n"
+       "Apply map to incoming routes\n"
+       "Apply map to outbound routes\n")
+{
+       int idx_peer = 2;
+       int idx_in_out = 5;
+       return peer_route_map_unset_vty(vty, argv[idx_peer]->arg,
+                                       bgp_node_afi(vty), bgp_node_safi(vty),
+                                       argv[idx_in_out]->arg);
 }
 
+ALIAS_HIDDEN(no_neighbor_route_map, no_neighbor_route_map_hidden_cmd,
+            "no neighbor <A.B.C.D|X:X::X:X|WORD> route-map WORD <in|out>",
+            NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
+            "Apply route map to neighbor\n"
+            "Name of route map\n"
+            "Apply map to incoming routes\n"
+            "Apply map to outbound routes\n")
+
 /* Set unsuppress-map to the peer. */
 static int peer_unsuppress_map_set_vty(struct vty *vty, const char *ip_str,
                                       afi_t afi, safi_t safi,
@@ -8291,113 +7494,129 @@ ALIAS_HIDDEN(no_neighbor_unsuppress_map, no_neighbor_unsuppress_map_hidden_cmd,
             "Route-map to selectively unsuppress suppressed routes\n"
             "Name of route map\n")
 
+static int peer_maximum_prefix_set_vty(struct vty *vty, const char *ip_str,
+                                      afi_t afi, safi_t safi,
+                                      const char *num_str,
+                                      const char *threshold_str, int warning,
+                                      const char *restart_str,
+                                      const char *force_str)
+{
+       int ret;
+       struct peer *peer;
+       uint32_t max;
+       uint8_t threshold;
+       uint16_t restart;
+
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       max = strtoul(num_str, NULL, 10);
+       if (threshold_str)
+               threshold = atoi(threshold_str);
+       else
+               threshold = MAXIMUM_PREFIX_THRESHOLD_DEFAULT;
+
+       if (restart_str)
+               restart = atoi(restart_str);
+       else
+               restart = 0;
+
+       ret = peer_maximum_prefix_set(peer, afi, safi, max, threshold, warning,
+                                     restart, force_str ? true : false);
+
+       return bgp_vty_return(vty, ret);
+}
+
+static int peer_maximum_prefix_unset_vty(struct vty *vty, const char *ip_str,
+                                        afi_t afi, safi_t safi)
+{
+       int ret;
+       struct peer *peer;
+
+       peer = peer_and_group_lookup_vty(vty, ip_str);
+       if (!peer)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       ret = peer_maximum_prefix_unset(peer, afi, safi);
+
+       return bgp_vty_return(vty, ret);
+}
+
 /* Maximum number of prefix to be sent to the neighbor. */
-DEFUN_YANG(neighbor_maximum_prefix_out,
-          neighbor_maximum_prefix_out_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix-out (1-4294967295)",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefixes to be sent to this peer\n"
-          "Maximum no. of prefix limit\n")
-{
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
+DEFUN(neighbor_maximum_prefix_out,
+      neighbor_maximum_prefix_out_cmd,
+      "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix-out (1-4294967295)",
+      NEIGHBOR_STR
+      NEIGHBOR_ADDR_STR2
+      "Maximum number of prefixes to be sent to this peer\n"
+      "Maximum no. of prefix limit\n")
+{
        int idx_peer = 1;
        int idx_number = 3;
+       struct peer *peer;
+       uint32_t max;
        afi_t afi = bgp_node_afi(vty);
        safi_t safi = bgp_node_safi(vty);
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='out']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       max = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
+       SET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
+       peer->pmax_out[afi][safi] = max;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return CMD_SUCCESS;
 }
 
-DEFUN_YANG(no_neighbor_maximum_prefix_out,
-          no_neighbor_maximum_prefix_out_cmd,
-          "no neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix-out",
-          NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefixes to be sent to this peer\n")
+DEFUN(no_neighbor_maximum_prefix_out,
+      no_neighbor_maximum_prefix_out_cmd,
+      "no neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix-out",
+      NO_STR
+      NEIGHBOR_STR
+      NEIGHBOR_ADDR_STR2
+      "Maximum number of prefixes to be sent to this peer\n")
 {
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
        int idx_peer = 2;
+       struct peer *peer;
        afi_t afi = bgp_node_afi(vty);
        safi_t safi = bgp_node_safi(vty);
 
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='out']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
+       UNSET_FLAG(peer->af_flags[afi][safi], PEER_FLAG_MAX_PREFIX_OUT);
+       peer->pmax_out[afi][safi] = 0;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return CMD_SUCCESS;
 }
 
 /* Maximum number of prefix configuration. Prefix count is different
    for each peer configuration. So this configuration can be set for
    each peer configuration. */
-DEFUN_YANG(neighbor_maximum_prefix,
-          neighbor_maximum_prefix_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) [force]",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefix accept from this peer\n"
-          "maximum no. of prefix limit\n"
-          "Force checking all received routes not only accepted\n")
+DEFUN (neighbor_maximum_prefix,
+       neighbor_maximum_prefix_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) [force]",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Maximum number of prefix accept from this peer\n"
+       "maximum no. of prefix limit\n"
+       "Force checking all received routes not only accepted\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
        int idx_force = 0;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='in']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
+       char *force = NULL;
 
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
        if (argv_find(argv, argc, "force", &idx_force))
-               nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY,
-                                     "true");
+               force = argv[idx_force]->arg;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_maximum_prefix_set_vty(
+               vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty),
+               argv[idx_number]->arg, NULL, 0, NULL, force);
 }
 
 ALIAS_HIDDEN(neighbor_maximum_prefix, neighbor_maximum_prefix_hidden_cmd,
@@ -8407,50 +7626,28 @@ ALIAS_HIDDEN(neighbor_maximum_prefix, neighbor_maximum_prefix_hidden_cmd,
             "maximum no. of prefix limit\n"
             "Force checking all received routes not only accepted\n")
 
-DEFUN_YANG(neighbor_maximum_prefix_threshold,
-          neighbor_maximum_prefix_threshold_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) (1-100) [force]",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefix accept from this peer\n"
-          "maximum no. of prefix limit\n"
-          "Threshold value (%) at which to generate a warning msg\n"
-          "Force checking all received routes not only accepted\n")
+DEFUN (neighbor_maximum_prefix_threshold,
+       neighbor_maximum_prefix_threshold_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) (1-100) [force]",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Maximum number of prefix accept from this peer\n"
+       "maximum no. of prefix limit\n"
+       "Threshold value (%) at which to generate a warning msg\n"
+       "Force checking all received routes not only accepted\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
        int idx_number_2 = 4;
        int idx_force = 0;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='in']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-
-       nb_cli_enqueue_change(vty, "./options/shutdown-threshold-pct",
-                             NB_OP_MODIFY, argv[idx_number_2]->arg);
+       char *force = NULL;
 
        if (argv_find(argv, argc, "force", &idx_force))
-               nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY,
-                                     "true");
+               force = argv[idx_force]->arg;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_maximum_prefix_set_vty(
+               vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty),
+               argv[idx_number]->arg, argv[idx_number_2]->arg, 0, NULL, force);
 }
 
 ALIAS_HIDDEN(
@@ -8463,48 +7660,27 @@ ALIAS_HIDDEN(
        "Threshold value (%) at which to generate a warning msg\n"
        "Force checking all received routes not only accepted\n")
 
-DEFUN_YANG(neighbor_maximum_prefix_warning,
-          neighbor_maximum_prefix_warning_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) warning-only [force]",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefix accept from this peer\n"
-          "maximum no. of prefix limit\n"
-          "Only give warning message when limit is exceeded\n"
-          "Force checking all received routes not only accepted\n")
+DEFUN (neighbor_maximum_prefix_warning,
+       neighbor_maximum_prefix_warning_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) warning-only [force]",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Maximum number of prefix accept from this peer\n"
+       "maximum no. of prefix limit\n"
+       "Only give warning message when limit is exceeded\n"
+       "Force checking all received routes not only accepted\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
        int idx_force = 0;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='in']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
+       char *force = NULL;
 
-       nb_cli_enqueue_change(vty, "./options/warning-only", NB_OP_MODIFY,
-                             "true");
        if (argv_find(argv, argc, "force", &idx_force))
-               nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY,
-                                     "true");
+               force = argv[idx_force]->arg;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_maximum_prefix_set_vty(
+               vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty),
+               argv[idx_number]->arg, NULL, 1, NULL, force);
 }
 
 ALIAS_HIDDEN(
@@ -8517,51 +7693,29 @@ ALIAS_HIDDEN(
        "Only give warning message when limit is exceeded\n"
        "Force checking all received routes not only accepted\n")
 
-DEFUN_YANG(neighbor_maximum_prefix_threshold_warning,
-          neighbor_maximum_prefix_threshold_warning_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) (1-100) warning-only [force]",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefix accept from this peer\n"
-          "maximum no. of prefix limit\n"
-          "Threshold value (%) at which to generate a warning msg\n"
-          "Only give warning message when limit is exceeded\n"
-          "Force checking all received routes not only accepted\n")
+DEFUN (neighbor_maximum_prefix_threshold_warning,
+       neighbor_maximum_prefix_threshold_warning_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) (1-100) warning-only [force]",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Maximum number of prefix accept from this peer\n"
+       "maximum no. of prefix limit\n"
+       "Threshold value (%) at which to generate a warning msg\n"
+       "Only give warning message when limit is exceeded\n"
+       "Force checking all received routes not only accepted\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
        int idx_number_2 = 4;
        int idx_force = 0;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='in']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
+       char *force = NULL;
 
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-       nb_cli_enqueue_change(vty, "./options/tw-shutdown-threshold-pct",
-                             NB_OP_MODIFY, argv[idx_number_2]->arg);
-       nb_cli_enqueue_change(vty, "./options/tw-warning-only", NB_OP_MODIFY,
-                             "true");
        if (argv_find(argv, argc, "force", &idx_force))
-               nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY,
-                                     "true");
+               force = argv[idx_force]->arg;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_maximum_prefix_set_vty(
+               vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty),
+               argv[idx_number]->arg, argv[idx_number_2]->arg, 1, NULL, force);
 }
 
 ALIAS_HIDDEN(
@@ -8575,49 +7729,29 @@ ALIAS_HIDDEN(
        "Only give warning message when limit is exceeded\n"
        "Force checking all received routes not only accepted\n")
 
-DEFUN_YANG(neighbor_maximum_prefix_restart,
-          neighbor_maximum_prefix_restart_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) restart (1-65535) [force]",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefix accept from this peer\n"
-          "maximum no. of prefix limit\n"
-          "Restart bgp connection after limit is exceeded\n"
-          "Restart interval in minutes\n"
-          "Force checking all received routes not only accepted\n")
+DEFUN (neighbor_maximum_prefix_restart,
+       neighbor_maximum_prefix_restart_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) restart (1-65535) [force]",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Maximum number of prefix accept from this peer\n"
+       "maximum no. of prefix limit\n"
+       "Restart bgp connection after limit is exceeded\n"
+       "Restart interval in minutes\n"
+       "Force checking all received routes not only accepted\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
        int idx_number_2 = 5;
        int idx_force = 0;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
+       char *force = NULL;
 
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='in']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-       nb_cli_enqueue_change(vty, "./options/restart-timer", NB_OP_MODIFY,
-                             argv[idx_number_2]->arg);
        if (argv_find(argv, argc, "force", &idx_force))
-               nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY,
-                                     "true");
+               force = argv[idx_force]->arg;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_maximum_prefix_set_vty(
+               vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty),
+               argv[idx_number]->arg, NULL, 0, argv[idx_number_2]->arg, force);
 }
 
 ALIAS_HIDDEN(
@@ -8631,53 +7765,32 @@ ALIAS_HIDDEN(
        "Restart interval in minutes\n"
        "Force checking all received routes not only accepted\n")
 
-DEFUN_YANG(neighbor_maximum_prefix_threshold_restart,
-          neighbor_maximum_prefix_threshold_restart_cmd,
-          "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) (1-100) restart (1-65535) [force]",
-          NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefixes to accept from this peer\n"
-          "maximum no. of prefix limit\n"
-          "Threshold value (%) at which to generate a warning msg\n"
-          "Restart bgp connection after limit is exceeded\n"
-          "Restart interval in minutes\n"
-          "Force checking all received routes not only accepted\n")
+DEFUN (neighbor_maximum_prefix_threshold_restart,
+       neighbor_maximum_prefix_threshold_restart_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix (1-4294967295) (1-100) restart (1-65535) [force]",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Maximum number of prefixes to accept from this peer\n"
+       "maximum no. of prefix limit\n"
+       "Threshold value (%) at which to generate a warning msg\n"
+       "Restart bgp connection after limit is exceeded\n"
+       "Restart interval in minutes\n"
+       "Force checking all received routes not only accepted\n")
 {
        int idx_peer = 1;
        int idx_number = 3;
        int idx_number_2 = 4;
        int idx_number_3 = 6;
        int idx_force = 0;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='in']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
+       char *force = NULL;
 
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       nb_cli_enqueue_change(vty, "./max-prefixes", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
-       nb_cli_enqueue_change(vty, "./options/tr-shutdown-threshold-pct",
-                             NB_OP_MODIFY, argv[idx_number_2]->arg);
-       nb_cli_enqueue_change(vty, "./options/tr-restart-timer", NB_OP_MODIFY,
-                             argv[idx_number_3]->arg);
        if (argv_find(argv, argc, "force", &idx_force))
-               nb_cli_enqueue_change(vty, "./force-check", NB_OP_MODIFY,
-                                     "true");
+               force = argv[idx_force]->arg;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_maximum_prefix_set_vty(
+               vty, argv[idx_peer]->arg, bgp_node_afi(vty), bgp_node_safi(vty),
+               argv[idx_number]->arg, argv[idx_number_2]->arg, 0,
+               argv[idx_number_3]->arg, force);
 }
 
 ALIAS_HIDDEN(
@@ -8692,40 +7805,24 @@ ALIAS_HIDDEN(
        "Restart interval in minutes\n"
        "Force checking all received routes not only accepted\n")
 
-DEFUN_YANG(no_neighbor_maximum_prefix,
-          no_neighbor_maximum_prefix_cmd,
-          "no neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix [(1-4294967295) [(1-100)] [restart (1-65535)] [warning-only] [force]]",
-          NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "Maximum number of prefixes to accept from this peer\n"
-          "maximum no. of prefix limit\n"
-          "Threshold value (%) at which to generate a warning msg\n"
-          "Restart bgp connection after limit is exceeded\n"
-          "Restart interval in minutes\n"
-          "Only give warning message when limit is exceeded\n"
-          "Force checking all received routes not only accepted\n")
+DEFUN (no_neighbor_maximum_prefix,
+       no_neighbor_maximum_prefix_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> maximum-prefix [(1-4294967295) [(1-100)] [restart (1-65535)] [warning-only] [force]]",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "Maximum number of prefixes to accept from this peer\n"
+       "maximum no. of prefix limit\n"
+       "Threshold value (%) at which to generate a warning msg\n"
+       "Restart bgp connection after limit is exceeded\n"
+       "Restart interval in minutes\n"
+       "Only give warning message when limit is exceeded\n"
+       "Force checking all received routes not only accepted\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
-       char af_xpath[XPATH_MAXLEN];
-       char attr_xpath[XPATH_MAXLEN];
-       afi_t afi = bgp_node_afi(vty);
-       safi_t safi = bgp_node_safi(vty);
-
-       snprintf(af_xpath, sizeof(af_xpath), FRR_BGP_AF_XPATH,
-                yang_afi_safi_value2identity(afi, safi));
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), af_xpath)
-           < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       snprintf(attr_xpath, sizeof(attr_xpath),
-                "/%s/prefix-limit/direction-list[direction='in']",
-                bgp_afi_safi_get_container_str(afi, safi));
-       strlcat(base_xpath, attr_xpath, sizeof(base_xpath));
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return peer_maximum_prefix_unset_vty(vty, argv[idx_peer]->arg,
+                                            bgp_node_afi(vty),
+                                            bgp_node_safi(vty));
 }
 
 ALIAS_HIDDEN(
@@ -8817,49 +7914,58 @@ ALIAS_HIDDEN(
        "Number of occurrences of AS number\n"
        "Only accept my AS in the as-path if the route was originated in my AS\n")
 
-DEFUN_YANG (neighbor_ttl_security,
-           neighbor_ttl_security_cmd,
-           "neighbor <A.B.C.D|X:X::X:X|WORD> ttl-security hops (1-254)",
-           NEIGHBOR_STR
-           NEIGHBOR_ADDR_STR2
-           "BGP ttl-security parameters\n"
-           "Specify the maximum number of hops to the BGP peer\n"
-           "Number of hops to BGP peer\n")
+DEFUN (neighbor_ttl_security,
+       neighbor_ttl_security_cmd,
+       "neighbor <A.B.C.D|X:X::X:X|WORD> ttl-security hops (1-254)",
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "BGP ttl-security parameters\n"
+       "Specify the maximum number of hops to the BGP peer\n"
+       "Number of hops to BGP peer\n")
 {
        int idx_peer = 1;
        int idx_number = 4;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
+       int gtsm_hops;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./ttl-security", NB_OP_MODIFY,
-                             argv[idx_number]->arg);
+       gtsm_hops = strtoul(argv[idx_number]->arg, NULL, 10);
+
+       /*
+        * If 'neighbor swpX', then this is for directly connected peers,
+        * we should not accept a ttl-security hops value greater than 1.
+        */
+       if (peer->conf_if && (gtsm_hops > BGP_GTSM_HOPS_CONNECTED)) {
+               vty_out(vty,
+                       "%s is directly connected peer, hops cannot exceed 1\n",
+                       argv[idx_peer]->arg);
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_vty_return(vty, peer_ttl_security_hops_set(peer, gtsm_hops));
 }
 
-DEFUN_YANG(no_neighbor_ttl_security,
-          no_neighbor_ttl_security_cmd,
-          "no neighbor <A.B.C.D|X:X::X:X|WORD> ttl-security hops (1-254)",
-          NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2
-          "BGP ttl-security parameters\n"
-          "Specify the maximum number of hops to the BGP peer\n"
-          "Number of hops to BGP peer\n")
+DEFUN (no_neighbor_ttl_security,
+       no_neighbor_ttl_security_cmd,
+       "no neighbor <A.B.C.D|X:X::X:X|WORD> ttl-security hops (1-254)",
+       NO_STR
+       NEIGHBOR_STR
+       NEIGHBOR_ADDR_STR2
+       "BGP ttl-security parameters\n"
+       "Specify the maximum number of hops to the BGP peer\n"
+       "Number of hops to BGP peer\n")
 {
        int idx_peer = 2;
-       char base_xpath[XPATH_MAXLEN];
+       struct peer *peer;
 
-       if (peer_and_group_lookup_nb(vty, argv[idx_peer]->arg, base_xpath,
-                                    sizeof(base_xpath), NULL)
-           < 0)
+       peer = peer_and_group_lookup_vty(vty, argv[idx_peer]->arg);
+       if (!peer)
                return CMD_WARNING_CONFIG_FAILED;
 
-       nb_cli_enqueue_change(vty, "./ttl-security", NB_OP_DESTROY, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       return bgp_vty_return(vty, peer_ttl_security_hops_unset(peer));
 }
 
 DEFUN (neighbor_addpath_tx_all_paths,
@@ -9019,93 +8125,6 @@ DEFPY(
        return CMD_SUCCESS;
 }
 
-DEFPY(neighbor_damp,
-      neighbor_damp_cmd,
-      "neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor dampening [(1-45)$half [(1-20000)$reuse (1-20000)$suppress (1-255)$max]]",
-      NEIGHBOR_STR
-      NEIGHBOR_ADDR_STR2
-      "Enable neighbor route-flap dampening\n"
-      "Half-life time for the penalty\n"
-      "Value to start reusing a route\n"
-      "Value to start suppressing a route\n"
-      "Maximum duration to suppress a stable route\n")
-{
-       struct peer *peer = peer_and_group_lookup_vty(vty, neighbor);
-
-       if (!peer)
-               return CMD_WARNING_CONFIG_FAILED;
-       if (!half)
-               half = DEFAULT_HALF_LIFE;
-       if (!reuse) {
-               reuse = DEFAULT_REUSE;
-               suppress = DEFAULT_SUPPRESS;
-               max = half * 4;
-       }
-       if (suppress < reuse) {
-               vty_out(vty,
-                       "Suppress value cannot be less than reuse value\n");
-               return CMD_WARNING_CONFIG_FAILED;
-       }
-       bgp_peer_damp_enable(peer, bgp_node_afi(vty), bgp_node_safi(vty),
-                            half * 60, reuse, suppress, max * 60);
-       return CMD_SUCCESS;
-}
-
-DEFPY(no_neighbor_damp,
-      no_neighbor_damp_cmd,
-      "no neighbor <A.B.C.D|X:X::X:X|WORD>$neighbor dampening [HALF [REUSE SUPPRESS MAX]]",
-      NO_STR
-      NEIGHBOR_STR
-      NEIGHBOR_ADDR_STR2
-      "Enable neighbor route-flap dampening\n"
-      "Half-life time for the penalty\n"
-      "Value to start reusing a route\n"
-      "Value to start suppressing a route\n"
-      "Maximum duration to suppress a stable route\n")
-{
-       struct peer *peer = peer_and_group_lookup_vty(vty, neighbor);
-
-       if (!peer)
-               return CMD_WARNING_CONFIG_FAILED;
-       bgp_peer_damp_disable(peer, bgp_node_afi(vty), bgp_node_safi(vty));
-       return CMD_SUCCESS;
-}
-
-DEFPY (show_ip_bgp_neighbor_damp_param,
-       show_ip_bgp_neighbor_damp_param_cmd,
-       "show [ip] bgp [<ipv4|ipv6> [unicast]] neighbors <A.B.C.D|X:X::X:X|WORD>$neighbor dampening parameters [json]$json",
-       SHOW_STR
-       IP_STR
-       BGP_STR
-       BGP_AFI_HELP_STR
-       "Address Family modifier\n"
-       NEIGHBOR_STR
-       NEIGHBOR_ADDR_STR2
-       "Neighbor route-flap dampening information\n"
-       "Display detail of configured dampening parameters\n"
-       JSON_STR)
-{
-       bool use_json = false;
-       int idx = 0;
-       afi_t afi = AFI_IP;
-       safi_t safi = SAFI_UNICAST;
-       struct peer *peer;
-
-       if (argv_find(argv, argc, "ip", &idx))
-               afi = AFI_IP;
-       if (argv_find(argv, argc, "ipv4", &idx))
-               afi = AFI_IP;
-       if (argv_find(argv, argc, "ipv6", &idx))
-               afi = AFI_IP6;
-       peer = peer_and_group_lookup_vty(vty, neighbor);
-       if (!peer)
-               return CMD_WARNING;
-       if (json)
-               use_json = true;
-       bgp_show_peer_dampening_parameters(vty, peer, afi, safi, use_json);
-       return CMD_SUCCESS;
-}
-
 static int set_ecom_list(struct vty *vty, int argc, struct cmd_token **argv,
                         struct ecommunity **list, bool is_rt6)
 {
@@ -9144,33 +8163,6 @@ static int set_ecom_list(struct vty *vty, int argc, struct cmd_token **argv,
        return CMD_SUCCESS;
 }
 
-bool vpn_policy_check_import(struct bgp *bgp, afi_t afi, safi_t safi,
-                            bool v2vimport, char *errmsg, size_t errmsg_len)
-{
-       if (!v2vimport) {
-               if (CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
-                              BGP_CONFIG_VRF_TO_VRF_IMPORT)
-                   || CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
-                                 BGP_CONFIG_VRF_TO_VRF_EXPORT)) {
-                       snprintf(
-                               errmsg, errmsg_len, "%s",
-                               "%% error: Please unconfigure import vrf commands before using vpn commands");
-                       return false;
-               }
-       } else {
-               if (CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
-                              BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT)
-                   || CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
-                                 BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT)) {
-                       snprintf(
-                               errmsg, errmsg_len, "%s",
-                               "%% error: Please unconfigure vpn to vrf commands before using import vrf commands");
-                       return false;
-               }
-       }
-       return true;
-}
-
 /*
  * v2vimport is true if we are handling a `import vrf ...` command
  */
@@ -9213,45 +8205,57 @@ static afi_t vpn_policy_getafi(struct vty *vty, struct bgp *bgp, bool v2vimport)
        return afi;
 }
 
-DEFPY_YANG(
-       af_rd_vpn_export,
-       af_rd_vpn_export_cmd,
-       "[no] rd vpn export ASN:NN_OR_IP-ADDRESS:NN$rd_str",
-       NO_STR
-       "Specify route distinguisher\n"
-       "Between current address-family and vpn\n"
-       "For routes leaked from current address-family to vpn\n"
-       "Route Distinguisher (<as-number>:<number> | <ip-address>:<number>)\n")
+DEFPY (af_rd_vpn_export,
+       af_rd_vpn_export_cmd,
+       "[no] rd vpn export ASN:NN_OR_IP-ADDRESS:NN$rd_str",
+       NO_STR
+       "Specify route distinguisher\n"
+       "Between current address-family and vpn\n"
+       "For routes leaked from current address-family to vpn\n"
+       "Route Distinguisher (<as-number>:<number> | <ip-address>:<number>)\n")
 {
-       char base_xpath[XPATH_MAXLEN];
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       struct prefix_rd prd;
+       int ret;
        afi_t afi;
-       safi_t safi;
        int idx = 0;
+       bool yes = true;
 
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
+       if (argv_find(argv, argc, "no", &idx))
+               yes = false;
 
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/vpn-config",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
+       if (yes) {
+               ret = str2prefix_rd(rd_str, &prd);
+               if (!ret) {
+                       vty_out(vty, "%% Malformed rd\n");
+                       return CMD_WARNING_CONFIG_FAILED;
+               }
+       }
 
-       if (argv_find(argv, argc, "no", &idx))
-               nb_cli_enqueue_change(vty, "./rd", NB_OP_DESTROY, NULL);
-       else
-               nb_cli_enqueue_change(vty, "./rd", NB_OP_MODIFY, rd_str);
+       afi = vpn_policy_getafi(vty, bgp, false);
+       if (afi == AFI_MAX)
+               return CMD_WARNING_CONFIG_FAILED;
 
-       return nb_cli_apply_changes(vty, base_xpath);
-}
+       /*
+        * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
+        */
+       vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                          bgp_get_default(), bgp);
 
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rd(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       int indent = 2;
+       if (yes) {
+               bgp->vpn_policy[afi].tovpn_rd = prd;
+               SET_FLAG(bgp->vpn_policy[afi].flags,
+                        BGP_VPN_POLICY_TOVPN_RD_SET);
+       } else {
+               UNSET_FLAG(bgp->vpn_policy[afi].flags,
+                          BGP_VPN_POLICY_TOVPN_RD_SET);
+       }
+
+       /* post-change: re-export vpn routes */
+       vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                           bgp_get_default(), bgp);
 
-       vty_out(vty, "%*srd vpn export %s\n", indent, "",
-               yang_dnode_get_string(dnode, NULL));
+       return CMD_SUCCESS;
 }
 
 ALIAS (af_rd_vpn_export,
@@ -9425,7 +8429,7 @@ ALIAS (af_label_vpn_export,
        "Between current address-family and vpn\n"
        "For routes leaked from current address-family to vpn\n")
 
-DEFPY_YANG (af_nexthop_vpn_export,
+DEFPY (af_nexthop_vpn_export,
        af_nexthop_vpn_export_cmd,
        "[no] nexthop vpn export [<A.B.C.D|X:X::X:X>$nexthop_su]",
        NO_STR
@@ -9435,10 +8439,8 @@ DEFPY_YANG (af_nexthop_vpn_export,
        "IPv4 prefix\n"
        "IPv6 prefix\n")
 {
-       char base_xpath[XPATH_MAXLEN];
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        afi_t afi;
-       safi_t safi;
-       int idx = 0;
        struct prefix p;
 
        if (!no) {
@@ -9450,31 +8452,30 @@ DEFPY_YANG (af_nexthop_vpn_export,
                        return CMD_WARNING_CONFIG_FAILED;
        }
 
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
-
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/vpn-config",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
+       afi = vpn_policy_getafi(vty, bgp, false);
+       if (afi == AFI_MAX)
+               return CMD_WARNING_CONFIG_FAILED;
 
-       if (argv_find(argv, argc, "no", &idx))
-               nb_cli_enqueue_change(vty, "./nexthop", NB_OP_DESTROY, NULL);
-       else
-               nb_cli_enqueue_change(vty, "./nexthop", NB_OP_MODIFY,
-                                     nexthop_su_str);
+       /*
+        * pre-change: un-export vpn routes (vpn->vrf routes unaffected)
+        */
+       vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                          bgp_get_default(), bgp);
 
-       return nb_cli_apply_changes(vty, base_xpath);
-}
+       if (!no) {
+               bgp->vpn_policy[afi].tovpn_nexthop = p;
+               SET_FLAG(bgp->vpn_policy[afi].flags,
+                        BGP_VPN_POLICY_TOVPN_NEXTHOP_SET);
+       } else {
+               UNSET_FLAG(bgp->vpn_policy[afi].flags,
+                          BGP_VPN_POLICY_TOVPN_NEXTHOP_SET);
+       }
 
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_nexthop(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       int indent = 2;
+       /* post-change: re-export vpn routes */
+       vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, afi,
+                           bgp_get_default(), bgp);
 
-       vty_out(vty, "%*snexthop vpn export %s\n", indent, "",
-               yang_dnode_get_string(dnode, NULL));
+       return CMD_SUCCESS;
 }
 
 static int vpn_policy_getdirs(struct vty *vty, const char *dstr, int *dodir)
@@ -9575,7 +8576,7 @@ ALIAS (af_rt_vpn_imexport,
        "For routes leaked from current address-family to vpn\n"
        "both import and export\n")
 
-DEFPY_YANG (af_route_map_vpn_imexport,
+DEFPY (af_route_map_vpn_imexport,
        af_route_map_vpn_imexport_cmd,
 /* future: "route-map <vpn|evpn|vrf NAME> <import|export> RMAP" */
        "[no] route-map vpn <import|export>$direction_str RMAP$rmap_str",
@@ -9586,54 +8587,53 @@ DEFPY_YANG (af_route_map_vpn_imexport,
        "For routes leaked from current address-family to vpn\n"
        "name of route-map\n")
 {
-       char base_xpath[XPATH_MAXLEN];
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int ret;
+       int dodir[BGP_VPN_POLICY_DIR_MAX] = {0};
+       vpn_policy_direction_t dir;
        afi_t afi;
-       safi_t safi;
        int idx = 0;
+       bool yes = true;
 
-       afi = bgp_node_afi(vty);
-       safi = bgp_node_safi(vty);
+       if (argv_find(argv, argc, "no", &idx))
+               yes = false;
 
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/vpn-config",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi));
-
-       if (argv_find(argv, argc, "no", &idx)) {
-               if (!strcmp(direction_str, "import"))
-                       nb_cli_enqueue_change(vty, "./rmap-import",
-                                             NB_OP_DESTROY, NULL);
-               else if (!strcmp(direction_str, "export"))
-                       nb_cli_enqueue_change(vty, "./rmap-export",
-                                             NB_OP_DESTROY, NULL);
-       } else {
-               if (!strcmp(direction_str, "import"))
-                       nb_cli_enqueue_change(vty, "./rmap-import",
-                                             NB_OP_MODIFY, rmap_str);
-               if (!strcmp(direction_str, "export"))
-                       nb_cli_enqueue_change(vty, "./rmap-export",
-                                             NB_OP_MODIFY, rmap_str);
-       }
-       return nb_cli_apply_changes(vty, base_xpath);
-}
+       afi = vpn_policy_getafi(vty, bgp, false);
+       if (afi == AFI_MAX)
+               return CMD_WARNING_CONFIG_FAILED;
 
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rmap_import(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       int indent = 2;
+       ret = vpn_policy_getdirs(vty, direction_str, dodir);
+       if (ret != CMD_SUCCESS)
+               return ret;
 
-       vty_out(vty, "%*sroute-map vpn import %s\n", indent, "",
-               yang_dnode_get_string(dnode, NULL));
-}
+       for (dir = 0; dir < BGP_VPN_POLICY_DIR_MAX; ++dir) {
+               if (!dodir[dir])
+                       continue;
 
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_rmap_export(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       int indent = 2;
+               vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
+
+               if (yes) {
+                       if (bgp->vpn_policy[afi].rmap_name[dir])
+                               XFREE(MTYPE_ROUTE_MAP_NAME,
+                                     bgp->vpn_policy[afi].rmap_name[dir]);
+                       bgp->vpn_policy[afi].rmap_name[dir] = XSTRDUP(
+                                                                     MTYPE_ROUTE_MAP_NAME, rmap_str);
+                       bgp->vpn_policy[afi].rmap[dir] =
+                               route_map_lookup_warn_noexist(vty, rmap_str);
+                       if (!bgp->vpn_policy[afi].rmap[dir])
+                               return CMD_SUCCESS;
+               } else {
+                       if (bgp->vpn_policy[afi].rmap_name[dir])
+                               XFREE(MTYPE_ROUTE_MAP_NAME,
+                                     bgp->vpn_policy[afi].rmap_name[dir]);
+                       bgp->vpn_policy[afi].rmap_name[dir] = NULL;
+                       bgp->vpn_policy[afi].rmap[dir] = NULL;
+               }
 
-       vty_out(vty, "%*sroute-map vpn import %s\n", indent, "",
-               yang_dnode_get_string(dnode, NULL));
+               vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
+       }
+
+       return CMD_SUCCESS;
 }
 
 ALIAS (af_route_map_vpn_imexport,
@@ -9730,18 +8730,24 @@ DEFPY(af_no_import_vrf_route_map, af_no_import_vrf_route_map_cmd,
        return CMD_SUCCESS;
 }
 
-DEFPY_YANG(bgp_imexport_vrf,
-          bgp_imexport_vrf_cmd,
-          "[no] import vrf VIEWVRFNAME$import_name",
-          NO_STR
-          "Import routes from another VRF\n"
-          "VRF to import from\n"
-          "The name of the VRF\n")
+DEFPY(bgp_imexport_vrf, bgp_imexport_vrf_cmd,
+      "[no] import vrf VIEWVRFNAME$import_name",
+      NO_STR
+      "Import routes from another VRF\n"
+      "VRF to import from\n"
+      "The name of the VRF\n")
 {
-       char base_xpath[XPATH_MAXLEN];
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       struct listnode *node;
+       struct bgp *vrf_bgp, *bgp_default;
+       int32_t ret = 0;
+       as_t as = bgp->as;
+       bool remove = false;
+       int32_t idx = 0;
+       char *vname;
+       enum bgp_instance_type bgp_type = BGP_INSTANCE_TYPE_VRF;
        safi_t safi;
        afi_t afi;
-       int32_t idx = 0;
 
        if (import_name == NULL) {
                vty_out(vty, "%% Missing import name\n");
@@ -9753,32 +8759,70 @@ DEFPY_YANG(bgp_imexport_vrf,
                return CMD_WARNING;
        }
 
-       afi = bgp_node_afi(vty);
+       if (argv_find(argv, argc, "no", &idx))
+               remove = true;
+
+       afi = vpn_policy_getafi(vty, bgp, true);
+       if (afi == AFI_MAX)
+               return CMD_WARNING_CONFIG_FAILED;
+
        safi = bgp_node_safi(vty);
 
-       snprintf(
-               base_xpath, sizeof(base_xpath),
-               "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/vpn-config/import-vrf-list[vrf='%s']",
-               yang_afi_safi_value2identity(afi, safi),
-               bgp_afi_safi_get_container_str(afi, safi), import_name);
+       if (((BGP_INSTANCE_TYPE_DEFAULT == bgp->inst_type)
+            && (strcmp(import_name, VRF_DEFAULT_NAME) == 0))
+           || (bgp->name && (strcmp(import_name, bgp->name) == 0))) {
+               vty_out(vty, "%% Cannot %s vrf %s into itself\n",
+                       remove ? "unimport" : "import", import_name);
+               return CMD_WARNING;
+       }
 
-       if (argv_find(argv, argc, "no", &idx))
-               nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-       else
-               nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       bgp_default = bgp_get_default();
+       if (!bgp_default) {
+               /* Auto-create assuming the same AS */
+               ret = bgp_get_vty(&bgp_default, &as, NULL,
+                                 BGP_INSTANCE_TYPE_DEFAULT);
 
-       return nb_cli_apply_changes(vty, base_xpath);
-}
+               if (ret) {
+                       vty_out(vty,
+                               "VRF default is not configured as a bgp instance\n");
+                       return CMD_WARNING;
+               }
+       }
 
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_import_vrfs(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       vty_out(vty, "  import vrf %s\n",
-               yang_dnode_get_string(dnode, "./vrf"));
+       vrf_bgp = bgp_lookup_by_name(import_name);
+       if (!vrf_bgp) {
+               if (strcmp(import_name, VRF_DEFAULT_NAME) == 0)
+                       vrf_bgp = bgp_default;
+               else
+                       /* Auto-create assuming the same AS */
+                       ret = bgp_get_vty(&vrf_bgp, &as, import_name, bgp_type);
+
+               if (ret) {
+                       vty_out(vty,
+                               "VRF %s is not configured as a bgp instance\n",
+                               import_name);
+                       return CMD_WARNING;
+               }
+       }
+
+       if (remove) {
+               vrf_unimport_from_vrf(bgp, vrf_bgp, afi, safi);
+       } else {
+               /* Already importing from "import_vrf"? */
+               for (ALL_LIST_ELEMENTS_RO(bgp->vpn_policy[afi].import_vrf, node,
+                                         vname)) {
+                       if (strcmp(vname, import_name) == 0)
+                               return CMD_WARNING;
+               }
+
+               vrf_import_from_vrf(bgp, vrf_bgp, afi, safi);
+       }
+
+       return CMD_SUCCESS;
 }
 
 /* This command is valid only in a bgp vrf instance or the default instance */
-DEFPY_YANG (bgp_imexport_vpn,
+DEFPY (bgp_imexport_vpn,
        bgp_imexport_vpn_cmd,
        "[no] <import|export>$direction_str vpn",
        NO_STR
@@ -9786,51 +8830,62 @@ DEFPY_YANG (bgp_imexport_vpn,
        "Export routes from this address-family\n"
        "to/from default instance VPN RIB\n")
 {
-       char base_xpath[XPATH_MAXLEN];
-       safi_t safi;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int previous_state;
        afi_t afi;
-       int32_t idx = 0;
+       safi_t safi;
+       int idx = 0;
+       bool yes = true;
+       int flag;
+       vpn_policy_direction_t dir;
+
+       if (argv_find(argv, argc, "no", &idx))
+               yes = false;
+
+       if (BGP_INSTANCE_TYPE_VRF != bgp->inst_type &&
+               BGP_INSTANCE_TYPE_DEFAULT != bgp->inst_type) {
+
+               vty_out(vty, "%% import|export vpn valid only for bgp vrf or default instance\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
        afi = bgp_node_afi(vty);
        safi = bgp_node_safi(vty);
+       if ((SAFI_UNICAST != safi) || ((AFI_IP != afi) && (AFI_IP6 != afi))) {
+               vty_out(vty, "%% import|export vpn valid only for unicast ipv4|ipv6\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
        if (!strcmp(direction_str, "import")) {
-               snprintf(
-                       base_xpath, sizeof(base_xpath),
-                       "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/vpn-config/import-vpn",
-                       yang_afi_safi_value2identity(afi, safi),
-                       bgp_afi_safi_get_container_str(afi, safi));
+               flag = BGP_CONFIG_MPLSVPN_TO_VRF_IMPORT;
+               dir = BGP_VPN_POLICY_DIR_FROMVPN;
        } else if (!strcmp(direction_str, "export")) {
-               snprintf(
-                       base_xpath, sizeof(base_xpath),
-                       "./global/afi-safis/afi-safi[afi-safi-name='%s']/%s/vpn-config/export-vpn",
-                       yang_afi_safi_value2identity(afi, safi),
-                       bgp_afi_safi_get_container_str(afi, safi));
+               flag = BGP_CONFIG_VRF_TO_MPLSVPN_EXPORT;
+               dir = BGP_VPN_POLICY_DIR_TOVPN;
        } else {
                vty_out(vty, "%% unknown direction %s\n", direction_str);
                return CMD_WARNING_CONFIG_FAILED;
        }
 
-       if (argv_find(argv, argc, "no", &idx))
-               nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-       else
-               nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, "true");
+       previous_state = CHECK_FLAG(bgp->af_flags[afi][safi], flag);
 
-       return nb_cli_apply_changes(vty, base_xpath);
-}
+       if (yes) {
+               SET_FLAG(bgp->af_flags[afi][safi], flag);
+               if (!previous_state) {
+                       /* trigger export current vrf */
+                       vpn_leak_postchange(dir, afi, bgp_get_default(), bgp);
+               }
+       } else {
+               if (previous_state) {
+                       /* trigger un-export current vrf */
+                       vpn_leak_prechange(dir, afi, bgp_get_default(), bgp);
+               }
+               UNSET_FLAG(bgp->af_flags[afi][safi], flag);
+       }
 
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_import_vpn(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       if (yang_dnode_get_bool(dnode, NULL))
-               vty_out(vty, "  import vpn\n");
-}
+       hook_call(bgp_snmp_init_stats, bgp);
 
-void cli_show_bgp_global_afi_safi_ip_unicast_vpn_config_export_vpn(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       if (yang_dnode_get_bool(dnode, NULL))
-               vty_out(vty, "  export vpn\n");
+       return CMD_SUCCESS;
 }
 
 DEFPY (af_routetarget_import,
@@ -9896,51 +8951,6 @@ DEFPY (af_routetarget_import,
        return CMD_SUCCESS;
 }
 
-void cli_show_bgp_global_afi_safi_header(struct vty *vty,
-                                        struct lyd_node *dnode,
-                                        bool show_defaults)
-{
-       const char *af_name;
-       afi_t afi;
-       safi_t safi;
-
-       af_name = yang_dnode_get_string(dnode, "./afi-safi-name");
-       yang_afi_safi_identity2value(af_name, &afi, &safi);
-
-       vty_out(vty, " !\n address-family ");
-       if (afi == AFI_IP) {
-               if (safi == SAFI_UNICAST)
-                       vty_out(vty, "ipv4 unicast");
-               else if (safi == SAFI_LABELED_UNICAST)
-                       vty_out(vty, "ipv4 labeled-unicast");
-               else if (safi == SAFI_MULTICAST)
-                       vty_out(vty, "ipv4 multicast");
-               else if (safi == SAFI_MPLS_VPN)
-                       vty_out(vty, "ipv4 vpn");
-               else if (safi == SAFI_ENCAP)
-                       vty_out(vty, "ipv4 encap");
-               else if (safi == SAFI_FLOWSPEC)
-                       vty_out(vty, "ipv4 flowspec");
-       } else if (afi == AFI_IP6) {
-               if (safi == SAFI_UNICAST)
-                       vty_out(vty, "ipv6 unicast");
-               else if (safi == SAFI_LABELED_UNICAST)
-                       vty_out(vty, "ipv6 labeled-unicast");
-               else if (safi == SAFI_MULTICAST)
-                       vty_out(vty, "ipv6 multicast");
-               else if (safi == SAFI_MPLS_VPN)
-                       vty_out(vty, "ipv6 vpn");
-               else if (safi == SAFI_ENCAP)
-                       vty_out(vty, "ipv6 encap");
-               else if (safi == SAFI_FLOWSPEC)
-                       vty_out(vty, "ipv6 flowspec");
-       } else if (afi == AFI_L2VPN) {
-               if (safi == SAFI_EVPN)
-                       vty_out(vty, "l2vpn evpn");
-       }
-       vty_out(vty, "\n");
-}
-
 DEFUN_NOSH (address_family_ipv4_safi,
        address_family_ipv4_safi_cmd,
        "address-family ipv4 [<unicast|multicast|vpn|labeled-unicast|flowspec>]",
@@ -9949,28 +8959,19 @@ DEFUN_NOSH (address_family_ipv4_safi,
        BGP_SAFI_WITH_LABEL_HELP_STR)
 {
 
-       safi_t safi = SAFI_UNICAST;
-       const struct lyd_node *vrf_dnode, *bgp_glb_dnode;
-       const char *vrf_name = NULL;
-
        if (argc == 3) {
-               safi = bgp_vty_safi_from_str(argv[2]->text);
-
-               bgp_glb_dnode = yang_dnode_get(vty->candidate_config->dnode,
-                                              VTY_CURR_XPATH);
-               vrf_dnode = yang_dnode_get_parent(bgp_glb_dnode,
-                                                 "control-plane-protocol");
-               vrf_name = yang_dnode_get_string(vrf_dnode, "./vrf");
-
-               if (!strmatch(vrf_name, VRF_DEFAULT_NAME)
+               VTY_DECLVAR_CONTEXT(bgp, bgp);
+               safi_t safi = bgp_vty_safi_from_str(argv[2]->text);
+               if (bgp->inst_type != BGP_INSTANCE_TYPE_DEFAULT
                    && safi != SAFI_UNICAST && safi != SAFI_MULTICAST
                    && safi != SAFI_EVPN) {
                        vty_out(vty,
                                "Only Unicast/Multicast/EVPN SAFIs supported in non-core instances.\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
-       }
-       vty->node = bgp_node_type(AFI_IP, safi);
+               vty->node = bgp_node_type(AFI_IP, safi);
+       } else
+               vty->node = BGP_IPV4_NODE;
 
        return CMD_SUCCESS;
 }
@@ -9982,27 +8983,19 @@ DEFUN_NOSH (address_family_ipv6_safi,
        "Address Family\n"
        BGP_SAFI_WITH_LABEL_HELP_STR)
 {
-       safi_t safi = SAFI_UNICAST;
-       const struct lyd_node *vrf_dnode, *bgp_glb_dnode;
-       const char *vrf_name = NULL;
-
        if (argc == 3) {
-               safi = bgp_vty_safi_from_str(argv[2]->text);
-               bgp_glb_dnode = yang_dnode_get(vty->candidate_config->dnode,
-                                              VTY_CURR_XPATH);
-               vrf_dnode = yang_dnode_get_parent(bgp_glb_dnode,
-                                                 "control-plane-protocol");
-               vrf_name = yang_dnode_get_string(vrf_dnode, "./vrf");
-
-               if (!strmatch(vrf_name, VRF_DEFAULT_NAME)
+               VTY_DECLVAR_CONTEXT(bgp, bgp);
+               safi_t safi = bgp_vty_safi_from_str(argv[2]->text);
+               if (bgp->inst_type != BGP_INSTANCE_TYPE_DEFAULT
                    && safi != SAFI_UNICAST && safi != SAFI_MULTICAST
                    && safi != SAFI_EVPN) {
                        vty_out(vty,
                                "Only Unicast/Multicast/EVPN SAFIs supported in non-core instances.\n");
                        return CMD_WARNING_CONFIG_FAILED;
                }
-       }
-       vty->node = bgp_node_type(AFI_IP6, safi);
+               vty->node = bgp_node_type(AFI_IP6, safi);
+       } else
+               vty->node = BGP_IPV6_NODE;
 
        return CMD_SUCCESS;
 }
@@ -10155,13 +9148,6 @@ DEFUN_NOSH (exit_address_family,
        return CMD_SUCCESS;
 }
 
-void cli_show_bgp_global_afi_safi_header_end(struct vty *vty,
-                                            struct lyd_node *dnode
-                                            __attribute__((__unused__)))
-{
-       vty_out(vty, " exit-address-family\n");
-}
-
 /* Recalculate bestpath and re-advertise a prefix */
 static int bgp_clear_prefix(struct vty *vty, const char *view_name,
                            const char *ip_str, afi_t afi, safi_t safi,
@@ -10278,8 +9264,6 @@ DEFUN (clear_ip_bgp_all,
        char *clr_arg = NULL;
 
        int idx = 0;
-       char errmsg[BUFSIZ] = {'\0'};
-       int ret;
 
        /* clear [ip] bgp */
        if (argv_find(argv, argc, "ip", &idx))
@@ -10344,12 +9328,7 @@ DEFUN (clear_ip_bgp_all,
        } else
                clr_type = BGP_CLEAR_SOFT_NONE;
 
-       ret = bgp_clear_vty(vrf, afi, safi, clr_sort, clr_type, clr_arg, errmsg,
-                           sizeof(errmsg));
-       if (ret != NB_OK)
-               vty_out(vty, "Error description: %s\n", errmsg);
-
-       return ret;
+       return bgp_clear_vty(vty, vrf, afi, safi, clr_sort, clr_type, clr_arg);
 }
 
 DEFUN (clear_ip_bgp_prefix,
@@ -16244,23 +15223,24 @@ DEFUN(show_ip_bgp_peer_groups, show_ip_bgp_peer_groups_cmd,
 
 /* Redistribute VTY commands.  */
 
-DEFUN_YANG (bgp_redistribute_ipv4,
-           bgp_redistribute_ipv4_cmd,
-           "redistribute " FRR_IP_REDIST_STR_BGPD,
-           "Redistribute information from another routing protocol\n"
-           FRR_IP_REDIST_HELP_STR_BGPD)
+DEFUN (bgp_redistribute_ipv4,
+       bgp_redistribute_ipv4_cmd,
+       "redistribute " FRR_IP_REDIST_STR_BGPD,
+       "Redistribute information from another routing protocol\n"
+       FRR_IP_REDIST_HELP_STR_BGPD)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
+       int type;
 
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       bgp_redist_add(bgp, AFI_IP, type, 0);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, false);
 }
 
 ALIAS_HIDDEN(
@@ -16268,28 +15248,33 @@ ALIAS_HIDDEN(
        "redistribute " FRR_IP_REDIST_STR_BGPD,
        "Redistribute information from another routing protocol\n" FRR_IP_REDIST_HELP_STR_BGPD)
 
-DEFUN_YANG (bgp_redistribute_ipv4_rmap,
-           bgp_redistribute_ipv4_rmap_cmd,
-           "redistribute " FRR_IP_REDIST_STR_BGPD " route-map WORD",
-           "Redistribute information from another routing protocol\n"
-           FRR_IP_REDIST_HELP_STR_BGPD
-           "Route map reference\n"
-           "Pointer to route-map entries\n")
+DEFUN (bgp_redistribute_ipv4_rmap,
+       bgp_redistribute_ipv4_rmap_cmd,
+       "redistribute " FRR_IP_REDIST_STR_BGPD " route-map WORD",
+       "Redistribute information from another routing protocol\n"
+       FRR_IP_REDIST_HELP_STR_BGPD
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
        int idx_word = 3;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
+       int type;
+       struct bgp_redist *red;
+       bool changed;
+       struct route_map *route_map = route_map_lookup_warn_noexist(
+               vty, argv[idx_word]->arg);
+
+       type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP, type, 0);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
 ALIAS_HIDDEN(
@@ -16299,28 +15284,32 @@ ALIAS_HIDDEN(
        "Route map reference\n"
        "Pointer to route-map entries\n")
 
-DEFUN_YANG (bgp_redistribute_ipv4_metric,
-           bgp_redistribute_ipv4_metric_cmd,
-           "redistribute " FRR_IP_REDIST_STR_BGPD " metric (0-4294967295)",
-           "Redistribute information from another routing protocol\n"
-           FRR_IP_REDIST_HELP_STR_BGPD
-           "Metric for redistributed routes\n"
-           "Default metric\n")
+DEFUN (bgp_redistribute_ipv4_metric,
+       bgp_redistribute_ipv4_metric_cmd,
+       "redistribute " FRR_IP_REDIST_STR_BGPD " metric (0-4294967295)",
+       "Redistribute information from another routing protocol\n"
+       FRR_IP_REDIST_HELP_STR_BGPD
+       "Metric for redistributed routes\n"
+       "Default metric\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number]->arg);
+       int type;
+       uint32_t metric;
+       struct bgp_redist *red;
+       bool changed;
+
+       type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP, type, 0);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
 ALIAS_HIDDEN(
@@ -16330,34 +15319,39 @@ ALIAS_HIDDEN(
        "Metric for redistributed routes\n"
        "Default metric\n")
 
-DEFUN_YANG(
-       bgp_redistribute_ipv4_rmap_metric,
-       bgp_redistribute_ipv4_rmap_metric_cmd,
-       "redistribute " FRR_IP_REDIST_STR_BGPD
-       " route-map WORD metric (0-4294967295)",
-       "Redistribute information from another routing protocol\n" FRR_IP_REDIST_HELP_STR_BGPD
-       "Route map reference\n"
-       "Pointer to route-map entries\n"
-       "Metric for redistributed routes\n"
-       "Default metric\n")
+DEFUN (bgp_redistribute_ipv4_rmap_metric,
+       bgp_redistribute_ipv4_rmap_metric_cmd,
+       "redistribute " FRR_IP_REDIST_STR_BGPD " route-map WORD metric (0-4294967295)",
+       "Redistribute information from another routing protocol\n"
+       FRR_IP_REDIST_HELP_STR_BGPD
+       "Route map reference\n"
+       "Pointer to route-map entries\n"
+       "Metric for redistributed routes\n"
+       "Default metric\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
        int idx_word = 3;
        int idx_number = 5;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number]->arg);
+       int type;
+       uint32_t metric;
+       struct bgp_redist *red;
+       bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
+
+       type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP, type, 0);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
 ALIAS_HIDDEN(
@@ -16371,34 +15365,39 @@ ALIAS_HIDDEN(
        "Metric for redistributed routes\n"
        "Default metric\n")
 
-DEFUN_YANG(
-       bgp_redistribute_ipv4_metric_rmap,
-       bgp_redistribute_ipv4_metric_rmap_cmd,
-       "redistribute " FRR_IP_REDIST_STR_BGPD
-       " metric (0-4294967295) route-map WORD",
-       "Redistribute information from another routing protocol\n" FRR_IP_REDIST_HELP_STR_BGPD
-       "Metric for redistributed routes\n"
-       "Default metric\n"
-       "Route map reference\n"
-       "Pointer to route-map entries\n")
+DEFUN (bgp_redistribute_ipv4_metric_rmap,
+       bgp_redistribute_ipv4_metric_rmap_cmd,
+       "redistribute " FRR_IP_REDIST_STR_BGPD " metric (0-4294967295) route-map WORD",
+       "Redistribute information from another routing protocol\n"
+       FRR_IP_REDIST_HELP_STR_BGPD
+       "Metric for redistributed routes\n"
+       "Default metric\n"
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
-       int idx_word = 5;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number]->arg);
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
+       int idx_word = 5;
+       int type;
+       uint32_t metric;
+       struct bgp_redist *red;
+       bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
+
+       type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP, type, 0);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP, type, metric);
+       changed |=
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       return bgp_redistribute_set(bgp, AFI_IP, type, 0, changed);
 }
 
 ALIAS_HIDDEN(
@@ -16412,26 +15411,29 @@ ALIAS_HIDDEN(
        "Route map reference\n"
        "Pointer to route-map entries\n")
 
-DEFUN_YANG (bgp_redistribute_ipv4_ospf,
-           bgp_redistribute_ipv4_ospf_cmd,
-           "redistribute <ospf|table> (1-65535)",
-           "Redistribute information from another routing protocol\n"
-           "Open Shortest Path First (OSPFv2)\n"
-           "Non-main Kernel Routing Table\n"
-           "Instance ID/Table ID\n")
+DEFUN (bgp_redistribute_ipv4_ospf,
+       bgp_redistribute_ipv4_ospf_cmd,
+       "redistribute <ospf|table> (1-65535)",
+       "Redistribute information from another routing protocol\n"
+       "Open Shortest Path First (OSPFv2)\n"
+       "Non-main Kernel Routing Table\n"
+       "Instance ID/Table ID\n")
 {
-       int idx_protocol = 1;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_ospf_table = 1;
        int idx_number = 2;
-       char base_xpath[XPATH_MAXLEN];
+       unsigned short instance;
+       unsigned short protocol;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, argv[idx_number]->arg);
+       instance = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
+               protocol = ZEBRA_ROUTE_OSPF;
+       else
+               protocol = ZEBRA_ROUTE_TABLE;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       bgp_redist_add(bgp, AFI_IP, protocol, instance);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, false);
 }
 
 ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf, bgp_redistribute_ipv4_ospf_hidden_cmd,
@@ -16441,32 +15443,37 @@ ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf, bgp_redistribute_ipv4_ospf_hidden_cmd,
             "Non-main Kernel Routing Table\n"
             "Instance ID/Table ID\n")
 
-DEFUN_YANG (bgp_redistribute_ipv4_ospf_rmap,
-           bgp_redistribute_ipv4_ospf_rmap_cmd,
-           "redistribute <ospf|table> (1-65535) route-map WORD",
-           "Redistribute information from another routing protocol\n"
-           "Open Shortest Path First (OSPFv2)\n"
-           "Non-main Kernel Routing Table\n"
-           "Instance ID/Table ID\n"
-           "Route map reference\n"
-           "Pointer to route-map entries\n")
+DEFUN (bgp_redistribute_ipv4_ospf_rmap,
+       bgp_redistribute_ipv4_ospf_rmap_cmd,
+       "redistribute <ospf|table> (1-65535) route-map WORD",
+       "Redistribute information from another routing protocol\n"
+       "Open Shortest Path First (OSPFv2)\n"
+       "Non-main Kernel Routing Table\n"
+       "Instance ID/Table ID\n"
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
-       int idx_protocol = 1;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_ospf_table = 1;
        int idx_number = 2;
        int idx_word = 4;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, argv[idx_number]->arg);
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
+       struct bgp_redist *red;
+       unsigned short instance;
+       int protocol;
+       bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
+
+       if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
+               protocol = ZEBRA_ROUTE_OSPF;
+       else
+               protocol = ZEBRA_ROUTE_TABLE;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       instance = strtoul(argv[idx_number]->arg, NULL, 10);
+       red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
 ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf_rmap,
@@ -16479,32 +15486,38 @@ ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf_rmap,
             "Route map reference\n"
             "Pointer to route-map entries\n")
 
-DEFUN_YANG(bgp_redistribute_ipv4_ospf_metric,
-          bgp_redistribute_ipv4_ospf_metric_cmd,
-          "redistribute <ospf|table> (1-65535) metric (0-4294967295)",
-          "Redistribute information from another routing protocol\n"
-          "Open Shortest Path First (OSPFv2)\n"
-          "Non-main Kernel Routing Table\n"
-          "Instance ID/Table ID\n"
-          "Metric for redistributed routes\n"
-          "Default metric\n")
+DEFUN (bgp_redistribute_ipv4_ospf_metric,
+       bgp_redistribute_ipv4_ospf_metric_cmd,
+       "redistribute <ospf|table> (1-65535) metric (0-4294967295)",
+       "Redistribute information from another routing protocol\n"
+       "Open Shortest Path First (OSPFv2)\n"
+       "Non-main Kernel Routing Table\n"
+       "Instance ID/Table ID\n"
+       "Metric for redistributed routes\n"
+       "Default metric\n")
 {
-       int idx_protocol = 1;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_ospf_table = 1;
        int idx_number = 2;
        int idx_number_2 = 4;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, argv[idx_number]->arg);
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       uint32_t metric;
+       struct bgp_redist *red;
+       unsigned short instance;
+       int protocol;
+       bool changed;
+
+       if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
+               protocol = ZEBRA_ROUTE_OSPF;
+       else
+               protocol = ZEBRA_ROUTE_TABLE;
 
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number_2]->arg);
+       instance = strtoul(argv[idx_number]->arg, NULL, 10);
+       metric = strtoul(argv[idx_number_2]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol,
+                                               metric);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
 ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf_metric,
@@ -16517,38 +15530,45 @@ ALIAS_HIDDEN(bgp_redistribute_ipv4_ospf_metric,
             "Metric for redistributed routes\n"
             "Default metric\n")
 
-DEFUN_YANG(
-       bgp_redistribute_ipv4_ospf_rmap_metric,
-       bgp_redistribute_ipv4_ospf_rmap_metric_cmd,
-       "redistribute <ospf|table> (1-65535) route-map WORD metric (0-4294967295)",
-       "Redistribute information from another routing protocol\n"
-       "Open Shortest Path First (OSPFv2)\n"
-       "Non-main Kernel Routing Table\n"
-       "Instance ID/Table ID\n"
-       "Route map reference\n"
-       "Pointer to route-map entries\n"
-       "Metric for redistributed routes\n"
-       "Default metric\n")
+DEFUN (bgp_redistribute_ipv4_ospf_rmap_metric,
+       bgp_redistribute_ipv4_ospf_rmap_metric_cmd,
+       "redistribute <ospf|table> (1-65535) route-map WORD metric (0-4294967295)",
+       "Redistribute information from another routing protocol\n"
+       "Open Shortest Path First (OSPFv2)\n"
+       "Non-main Kernel Routing Table\n"
+       "Instance ID/Table ID\n"
+       "Route map reference\n"
+       "Pointer to route-map entries\n"
+       "Metric for redistributed routes\n"
+       "Default metric\n")
 {
-       int idx_protocol = 1;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_ospf_table = 1;
        int idx_number = 2;
        int idx_word = 4;
        int idx_number_2 = 6;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, argv[idx_number]->arg);
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       uint32_t metric;
+       struct bgp_redist *red;
+       unsigned short instance;
+       int protocol;
+       bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
+
+       if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
+               protocol = ZEBRA_ROUTE_OSPF;
+       else
+               protocol = ZEBRA_ROUTE_TABLE;
 
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number_2]->arg);
+       instance = strtoul(argv[idx_number]->arg, NULL, 10);
+       metric = strtoul(argv[idx_number_2]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol,
+                                               metric);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
 ALIAS_HIDDEN(
@@ -16564,38 +15584,45 @@ ALIAS_HIDDEN(
        "Metric for redistributed routes\n"
        "Default metric\n")
 
-DEFUN_YANG(
-       bgp_redistribute_ipv4_ospf_metric_rmap,
-       bgp_redistribute_ipv4_ospf_metric_rmap_cmd,
-       "redistribute <ospf|table> (1-65535) metric (0-4294967295) route-map WORD",
-       "Redistribute information from another routing protocol\n"
-       "Open Shortest Path First (OSPFv2)\n"
-       "Non-main Kernel Routing Table\n"
-       "Instance ID/Table ID\n"
-       "Metric for redistributed routes\n"
-       "Default metric\n"
-       "Route map reference\n"
-       "Pointer to route-map entries\n")
+DEFUN (bgp_redistribute_ipv4_ospf_metric_rmap,
+       bgp_redistribute_ipv4_ospf_metric_rmap_cmd,
+       "redistribute <ospf|table> (1-65535) metric (0-4294967295) route-map WORD",
+       "Redistribute information from another routing protocol\n"
+       "Open Shortest Path First (OSPFv2)\n"
+       "Non-main Kernel Routing Table\n"
+       "Instance ID/Table ID\n"
+       "Metric for redistributed routes\n"
+       "Default metric\n"
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
-       int idx_protocol = 1;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_ospf_table = 1;
        int idx_number = 2;
        int idx_number_2 = 4;
        int idx_word = 6;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, argv[idx_number]->arg);
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       uint32_t metric;
+       struct bgp_redist *red;
+       unsigned short instance;
+       int protocol;
+       bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
+
+       if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
+               protocol = ZEBRA_ROUTE_OSPF;
+       else
+               protocol = ZEBRA_ROUTE_TABLE;
 
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number_2]->arg);
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
+       instance = strtoul(argv[idx_number]->arg, NULL, 10);
+       metric = strtoul(argv[idx_number_2]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP, protocol, instance);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP, protocol,
+                                               metric);
+       changed |=
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       return bgp_redistribute_set(bgp, AFI_IP, protocol, instance, changed);
 }
 
 ALIAS_HIDDEN(
@@ -16611,31 +15638,32 @@ ALIAS_HIDDEN(
        "Route map reference\n"
        "Pointer to route-map entries\n")
 
-DEFUN_YANG (no_bgp_redistribute_ipv4_ospf,
-           no_bgp_redistribute_ipv4_ospf_cmd,
-           "no redistribute <ospf|table> (1-65535) [{metric (0-4294967295)|route-map WORD}]",
-           NO_STR
-           "Redistribute information from another routing protocol\n"
-           "Open Shortest Path First (OSPFv2)\n"
-           "Non-main Kernel Routing Table\n"
-           "Instance ID/Table ID\n"
-           "Metric for redistributed routes\n"
-           "Default metric\n"
-           "Route map reference\n"
-           "Pointer to route-map entries\n")
+DEFUN (no_bgp_redistribute_ipv4_ospf,
+       no_bgp_redistribute_ipv4_ospf_cmd,
+       "no redistribute <ospf|table> (1-65535) [{metric (0-4294967295)|route-map WORD}]",
+       NO_STR
+       "Redistribute information from another routing protocol\n"
+       "Open Shortest Path First (OSPFv2)\n"
+       "Non-main Kernel Routing Table\n"
+       "Instance ID/Table ID\n"
+       "Metric for redistributed routes\n"
+       "Default metric\n"
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
-       int idx_protocol = 2;
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
+       int idx_ospf_table = 2;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
+       unsigned short instance;
+       int protocol;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, argv[idx_number]->arg);
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
+       if (strncmp(argv[idx_ospf_table]->arg, "o", 1) == 0)
+               protocol = ZEBRA_ROUTE_OSPF;
+       else
+               protocol = ZEBRA_ROUTE_TABLE;
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       instance = strtoul(argv[idx_number]->arg, NULL, 10);
+       return bgp_redistribute_unset(bgp, AFI_IP, protocol, instance);
 }
 
 ALIAS_HIDDEN(
@@ -16651,28 +15679,27 @@ ALIAS_HIDDEN(
        "Route map reference\n"
        "Pointer to route-map entries\n")
 
-DEFUN_YANG (no_bgp_redistribute_ipv4,
-           no_bgp_redistribute_ipv4_cmd,
-           "no redistribute " FRR_IP_REDIST_STR_BGPD " [{metric (0-4294967295)|route-map WORD}]",
-           NO_STR
-           "Redistribute information from another routing protocol\n"
-           FRR_IP_REDIST_HELP_STR_BGPD
-           "Metric for redistributed routes\n"
-           "Default metric\n"
-           "Route map reference\n"
-           "Pointer to route-map entries\n")
+DEFUN (no_bgp_redistribute_ipv4,
+       no_bgp_redistribute_ipv4_cmd,
+       "no redistribute " FRR_IP_REDIST_STR_BGPD " [{metric (0-4294967295)|route-map WORD}]",
+       NO_STR
+       "Redistribute information from another routing protocol\n"
+       FRR_IP_REDIST_HELP_STR_BGPD
+       "Metric for redistributed routes\n"
+       "Default metric\n"
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 2;
-       char base_xpath[XPATH_MAXLEN];
+       int type;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
+       type = proto_redistnum(AFI_IP, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       return bgp_redistribute_unset(bgp, AFI_IP, type, 0);
 }
 
 ALIAS_HIDDEN(
@@ -16686,50 +15713,56 @@ ALIAS_HIDDEN(
        "Route map reference\n"
        "Pointer to route-map entries\n")
 
-DEFUN_YANG (bgp_redistribute_ipv6,
-           bgp_redistribute_ipv6_cmd,
-           "redistribute " FRR_IP6_REDIST_STR_BGPD,
-           "Redistribute information from another routing protocol\n"
-           FRR_IP6_REDIST_HELP_STR_BGPD)
+DEFUN (bgp_redistribute_ipv6,
+       bgp_redistribute_ipv6_cmd,
+       "redistribute " FRR_IP6_REDIST_STR_BGPD,
+       "Redistribute information from another routing protocol\n"
+       FRR_IP6_REDIST_HELP_STR_BGPD)
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
-       char base_xpath[XPATH_MAXLEN];
+       int type;
 
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP6, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP6, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
+       type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       bgp_redist_add(bgp, AFI_IP6, type, 0);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, false);
 }
 
-DEFUN_YANG (bgp_redistribute_ipv6_rmap,
-           bgp_redistribute_ipv6_rmap_cmd,
-           "redistribute " FRR_IP6_REDIST_STR_BGPD " route-map WORD",
-           "Redistribute information from another routing protocol\n"
-           FRR_IP6_REDIST_HELP_STR_BGPD
-           "Route map reference\n"
-           "Pointer to route-map entries\n")
+DEFUN (bgp_redistribute_ipv6_rmap,
+       bgp_redistribute_ipv6_rmap_cmd,
+       "redistribute " FRR_IP6_REDIST_STR_BGPD " route-map WORD",
+       "Redistribute information from another routing protocol\n"
+       FRR_IP6_REDIST_HELP_STR_BGPD
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
        int idx_word = 3;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP6, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP6, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
+       int type;
+       struct bgp_redist *red;
+       bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
+
+       type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP6, type, 0);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
-DEFUN_YANG (bgp_redistribute_ipv6_metric,
+DEFUN (bgp_redistribute_ipv6_metric,
        bgp_redistribute_ipv6_metric_cmd,
        "redistribute " FRR_IP6_REDIST_STR_BGPD " metric (0-4294967295)",
        "Redistribute information from another routing protocol\n"
@@ -16737,123 +15770,120 @@ DEFUN_YANG (bgp_redistribute_ipv6_metric,
        "Metric for redistributed routes\n"
        "Default metric\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP6, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP6, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number]->arg);
+       int type;
+       uint32_t metric;
+       struct bgp_redist *red;
+       bool changed;
+
+       type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP6, type, 0);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP6, type, metric);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
-DEFUN_YANG(
-       bgp_redistribute_ipv6_rmap_metric,
-       bgp_redistribute_ipv6_rmap_metric_cmd,
-       "redistribute " FRR_IP6_REDIST_STR_BGPD
-       " route-map WORD metric (0-4294967295)",
-       "Redistribute information from another routing protocol\n" FRR_IP6_REDIST_HELP_STR_BGPD
-       "Route map reference\n"
-       "Pointer to route-map entries\n"
-       "Metric for redistributed routes\n"
-       "Default metric\n")
+DEFUN (bgp_redistribute_ipv6_rmap_metric,
+       bgp_redistribute_ipv6_rmap_metric_cmd,
+       "redistribute " FRR_IP6_REDIST_STR_BGPD " route-map WORD metric (0-4294967295)",
+       "Redistribute information from another routing protocol\n"
+       FRR_IP6_REDIST_HELP_STR_BGPD
+       "Route map reference\n"
+       "Pointer to route-map entries\n"
+       "Metric for redistributed routes\n"
+       "Default metric\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
        int idx_word = 3;
        int idx_number = 5;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP6, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP6, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number]->arg);
+       int type;
+       uint32_t metric;
+       struct bgp_redist *red;
+       bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
+
+       type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP6, type, 0);
+       changed =
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       changed |= bgp_redistribute_metric_set(bgp, red, AFI_IP6, type,
+                                               metric);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
-DEFUN_YANG(
-       bgp_redistribute_ipv6_metric_rmap,
-       bgp_redistribute_ipv6_metric_rmap_cmd,
-       "redistribute " FRR_IP6_REDIST_STR_BGPD
-       " metric (0-4294967295) route-map WORD",
-       "Redistribute information from another routing protocol\n" FRR_IP6_REDIST_HELP_STR_BGPD
-       "Metric for redistributed routes\n"
-       "Default metric\n"
-       "Route map reference\n"
-       "Pointer to route-map entries\n")
+DEFUN (bgp_redistribute_ipv6_metric_rmap,
+       bgp_redistribute_ipv6_metric_rmap_cmd,
+       "redistribute " FRR_IP6_REDIST_STR_BGPD " metric (0-4294967295) route-map WORD",
+       "Redistribute information from another routing protocol\n"
+       FRR_IP6_REDIST_HELP_STR_BGPD
+       "Metric for redistributed routes\n"
+       "Default metric\n"
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 1;
-       int idx_word = 5;
        int idx_number = 3;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP6, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP6, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_CREATE, NULL);
-       nb_cli_enqueue_change(vty, "./metric", NB_OP_CREATE,
-                             argv[idx_number]->arg);
-       nb_cli_enqueue_change(vty, "./rmap-policy-import", NB_OP_CREATE,
-                             argv[idx_word]->arg);
+       int idx_word = 5;
+       int type;
+       uint32_t metric;
+       struct bgp_redist *red;
+       bool changed;
+       struct route_map *route_map =
+               route_map_lookup_warn_noexist(vty, argv[idx_word]->arg);
+
+       type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       metric = strtoul(argv[idx_number]->arg, NULL, 10);
 
-       return nb_cli_apply_changes(vty, base_xpath);
+       red = bgp_redist_add(bgp, AFI_IP6, type, 0);
+       changed = bgp_redistribute_metric_set(bgp, red, AFI_IP6, SAFI_UNICAST,
+                                               metric);
+       changed |=
+               bgp_redistribute_rmap_set(red, argv[idx_word]->arg, route_map);
+       return bgp_redistribute_set(bgp, AFI_IP6, type, 0, changed);
 }
 
-DEFUN_YANG(
-       no_bgp_redistribute_ipv6,
-       no_bgp_redistribute_ipv6_cmd,
-       "no redistribute " FRR_IP6_REDIST_STR_BGPD
-       " [{metric (0-4294967295)|route-map WORD}]",
-       NO_STR
-       "Redistribute information from another routing protocol\n" FRR_IP6_REDIST_HELP_STR_BGPD
-       "Metric for redistributed routes\n"
-       "Default metric\n"
-       "Route map reference\n"
-       "Pointer to route-map entries\n")
+DEFUN (no_bgp_redistribute_ipv6,
+       no_bgp_redistribute_ipv6_cmd,
+       "no redistribute " FRR_IP6_REDIST_STR_BGPD " [{metric (0-4294967295)|route-map WORD}]",
+       NO_STR
+       "Redistribute information from another routing protocol\n"
+       FRR_IP6_REDIST_HELP_STR_BGPD
+       "Metric for redistributed routes\n"
+       "Default metric\n"
+       "Route map reference\n"
+       "Pointer to route-map entries\n")
 {
+       VTY_DECLVAR_CONTEXT(bgp, bgp);
        int idx_protocol = 2;
-       char base_xpath[XPATH_MAXLEN];
-
-       snprintf(base_xpath, sizeof(base_xpath), FRR_BGP_AFI_SAFI_REDIST_XPATH,
-                yang_afi_safi_value2identity(AFI_IP6, SAFI_UNICAST),
-                bgp_afi_safi_get_container_str(AFI_IP6, SAFI_UNICAST),
-                argv[idx_protocol]->text, "0");
-
-       nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
-
-       return nb_cli_apply_changes(vty, base_xpath);
-}
+       int type;
 
-void cli_show_bgp_global_afi_safi_ip_unicast_redistribution_list(
-       struct vty *vty, struct lyd_node *dnode, bool show_defaults)
-{
-       uint32_t instance = 0;
+       type = proto_redistnum(AFI_IP6, argv[idx_protocol]->text);
+       if (type < 0) {
+               vty_out(vty, "%% Invalid route type\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
 
-       vty_out(vty, "  redistribute %s",
-               yang_dnode_get_string(dnode, "./route-type"));
-       if ((instance = yang_dnode_get_uint16(dnode, "./route-instance")))
-               vty_out(vty, " %d", instance);
-       if (yang_dnode_exists(dnode, "./metric"))
-               vty_out(vty, " metric %u",
-                       yang_dnode_get_uint32(dnode, "./metric"));
-       if (yang_dnode_exists(dnode, "./rmap-policy-import"))
-               vty_out(vty, " route-map %s",
-                       yang_dnode_get_string(dnode, "./rmap-policy-import"));
-       vty_out(vty, "\n");
+       return bgp_redistribute_unset(bgp, AFI_IP6, type, 0);
 }
 
 /* Neighbor update tcp-mss. */
@@ -17031,6 +16061,7 @@ static void bgp_vpn_policy_config_write_afi(struct vty *vty, struct bgp *bgp,
                                            afi_t afi)
 {
        int indent = 2;
+       uint32_t tovpn_sid_index = 0;
 
        if (bgp->vpn_policy[afi].rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]) {
                if (CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
@@ -17060,6 +16091,16 @@ static void bgp_vpn_policy_config_write_afi(struct vty *vty, struct bgp *bgp,
                                bgp->vpn_policy[afi].tovpn_label);
                }
        }
+
+       tovpn_sid_index = bgp->vpn_policy[afi].tovpn_sid_index;
+       if (CHECK_FLAG(bgp->vpn_policy[afi].flags,
+                      BGP_VPN_POLICY_TOVPN_SID_AUTO)) {
+               vty_out(vty, "%*ssid vpn export %s\n", indent, "", "auto");
+       } else if (tovpn_sid_index != 0) {
+               vty_out(vty, "%*ssid vpn export %d\n", indent, "",
+                       tovpn_sid_index);
+       }
+
        if (CHECK_FLAG(bgp->vpn_policy[afi].flags,
                       BGP_VPN_POLICY_TOVPN_RD_SET)) {
                char buf[RD_ADDRSTRLEN];
@@ -17385,6 +16426,11 @@ static void bgp_config_write_peer_global(struct vty *vty, struct bgp *bgp,
        if (peergroup_flag_check(peer, PEER_FLAG_DISABLE_CONNECTED_CHECK))
                vty_out(vty, " neighbor %s disable-connected-check\n", addr);
 
+       /* link-bw-encoding-ieee */
+       if (peergroup_flag_check(peer, PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE))
+               vty_out(vty, " neighbor %s disable-link-bw-encoding-ieee\n",
+                       addr);
+
        /* enforce-first-as */
        if (peergroup_flag_check(peer, PEER_FLAG_ENFORCE_FIRST_AS))
                vty_out(vty, " neighbor %s enforce-first-as\n", addr);
@@ -17756,9 +16802,6 @@ static void bgp_config_write_peer_af(struct vty *vty, struct bgp *bgp,
                                        : "");
                }
        }
-
-       if (peer_af_flag_check(peer, afi, safi, PEER_FLAG_CONFIG_DAMPENING))
-               bgp_config_write_peer_damp(vty, peer, afi, safi);
 }
 
 /* Address family based peer configuration display.  */
@@ -17811,7 +16854,7 @@ static void bgp_config_write_family(struct vty *vty, struct bgp *bgp, afi_t afi,
 
        /* BGP flag dampening. */
        if (CHECK_FLAG(bgp->af_flags[afi][safi], BGP_CONFIG_DAMPENING))
-               bgp_config_write_damp(vty, bgp, afi, safi);
+               bgp_config_write_damp(vty, afi, safi);
 
        for (ALL_LIST_ELEMENTS(bgp->group, node, nnode, group))
                bgp_config_write_peer_af(vty, bgp, group->conf, afi, safi);
@@ -18164,6 +17207,12 @@ int bgp_config_write(struct vty *vty)
                        vty_out(vty, " timers bgp %u %u\n",
                                bgp->default_keepalive, bgp->default_holdtime);
 
+               /* BGP minimum holdtime configuration. */
+               if (bgp->default_min_holdtime != SAVE_BGP_HOLDTIME
+                   && bgp->default_min_holdtime != 0)
+                       vty_out(vty, " bgp minimum-holdtime %u\n",
+                               bgp->default_min_holdtime);
+
                /* Conditional advertisement timer configuration */
                if (bgp->condition_check_period
                    != DEFAULT_CONDITIONAL_ROUTES_POLL_TIME)
@@ -18199,11 +17248,15 @@ int bgp_config_write(struct vty *vty)
                if (CHECK_FLAG(bgp->flags, BGP_FLAG_SHUTDOWN))
                        vty_out(vty, " bgp shutdown\n");
 
+               if (bgp->fast_convergence)
+                       vty_out(vty, " bgp fast-convergence\n");
+
                if (bgp->srv6_enabled) {
                        vty_frame(vty, " !\n segment-routing srv6\n");
                        if (strlen(bgp->srv6_locator_name))
                                vty_out(vty, "  locator %s\n",
                                        bgp->srv6_locator_name);
+                       vty_endframe(vty, " exit\n");
                }
 
 
@@ -18253,6 +17306,7 @@ int bgp_config_write(struct vty *vty)
                bgp_rfapi_cfg_write(vty, bgp);
 #endif
 
+               vty_out(vty, "exit\n");
                vty_out(vty, "!\n");
        }
        return 0;
@@ -18290,7 +17344,7 @@ static struct cmd_node bgp_ipv4_labeled_unicast_node = {
 };
 
 static struct cmd_node bgp_ipv6_unicast_node = {
-       .name = "bgp ipv6",
+       .name = "bgp ipv6 unicast",
        .node = BGP_IPV6_NODE,
        .parent_node = BGP_NODE,
        .prompt = "%s(config-router-af)# ",
@@ -18462,6 +17516,10 @@ void bgp_vty_init(void)
        install_element(CONFIG_NODE, &bgp_set_route_map_delay_timer_cmd);
        install_element(CONFIG_NODE, &no_bgp_set_route_map_delay_timer_cmd);
 
+       /* bgp fast-convergence command */
+       install_element(BGP_NODE, &bgp_fast_convergence_cmd);
+       install_element(BGP_NODE, &no_bgp_fast_convergence_cmd);
+
        /* global bgp update-delay command */
        install_element(CONFIG_NODE, &bgp_global_update_delay_cmd);
        install_element(CONFIG_NODE, &no_bgp_global_update_delay_cmd);
@@ -18558,6 +17616,10 @@ void bgp_vty_init(void)
        install_element(BGP_NODE, &bgp_timers_cmd);
        install_element(BGP_NODE, &no_bgp_timers_cmd);
 
+       /* "minimum-holdtime" commands. */
+       install_element(BGP_NODE, &bgp_minimum_holdtime_cmd);
+       install_element(BGP_NODE, &no_bgp_minimum_holdtime_cmd);
+
        /* route-map delay-timer commands - per instance for backwards compat.
         */
        install_element(BGP_NODE, &bgp_set_route_map_delay_timer_cmd);
@@ -19279,6 +18341,10 @@ void bgp_vty_init(void)
        install_element(BGP_NODE, &neighbor_disable_connected_check_cmd);
        install_element(BGP_NODE, &no_neighbor_disable_connected_check_cmd);
 
+       /* "neighbor link-bw-encoding-ieee" commands.  */
+       install_element(BGP_NODE, &neighbor_link_bw_encoding_ieee_cmd);
+       install_element(BGP_NODE, &no_neighbor_link_bw_encoding_ieee_cmd);
+
        /* "neighbor enforce-first-as" commands. */
        install_element(BGP_NODE, &neighbor_enforce_first_as_cmd);
        install_element(BGP_NODE, &no_neighbor_enforce_first_as_cmd);
@@ -19390,16 +18456,27 @@ void bgp_vty_init(void)
 
        /* "neighbor prefix-list" commands. */
        install_element(BGP_NODE, &neighbor_prefix_list_hidden_cmd);
+       install_element(BGP_NODE, &no_neighbor_prefix_list_hidden_cmd);
        install_element(BGP_IPV4_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_IPV4_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_IPV4M_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_IPV4M_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_IPV4L_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_IPV4L_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_IPV6_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_IPV6_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_IPV6M_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_IPV6M_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_IPV6L_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_IPV6L_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_VPNV4_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_VPNV4_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_VPNV6_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_VPNV6_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_FLOWSPECV4_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_FLOWSPECV4_NODE, &no_neighbor_prefix_list_cmd);
        install_element(BGP_FLOWSPECV6_NODE, &neighbor_prefix_list_cmd);
+       install_element(BGP_FLOWSPECV6_NODE, &no_neighbor_prefix_list_cmd);
 
        /* "neighbor filter-list" commands. */
        install_element(BGP_NODE, &neighbor_filter_list_hidden_cmd);
@@ -19426,17 +18503,30 @@ void bgp_vty_init(void)
        install_element(BGP_FLOWSPECV6_NODE, &no_neighbor_filter_list_cmd);
 
        /* "neighbor route-map" commands. */
+       install_element(BGP_NODE, &neighbor_route_map_hidden_cmd);
+       install_element(BGP_NODE, &no_neighbor_route_map_hidden_cmd);
        install_element(BGP_IPV4_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_IPV4_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_IPV4M_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_IPV4M_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_IPV4L_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_IPV4L_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_IPV6_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_IPV6_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_IPV6M_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_IPV6M_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_IPV6L_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_IPV6L_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_VPNV4_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_VPNV4_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_VPNV6_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_VPNV6_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_FLOWSPECV4_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_FLOWSPECV4_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_FLOWSPECV6_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_FLOWSPECV6_NODE, &no_neighbor_route_map_cmd);
        install_element(BGP_EVPN_NODE, &neighbor_route_map_cmd);
+       install_element(BGP_EVPN_NODE, &no_neighbor_route_map_cmd);
 
        /* "neighbor unsuppress-map" commands. */
        install_element(BGP_NODE, &neighbor_unsuppress_map_hidden_cmd);
@@ -19596,23 +18686,6 @@ void bgp_vty_init(void)
        install_element(BGP_EVPN_NODE, &neighbor_allowas_in_cmd);
        install_element(BGP_EVPN_NODE, &no_neighbor_allowas_in_cmd);
 
-       /* "neighbor dampening" commands. */
-       install_element(BGP_NODE, &neighbor_damp_cmd);
-       install_element(BGP_NODE, &no_neighbor_damp_cmd);
-       install_element(BGP_IPV4_NODE, &neighbor_damp_cmd);
-       install_element(BGP_IPV4_NODE, &no_neighbor_damp_cmd);
-       install_element(BGP_IPV4M_NODE, &neighbor_damp_cmd);
-       install_element(BGP_IPV4M_NODE, &no_neighbor_damp_cmd);
-       install_element(BGP_IPV4L_NODE, &neighbor_damp_cmd);
-       install_element(BGP_IPV4L_NODE, &no_neighbor_damp_cmd);
-       install_element(BGP_IPV6_NODE, &neighbor_damp_cmd);
-       install_element(BGP_IPV6_NODE, &no_neighbor_damp_cmd);
-       install_element(BGP_IPV6M_NODE, &neighbor_damp_cmd);
-       install_element(BGP_IPV6M_NODE, &no_neighbor_damp_cmd);
-       install_element(BGP_IPV6L_NODE, &neighbor_damp_cmd);
-       install_element(BGP_IPV6L_NODE, &no_neighbor_damp_cmd);
-       install_element(VIEW_NODE, &show_ip_bgp_neighbor_damp_param_cmd);
-
        /* address-family commands. */
        install_element(BGP_NODE, &address_family_ipv4_safi_cmd);
        install_element(BGP_NODE, &address_family_ipv6_safi_cmd);
@@ -20955,6 +20028,8 @@ static void community_list_vty(void)
        install_element(CONFIG_NODE, &no_bgp_lcommunity_list_name_expanded_cmd);
        install_element(VIEW_NODE, &show_bgp_lcommunity_list_cmd);
        install_element(VIEW_NODE, &show_bgp_lcommunity_list_arg_cmd);
+
+       bgp_community_list_command_completion_setup();
 }
 
 static struct cmd_node community_alias_node = {
@@ -20970,4 +20045,6 @@ void community_alias_vty(void)
 
        /* Community-list.  */
        install_element(CONFIG_NODE, &bgp_community_alias_cmd);
+
+       bgp_community_alias_command_completion_setup();
 }
index 04a47f6f62c5fd646a1a72bf120f128d4731bc7d..93026c663aa3509bbada85c49175c6a238745194 100644 (file)
@@ -187,34 +187,5 @@ int bgp_vty_find_and_parse_bgp(struct vty *vty, struct cmd_token **argv,
 extern int bgp_show_summary_vty(struct vty *vty, const char *name, afi_t afi,
                                safi_t safi, const char *neighbor, int as_type,
                                as_t as, uint16_t show_flags);
-extern int bgp_clear_star_soft_in(const char *name, char *errmsg,
-                                 size_t errmsg_len);
-extern int bgp_clear_star_soft_out(const char *name, char *errmsg,
-                                  size_t errmsg_len);
-int bgp_wpkt_quanta_config_vty(struct bgp *bgp, uint32_t quanta, bool set);
-int bgp_rpkt_quanta_config_vty(struct bgp *bgp, uint32_t quanta, bool set);
-extern int bgp_maxpaths_config_vty(struct bgp *bgp, afi_t afi, safi_t safi,
-                                  int peer_type, uint16_t maxpaths,
-                                  uint16_t options, int set, char *errmsg,
-                                  size_t errmsg_len);
-extern const char *bgp_afi_safi_get_container_str(afi_t afi, safi_t safi);
-extern bool vpn_policy_check_import(struct bgp *bgp, afi_t afi, safi_t safi,
-                                   bool v2vimport, char *errmsg,
-                                   size_t errmsg_len);
-extern int bgp_nb_errmsg_return(char *errmsg, size_t errmsg_len, int ret);
-extern bool peer_address_self_check(struct bgp *bgp, union sockunion *su);
-extern int peer_local_interface_cfg(struct bgp *bgp, const char *ip_str,
-                                   const char *str, char *errmsg,
-                                   size_t errmsg_len);
-extern int peer_conf_interface_create(struct bgp *bgp, const char *conf_if,
-                                     bool v6only, const char *peer_group_name,
-                                     int as_type, as_t as, char *errmsg,
-                                     size_t errmsg_len);
-extern int peer_flag_modify_nb(struct bgp *bgp, const char *ip_str,
-                              struct peer *peer, uint32_t flag, bool set,
-                              char *errmsg, size_t errmsg_len);
-extern int peer_af_flag_modify_nb(struct peer *peer, afi_t afi, safi_t safi,
-                                 uint32_t flag, int set, char *errmsg,
-                                 size_t errmsg_len);
 
 #endif /* _QUAGGA_BGP_VTY_H */
index 2c7c0878553df20b1441d8be56df1212a71a579b..5ef49e5108d2c1a3e2a94d8357558b2ffec80e99 100644 (file)
@@ -517,8 +517,8 @@ static int zebra_read_route(ZAPI_CALLBACK_ARGS)
 
                /* Now perform the add/update. */
                bgp_redistribute_add(bgp, &api.prefix, &nexthop, ifindex,
-                                    nhtype, api.metric, api.type, api.instance,
-                                    api.tag);
+                                    nhtype, api.distance, api.metric, api.type,
+                                    api.instance, api.tag);
        } else {
                bgp_redistribute_delete(bgp, &api.prefix, api.type,
                                        api.instance);
@@ -838,6 +838,12 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote,
                        if (direct)
                                v6_ll_avail = if_get_ipv6_local(
                                        ifp, &nexthop->v6_local);
+                       /*
+                        * It's fine to not have a v6 LL when using
+                        * update-source loopback/vrf
+                        */
+                       if (!v6_ll_avail && if_is_loopback_or_vrf(ifp))
+                               v6_ll_avail = true;
                } else
                /* Link-local address. */
                {
@@ -1543,6 +1549,7 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
 
                        label_buf[0] = '\0';
                        eth_buf[0] = '\0';
+                       segs_buf[0] = '\0';
                        if (has_valid_label
                            && !CHECK_FLAG(api.flags, ZEBRA_FLAG_EVPN_ROUTE))
                                snprintf(label_buf, sizeof(label_buf),
@@ -2576,6 +2583,7 @@ static void bgp_encode_pbr_rule_action(struct stream *s,
                stream_putl(s, pbr->unique);
        else
                stream_putl(s, pbra->unique);
+       stream_putc(s, 0); /* ip protocol being used */
        if (pbr && pbr->flags & MATCH_IP_SRC_SET)
                memcpy(&pfx, &(pbr->src), sizeof(struct prefix));
        else {
@@ -3315,6 +3323,13 @@ void bgp_zebra_announce_default(struct bgp *bgp, struct nexthop *nh,
                    && nh->type != NEXTHOP_TYPE_IPV6)
            || nh->vrf_id == VRF_UNKNOWN)
                return;
+
+       /* in vrf-lite, no default route has to be announced
+        * the table id of vrf is directly used to divert traffic
+        */
+       if (!vrf_is_backend_netns() && bgp->vrf_id != nh->vrf_id)
+               return;
+
        memset(&p, 0, sizeof(struct prefix));
        if (afi != AFI_IP && afi != AFI_IP6)
                return;
index 6c9ec0ebaa29cf1a1a47d2026379a09276456aae..7236b9fe4b83e4f0f2deebc26a38c681f34d37de 100644 (file)
@@ -469,6 +469,10 @@ int bgp_cluster_id_set(struct bgp *bgp, struct in_addr *cluster_id)
        struct peer *peer;
        struct listnode *node, *nnode;
 
+       if (bgp_config_check(bgp, BGP_CONFIG_CLUSTER_ID)
+           && IPV4_ADDR_SAME(&bgp->cluster_id, cluster_id))
+               return 0;
+
        IPV4_ADDR_COPY(&bgp->cluster_id, cluster_id);
        bgp_config_set(bgp, BGP_CONFIG_CLUSTER_ID);
 
@@ -1449,7 +1453,6 @@ void peer_xfer_config(struct peer *peer_dst, struct peer *peer_src)
 
        /* peer flags apply */
        peer_dst->flags = peer_src->flags;
-       peer_dst->cap = peer_src->cap;
 
        peer_dst->peer_gr_present_state = peer_src->peer_gr_present_state;
        peer_dst->peer_gr_new_status_flag = peer_src->peer_gr_new_status_flag;
@@ -2409,14 +2412,6 @@ int peer_delete(struct peer *peer)
        if (peer->bfd_config)
                bgp_peer_remove_bfd_config(peer);
 
-       /* Delete peer route flap dampening configuration. This needs to happen
-        * before removing the peer from peer groups.
-        */
-       FOREACH_AFI_SAFI (afi, safi)
-               if (peer_af_flag_check(peer, afi, safi,
-                                      PEER_FLAG_CONFIG_DAMPENING))
-                       bgp_peer_damp_disable(peer, afi, safi);
-
        /* If this peer belongs to peer group, clear up the
           relationship.  */
        if (peer->group) {
@@ -3159,6 +3154,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,
        bgp->default_subgroup_pkt_queue_max =
                BGP_DEFAULT_SUBGROUP_PKT_QUEUE_MAX;
        bgp_timers_unset(bgp);
+       bgp->default_min_holdtime = 0;
        bgp->restart_time = BGP_DEFAULT_RESTART_TIME;
        bgp->stalepath_time = BGP_DEFAULT_STALEPATH_TIME;
        bgp->select_defer_time = BGP_DEFAULT_SELECT_DEFERRAL_TIME;
@@ -3170,7 +3166,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,
        bgp->reject_as_sets = false;
        bgp->condition_check_period = DEFAULT_CONDITIONAL_ROUTES_POLL_TIME;
        bgp_addpath_init_bgp_data(&bgp->tx_addpath);
-
+       bgp->fast_convergence = false;
        bgp->as = *as;
 
 #ifdef ENABLE_BGP_VNC
@@ -3413,8 +3409,21 @@ int bgp_get(struct bgp **bgp_val, as_t *as, const char *name,
                return ret;
 
        bgp = bgp_create(as, name, inst_type);
-       if (bgp_option_check(BGP_OPT_NO_ZEBRA) && name)
-               bgp->vrf_id = vrf_generate_id();
+
+       /*
+        * view instances will never work inside of a vrf
+        * as such they must always be in the VRF_DEFAULT
+        * Also we must set this to something useful because
+        * of the vrf socket code needing an actual useful
+        * default value to send to the underlying OS.
+        *
+        * This code is currently ignoring vrf based
+        * code using the -Z option( and that is probably
+        * best addressed elsewhere in the code )
+        */
+       if (inst_type == BGP_INSTANCE_TYPE_VIEW)
+               bgp->vrf_id = VRF_DEFAULT;
+
        bgp_router_id_set(bgp, &bgp->router_id_zebra, true);
        bgp_address_init(bgp);
        bgp_tip_hash_init(bgp);
@@ -3600,11 +3609,6 @@ int bgp_delete(struct bgp *bgp)
                BGP_TIMER_OFF(gr_info->t_route_select);
        }
 
-       /* Delete route flap dampening configuration */
-       FOREACH_AFI_SAFI (afi, safi) {
-               bgp_damp_disable(bgp, afi, safi);
-       }
-
        if (BGP_DEBUG(zebra, ZEBRA)) {
                if (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)
                        zlog_debug("Deleting Default VRF");
@@ -4174,6 +4178,7 @@ static const struct peer_flag_action peer_flag_action_list[] = {
        {PEER_FLAG_LOCAL_AS_NO_PREPEND, 0, peer_change_none},
        {PEER_FLAG_LOCAL_AS_REPLACE_AS, 0, peer_change_none},
        {PEER_FLAG_UPDATE_SOURCE, 0, peer_change_none},
+       {PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE, 0, peer_change_none},
        {0, 0, 0}};
 
 static const struct peer_flag_action peer_af_flag_action_list[] = {
index e6a828a2c0696134d5fdd6434053854d1636cf39..eb1a18edc40b62ed963be5fa22dd12629facfc32 100644 (file)
@@ -44,7 +44,6 @@
 #include "bgp_labelpool.h"
 #include "bgp_addpath_types.h"
 #include "bgp_nexthop.h"
-#include "bgp_damp.h"
 #include "bgp_io.h"
 
 #include "lib/bfd.h"
@@ -603,6 +602,9 @@ struct bgp {
        uint32_t default_connect_retry;
        uint32_t default_delayopen;
 
+       /* BGP minimum holdtime.  */
+       uint16_t default_min_holdtime;
+
        /* BGP graceful restart */
        uint32_t restart_time;
        uint32_t stalepath_time;
@@ -747,14 +749,13 @@ struct bgp {
        /* Process Queue for handling routes */
        struct work_queue *process_queue;
 
+       bool fast_convergence;
+
        /* BGP Conditional advertisement */
        uint32_t condition_check_period;
        uint32_t condition_filter_count;
        struct thread *t_condition_check;
 
-       /* BGP route flap dampening configuration */
-       struct bgp_damp_config damp[AFI_MAX][SAFI_MAX];
-
        /* BGP VPN SRv6 backend */
        bool srv6_enabled;
        char srv6_locator_name[SRV6_LOCNAME_SIZE];
@@ -1287,6 +1288,10 @@ struct peer {
 #define PEER_FLAG_RTT_SHUTDOWN (1U << 26) /* shutdown rtt */
 #define PEER_FLAG_TIMER_DELAYOPEN (1U << 27) /* delayopen timer */
 #define PEER_FLAG_TCP_MSS (1U << 28)    /* tcp-mss */
+/* Disable IEEE floating-point link bandwidth encoding in
+ * extended communities.
+ */
+#define PEER_FLAG_DISABLE_LINK_BW_ENCODING_IEEE (1U << 29)
 
        /*
         *GR-Disabled mode means unset PEER_FLAG_GRACEFUL_RESTART
@@ -1314,9 +1319,6 @@ struct peer {
        /* Last update packet sent time */
        time_t pkt_stime[AFI_MAX][SAFI_MAX];
 
-       /* Peer / peer group route flap dampening configuration */
-       struct bgp_damp_config damp[AFI_MAX][SAFI_MAX];
-
        /* Peer Per AF flags */
        /*
         * Please consult the comments for *flags_override*, *flags_invert* and
@@ -1354,8 +1356,6 @@ struct peer {
 #define PEER_FLAG_SEND_LARGE_COMMUNITY      (1U << 26) /* Send large Communities */
 #define PEER_FLAG_MAX_PREFIX_OUT            (1U << 27) /* outgoing maximum prefix */
 #define PEER_FLAG_MAX_PREFIX_FORCE          (1U << 28) /* maximum-prefix <num> force */
-#define PEER_FLAG_CONFIG_DAMPENING (1U << 29) /* route flap dampening */
-
 
        enum bgp_addpath_strat addpath_type[AFI_MAX][SAFI_MAX];
 
@@ -1424,6 +1424,7 @@ struct peer {
        struct thread *t_gr_stale;
        struct thread *t_generate_updgrp_packets;
        struct thread *t_process_packet;
+       struct thread *t_process_packet_error;
        struct thread *t_refresh_stalepath;
 
        /* Thread flags. */
index cc64261388c6f09bbdf9f89785636a27663b0890..2437bd8cfee8269685bb92c2a8c522b4c294b240 100644 (file)
@@ -4043,7 +4043,7 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp)
                                        rfg->routemap_redist_name
                                                [ZEBRA_ROUTE_BGP_DIRECT_EXT]);
                        }
-                       vty_out(vty, "  exit-vrf-policy\n");
+                       vty_out(vty, " exit-vrf-policy\n");
                        vty_out(vty, "!\n");
                }
        if (hc->flags & BGP_VNC_CONFIG_ADV_UN_METHOD_ENCAP) {
@@ -4121,7 +4121,7 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp)
                                                vty, bgp->rfapi->rfp,
                                                RFAPI_RFP_CFG_GROUP_L2,
                                                rfgc->name, rfgc->rfp_cfg);
-                               vty_out(vty, "   exit-vnc\n");
+                               vty_out(vty, " exit-vnc\n");
                                vty_out(vty, "!\n");
                        }
                }
@@ -4199,7 +4199,7 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp)
                                        vty, bgp->rfapi->rfp,
                                        RFAPI_RFP_CFG_GROUP_DEFAULT, NULL,
                                        bgp->rfapi_cfg->default_rfp_cfg);
-                       vty_out(vty, "  exit-vnc\n");
+                       vty_out(vty, " exit-vnc\n");
                        vty_out(vty, "!\n");
                }
 
@@ -4364,7 +4364,7 @@ int bgp_rfapi_cfg_write(struct vty *vty, struct bgp *bgp)
                                                vty, bgp->rfapi->rfp,
                                                RFAPI_RFP_CFG_GROUP_NVE,
                                                rfg->name, rfg->rfp_cfg);
-                               vty_out(vty, "  exit-vnc\n");
+                               vty_out(vty, " exit-vnc\n");
                                vty_out(vty, "!\n");
                        }
        } /* have listen ports */
index 53225192f2c7c854fcbecd117278bcd51a32b6d8..9e3a095529e6f99eae6706a501b72c61345b5662 100644 (file)
@@ -103,8 +103,6 @@ bgpd_libbgp_a_SOURCES = \
        bgpd/bgp_vty.c \
        bgpd/bgp_zebra.c \
        bgpd/bgpd.c \
-       bgpd/bgp_nb.c \
-       bgpd/bgp_nb_config.c \
        bgpd/bgp_trace.c \
        # end
 
@@ -185,7 +183,6 @@ noinst_HEADERS += \
        bgpd/bgp_vty.h \
        bgpd/bgp_zebra.h \
        bgpd/bgpd.h \
-       bgpd/bgp_nb.h \
        bgpd/bgp_trace.h \
        \
        bgpd/rfapi/bgp_rfapi_cfg.h \
@@ -219,17 +216,17 @@ bgpd_bgp_btoa_LDADD = bgpd/libbgp.a $(RFPLDADD) lib/libfrr.la $(LIBYANG_LIBS) $(
 
 bgpd_bgpd_snmp_la_SOURCES = bgpd/bgp_snmp.c  bgpd/bgp_mplsvpn_snmp.c
 bgpd_bgpd_snmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
-bgpd_bgpd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+bgpd_bgpd_snmp_la_LDFLAGS = $(MODULE_LDFLAGS)
 bgpd_bgpd_snmp_la_LIBADD = lib/libfrrsnmp.la
 
 bgpd_bgpd_rpki_la_SOURCES = bgpd/bgp_rpki.c
 bgpd_bgpd_rpki_la_CFLAGS = $(AM_CFLAGS) $(RTRLIB_CFLAGS)
-bgpd_bgpd_rpki_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+bgpd_bgpd_rpki_la_LDFLAGS = $(MODULE_LDFLAGS)
 bgpd_bgpd_rpki_la_LIBADD = $(RTRLIB_LIBS)
 
 bgpd_bgpd_bmp_la_SOURCES = bgpd/bgp_bmp.c
 bgpd_bgpd_bmp_la_LIBADD = lib/libfrrcares.la
-bgpd_bgpd_bmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+bgpd_bgpd_bmp_la_LDFLAGS = $(MODULE_LDFLAGS)
 
 clippy_scan += \
        bgpd/bgp_bmp.c \
index 1ad87d9435f147e51edbb98f1a9920e7ac772a55..c86f47d07305b668005f6b6f06e9a0fe275c3323 100644 (file)
@@ -264,11 +264,11 @@ AC_C_FLAG([-std=gnu11], [CC="$ac_cc"], [CC="$CC -std=gnu11"])
 dnl if the user has specified any CFLAGS, override our settings
 if test "$enable_gcov" = "yes"; then
    if test "$orig_cflags" = ""; then
-      AC_C_FLAG([-coverage])
+      AC_C_FLAG([--coverage])
       AC_C_FLAG([-O0])
    fi
 
-   AC_LDFLAGS="${AC_LDFLAGS} -lgcov"
+   AC_LDFLAGS="${AC_LDFLAGS} --coverage"
 fi
 
 if test "$enable_clang_coverage" = "yes"; then
@@ -492,7 +492,7 @@ _LT_CONFIG_LIBTOOL([
   sed -e 's%func_warning ".*has not been installed in%true #\0%' -i libtool || true
 ])
 if test "$enable_static_bin" = "yes"; then
-  AC_LDFLAGS="-static"
+  AC_LDFLAGS_EXEC="-static"
   if test "$enable_static" != "yes"; then
     AC_MSG_ERROR([The --enable-static-bin option must be combined with --enable-static.])
   fi
@@ -501,6 +501,7 @@ if test "$enable_shared" != "yes"; then
   AC_MSG_ERROR([FRR cannot be built with --disable-shared.  If you want statically linked daemons, use --enable-shared --enable-static --enable-static-bin])
 fi
 AC_SUBST([AC_LDFLAGS])
+AC_SUBST([AC_LDFLAGS_EXEC])
 AM_CONDITIONAL([STATIC_BIN], [test "$enable_static_bin" = "yes"])
 
 AC_ARG_ENABLE([rpath],
index 1757d41feb22b69933098f2d23249d85dde2bf9f..202f0036f82fdbfbfb207070892e1cac797b8702 100644 (file)
@@ -14,8 +14,8 @@ is implemented using the standard Lua C bindings. The supported version of Lua
 is 5.3.
 
 C objects may be passed into Lua and Lua objects may be retrieved by C code via
-a marshalling system. In this way, arbitrary data from FRR may be passed to
-scripts. It is possible to pass C functions as well.
+a encoding/decoding system. In this way, arbitrary data from FRR may be passed to
+scripts.
 
 The Lua environment is isolated from the C environment; user scripts cannot
 access FRR's address space unless explicitly allowed by FRR.
@@ -53,150 +53,303 @@ Reasons against supporting multiple scripting languages:
   with which a given script can be shared
 
 General
-^^^^^^^
-
-FRR's concept of a script is somewhat abstracted away from the fact that it is
-Lua underneath. A script in has two things:
+-------
 
-- name
-- state
-
-In code:
+FRR's scripting functionality is provided in the form of Lua functions in Lua
+scripts (``.lua`` files). One Lua script may contain many Lua functions. These
+are respectively encapsulated in the following structures:
 
 .. code-block:: c
 
    struct frrscript {
-           /* Script name */
-           char *name;
+       /* Lua file name */
+       char *name;
 
-           /* Lua state */
-           struct lua_State *L;
+       /* hash of lua_function_states */
+       struct hash *lua_function_hash;
    };
 
+   struct lua_function_state {
+       /* Lua function name */
+       char *name;
 
-``name`` is simply a string. Everything else is in ``state``, which is itself a
-Lua library object (``lua_State``). This is an opaque struct that is
-manipulated using ``lua_*`` functions. The basic ones are imported from
-``lua.h`` and the rest are implemented within FRR to fill our use cases. The
-thing to remember is that all operations beyond the initial loading the script
-take place on this opaque state object.
+       lua_State *L;
+   };
 
-There are four basic actions that can be done on a script:
 
-- load
-- execute
-- query state
-- unload
+`struct frrscript`: Since all Lua functions are contained within scripts, the
+following APIs manipulates this structure. ``name`` contains the
+Lua script name and a hash of Lua functions to their function names.
 
-They are typically done in this order.
+`struct lua_function_state` is an internal structure, but it essentially contains
+the name of the Lua function and its state (a stack), which is run using Lua
+library functions.
 
+In general, to run a Lua function, these steps must take place:
 
-Loading
-^^^^^^^
+- Initialization
+- Load
+- Call
+- Delete
 
-A snippet of Lua code is referred to as a "chunk". These are simply text. FRR
-presently assumes chunks are located in individual files specific to one task.
-These files are stored in the scripts directory and must end in ``.lua``.
+Initialization
+^^^^^^^^^^^^^^
 
-A script object is created by loading a script. This is done with
-``frrscript_load()``. This function takes the name of the script and an
-optional callback function. The string ".lua" is appended to the script name,
-and the resultant filename is looked for in the scripts directory.
+The ``frrscript`` object encapsulates the Lua function state(s) from
+one Lua script file. To create, use ``frrscript_new()`` which takes the
+name of the Lua script.
+The string ".lua" is appended to the script name, and the resultant filename
+will be used to look for the script when we want to load a Lua function from it.
 
-For example, to load ``/etc/frr/scripts/bingus.lua``:
+For example, to create ``frrscript`` for ``/etc/frr/scripts/bingus.lua``:
 
 .. code-block:: c
 
-   struct frrscript *fs = frrscript_load("bingus", NULL);
+   struct frrscript *fs = frrscript_new("bingus");
+
+
+The script is *not* read at this stage.
+This function cannot be used to test for a script's presence.
+
+Load
+^^^^
+
+The function to be called must first be loaded. Use ``frrscript_load()``
+which takes a ``frrscript`` object, the name of the Lua function
+and a callback function.
+The script file will be read to load and compile the function.
+
+For example, to load the Lua function ``on_foo``
+in ``/etc/frr/scripts/bingus.lua``:
+
+.. code-block:: c
 
-During loading the script is validated for syntax and its initial environment
-is setup. By default this does not include the Lua standard library; there are
+   int ret = frrscript_load(fs, "on_foo", NULL);
+
+
+This function returns 0 if and only if the Lua function was successfully loaded.
+A non-zero return could indicate either a missing Lua script, a missing
+Lua function, or an error when loading the function.
+
+During loading the script is validated for syntax and its environment
+is set up. By default this does not include the Lua standard library; there are
 security issues to consider, though for practical purposes untrusted users
-should not be able to write the scripts directory anyway. If desired the Lua
-standard library may be added to the script environment using
-``luaL_openlibs(fs->L)`` after loading the script. Further information on
-setting up the script environment is in the Lua manual.
+should not be able to write the scripts directory anyway.
 
+Call
+^^^^
 
-Executing
-^^^^^^^^^
+After loading, a Lua function can be called any number of times.
 
-After loading, scripts may be executed. A script may take input in the form of
-variable bindings set in its environment prior to being run, and may provide
-results by setting the value of variables. Arbitrary C values may be
-transferred into the script environment, including functions.
+Input
+"""""
 
-A typical execution call looks something like this:
+Inputs to the Lua script should be given by providing a list of parenthesized
+pairs,
+where the first and second field identify the name of the variable and the
+value it is bound to, respectively.
+The types of the values must have registered encoders (more below); the compiler
+will warn you otherwise.
+
+These variables are first encoded in-order, then provided as arguments
+to the Lua function. In the example, note that ``c`` is passed in as a value
+while ``a`` and ``b`` are passed in as pointers.
 
 .. code-block:: c
 
-   struct frrscript *fs = frrscript_load(...);
+   int a = 100, b = 200, c = 300;
+   frrscript_call(fs, "on_foo", ("a", &a), ("b", &b), ("c", c));
+
+
+.. code-block:: lua
 
-   int status_ok = 0, status_fail = 1;
-   struct prefix p = ...;
+   function on_foo(a, b, c)
+     -- a is 100, b is 200, c is 300
+     ...
 
-   int result = frrscript_call(fs,
-                ("STATUS_FAIL", &status_fail),
-                ("STATUS_OK", &status_ok),
-                ("prefix", &p));
 
+Output
+""""""
 
-To execute a loaded script, we need to define the inputs. These inputs are
-passed in by binding values to variable names that will be accessible within the
-Lua environment. Basically, all communication with the script takes place via
-global variables within the script, and to provide inputs we predefine globals
-before the script runs. This is done by passing ``frrscript_call()`` a list of
-parenthesized pairs, where the first and second fields identify, respectively,
-the name of the global variable within the script environment and the value it
-is bound to.
+.. code-block:: c
 
-The script is then executed and returns a general status code. In the success
-case this will be 0, otherwise it will be nonzero. The script itself does not
-determine this code, it is provided by the Lua interpreter.
+   int a = 100, b = 200, c = 300;
+   frrscript_call(fs, "on_foo", ("a", &a), ("b", &b), ("c", c));
+   // a is 500, b is 200, c is 300
 
+   int* d = frrscript_get_result(fs, "on_foo", "d", lua_tointegerp);
+   // d is 800
 
-Querying State
-^^^^^^^^^^^^^^
 
-.. todo::
+.. code-block:: lua
+
+   function on_foo(a, b, c)
+     b = 600
+     return { ["a"] = 500, ["c"] = 700, ["d"] = 800 }
+   end
 
-   This section will be updated once ``frrscript_get_result`` has been
-   updated to work with the new ``frrscript_call`` and the rest of the new API.
 
+**Lua functions being called must return a single table of string names to
+values.**
+(Lua functions should return an empty table if there is no output.)
+The keys of the table are mapped back to names of variables in C. Note that
+the values in the table can also be tables. Since tables are Lua's primary
+data structure, this design lets us return any Lua value.
 
-Unloading
-^^^^^^^^^
+After the Lua function returns, the names of variables  to ``frrscript_call()``
+are matched against keys of the returned table, and then decoded. The types
+being decoded must have registered decoders (more below); the compiler will
+warn you otherwise.
 
-To destroy a script and its associated state:
+In the example, since ``a`` was in the returned table and ``b`` was not,
+``a`` was decoded and its value modified, while ``b`` was not decoded.
+``c`` was decoded as well, but its decoder is a noop.
+What modifications happen given a variable depends whether its name was
+in the returned table and the decoder's implementation.
+
+.. warning::
+   Always keep in mind that non const-qualified pointers in
+   ``frrscript_call()`` may be modified - this may be a source of bugs.
+   On the other hand, const-qualified pointers and other values cannot
+   be modified.
+
+
+.. tip::
+   You can make a copy of a data structure and pass that in instead,
+   so that modifications only happen to that copy.
+
+``frrscript_call()`` returns 0 if and only if the Lua function was successfully
+called. A non-zero return could indicate either a missing Lua script, a missing
+Lua function, or an error from the Lua interpreter.
+
+In the above example, ``d`` was not an input to ``frrscript_call()``, so its
+value must be explicitly retrieved with ``frrscript_get_result``.
+
+``frrscript_get_result()`` takes a
+decoder and string name which is used as a key to search the returned table.
+Returns the pointer to the decoded value, or NULL if it was not found.
+In the example, ``d`` is a "new" value in C space,
+so memory allocation might take place. Hence the caller is
+responsible for memory deallocation.
+
+``frrscript_call()`` may be called multiple times without re-loading with
+``frrscript_load()``. Results are not preserved between consecutive calls.
+
+.. code-block:: c
+
+   frrscript_load(fs, "on_foo");
+
+   frrscript_call(fs, "on_foo");
+   frrscript_get_result(fs, "on_foo", ...);
+   frrscript_call(fs, "on_foo");
+   frrscript_get_result(fs, "on_foo", ...);
+
+
+Delete
+^^^^^^
+
+To delete a script and the all Lua states associated with it:
+
+.. code-block:: c
+
+   frrscript_delete(fs);
+
+
+A complete example
+""""""""""""""""""
+
+So, a typical execution call, with error checking, looks something like this:
 
 .. code-block:: c
 
-   frrscript_unload(fs);
+   struct frrscript *fs = frrscript_new("my_script"); // name *without* .lua
+
+   int ret = frrscript_load(fs, "on_foo", NULL);
+   if (ret != 0)
+       goto DONE; // Lua script or function might have not been found
+
+   int a = 100, b = 200, c = 300;
+   ret = frrscript_call(fs, "on_foo", ("a", &a), ("b", &b), ("c", c));
+   if (ret != 0)
+       goto DONE; // Lua function might have not successfully run
+
+   // a and b might be modified
+   assert(a == 500);
+   assert(b == 200);
 
+   // c could not have been modified
+   assert(c == 300);
 
-.. _marshalling:
+   // d is new
+   int* d = frrscript_get_result(fs, "on_foo", "d", lua_tointegerp);
 
-Marshalling
-^^^^^^^^^^^
+   if (!d)
+       goto DONE; // "d" might not have been in returned table
+
+   assert(*d == 800);
+   XFREE(MTYPE_SCRIPT_RES, d); // caller responsible for free
+
+   DONE:
+   frrscript_delete(fs);
+
+
+.. code-block:: lua
+
+   function on_foo(a, b, c)
+     b = 600
+     return { a = 500, c = 700, d = 800 }
+   end
+
+
+Note that ``{ a = ...`` is same as ``{ ["a"] = ...``; it is Lua shorthand to
+use the variable name as the key in a table.
+
+Encoding and Decoding
+^^^^^^^^^^^^^^^^^^^^^
 
 Earlier sections glossed over the types of values that can be passed into
-``frrscript_call`` and how data is passed between C and Lua. Lua, as a dynamically
-typed, garbage collected language, cannot directly use C values without some
-kind of marshalling / unmarshalling system to translate types between the two
-runtimes.
+``frrscript_call()`` and how data is passed between C and Lua. Lua, as a
+dynamically typed, garbage collected language, cannot directly use C values
+without some kind of encoding / decoding system to
+translate types between the two runtimes.
 
 Lua communicates with C code using a stack. C code wishing to provide data to
-Lua scripts must provide a function that marshalls the C data into a Lua
+Lua scripts must provide a function that encodes the C data into a Lua
 representation and pushes it on the stack. C code wishing to retrieve data from
-Lua must provide a corresponding unmarshalling function that retrieves a Lua
-value from the stack and converts it to the corresponding C type. These
-functions are known as encoders and decoders in FRR.
+Lua must provide a corresponding decoder function that retrieves a Lua
+value from the stack and converts it to the corresponding C type.
+
+Encoders and decoders are provided for common data types.
+Developers wishing to pass their own data structures between C and Lua need to
+create encoders and decoders for that data type.
+
+We try to keep them named consistently.
+There are three kinds of encoders and decoders:
+
+1. lua_push*: encodes a value onto the Lua stack.
+   Required for ``frrscript_call``.
 
-An encoder is a function that takes a ``lua_State *`` and a C type and pushes
-onto the Lua stack a value representing the C type. For C structs, the usual
-case, this will typically be a Lua table (tables are the only datastructure Lua
-has). For example, here is the encoder function for ``struct prefix``:
+2. lua_decode*: decodes a value from the Lua stack.
+   Required for ``frrscript_call``.
+   Only non const-qualified pointers may be actually decoded (more below).
 
+3. lua_to*: allocates memory and decodes a value from the Lua stack.
+   Required for ``frrscript_get_result``.
+
+This design allows us to combine typesafe *modification* of C values as well as
+*allocation* of new C values.
+
+In the following sections, we will use the encoders/decoders for ``struct prefix`` as an example.
+
+Encoding
+""""""""
+
+An encoder function takes a ``lua_State *``, a C type and pushes that value onto
+the Lua state (a stack).
+For C structs, the usual case,
+this will typically be encoded to a Lua table, then pushed onto the Lua stack.
+
+Here is the encoder function for ``struct prefix``:
 
 .. code-block:: c
 
@@ -204,8 +357,6 @@ has). For example, here is the encoder function for ``struct prefix``:
    {
            char buffer[PREFIX_STRLEN];
 
-           zlog_debug("frrlua: pushing prefix table");
-
            lua_newtable(L);
            lua_pushstring(L, prefix2str(prefix, buffer, PREFIX_STRLEN));
            lua_setfield(L, -2, "network");
@@ -215,7 +366,7 @@ has). For example, here is the encoder function for ``struct prefix``:
            lua_setfield(L, -2, "family");
    }
 
-This function pushes a single value onto the Lua stack. It is a table whose
+This function pushes a single value, a table, onto the Lua stack, whose
 equivalent in Lua is:
 
 .. code-block:: c
@@ -223,16 +374,23 @@ equivalent in Lua is:
    { ["network"] = "1.2.3.4/24", ["prefixlen"] = 24, ["family"] = 2 }
 
 
+Decoding
+""""""""
+
 Decoders are a bit more involved. They do the reverse; a decoder function takes
 a ``lua_State *``, pops a value off the Lua stack and converts it back into its
 C type.
-However, since Lua programs have the ability to directly modify their inputs
-(i.e. values passed in via ``frrscript_call``), we need two separate decoder
-functions, called ``lua_decode_*`` and ``lua_to*``.
 
-A ``lua_decode_*`` function takes a ``lua_State*``, an index, and a C type, and
-unmarshalls a Lua value into that C type.
-Again, for ``struct prefix``:
+There are two: ``lua_decode*`` and ``lua_to*``. The former does no mememory
+allocation and is needed for ``frrscript_call``.
+The latter performs allocation and is optional.
+
+A ``lua_decode_*`` function takes a ``lua_State*``, an index, and a pointer
+to a C data structure, and directly modifies the structure with values from the
+Lua stack. Note that only non const-qualified pointers may be modified;
+``lua_decode_*`` for other types will be noops.
+
+Again, for ``struct prefix *``:
 
 .. code-block:: c
 
@@ -240,29 +398,52 @@ Again, for ``struct prefix``:
    {
         lua_getfield(L, idx, "network");
         (void)str2prefix(lua_tostring(L, -1), prefix);
+        /* pop the network string */
         lua_pop(L, 1);
-        /* pop the table */
+        /* pop the prefix table */
         lua_pop(L, 1);
    }
 
+
+Note:
+ - Before ``lua_decode*`` is run, the "prefix" table is already on the top of
+   the stack. ``frrscript_call`` does this for us.
+ - However, at the end of ``lua_decode*``, the "prefix" table should be popped.
+ - The other two fields in the "network" table are disregarded, meaning that any
+   modification to them is discarded in C space. In this case, this is desired
+   behavior.
+
 .. warning::
 
-   ``lua_decode_prefix`` functions should leave the Lua stack completely empty
-   when they return.
-   For decoders that unmarshall fields from tables, remember to pop the table
-   at the end.
+   ``lua_decode*`` functions should pop all values that ``lua_to*`` pushed onto
+   the Lua stack.
+   For encoders that pushed a table, its decoder should pop the table at the end.
+   The above is an example.
+
 
 
-A ``lua_to*`` function perform a similar role except that it first allocates
-memory for the new C type before decoding the value from the Lua stack, then
-returns a pointer to the newly allocated C type.
+``int`` is not a non const-qualified pointer, so for ``int``:
+
+.. code-block:: c
+
+   void lua_decode_int_noop(lua_State *L, int idx, int i)
+   { //noop
+   }
+
+
+A ``lua_to*`` function provides identical functionality except that it first
+allocates memory for the new C type before decoding the value from the Lua stack,
+then returns a pointer to the newly allocated C type. You only need to implement
+this function to use with ``frrscript_get_result`` to retrieve a result of
+this type.
+
 This function can and should be implemented using ``lua_decode_*``:
 
 .. code-block:: c
 
    void *lua_toprefix(lua_State *L, int idx)
    {
-           struct prefix *p = XCALLOC(MTYPE_TMP, sizeof(struct prefix));
+           struct prefix *p = XCALLOC(MTYPE_SCRIPT_RES, sizeof(struct prefix));
 
            lua_decode_prefix(L, idx, p);
            return p;
@@ -270,22 +451,15 @@ This function can and should be implemented using ``lua_decode_*``:
 
 
 The returned data must always be copied off the stack and the copy must be
-allocated with ``MTYPE_TMP``. This way it is possible to unload the script
+allocated with ``MTYPE_SCRIPT_RES``. This way it is possible to unload the script
 (destroy the state) without invalidating any references to values stored in it.
 Note that it is the caller's responsibility to free the data.
 
-For consistency, we should always name functions of the first type
-``lua_decode_*``.
-Functions of the second type should be named ``lua_to*``, as this is the
-naming convention used by the Lua C library for the basic types e.g.
-``lua_tointeger`` and ``lua_tostring``.
 
-This two-function design allows the compiler to warn if a value passed into
-``frrscript_call`` does not have a encoder and decoder for that type.
-The ``lua_to*`` functions enable us to easily create decoders for nested
-structures.
+Registering encoders and decoders for frrscript_call
+""""""""""""""""""""""""""""""""""""""""""""""""""""
 
-To register a new type with its corresponding encoding and decoding functions,
+To register a new type with its ``lua_push*`` and ``lua_decode*`` functions,
 add the mapping in the following macros in ``frrscript.h``:
 
 .. code-block:: diff
@@ -296,7 +470,7 @@ add the mapping in the following macros in ``frrscript.h``:
    - struct peer * : lua_pushpeer \
    + struct peer * : lua_pushpeer, \
    + struct prefix * : lua_pushprefix \
-     )(L, value)
+     )((L), (value))
 
      #define DECODE_ARGS_WITH_STATE(L, value) \
           _Generic((value), \
@@ -304,7 +478,7 @@ add the mapping in the following macros in ``frrscript.h``:
    - struct peer * : lua_decode_peer \
    + struct peer * : lua_decode_peer, \
    + struct prefix * : lua_decode_prefix \
-     )(L, -1, value)
+     )((L), -1, (value))
 
 
 At compile time, the compiler will search for encoders/decoders for the type of
@@ -331,11 +505,12 @@ For that, use ``lua_decode_noop``:
 
 .. note::
 
-   Marshalled types are not restricted to simple values like integers, strings
-   and tables. It is possible to marshall a type such that the resultant object
-   in Lua is an actual object-oriented object, complete with methods that call
-   back into defined C functions. See the Lua manual for how to do this; for a
-   code example, look at how zlog is exported into the script environment.
+   Encodable/decodable types are not restricted to simple values like integers,
+   strings and tables.
+   It is possible to encode a type such that the resultant object in Lua
+   is an actual object-oriented object, complete with methods that call
+   back into defined C functions. See the Lua manual for how to do this;
+   for a code example, look at how zlog is exported into the script environment.
 
 
 Script Environment
@@ -364,10 +539,11 @@ Examples
 For a complete code example involving passing custom types, retrieving results,
 and doing complex calculations in Lua, look at the implementation of the
 ``match script SCRIPT`` command for BGP routemaps. This example calls into a
-script with a route prefix and attributes received from a peer and expects the
-script to return a match / no match / match and update result.
+script with a function named ``route_match``,
+provides route prefix and attributes received from a peer and expects the
+function to return a match / no match / match and update result.
 
-An example script to use with this follows. This script matches, does not match
+An example script to use with this follows. This function matches, does not match
 or updates a route depending on how many BGP UPDATE messages the peer has
 received when the script is called, simply as a demonstration of what can be
 accomplished with scripting.
@@ -378,64 +554,75 @@ accomplished with scripting.
    -- Example route map matching
    -- author: qlyoung
    --
-   -- The following variables are available to us:
+   -- The following variables are available in the global environment:
    --   log
    --     logging library, with the usual functions
-   --   prefix
+   --
+   -- route_match arguments:
+   --   table prefix
    --     the route under consideration
-   --   attributes
+   --   table attributes
    --     the route's attributes
-   --   peer
+   --   table peer
    --     the peer which received this route
-   --   RM_FAILURE
+   --   integer RM_FAILURE
    --     status code in case of failure
-   --   RM_NOMATCH
+   --   integer RM_NOMATCH
    --     status code for no match
-   --   RM_MATCH
+   --   integer RM_MATCH
    --     status code for match
-   --   RM_MATCH_AND_CHANGE
+   --   integer RM_MATCH_AND_CHANGE
    --     status code for match-and-set
    --
-   -- We need to set the following out values:
-   --   action
-   --      Set to the appropriate status code to indicate what we did
-   --   attributes
-   --      Setting fields on here will propagate them back up to the caller if
-   --      'action' is set to RM_MATCH_AND_CHANGE.
-   
-   
-   log.info("Evaluating route " .. prefix.network .. " from peer " .. peer.remote_id.string)
-   
-   function on_match (prefix, attrs)
-           log.info("Match")
-           action = RM_MATCH
-   end
-   
-   function on_nomatch (prefix, attrs)
-           log.info("No match")
-           action = RM_NOMATCH
-   end
-   
-   function on_match_and_change (prefix, attrs)
-           action = RM_MATCH_AND_CHANGE
-           log.info("Match and change")
-           attrs["metric"] = attrs["metric"] + 7
-   end
-   
-   special_routes = {
-           ["172.16.10.4/24"] = on_match,
-           ["172.16.13.1/8"] = on_nomatch,
-           ["192.168.0.24/8"] = on_match_and_change,
-   }
+   -- route_match returns table with following keys:
+   --   integer action, required
+   --     resultant status code. Should be one of RM_*
+   --   table attributes, optional
+   --     updated route attributes
+   --
+
+   function route_match(prefix, attributes, peer,
+           RM_FAILURE, RM_NOMATCH, RM_MATCH, RM_MATCH_AND_CHANGE)
+
+           log.info("Evaluating route " .. prefix.network .. " from peer " .. peer.remote_id.string)
    
+           function on_match (prefix, attributes)
+                   log.info("Match")
+                   return {
+                           attributes = RM_MATCH
+                   }
+           end
    
-   if special_routes[prefix.network] then
-           special_routes[prefix.network](prefix, attributes)
-   elseif peer.stats.update_in % 3 == 0 then
-           on_match(prefix, attributes)
-   elseif peer.stats.update_in % 2 == 0 then
-           on_nomatch(prefix, attributes)
-   else
-           on_match_and_change(prefix, attributes)
-   end
-
+           function on_nomatch (prefix, attributes)
+                   log.info("No match")
+                   return {
+                           action = RM_NOMATCH
+                   }
+           end
+
+           function on_match_and_change (prefix, attributes)
+                   log.info("Match and change")
+                   attributes["metric"] = attributes["metric"] + 7
+                   return {
+                           action = RM_MATCH_AND_CHANGE,
+                           attributes = attributes
+                   }
+           end
+
+           special_routes = {
+                   ["172.16.10.4/24"] = on_match,
+                   ["172.16.13.1/8"] = on_nomatch,
+                   ["192.168.0.24/8"] = on_match_and_change,
+           }
+
+
+           if special_routes[prefix.network] then
+                   return special_routes[prefix.network](prefix, attributes)
+           elseif peer.stats.update_in % 3 == 0 then
+                   return on_match(prefix, attributes)
+           elseif peer.stats.update_in % 2 == 0 then
+                   return on_nomatch(prefix, attributes)
+           else
+                   return on_match_and_change(prefix, attributes)
+           end
+    end
index dae175a732da418221bff5ee0a4facf854c190fa..b6fde2b28349dccb4207abddbf65970b37b50f48 100644 (file)
@@ -88,22 +88,45 @@ FRR employs a ``<MAJOR>.<MINOR>.<BUGFIX>`` versioning scheme.
 ``BUGFIX``
    Fixes for actual bugs and/or security issues.  Fully compatible.
 
-We will pull a new development branch for the next release every 4 months.  The
-current schedule is Feb/June/October 1. The decision for a ``MAJOR/MINOR``
-release is made at the time of branch pull based on what has been received the
-previous 4 months. The branch name will be ``dev/MAJOR.MINOR``. At this point
-in time the master branch and this new branch, :file:`configure.ac`,
-documentation and packaging systems will be updated to reflect the next
-possible release name to allow for easy distinguishing.
-
-After one month the development branch will be renamed to
-``stable/MAJOR.MINOR``.  The branch is a stable branch. This process is not
-held up unless a crash or security issue has been found and needs to
-be addressed. Issues being fixed will not cause a delay.
-
-Bugfix releases are made as needed at 1 month intervals until the next
-``MAJOR.MINOR`` release branch is pulled. Depending on the severity of the bugs,
-bugfix releases may occur sooner.
+Releases are scheduled in a 4-month cycle on the first Tuesday each
+March/July/November.  Walking backwards from this date:
+
+ - 6 weeks earlier, ``master`` is frozen for new features, and feature PRs
+   are considered lowest priority (regardless of when they were opened.)
+
+ - 4 weeks earlier, the stable branch separates from master (named
+   ``dev/MAJOR.MINOR`` at this point) and a ``rc1`` release candidate is
+   tagged.  Master is unfrozen and new features may again proceed.
+
+ - 2 weeks earlier, a ``rc2`` release candidate is tagged.
+
+ - on release date, the branch is renamed to ``stable/MAJOR.MINOR``.
+
+The 2 week window between each of these events should be used to run any and
+all testing possible for the release in progress.  However, the current
+intention is to stick to the schedule even if known issues remain.  This would
+hopefully occur only after all avenues of fixing issues are exhausted, but to
+achieve this, an as exhaustive as possible list of issues needs to be available
+as early as possible, i.e. the first 2-week window.
+
+For reference, the expected release schedule according to the above is:
+
++------------+------------+------------+------------+------------+------------+
+| Release    | 2021-11-02 | 2022-03-01 | 2022-07-05 | 2022-11-01 | 2023-03-07 |
++------------+------------+------------+------------+------------+------------+
+| rc2        | 2021-10-19 | 2022-02-15 | 2022-06-21 | 2022-10-18 | 2023-02-21 |
++------------+------------+------------+------------+------------+------------+
+| rc1/branch | 2021-10-05 | 2022-02-01 | 2022-06-07 | 2022-10-04 | 2023-02-07 |
++------------+------------+------------+------------+------------+------------+
+| freeze     | 2021-09-21 | 2022-01-18 | 2022-05-24 | 2022-09-20 | 2023-01-24 |
++------------+------------+------------+------------+------------+------------+
+
+Each release is managed by one or more volunteer release managers from the FRR
+community.  To spread and distribute this workload, this should be rotated for
+subsequent releases.  The release managers are currently assumed/expected to
+run a release management meeting during the weeks listed above.  Barring other
+constraints, this would be scheduled before the regular weekly FRR community
+call such that important items can be carried over into that call.
 
 Bugfixes are applied to the two most recent releases. However, backporting of bug
 fixes to older than the two most recent releases will not be prevented, if acked
index ac17328325af7463ab23b84be77426e794d2337e..45bdaf05d7e6aafc697768e3b3c32c9096d258c3 100644 (file)
@@ -401,6 +401,22 @@ Route Selection
    paths learned from any of eBGP, iBGP, or confederation neighbors will
    be multipath if they are otherwise considered equal cost.
 
+.. clicmd:: maximum-paths (1-128)
+
+   Sets the maximum-paths value used for ecmp calculations for this
+   bgp instance in EBGP.  The maximum value listed, 128, can be limited by
+   the ecmp cli for bgp or if the daemon was compiled with a lower
+   ecmp value.  This value can also be set in ipv4/ipv6 unicast/labeled
+   unicast to only affect those particular afi/safi's.
+
+.. clicmd:: maximum-paths ibgp (1-128) [equal-cluster-length]
+
+   Sets the maximum-paths value used for ecmp calculations for this
+   bgp instance in IBGP.  The maximum value listed, 128, can be limited by
+   the ecmp cli for bgp or if the daemon was compiled with a lower
+   ecmp value.  This value can also be set in ipv4/ipv6 unicast/labeled
+   unicast to only affect those particular afi/safi's.
+
 .. _bgp-distance:
 
 Administrative Distance Metrics
@@ -408,8 +424,8 @@ Administrative Distance Metrics
 
 .. clicmd:: distance bgp (1-255) (1-255) (1-255)
 
-   This command change distance value of BGP. The arguments are the distance
-   values for for external routes, internal routes and local routes
+   This command changes distance value of BGP. The arguments are the distance
+   values for external routes, internal routes and local routes
    respectively.
 
 .. clicmd:: distance (1-255) A.B.C.D/M
@@ -448,9 +464,9 @@ Require policy on EBGP
       RIB entries 7, using 1344 bytes of memory
       Peers 2, using 43 KiB of memory
 
-      Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt
-      192.168.0.2     4      65002         8        10        0    0    0 00:03:09            5 (Policy)
-      fe80:1::2222    4      65002         9        11        0    0    0 00:03:09     (Policy) (Policy)
+      Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
+      192.168.0.2     4      65002         8        10        0    0    0 00:03:09            5 (Policy) N/A
+      fe80:1::2222    4      65002         9        11        0    0    0 00:03:09     (Policy) (Policy) N/A
 
    Additionally a `show bgp neighbor` command would indicate in the `For address family:`
    block that:
@@ -499,54 +515,28 @@ Disable checking if nexthop is connected on EBGP sessions
 Route Flap Dampening
 --------------------
 
-.. clicmd:: bgp dampening [(1-45) [(1-20000) (1-20000) (1-255)]]
-
-   This command enables (with optionally specified dampening parameters) or
-   disables route-flap dampening for all routes of a BGP instance.
-
-.. clicmd:: neighbor PEER dampening [(1-45) [(1-20000) (1-20000) (1-255)]]
+.. clicmd:: bgp dampening (1-45) (1-20000) (1-20000) (1-255)
 
-   This command enables (with optionally specified dampening parameters) or
-   disables route-flap dampening for all routes learned from a BGP peer.
-
-.. clicmd:: neighbor GROUP dampening [(1-45) [(1-20000) (1-20000) (1-255)]]
-
-   This command enables (with optionally specified dampening parameters) or
-   disables route-flap dampening for all routes learned from peers of a peer
-   group.
+   This command enables BGP route-flap dampening and specifies dampening parameters.
 
    half-life
-      Half-life time for the penalty in minutes (default value: 15).
+      Half-life time for the penalty
 
    reuse-threshold
-      Value to start reusing a route (default value: 750).
+      Value to start reusing a route
 
    suppress-threshold
-      Value to start suppressing a route (default value: 2000).
+      Value to start suppressing a route
 
    max-suppress
-      Maximum duration to suppress a stable route in minutes (default value:
-      60).
+      Maximum duration to suppress a stable route
 
    The route-flap damping algorithm is compatible with :rfc:`2439`. The use of
-   these commands is not recommended nowadays.
+   this command is not recommended nowadays.
 
    At the moment, route-flap dampening is not working per VRF and is working only
    for IPv4 unicast and multicast.
 
-   With different parameter sets configurable for BGP instances, peer groups and
-   peers, the active dampening profile for a route is chosen on the fly,
-   allowing for various changes in configuration (i.e. peer group memberships)
-   during runtime. The parameter sets are taking precedence in the following
-   order:
-
-   1. Peer
-   2. Peer group
-   3. BGP instance
-
-   The negating commands do not allow to exclude a peer/peer group from a peer
-   group/BGP instances configuration.
-
 .. seealso::
    https://www.ripe.net/publications/docs/ripe-378
 
@@ -969,7 +959,7 @@ BGP GR Global Mode Commands
 
 .. clicmd:: bgp graceful-restart
 
-   This command will enable BGP graceful restart ifunctionality at the global
+   This command will enable BGP graceful restart functionality at the global
    level.
 
 .. clicmd:: bgp graceful-restart disable
@@ -985,7 +975,7 @@ BGP GR Peer Mode Commands
 
 .. clicmd:: neighbor A.B.C.D graceful-restart
 
-   This command will enable BGP graceful restart ifunctionality at the peer
+   This command will enable BGP graceful restart functionality at the peer
    level.
 
 .. clicmd:: neighbor A.B.C.D graceful-restart-helper
@@ -1092,7 +1082,7 @@ IPv6 Support
 
    This configuration demonstrates how the 'no bgp default ipv4-unicast' might
    be used in a setup with two upstreams where each of the upstreams should only
-   receive either IPv4 or IPv6 annocuments.
+   receive either IPv4 or IPv6 announcements.
 
    Using the ``bgp default ipv6-unicast`` configuration, IPv6 unicast
    address family is enabled by default for all new neighbors.
@@ -1112,6 +1102,13 @@ Route Aggregation-IPv4 Address Family
 
    This command specifies an aggregate address.
 
+   In order to advertise an aggregated prefix, a more specific (longer) prefix
+   MUST exist in the BGP table. For example, if you want to create an
+   ``aggregate-address 10.0.0.0/24``, you should make sure you have something
+   like ``10.0.0.5/32`` or ``10.0.0.0/26``, or any other smaller prefix in the
+   BGP table. The routing information table (RIB) is not enough, you have to
+   redistribute them into the BGP table.
+
 .. clicmd:: aggregate-address A.B.C.D/M route-map NAME
 
    Apply a route-map for an aggregated prefix.
@@ -1127,8 +1124,9 @@ Route Aggregation-IPv4 Address Family
 
 .. clicmd:: aggregate-address A.B.C.D/M summary-only
 
-   This command specifies an aggregate address. Aggregated routes will
-   not be announced.
+   This command specifies an aggregate address.
+
+   Longer prefixes advertisements of more specific routes to all neighbors are suppressed.
 
 .. clicmd:: aggregate-address A.B.C.D/M matching-MED-only
 
@@ -1179,8 +1177,9 @@ Route Aggregation-IPv6 Address Family
 
 .. clicmd:: aggregate-address X:X::X:X/M summary-only
 
-   This command specifies an aggregate address. Aggregated routes will
-   not be announced.
+   This command specifies an aggregate address.
+
+   Longer prefixes advertisements of more specific routes to all neighbors are suppressed
 
 .. clicmd:: aggregate-address X:X::X:X/M matching-MED-only
 
@@ -1264,7 +1263,7 @@ Redistribute routes from other protocols into BGP.
 
    This feature is used to enable read-only mode on BGP process restart or when
    a BGP process is cleared using 'clear ip bgp \*'.  Note that this command is
-   configured under the specific bgp instance/vrf that the feaure is enabled for.
+   configured under the specific bgp instance/vrf that the feature is enabled for.
    It cannot be used at the same time as the global "bgp update-delay" described
    above, which is entered at the global level and applies to all bgp instances.
    The global and per-vrf approaches to defining update-delay are mutually
@@ -1369,7 +1368,7 @@ Defining Peers
    limit is set to 100 by default. Increasing this value will really be
    possible if more file descriptors are available in the BGP process. This
    value is defined by the underlying system (ulimit value), and can be
-   overriden by `--limit-fds`. More information is available in chapter
+   overridden by `--limit-fds`. More information is available in chapter
    (:ref:`common-invocation-options`).
 
 .. clicmd:: coalesce-time (0-4294967295)
@@ -1403,6 +1402,15 @@ Configuring Peers
    Allow peerings between directly connected eBGP peers using loopback
    addresses.
 
+.. clicmd:: neighbor PEER disable-link-bw-encoding-ieee
+
+   By default bandwidth in extended communities is carried encoded as IEEE
+   floating-point format, which is according to the draft.
+
+   Older versions have the implementation where extended community bandwidth
+   value is carried encoded as uint32. To enable backward compatibility we
+   need to disable IEEE floating-point encoding option per-peer.
+
 .. clicmd:: neighbor PEER ebgp-multihop
 
    Specifying ``ebgp-multihop`` allows sessions with eBGP neighbors to
@@ -1556,7 +1564,7 @@ Configuring Peers
    can't connect them directly. This is an alternative to
    `neighbor WORD as-override`.
 
-   The parameter `(1-10)` configures the amount of accepted occurences of the
+   The parameter `(1-10)` configures the amount of accepted occurrences of the
    system AS number in AS path.
 
    The parameter `origin` configures BGP to only accept routes originated with
@@ -1681,7 +1689,7 @@ Configuring Peers
    Set keepalive and hold timers for a neighbor. The first value is keepalive
    and the second is hold time.
 
-.. clicmd:: neighbor PEER connect (1-65535)
+.. clicmd:: neighbor PEER timers connect (1-65535)
 
    Set connect timer for a neighbor. The connect timer controls how long BGP
    waits between connection attempts to a neighbor.
@@ -1694,6 +1702,12 @@ Configuring Peers
    default, the DelayOpenTimer is disabled. The timer interval may be set to a
    duration of 1 to 240 seconds.
 
+.. clicmd:: bgp minimum-holdtime (1-65535)
+
+   This command allows user to prevent session establishment with BGP peers
+   with lower holdtime less than configured minimum holdtime.
+   When this command is not set, minimum holdtime does not work.
+
 Displaying Information about Peers
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -1880,7 +1894,17 @@ AS path access list is user defined AS path.
 
    This command defines a new AS path access list.
 
+.. clicmd:: show bgp as-path-access-list [json]
 
+   Display all BGP AS Path access lists.
+
+   If the ``json`` option is specified, output is displayed in JSON format.
+
+.. clicmd:: show bgp as-path-access-list WORD [json]
+
+   Display the specified BGP AS Path access list.
+
+   If the ``json`` option is specified, output is displayed in JSON format.
 
 .. _bgp-bogon-filter-example:
 
@@ -2178,6 +2202,12 @@ communities attribute.
 
 The following commands can be used in route maps:
 
+.. clicmd:: match alias WORD
+
+   This command performs match to BGP updates using community alias WORD. When
+   the one of BGP communities value match to the one of community alias value in
+   community alias, it is match.
+
 .. clicmd:: match community WORD exact-match [exact-match]
 
    This command perform match to BGP updates using community list WORD. When
@@ -2408,6 +2438,12 @@ BGP Extended Communities in Route Map
 
 .. clicmd:: match extcommunity WORD
 
+.. clicmd:: set extcommunity none
+
+   This command resets the extended community value in BGP updates. If the attribute is
+   already configured or received from the peer, the attribute is discarded and set to
+   none. This is useful if you need to strip incoming extended communities.
+
 .. clicmd:: set extcommunity rt EXTCOMMUNITY
 
    This command set Route Target value.
@@ -2551,7 +2587,7 @@ BGP routes may be leaked (i.e. copied) between a unicast VRF RIB and the VPN
 SAFI RIB of the default VRF for use in MPLS-based L3VPNs. Unicast routes may
 also be leaked between any VRFs (including the unicast RIB of the default BGP
 instanced). A shortcut syntax is also available for specifying leaking from one
-VRF to another VRF using the default instance's VPN RIB as the intemediary. A
+VRF to another VRF using the default instance's VPN RIB as the intermediary. A
 common application of the VRF-VRF feature is to connect a customer's private
 routing domain to a provider's VPN service. Leaking is configured from the
 point of view of an individual VRF: ``import`` refers to routes leaked from VPN
@@ -2732,7 +2768,7 @@ the same behavior of using same next-hop and RMAC values.
 
 .. clicmd:: advertise-pip [ip <addr> [mac <addr>]]
 
-Enables or disables advertise-pip feature, specifiy system-IP and/or system-MAC
+Enables or disables advertise-pip feature, specify system-IP and/or system-MAC
 parameters.
 
 EVPN advertise-svi-ip
@@ -2788,7 +2824,7 @@ Topology requirements:
 1. This feature is supported for asymmetric routing model only. While
    sending packets to SN1, ingress PE (PE2) performs routing and
    egress PE (PE1) performs only bridging.
-2. This feature supports only tratitional(non vlan-aware) bridge model. Bridge
+2. This feature supports only traditional(non vlan-aware) bridge model. Bridge
    interface associated with L2VNI is an L3 interface. i.e., this interface is
    configured with an address in the L2VNI subnet. Note that the gateway IP
    should also have an address in the same subnet.
@@ -2866,7 +2902,7 @@ This group of server links is referred to as an Ethernet Segment.
 Ethernet Segments
 """""""""""""""""
 An Ethernet Segment can be configured by specifying a system-MAC and a
-local discriminatior against the bond interface on the PE (via zebra) -
+local discriminator against the bond interface on the PE (via zebra) -
 
 .. clicmd:: evpn mh es-id (1-16777215)
 
@@ -2897,7 +2933,7 @@ The DF preference is configurable per-ES (via zebra) -
 
 BUM traffic is rxed via the overlay by all PEs attached to a server but
 only the DF can forward the de-capsulated traffic to the access port. To
-accomodate that non-DF filters are installed in the dataplane to drop
+accommodate that non-DF filters are installed in the dataplane to drop
 the traffic.
 
 Similarly traffic received from ES peers via the overlay cannot be forwarded
@@ -3457,12 +3493,12 @@ structure is extended with :clicmd:`show bgp [afi] [safi]`.
 
 .. clicmd:: show bgp [afi] [safi] [all] summary failed [json]
 
-   Show a bgp peer summary for peers that are not succesfully exchanging routes
+   Show a bgp peer summary for peers that are not successfully exchanging routes
    for the specified address family, and subsequent address-family.
 
 .. clicmd:: show bgp [afi] [safi] [all] summary established [json]
 
-   Show a bgp peer summary for peers that are succesfully exchanging routes
+   Show a bgp peer summary for peers that are successfully exchanging routes
    for the specified address family, and subsequent address-family.
 
 .. clicmd:: show bgp [afi] [safi] [all] summary neighbor [PEER] [json]
@@ -3517,17 +3553,17 @@ structure is extended with :clicmd:`show bgp [afi] [safi]`.
    It helps to identify which prefixes were installed at some point.
 
    Here is an example of how to check what prefixes were installed starting
-   with an arbitrary version::
+   with an arbitrary version:
 
-   .. code-block:: frr
+.. code-block:: shell
 
-      ~# vtysh -c 'show bgp ipv4 unicast json' | jq '.tableVersion'
-      9
-      ~# vtysh -c 'show ip bgp version 9 json' | jq -r '.routes | keys[]'
-      192.168.3.0/24
-      ~# vtysh -c 'show ip bgp version 8 json' | jq -r '.routes | keys[]'
-      192.168.2.0/24
-      192.168.3.0/24
+   # vtysh -c 'show bgp ipv4 unicast json' | jq '.tableVersion'
+   9
+   # vtysh -c 'show ip bgp version 9 json' | jq -r '.routes | keys[]'
+   192.168.3.0/24
+   # vtysh -c 'show ip bgp version 8 json' | jq -r '.routes | keys[]'
+   192.168.2.0/24
+   192.168.3.0/24
 
 .. clicmd:: show bgp [afi] [safi] statistics
 
@@ -3620,7 +3656,7 @@ attribute.
 
    If ``summary`` option is specified, output is a summary of the counts for
    the chunks, inuse, ledger and requests list along with the count of
-   outstanding chunk requests to Zebra and the nummber of zebra reconnects
+   outstanding chunk requests to Zebra and the number of zebra reconnects
    that have happened
 
    If ``json`` option is specified, output is displayed in JSON format.
@@ -4333,3 +4369,35 @@ Show command json output:
 .. [bgp-route-osci-cond] McPherson, D. and Gill, V. and Walton, D., "Border Gateway Protocol (BGP) Persistent Route Oscillation Condition", IETF RFC3345
 .. [stable-flexible-ibgp] Flavel, A. and M. Roughan, "Stable and flexible iBGP", ACM SIGCOMM 2009
 .. [ibgp-correctness] Griffin, T. and G. Wilfong, "On the correctness of IBGP configuration", ACM SIGCOMM 2002
+
+.. _bgp-fast-convergence:
+
+BGP fast-convergence support
+============================
+Whenever BGP peer address becomes unreachable we must bring down the BGP
+session immediately. Currently only single-hop EBGP sessions are brought 
+down immediately.IBGP and multi-hop EBGP sessions wait for hold-timer 
+expiry to bring down the sessions.
+
+This new configuration option helps user to teardown BGP sessions immediately
+whenever peer becomes unreachable.
+
+.. clicmd:: bgp fast-convergence
+
+This configuration is available at the bgp level. When enabled, configuration
+is applied to all the neighbors configured in that bgp instance.
+
+.. code-block:: frr
+
+   router bgp 64496
+    neighbor 10.0.0.2 remote-as 64496
+    neighbor fd00::2 remote-as 64496
+    bgp fast-convergence
+   !
+   address-family ipv4 unicast
+    redistribute static
+   exit-address-family
+   !
+   address-family ipv6 unicast
+    neighbor fd00::2 activate
+   exit-address-family
index 1fb9beccdc1794f3a527fe65183c93d8ca732e3e..c1146e50aa2bbdbd20a77d5471433d6ac50078bf 100644 (file)
@@ -35,6 +35,18 @@ IP Access List
       access-list filter permit 10.0.0.0/8
       access-list filter seq 13 permit 10.0.0.0/7
 
+.. clicmd:: show <ip|ipv6> access-list [json]
+
+   Display all IPv4 or IPv6 access lists.
+
+   If the ``json`` option is specified, output is displayed in JSON format.
+
+.. clicmd:: show <ip|ipv6> access-list WORD [json]
+
+   Display the specified IPv4 or IPv6 access list.
+
+   If the ``json`` option is specified, output is displayed in JSON format.
+
 
 IP Prefix List
 ==============
@@ -111,19 +123,25 @@ ip prefix-list description
 Showing ip prefix-list
 ----------------------
 
-.. clicmd:: show ip prefix-list
+.. clicmd:: show ip prefix-list [json]
 
    Display all IP prefix lists.
 
-.. clicmd:: show ip prefix-list NAME
+   If the ``json`` option is specified, output is displayed in JSON format.
+
+.. clicmd:: show ip prefix-list NAME [json]
 
    Show IP prefix list can be used with a prefix list name.
 
-.. clicmd:: show ip prefix-list NAME seq NUM
+   If the ``json`` option is specified, output is displayed in JSON format.
+
+.. clicmd:: show ip prefix-list NAME seq NUM [json]
 
    Show IP prefix list can be used with a prefix list name and sequential
    number.
 
+   If the ``json`` option is specified, output is displayed in JSON format.
+
 .. clicmd:: show ip prefix-list NAME A.B.C.D/M
 
    If the command longer is used, all prefix lists with prefix lengths equal to
@@ -132,10 +150,19 @@ Showing ip prefix-list
 
 .. clicmd:: show ip prefix-list NAME A.B.C.D/M longer
 .. clicmd:: show ip prefix-list NAME A.B.C.D/M first-match
-.. clicmd:: show ip prefix-list summary
-.. clicmd:: show ip prefix-list summary NAME
-.. clicmd:: show ip prefix-list detail
-.. clicmd:: show ip prefix-list detail NAME
+.. clicmd:: show ip prefix-list summary [json]
+.. clicmd:: show ip prefix-list summary NAME [json]
+.. clicmd:: show ip prefix-list detail [json]
+.. clicmd:: show ip prefix-list detail NAME [json]
+
+.. clicmd:: debug prefix-list NAME match <A.B.C.D/M|X:X::X:X/M> [address-mode]
+
+   Execute the prefix list matching code for the specified list and prefix.
+   Shows which entry matched, if any.  (``address-mode`` is used for
+   PIM RP lookups and skips prefix length checks.)
+
+   The return value from this command is success only if the prefix-list
+   result is to permit the prefix, so the command can be used in scripting.
 
 Clear counter of ip prefix-list
 -------------------------------
index c4a1bc381eeb94b767b4085e54e42d0d72503331..499788ae87ed53939ef23295e9028a3ff62c4513 100644 (file)
@@ -85,84 +85,114 @@ OSPF6 router
    change to take effect, user can use this cli instead of restarting the
    ospf6d daemon.
 
-.. _ospf6-debugging:
+ASBR Summarisation Support in OSPFv3
+====================================
 
-OSPFv3 Debugging
-================
+   External routes in OSPFv3 are carried by type 5/7 LSA (external LSAs).
+   External LSAs are generated by ASBR (Autonomous System Boundary Router).
+   Large topology database requires a large amount of router memory, which
+   slows down all processes, including SPF calculations.
+   It is necessary to reduce the size of the OSPFv3 topology database,
+   especially in a large network. Summarising routes keeps the routing
+   tables smaller and easier to troubleshoot.
 
-The following debug commands are supported:
+   External route summarization must be configured on ASBR.
+   Stub area do not allow ASBR because they don’t allow type 5 LSAs.
 
-.. clicmd:: debug ospf6 abr
+   An ASBR will inject a summary route into the OSPFv3 domain.
 
-   Toggle OSPFv3 ABR debugging messages.
+   Summary route will only be advertised if you have at least one subnet
+   that falls within the summary range.
 
-.. clicmd:: debug ospf6 asbr
+   Users will be allowed an option in the CLI to not advertise range of
+   ipv6 prefixes as well.
 
-   Toggle OSPFv3 ASBR debugging messages.
+   The configuration of ASBR Summarisation is supported using the CLI command
 
-.. clicmd:: debug ospf6 border-routers
+.. clicmd:: summary-address X:X::X:X/M [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}]
 
-   Toggle OSPFv3 border router debugging messages.
+   This command will advertise a single External LSA on behalf of all the
+   prefixes falling under this range configured by the CLI.
+   The user is allowed to configure tag, metric and metric-type as well.
+   By default, tag is not configured, default metric as 20 and metric-type
+   as type-2 gets advertised.
+   A summary route is created when one or more specific routes are learned and
+   removed when no more specific route exist.
+   The summary route is also installed in the local system with Null0 as
+   next-hop to avoid leaking traffic.
 
-.. clicmd:: debug ospf6 flooding
+.. clicmd:: no summary-address X:X::X:X/M [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}]
 
-   Toggle OSPFv3 flooding debugging messages.
+   This command can be used to remove the summarisation configuration.
+   This will flush the single External LSA if it was originated and advertise
+   the External LSAs for all the existing individual prefixes.
 
-.. clicmd:: debug ospf6 interface
+.. clicmd:: summary-address X:X::X:X/M no-advertise
 
-   Toggle OSPFv3 interface related debugging messages.
+   This command can be used when user do not want to advertise a certain
+   range of prefixes using the no-advertise option.
+   This command when configured will flush all the existing external LSAs
+   falling under this range.
 
-.. clicmd:: debug ospf6 lsa
+.. clicmd:: no summary-address X:X::X:X/M no-advertise
 
-   Toggle OSPFv3 Link State Advertisements debugging messages.
+   This command can be used to remove the previous configuration.
+   When configured, tt will resume originating external LSAs for all the prefixes
+   falling under the configured range.
 
-.. clicmd:: debug ospf6 message
+.. clicmd:: aggregation timer (5-1800)
 
-   Toggle OSPFv3 message exchange debugging messages.
+   The summarisation command takes effect after the aggregation timer expires.
+   By default the value of this timer is 5 seconds. User can modify the time
+   after which the external LSAs should get originated using this command.
 
-.. clicmd:: debug ospf6 neighbor
+.. clicmd:: no aggregation timer (5-1800)
 
-   Toggle OSPFv3 neighbor interaction debugging messages.
-
-.. clicmd:: debug ospf6 nssa
+   This command removes the timer configuration. It reverts back to default
+   5 second timer.
 
-   Toggle OSPFv3 Not So Stubby Area (NSSA) debugging messages.
+.. clicmd:: show ipv6 ospf6 summary-address [detail] [json]
 
-.. clicmd:: debug ospf6 route
+   This command can be used to see all the summary-address related information.
+   When detail option is used, it shows all the prefixes falling under each
+   summary-configuration apart from other information.
 
-   Toggle OSPFv3 routes debugging messages.
+.. _ospf6-area:
 
-.. clicmd:: debug ospf6 spf
+OSPF6 area
+==========
 
-   Toggle OSPFv3 Shortest Path calculation debugging messages.
+.. clicmd:: area A.B.C.D range X:X::X:X/M [<advertise|not-advertise|cost (0-16777215)>]
 
-.. clicmd:: debug ospf6 zebra
+.. clicmd:: area (0-4294967295) range X:X::X:X/M [<advertise|not-advertise|cost (0-16777215)>]
 
-   Toggle OSPFv3 zebra interaction debugging messages.
+    Summarize a group of internal subnets into a single Inter-Area-Prefix LSA.
+    This command can only be used at the area boundary (ABR router).
 
-.. _ospf6-area:
+    By default, the metric of the summary route is calculated as the highest
+    metric among the summarized routes. The `cost` option, however, can be used
+    to set an explicit metric.
 
-OSPF6 area
-==========
+    The `not-advertise` option, when present, prevents the summary route from
+    being advertised, effectively filtering the summarized routes.
 
 .. clicmd:: area A.B.C.D nssa
 
-NSSA Support in OSPFv3
-=======================
+.. clicmd:: area (0-4294967295) nssa
+
+   Configure the area to be a NSSA (Not-So-Stubby Area).
 
-The configuration of NSSA areas in OSPFv3 is supported using the CLI command
-``area A.B.C.D nssa`` in ospf6 router configuration mode.
-The following functionalities are implemented as per RFC 3101:
+   The following functionalities are implemented as per RFC 3101:
 
-1. Advertising Type-7 LSA into NSSA area when external route is redistributed
-   into OSPFv3
-2. Processing Type-7 LSA received from neighbor and installing route in the
-   route table
-3. Support for NSSA ABR functionality which is generating Type-5 LSA when
-   backbone area is configured. Currently translation of Type-7 LSA to Type-5 LSA
-   is enabled by default.
-4. Support for NSSA Translator functionality when there are multiple NSSA ABR
-   in an area
+   1. Advertising Type-7 LSA into NSSA area when external route is
+      redistributed into OSPFv3.
+   2. Processing Type-7 LSA received from neighbor and installing route in the
+      route table.
+   3. Support for NSSA ABR functionality which is generating Type-5 LSA when
+      backbone area is configured. Currently translation of Type-7 LSA to
+      Type-5 LSA is enabled by default.
+   4. Support for NSSA Translator functionality when there are multiple NSSA
+      ABR in an area.
 
 .. _ospf6-interface:
 
@@ -218,9 +248,11 @@ Usage of *ospfd6*'s route-map support.
 Redistribute routes to OSPF6
 ============================
 
-.. clicmd:: redistribute <babel|bgp|connected|isis|kernel|openfabric|ripng|sharp|static|table> [route-map WORD]
+.. clicmd:: redistribute <babel|bgp|connected|isis|kernel|openfabric|ripng|sharp|static|table> [metric-type (1-2)] [metric (0-16777214)] [route-map WORD]
 
-   Redistribute routes from other protocols into OSPFv3.
+   Redistribute routes of the specified protocol or kind into OSPFv3, with the
+   metric type and metric set if specified, filtering the routes using the
+   given route-map if specified.
 
 .. clicmd:: default-information originate [{always|metric (0-16777214)|metric-type (1-2)|route-map WORD}]
 
@@ -228,6 +260,39 @@ Redistribute routes to OSPF6
    argument injects the default route regardless of it being present in the
    router. Metric values and route-map can also be specified optionally.
 
+Graceful Restart Helper
+=======================
+
+.. clicmd:: graceful-restart helper-only [A.B.C.D]
+
+
+   Configure Graceful Restart (RFC 5187) helper support.
+   By default, helper support is disabled for all neighbours.
+   This config enables/disables helper support on this router
+   for all neighbours.
+   To enable/disable helper support for a specific
+   neighbour, the router-id (A.B.C.D) has to be specified.
+
+.. clicmd:: graceful-restart helper strict-lsa-checking
+
+
+   If 'strict-lsa-checking' is configured then the helper will
+   abort the Graceful Restart when a LSA change occurs which
+   affects the restarting router.
+   By default 'strict-lsa-checking' is enabled"
+
+.. clicmd:: graceful-restart helper supported-grace-time (10-1800)
+
+
+   Supports as HELPER for configured grace period.
+
+.. clicmd:: graceful-restart helper planned-only
+
+
+   It helps to support as HELPER only for planned
+   restarts. By default, it supports both planned and
+   unplanned outages.
+
 .. _showing-ospf6-information:
 
 Showing OSPF6 information
@@ -321,6 +386,73 @@ Showing OSPF6 information
    JSON object, with each router having "cost", "isLeafNode" and "children" as
    arguments.
 
+.. clicmd:: show ipv6 ospf6 graceful-restart helper [detail] [json]
+
+   This command shows the graceful-restart helper details including helper
+   configuration parameters.
+
+.. _ospf6-debugging:
+
+OSPFv3 Debugging
+================
+
+The following debug commands are supported:
+
+.. clicmd:: debug ospf6 abr
+
+   Toggle OSPFv3 ABR debugging messages.
+
+.. clicmd:: debug ospf6 asbr
+
+   Toggle OSPFv3 ASBR debugging messages.
+
+.. clicmd:: debug ospf6 border-routers
+
+   Toggle OSPFv3 border router debugging messages.
+
+.. clicmd:: debug ospf6 flooding
+
+   Toggle OSPFv3 flooding debugging messages.
+
+.. clicmd:: debug ospf6 interface
+
+   Toggle OSPFv3 interface related debugging messages.
+
+.. clicmd:: debug ospf6 lsa
+
+   Toggle OSPFv3 Link State Advertisements debugging messages.
+
+.. clicmd:: debug ospf6 lsa aggregation
+
+   Toggle OSPFv3 Link State Advertisements summarization debugging messages.
+
+.. clicmd:: debug ospf6 message
+
+   Toggle OSPFv3 message exchange debugging messages.
+
+.. clicmd:: debug ospf6 neighbor
+
+   Toggle OSPFv3 neighbor interaction debugging messages.
+
+.. clicmd:: debug ospf6 nssa
+
+   Toggle OSPFv3 Not So Stubby Area (NSSA) debugging messages.
+
+.. clicmd:: debug ospf6 route
+
+   Toggle OSPFv3 routes debugging messages.
+
+.. clicmd:: debug ospf6 spf
+
+   Toggle OSPFv3 Shortest Path calculation debugging messages.
+
+.. clicmd:: debug ospf6 zebra
+
+   Toggle OSPFv3 zebra interaction debugging messages.
+
+.. clicmd:: debug ospf6 graceful-restart
+
+   Toggle OSPFv3 graceful-restart helper debugging messages.
 
 Sample configuration
 ====================
@@ -387,13 +519,3 @@ Larger example with policy and various options set:
     ipv6 access-class access6
     exec-timeout 0 0
    !
-
-
-Configuration Limits
-====================
-
-Ospf6d currently supports 100 interfaces addresses if MTU is set to
-default value, and 200 interface addresses if MTU is set to jumbo
-packet size or larger.
-
-  
index f27360cca74d17e8dd3ebe339105fb2bffa54b60..bdbf89529924e7e4992d44d1a4b9a666dea450d1 100644 (file)
@@ -52,10 +52,10 @@ Example:
      index 20 mpls label 16030
     !
     segment-list SL2
-     index 10  nai prefix 10.1.2.1/32 iface 1
-     index 20  nai adjacency 10.1.20.1 10.1.20.2
-     index 30  nai prefix 10.10.10.5/32 algorithm 0
-     index 40  mpls label 18001
+     index 10 nai prefix 10.1.2.1/32 iface 1
+     index 20 nai adjacency 10.1.20.1 10.1.20.2
+     index 30 nai prefix 10.10.10.5/32 algorithm 0
+     index 40 mpls label 18001
     !
     policy color 1 endpoint 1.1.1.1
      name default
@@ -70,7 +70,7 @@ Example:
     !
     pcep
      pce-config GROUP1
-      source-address 1.1.1.1
+      source-address ip 1.1.1.1
       tcp-md5-auth secret
       timer keep-alive 30
      !
index 77134a77042a550a91f56ab165dbbf326c955293..e59ed10896a0f8433ed982dda23ceb7e85caad9e 100644 (file)
@@ -117,6 +117,21 @@ end destination.
    both v4 and v6 prefixes.  This command is used in conjunction of the
    :clicmd:`match src-ip PREFIX` command for matching.
 
+.. clicmd:: match src-port (1-65535)
+
+   When a incoming packet matches the source port specified, take the
+   packet and forward according to the nexthops specified.
+
+.. clicmd:: match dst-port (1-65535)
+
+   When a incoming packet matches the destination port specified, take the
+   packet and forward according to the nexthops specified.
+
+.. clicmd:: match ip-protocol [tcp|udp]
+
+   When a incoming packet matches the specified ip protocol, take the
+   packet and forward according to the nexthops specified.
+
 .. clicmd:: match mark (1-4294967295)
 
    Select the mark to match.  This is a linux only command and if attempted
index 83d19d61880e768763fe65000b6074ce95d2ee4e..899a6b007874aea3fc9288b59207b8672cc88e4c 100644 (file)
@@ -93,20 +93,22 @@ Certain signals have special meanings to *pimd*.
    down. This command is vrf aware, to configure for a vrf, enter the vrf
    submode.
 
-.. clicmd:: ip pim join-prune-interval (60-600)
+.. clicmd:: ip pim join-prune-interval (1-65535)
 
    Modify the join/prune interval that pim uses to the new value. Time is
    specified in seconds. This command is vrf aware, to configure for a vrf,
-   enter the vrf submode.
+   enter the vrf submode.  The default time is 60 seconds.  If you enter
+   a value smaller than 60 seconds be aware that this can and will affect
+   convergence at scale.
 
-.. clicmd:: ip pim keep-alive-timer (31-60000)
+.. clicmd:: ip pim keep-alive-timer (1-65535)
 
-   Modify the time out value for a S,G flow from 31-60000 seconds. 31 seconds
-   is chosen for a lower bound because some hardware platforms cannot see data
+   Modify the time out value for a S,G flow from 1-60000 seconds. If choosing
+   a value below 31 seconds be aware that some hardware platforms cannot see data
    flowing in better than 30 second chunks. This command is vrf aware, to
    configure for a vrf, enter the vrf submode.
 
-.. clicmd:: ip pim packets (1-100)
+.. clicmd:: ip pim packets (1-255)
 
    When processing packets from a neighbor process the number of packets
    incoming at one time before moving on to the next task. The default value is
@@ -114,7 +116,7 @@ Certain signals have special meanings to *pimd*.
    a large number of pim control packets flowing. This command is vrf aware, to
    configure for a vrf, enter the vrf submode.
 
-.. clicmd:: ip pim register-suppress-time (5-60000)
+.. clicmd:: ip pim register-suppress-time (1-65535)
 
    Modify the time that pim will register suppress a FHR will send register
    notifications to the kernel. This command is vrf aware, to configure for a
@@ -160,7 +162,7 @@ Certain signals have special meanings to *pimd*.
    the existing IGMP general query timer.If no version is provided in the cli,
    it will be considered as default v2 query.This is a hidden command.
 
-.. clicmd:: ip igmp watermark-warn (10-60000)
+.. clicmd:: ip igmp watermark-warn (1-65535)
 
    Configure watermark warning generation for an igmp group limit. Generates
    warning once the configured group limit is reached while adding new groups.
@@ -199,7 +201,7 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
    Set the DR Priority for the interface. This command is useful to allow the
    user to influence what node becomes the DR for a lan segment.
 
-.. clicmd:: ip pim hello (1-180) (1-180)
+.. clicmd:: ip pim hello (1-65535) (1-65535)
 
    Set the pim hello and hold interval for a interface.
 
@@ -225,11 +227,11 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
 
    Join multicast group or source-group on an interface.
 
-.. clicmd:: ip igmp query-interval (1-1800)
+.. clicmd:: ip igmp query-interval (1-65535)
 
    Set the IGMP query interval that PIM will use.
 
-.. clicmd:: ip igmp query-max-response-time (10-250)
+.. clicmd:: ip igmp query-max-response-time (1-65535)
 
    Set the IGMP query response timeout value. If an report is not returned in
    the specified time we will assume the S,G or \*,G has timed out.
@@ -244,12 +246,12 @@ is in a vrf, enter the interface command with the vrf keyword at the end.
    or IGMP report is received on this interface and the Group is denied by the
    prefix-list, PIM will ignore the join or report.
 
-.. clicmd:: ip igmp last-member-query-count (1-7)
+.. clicmd:: ip igmp last-member-query-count (1-255)
 
    Set the IGMP last member query count. The default value is 2. 'no' form of
    this command is used to to configure back to the default value.
 
-.. clicmd:: ip igmp last-member-query-interval (1-255)
+.. clicmd:: ip igmp last-member-query-interval (1-65535)
 
    Set the IGMP last member query interval in deciseconds. The default value is
    10 deciseconds. 'no' form of this command is used to to configure back to the
@@ -317,17 +319,17 @@ MSDP can be setup in different ways:
 
 Commands available for MSDP:
 
-.. clicmd:: ip msdp timers (2-600) (3-600) [(1-600)]
+.. clicmd:: ip msdp timers (1-65535) (1-65535) [(1-65535)]
 
    Configure global MSDP timers.
 
-   First value is the keep-alive interval and it must be less than the
-   second value which is hold-time. This configures the interval in
-   seconds between keep-alive messages. The default value is 60 seconds.
+   First value is the keep-alive interval. This configures the interval in
+   seconds between keep-alive messages. The default value is 60 seconds. It
+   should be less than the remote hold time.
 
-   Second value is the hold-time and it must be greater than the keep-alive
-   interval. This configures the interval in seconds before closing a non
-   responding connection. The default value is 75.
+   Second value is the hold-time. This configures the interval in seconds before
+   closing a non responding connection. The default value is 75. This value
+   should be greater than the remote keep alive time.
 
    Third value is the connection retry interval and it is optional. This
    configures the interval between connection attempts. The default value
index 3cb83cc6524caf6124c6a328258b61eaff0f8237..2714b81dbedf73038f9b22953090766bef4bad40 100644 (file)
@@ -90,11 +90,13 @@ cont
 
 .. _route-map-show-command:
 
-.. clicmd:: show route-map [WORD]
+.. clicmd:: show route-map [WORD] [json]
 
    Display data about each daemons knowledge of individual route-maps.
    If WORD is supplied narrow choice to that particular route-map.
 
+   If the ``json`` option is specified, output is displayed in JSON format.
+
 .. _route-map-clear-counter-command:
 
 .. clicmd:: clear route-map counter [WORD]
index 36548011009c2ebdd4fa62ae8a632fd157ae1960..79036320b824fc0de218e714d34c024609031921 100644 (file)
@@ -222,7 +222,7 @@ Link Parameters Commands
    Bandwidth for each 0-7 priority and Admin Group (ISIS) or Resource
    Class/Color (OSPF).
 
-   Note that BANDIWDTH is specified in IEEE floating point format and express
+   Note that BANDWIDTH is specified in IEEE floating point format and express
    in Bytes/second.
 
 .. clicmd:: delay (0-16777215) [min (0-16777215) | max (0-16777215)]
@@ -908,10 +908,11 @@ IPv6 example for OSPFv3.
 
 .. note::
 
-   For both IPv4 and IPv6, the IP address has to exist at the point the
-   route-map is created.  Be wary of race conditions if the interface is
-   not created at startup.  On Debian, FRR might start before ifupdown
-   completes. Consider a reboot test.
+   For both IPv4 and IPv6, the IP address has to exist on some interface when
+   the route is getting installed into the system. Otherwise, kernel rejects
+   the route. To solve the problem of disappearing IPv6 addresses when the
+   interface goes down, use ``net.ipv6.conf.all.keep_addr_on_down``
+   :ref:`sysctl option <zebra-sysctl>`.
 
 .. clicmd:: zebra route-map delay-timer (0-600)
 
@@ -1139,6 +1140,10 @@ zebra Terminal Mode Commands
    Display detailed information about a route. If [nexthop-group] is
    included, it will display the nexthop group ID the route is using as well.
 
+.. clicmd:: show interface [NAME] [{vrf VRF|brief}] [json]
+
+.. clicmd:: show interface [NAME] [{vrf all|brief}] [json]
+
 .. clicmd:: show interface [NAME] [{vrf VRF|brief}] [nexthop-group]
 
 .. clicmd:: show interface [NAME] [{vrf all|brief}] [nexthop-group]
@@ -1148,6 +1153,8 @@ zebra Terminal Mode Commands
    detailed information about that single interface. If [nexthop-group] is
    specified, it will display nexthop groups pointing out that interface.
 
+   If the ``json`` option is specified, output is displayed in JSON format.
+
 .. clicmd:: show ip prefix-list [NAME]
 
 .. clicmd:: show route-map [NAME]
@@ -1232,6 +1239,8 @@ For protocols requiring an IPv6 router-id, the following commands are available:
 
    Display the user configured IPv6 router-id.
 
+.. _zebra-sysctl:
+
 Expected sysctl settings
 ========================
 
index 8fc36c0e5f10dca4e6b33366ea11c1b4b69d09d9..79ae31567933623c1bebab573869044f52c9281c 100644 (file)
@@ -1,3 +1,26 @@
+# syntax=docker/dockerfile:1
+
+# Create a basic stage set up to build APKs
+FROM alpine:3.13 as alpine-builder
+RUN apk add \
+               --update-cache \
+               abuild \
+               alpine-conf \
+               alpine-sdk \
+       && setup-apkcache /var/cache/apk \
+       && mkdir -p /pkgs/apk \
+       && echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
+RUN adduser -D -G abuild builder && su builder -c 'abuild-keygen -a -n'
+
+# This stage builds a libyang APK from source
+FROM alpine-builder as libyang-builder
+RUN mkdir -p /libyang && chown -R builder /pkgs /libyang
+COPY docker/alpine/libyang/ /libyang
+USER builder
+RUN cd /libyang \
+       && abuild checksum \
+       && abuild -r -P /pkgs/apk
+
 # This stage builds a dist tarball from the source
 FROM alpine:3.13 as source-builder
 
@@ -9,8 +32,15 @@ RUN source /src/alpine/APKBUILD.in \
                --update-cache \
                $makedepends \
                gzip \
+               py-pip \
        && pip install pytest
 
+RUN mkdir -p /pkgs/apk
+COPY --from=libyang-builder /pkgs/apk/ /pkgs/apk/
+RUN apk add \
+               --no-cache \
+               --allow-untrusted /pkgs/apk/*/*.apk
+
 COPY . /src
 ARG PKGVER
 RUN cd /src \
@@ -20,25 +50,17 @@ RUN cd /src \
                --with-pkg-extra-version="_git$PKGVER" \
        && make dist
 
-# This stage builds an apk from the dist tarball
-FROM alpine:3.13 as alpine-builder
-# Don't use nocache here so that abuild can use the cache
-RUN apk add \
-               --update-cache \
-               abuild \
-               alpine-conf \
-               alpine-sdk \
-               py-pip \
-       && pip install pytest \
-       && setup-apkcache /var/cache/apk \
-       && mkdir -p /pkgs/apk \
-       && echo 'builder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
-
+# This stage builds an APK from the dist tarball
+FROM alpine-builder as frr-apk-builder
+COPY --from=libyang-builder /pkgs/apk/ /pkgs/apk/
 COPY --from=source-builder /src/frr-*.tar.gz /src/alpine/* /dist/
-RUN adduser -D -G abuild builder && chown -R builder /dist /pkgs
+RUN find /pkgs/apk -type f -name APKINDEX.tar.gz -delete
+RUN apk add \
+               --no-cache \
+               --allow-untrusted /pkgs/apk/*/*.apk
+RUN chown -R builder /dist /pkgs
 USER builder
 RUN cd /dist \
-       && abuild-keygen -a -n \
        && abuild checksum \
        && git init \
        && abuild -r -P /pkgs/apk
@@ -46,7 +68,7 @@ RUN cd /dist \
 # This stage installs frr from the apk
 FROM alpine:3.13
 RUN mkdir -p /pkgs/apk
-COPY --from=alpine-builder /pkgs/apk/ /pkgs/apk/
+COPY --from=frr-apk-builder /pkgs/apk/ /pkgs/apk/
 RUN apk add \
                --no-cache \
                --update-cache \
index c20df42e8e716a4a1dcc7a45fa2aa174a8e6260f..698f4f93c9da7b521d93115b78900e5e070afd36 100755 (executable)
@@ -1,4 +1,18 @@
 #!/bin/ash
 
+if [ -r "/lib/lsb/init-functions" ]; then
+        . /lib/lsb/init-functions
+else
+        log_success_msg() {
+                echo "$@"
+        }
+        log_warning_msg() {
+                echo "$@" >&2
+        }
+        log_failure_msg() {
+                echo "$@" >&2
+        }
+fi
+
 source /usr/lib/frr/frrcommon.sh
 /usr/lib/frr/watchfrr $(daemon_list)
diff --git a/docker/alpine/libyang/10-remove-non-standard-headers.patch b/docker/alpine/libyang/10-remove-non-standard-headers.patch
new file mode 100644 (file)
index 0000000..18812b5
--- /dev/null
@@ -0,0 +1,298 @@
+From 8f4907590afbe3eafabcf5b461c0ae51b65c3a37 Mon Sep 17 00:00:00 2001
+From: Michal Vasko <mvasko@cesnet.cz>
+Date: Thu, 10 Jun 2021 15:07:02 +0200
+Subject: [PATCH] libyang BUGFIX do not include non-standard headers
+
+Fixes #1614
+---
+ src/context.c                            | 1 -
+ src/diff.c                               | 1 -
+ src/log.c                                | 1 -
+ src/out.c                                | 1 -
+ src/plugins_types.c                      | 1 -
+ src/plugins_types/bits.c                 | 1 -
+ src/plugins_types/date_and_time.c        | 1 -
+ src/plugins_types/identityref.c          | 1 -
+ src/plugins_types/integer.c              | 1 -
+ src/plugins_types/ipv4_address.c         | 1 -
+ src/plugins_types/ipv4_address_no_zone.c | 1 -
+ src/plugins_types/ipv4_prefix.c          | 1 -
+ src/plugins_types/ipv6_address.c         | 1 -
+ src/plugins_types/ipv6_address_no_zone.c | 1 -
+ src/plugins_types/ipv6_prefix.c          | 1 -
+ src/plugins_types/union.c                | 1 -
+ src/schema_compile_node.c                | 1 -
+ src/tree_data_helpers.c                  | 1 -
+ src/tree_schema.c                        | 1 -
+ src/validation.c                         | 1 -
+ src/xpath.c                              | 1 -
+ tools/re/main.c                          | 1 -
+ 22 files changed, 22 deletions(-)
+
+diff --git a/src/context.c b/src/context.c
+index eb671255..ac62cac5 100644
+--- a/src/context.c
++++ b/src/context.c
+@@ -17,7 +17,6 @@
+ #define _XOPEN_SOURCE 1
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #endif
+-#include <sys/cdefs.h>
+ #include "context.h"
+diff --git a/src/diff.c b/src/diff.c
+index b40dd73a..4971c6fe 100644
+--- a/src/diff.c
++++ b/src/diff.c
+@@ -12,7 +12,6 @@
+  *     https://opensource.org/licenses/BSD-3-Clause
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "diff.h"
+diff --git a/src/log.c b/src/log.c
+index 97c7b283..9cd5fd0d 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "log.h"
+diff --git a/src/out.c b/src/out.c
+index 37beb696..898d663a 100644
+--- a/src/out.c
++++ b/src/out.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "out.h"
+ #include "out_internal.h"
+diff --git a/src/plugins_types.c b/src/plugins_types.c
+index 26bac210..a2cf0f38 100644
+--- a/src/plugins_types.c
++++ b/src/plugins_types.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/bits.c b/src/plugins_types/bits.c
+index 9d086ffb..ef87691b 100644
+--- a/src/plugins_types/bits.c
++++ b/src/plugins_types/bits.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/date_and_time.c b/src/plugins_types/date_and_time.c
+index 0d52dbb1..a23caaa9 100644
+--- a/src/plugins_types/date_and_time.c
++++ b/src/plugins_types/date_and_time.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/identityref.c b/src/plugins_types/identityref.c
+index 90546d69..91ddbde2 100644
+--- a/src/plugins_types/identityref.c
++++ b/src/plugins_types/identityref.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/integer.c b/src/plugins_types/integer.c
+index 44e87f99..bf2b7812 100644
+--- a/src/plugins_types/integer.c
++++ b/src/plugins_types/integer.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/ipv4_address.c b/src/plugins_types/ipv4_address.c
+index a95752ea..a7369d6b 100644
+--- a/src/plugins_types/ipv4_address.c
++++ b/src/plugins_types/ipv4_address.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/ipv4_address_no_zone.c b/src/plugins_types/ipv4_address_no_zone.c
+index a17a7efe..1fb34b06 100644
+--- a/src/plugins_types/ipv4_address_no_zone.c
++++ b/src/plugins_types/ipv4_address_no_zone.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/ipv4_prefix.c b/src/plugins_types/ipv4_prefix.c
+index 3108b2c5..6fb93390 100644
+--- a/src/plugins_types/ipv4_prefix.c
++++ b/src/plugins_types/ipv4_prefix.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/ipv6_address.c b/src/plugins_types/ipv6_address.c
+index c0d20fa4..d09425b3 100644
+--- a/src/plugins_types/ipv6_address.c
++++ b/src/plugins_types/ipv6_address.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/ipv6_address_no_zone.c b/src/plugins_types/ipv6_address_no_zone.c
+index c612b663..06bd1891 100644
+--- a/src/plugins_types/ipv6_address_no_zone.c
++++ b/src/plugins_types/ipv6_address_no_zone.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/ipv6_prefix.c b/src/plugins_types/ipv6_prefix.c
+index b3ad34b6..91431fef 100644
+--- a/src/plugins_types/ipv6_prefix.c
++++ b/src/plugins_types/ipv6_prefix.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/plugins_types/union.c b/src/plugins_types/union.c
+index a8ec43b3..89e81c7a 100644
+--- a/src/plugins_types/union.c
++++ b/src/plugins_types/union.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* strdup */
+-#include <sys/cdefs.h>
+ #include "plugins_types.h"
+diff --git a/src/schema_compile_node.c b/src/schema_compile_node.c
+index 424b7f8f..273023de 100644
+--- a/src/schema_compile_node.c
++++ b/src/schema_compile_node.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "schema_compile_node.h"
+diff --git a/src/tree_data_helpers.c b/src/tree_data_helpers.c
+index 488efbbb..2d9ba624 100644
+--- a/src/tree_data_helpers.c
++++ b/src/tree_data_helpers.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include <assert.h>
+ #include <ctype.h>
+diff --git a/src/tree_schema.c b/src/tree_schema.c
+index 93f29796..4a57cc47 100644
+--- a/src/tree_schema.c
++++ b/src/tree_schema.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "tree_schema.h"
+diff --git a/src/validation.c b/src/validation.c
+index b9eda810..e2062256 100644
+--- a/src/validation.c
++++ b/src/validation.c
+@@ -12,7 +12,6 @@
+  *     https://opensource.org/licenses/BSD-3-Clause
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "validation.h"
+diff --git a/src/xpath.c b/src/xpath.c
+index b68a76b8..ea1cdfc9 100644
+--- a/src/xpath.c
++++ b/src/xpath.c
+@@ -12,7 +12,6 @@
+  *     https://opensource.org/licenses/BSD-3-Clause
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include "xpath.h"
+diff --git a/tools/re/main.c b/tools/re/main.c
+index b512ad80..4d8aa99c 100644
+--- a/tools/re/main.c
++++ b/tools/re/main.c
+@@ -13,7 +13,6 @@
+  */
+ #define _GNU_SOURCE /* asprintf, strdup */
+-#include <sys/cdefs.h>
+ #include <errno.h>
+ #include <getopt.h>
+-- 
+2.31.1
+
diff --git a/docker/alpine/libyang/11-utest-dont-parse-dlerror.patch b/docker/alpine/libyang/11-utest-dont-parse-dlerror.patch
new file mode 100644 (file)
index 0000000..054862f
--- /dev/null
@@ -0,0 +1,40 @@
+From 2054431ea3024b177083f09c66c1bb4c3d08b048 Mon Sep 17 00:00:00 2001
+From: Wesley Coakley <w@wesleycoakley.com>
+Date: Wed, 16 Jun 2021 00:30:50 -0400
+Subject: [PATCH] don't attempt to parse dlerror() in utests
+
+---
+ tests/utests/basic/test_plugins.c | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/tests/utests/basic/test_plugins.c b/tests/utests/basic/test_plugins.c
+index fd9e6130..662fd9b4 100644
+--- a/tests/utests/basic/test_plugins.c
++++ b/tests/utests/basic/test_plugins.c
+@@ -36,23 +36,6 @@ static void
+ test_add_invalid(void **state)
+ {
+     assert_int_equal(LY_ESYS, lyplg_add(TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX));
+-
+-#ifdef __APPLE__
+-    CHECK_LOG("Loading \""TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX "\" as a plugin failed "
+-            "(dlopen("TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX ", 2): image not found).", NULL);
+-#else
+-    CHECK_LOG("Loading \""TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX "\" as a plugin failed "
+-            "("TESTS_BIN "/plugins/plugin_does_not_exist" LYPLG_SUFFIX ": cannot open shared object file: "
+-            "No such file or directory).", NULL);
+-#endif
+-
+-    assert_int_equal(LY_EINVAL, lyplg_add(TESTS_BIN "/plugins/plugin_invalid" LYPLG_SUFFIX));
+-#ifndef __APPLE__
+-    /* OS X prints address of the symbol being searched and cmocka doesn't support wildcards in string checking assert */
+-    CHECK_LOG("Processing user type plugin \""TESTS_BIN "/plugins/plugin_invalid"LYPLG_SUFFIX "\" failed, "
+-            "missing type plugins information ("TESTS_BIN "/plugins/plugin_invalid"LYPLG_SUFFIX ": "
+-            "undefined symbol: plugins_types__).", NULL);
+-#endif
+ }
+ static void
+-- 
+2.31.1
+
diff --git a/docker/alpine/libyang/APKBUILD b/docker/alpine/libyang/APKBUILD
new file mode 100755 (executable)
index 0000000..9fa20bf
--- /dev/null
@@ -0,0 +1,46 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Maintainer: Christian Franke <nobody@nowhere.ws>
+pkgname=libyang
+pkgver=2.0.7
+pkgrel=0
+pkgdesc="YANG data modelling language parser and toolkit"
+url="https://github.com/CESNET/libyang"
+arch="all"
+license="BSD-3-Clause-Clear"
+makedepends="bison cmake cmocka-dev flex pcre2-dev"
+checkdepends="expect grep shunit2"
+subpackages="$pkgname-dev $pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/CESNET/libyang/archive/v$pkgver.tar.gz
+       10-remove-non-standard-headers.patch
+       11-utest-dont-parse-dlerror.patch"
+
+# secfixes:
+#   1.0.215-r1:
+#     - CVE-2021-28902
+#     - CVE-2021-28903
+#     - CVE-2021-28904
+#     - CVE-2021-28905
+#     - CVE-2021-28906
+
+build() {
+       if [ "$CBUILD" != "$CHOST" ]; then
+               CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+       fi
+       cmake -B build \
+               -DCMAKE_BUILD_TYPE=None \
+               -DCMAKE_INSTALL_PREFIX=/usr \
+               -DCMAKE_INSTALL_LIBDIR=lib \
+               -DBUILD_SHARED_LIBS=True \
+               -DCMAKE_C_FLAGS="$CFLAGS" \
+               -DENABLE_BUILD_TESTS=ON \
+               "$CMAKE_CROSSOPTS"
+       make -C build
+}
+
+package() {
+       make -C build DESTDIR="$pkgdir" install
+}
+
+sha512sums="edb1d8d372b25ed820fa312e0dc96d4af7c8cd5ddeb785964de73f64774062ea7a5586bb27e2039ad24189d4a2ba04268921ca86e82423fc48647d1d10a2a0a7  libyang-2.0.7.tar.gz
+385008c715e6b0dc9e8f33c9cb550b3af7ee16f056f35d09a4ba01b9e00ddb88940915f93fc608fedd30b4f9a6a1503df414ae0be64b1263681b0ee18e6f4db8  10-remove-non-standard-headers.patch
+b16881d301a6aec68fbe6bfb7ba53a8fcdb4b9eead3b03573e0e2a4a8c3c3d6962db623be14d29c023b5a7ad0f685da1f6033dd9985f7a2914ad2f4da07e60cb  11-utest-dont-parse-dlerror.patch"
index 47de929fc3cb494f2b4ae9ca69446d42483c39f2..533d7de2c282cf104dc8ad7adde4d1cf8baad2a4 100644 (file)
@@ -96,6 +96,7 @@ void eigrp_cli_show_header(struct vty *vty, struct lyd_node *dnode,
 
 void eigrp_cli_show_end_header(struct vty *vty, struct lyd_node *dnode)
 {
+       vty_out(vty, "exit\n");
        vty_out(vty, "!\n");
 }
 
@@ -861,16 +862,6 @@ static int eigrp_config_write(struct vty *vty)
        return written;
 }
 
-static int eigrp_write_interface(struct vty *vty);
-static struct cmd_node eigrp_interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = eigrp_write_interface,
-};
-
-
 static int eigrp_write_interface(struct vty *vty)
 {
        struct lyd_node *dnode;
@@ -919,10 +910,9 @@ eigrp_cli_init(void)
        install_element(EIGRP_NODE, &eigrp_neighbor_cmd);
        install_element(EIGRP_NODE, &eigrp_redistribute_source_metric_cmd);
 
-       vrf_cmd_init(NULL, &eigrpd_privs);
+       vrf_cmd_init(NULL);
 
-       install_node(&eigrp_interface_node);
-       if_cmd_init();
+       if_cmd_init(eigrp_write_interface);
 
        install_element(INTERFACE_NODE, &eigrp_if_delay_cmd);
        install_element(INTERFACE_NODE, &no_eigrp_if_delay_cmd);
index b775c841f025c8c691e3af0b2985693a236d71ce..9acb517d8cf70b30b2c3ab071a2d7bcedea7983b 100644 (file)
@@ -177,7 +177,6 @@ int main(int argc, char **argv, char **envp)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index a645ca2b035f852e07548f85a5718d0e4f58eacf..b5988137e095943855c6a396f96b2f2215413366 100644 (file)
@@ -4,7 +4,7 @@ lib_LTLIBRARIES += fpm/libfrrfpm_pb.la
 endif
 endif
 
-fpm_libfrrfpm_pb_la_LDFLAGS = -version-info 0:0:0
+fpm_libfrrfpm_pb_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
 fpm_libfrrfpm_pb_la_CPPFLAGS = $(AM_CPPFLAGS) $(PROTOBUF_C_CFLAGS)
 fpm_libfrrfpm_pb_la_SOURCES = \
        fpm/fpm.h \
index d9ec365ba841ef37ad16899506dde7142f6e2945..cbebd72323d5e979a7ff8009f8fd42b191f59988 100644 (file)
@@ -2,7 +2,7 @@ if GRPC
 lib_LTLIBRARIES += grpc/libfrrgrpc_pb.la
 endif
 
-grpc_libfrrgrpc_pb_la_LDFLAGS = -version-info 0:0:0
+grpc_libfrrgrpc_pb_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
 grpc_libfrrgrpc_pb_la_CPPFLAGS = $(AM_CPPFLAGS) $(GRPC_CXXFLAGS)
 
 if GRPC
index 74a0d795aba6898da33e99956c85e29875429e03..5888492a5257b450d6518718a80c82a4d6c17b93 100644 (file)
@@ -178,6 +178,13 @@ enum {
        RTM_GETVLAN,
 #define RTM_GETVLAN    RTM_GETVLAN
 
+       RTM_NEWNEXTHOPBUCKET = 116,
+#define RTM_NEWNEXTHOPBUCKET   RTM_NEWNEXTHOPBUCKET
+       RTM_DELNEXTHOPBUCKET,
+#define RTM_DELNEXTHOPBUCKET   RTM_DELNEXTHOPBUCKET
+       RTM_GETNEXTHOPBUCKET,
+#define RTM_GETNEXTHOPBUCKET   RTM_GETNEXTHOPBUCKET
+
        __RTM_MAX,
 #define RTM_MAX                (((__RTM_MAX + 3) & ~3) - 1)
 };
@@ -283,6 +290,7 @@ enum {
 #define RTPROT_MROUTED         17      /* Multicast daemon */
 #define RTPROT_KEEPALIVED      18      /* Keepalived daemon */
 #define RTPROT_BABEL           42      /* Babel daemon */
+#define RTPROT_OPENR           99      /* Open Routing (Open/R) Routes */
 #define RTPROT_BGP             186     /* BGP Routes */
 #define RTPROT_ISIS            187     /* ISIS Routes */
 #define RTPROT_OSPF            188     /* OSPF Routes */
@@ -319,7 +327,11 @@ enum rt_scope_t {
 #define RTM_F_FIB_MATCH                0x2000  /* return full fib lookup match */
 #define RTM_F_OFFLOAD          0x4000  /* route is offloaded */
 #define RTM_F_TRAP             0x8000  /* route is trapping packets */
-#define RTM_F_OFFLOAD_FAILED    0x10000 /* route offload failed */
+#define RTM_F_OFFLOAD_FAILED   0x20000000 /* route offload failed, this value
+                                           * is chosen to avoid conflicts with
+                                           * other flags defined in
+                                           * include/uapi/linux/ipv6_route.h
+                                           */
 
 /* Reserved table identifiers */
 
@@ -397,11 +409,13 @@ struct rtnexthop {
 #define RTNH_F_DEAD            1       /* Nexthop is dead (used by multipath)  */
 #define RTNH_F_PERVASIVE       2       /* Do recursive gateway lookup  */
 #define RTNH_F_ONLINK          4       /* Gateway is forced on link    */
-#define RTNH_F_OFFLOAD         8       /* offloaded route */
+#define RTNH_F_OFFLOAD         8       /* Nexthop is offloaded */
 #define RTNH_F_LINKDOWN                16      /* carrier-down on nexthop */
 #define RTNH_F_UNRESOLVED      32      /* The entry is unresolved (ipmr) */
+#define RTNH_F_TRAP            64      /* Nexthop is trapping packets */
 
-#define RTNH_COMPARE_MASK      (RTNH_F_DEAD | RTNH_F_LINKDOWN | RTNH_F_OFFLOAD)
+#define RTNH_COMPARE_MASK      (RTNH_F_DEAD | RTNH_F_LINKDOWN | \
+                                RTNH_F_OFFLOAD | RTNH_F_TRAP)
 
 /* Macros to handle hexthops */
 
@@ -767,12 +781,18 @@ enum {
 #define TA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct tcamsg))
 /* tcamsg flags stored in attribute TCA_ROOT_FLAGS
  *
- * TCA_FLAG_LARGE_DUMP_ON user->kernel to request for larger than TCA_ACT_MAX_PRIO
- * actions in a dump. All dump responses will contain the number of actions
- * being dumped stored in for user app's consumption in TCA_ROOT_COUNT
+ * TCA_ACT_FLAG_LARGE_DUMP_ON user->kernel to request for larger than
+ * TCA_ACT_MAX_PRIO actions in a dump. All dump responses will contain the
+ * number of actions being dumped stored in for user app's consumption in
+ * TCA_ROOT_COUNT
+ *
+ * TCA_ACT_FLAG_TERSE_DUMP user->kernel to request terse (brief) dump that only
+ * includes essential action info (kind, index, etc.)
  *
  */
 #define TCA_FLAG_LARGE_DUMP_ON         (1 << 0)
+#define TCA_ACT_FLAG_LARGE_DUMP_ON     TCA_FLAG_LARGE_DUMP_ON
+#define TCA_ACT_FLAG_TERSE_DUMP                (1 << 1)
 
 /* New extended info filters for IFLA_EXT_MASK */
 #define RTEXT_FILTER_VF                (1 << 0)
@@ -780,6 +800,8 @@ enum {
 #define RTEXT_FILTER_BRVLAN_COMPRESSED (1 << 2)
 #define        RTEXT_FILTER_SKIP_STATS (1 << 3)
 #define RTEXT_FILTER_MRP       (1 << 4)
+#define RTEXT_FILTER_CFM_CONFIG        (1 << 5)
+#define RTEXT_FILTER_CFM_STATUS        (1 << 6)
 
 /* End of information exported to user level */
 
index bccb9065f4cdfefd9c5728689bb59ef3623023fe..6f4a91be67d377391cbb3eb246c9c80ac32c6181 100644 (file)
@@ -1290,7 +1290,7 @@ static int isis_interface_config_write(struct vty *vty)
                        write += hook_call(isis_circuit_config_write,
                                           circuit, vty);
                }
-               vty_endframe(vty, "!\n");
+               vty_endframe(vty, "exit\n!\n");
        }
 
        return write;
@@ -1430,14 +1430,6 @@ ferr_r isis_circuit_passwd_hmac_md5_set(struct isis_circuit *circuit,
                                       passwd);
 }
 
-struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = isis_interface_config_write,
-};
-
 void isis_circuit_circ_type_set(struct isis_circuit *circuit, int circ_type)
 {
        if (circuit->circ_type == circ_type)
@@ -1537,8 +1529,7 @@ void isis_circuit_init(void)
        hook_register_prio(if_del, 0, isis_if_delete_hook);
 
        /* Install interface node */
-       install_node(&interface_node);
-       if_cmd_init();
+       if_cmd_init(isis_interface_config_write);
        if_zapi_callbacks(isis_ifp_create, isis_ifp_up,
                          isis_ifp_down, isis_ifp_destroy);
 }
index ef86d47b2298da0ce935cf90e543ad2251b5c215..70ec66fd7feb661a629d4d3cfd6f82ec46158fed 100644 (file)
@@ -146,6 +146,11 @@ void cli_show_router_isis(struct vty *vty, struct lyd_node *dnode,
        vty_out(vty, "\n");
 }
 
+void cli_show_router_isis_end(struct vty *vty, struct lyd_node *dnode)
+{
+       vty_out(vty, "exit\n");
+}
+
 /*
  * XPath: /frr-interface:lib/interface/frr-isisd:isis/
  * XPath: /frr-interface:lib/interface/frr-isisd:isis/ipv4-routing
index 5c013d634b72ea68fe37f4aa90d6648cd52bc7a7..e3de6f08c04918decd8c66d3343de92ae7ec1579 100644 (file)
@@ -641,7 +641,7 @@ void lsp_insert(struct lspdb_head *head, struct isis_lsp *lsp)
 }
 
 /*
- * Build a list of LSPs with non-zero ht bounded by start and stop ids
+ * Build a list of LSPs with non-zero ht and seqno bounded by start and stop ids
  */
 void lsp_build_list_nonzero_ht(struct lspdb_head *head, const uint8_t *start_id,
                               const uint8_t *stop_id, struct list *list)
@@ -657,7 +657,7 @@ void lsp_build_list_nonzero_ht(struct lspdb_head *head, const uint8_t *start_id,
                           ISIS_SYS_ID_LEN + 2) > 0)
                        break;
 
-               if (lsp->hdr.rem_lifetime)
+               if (lsp->hdr.rem_lifetime && lsp->hdr.seqno)
                        listnode_add(list, lsp);
        }
 }
index acfa1a29d41ef02da2fbeb8b0eb3923c38a0c803..6deeebda95b4cd772785f75b7336f0a381633c9a 100644 (file)
@@ -231,7 +231,6 @@ int main(int argc, char **argv, char **envp)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index ecad16229c18b63c2b0aadc9638618fc6c6cc443..f62a8d481335175772ed80111ad279734d409ac6 100644 (file)
@@ -32,6 +32,7 @@ const struct frr_yang_module_info frr_isisd_info = {
                        .xpath = "/frr-isisd:isis/instance",
                        .cbs = {
                                .cli_show = cli_show_router_isis,
+                               .cli_show_end = cli_show_router_isis_end,
                                .create = isis_instance_create,
                                .destroy = isis_instance_destroy,
                        },
index 0c2f7b6b7e5acecace3d54c560be82429d6fb50c..4680dd5ded9cb455253d875a57b5a858e4bac3e1 100644 (file)
@@ -415,6 +415,7 @@ void isis_instance_segment_routing_prefix_sid_map_prefix_sid_apply_finish(
 /* Optional 'cli_show' callbacks. */
 void cli_show_router_isis(struct vty *vty, struct lyd_node *dnode,
                          bool show_defaults);
+void cli_show_router_isis_end(struct vty *vty, struct lyd_node *dnode);
 void cli_show_ip_isis_ipv4(struct vty *vty, struct lyd_node *dnode,
                           bool show_defaults);
 void cli_show_ip_isis_ipv6(struct vty *vty, struct lyd_node *dnode,
index 43efa0164daf5fecb801e90c45e268c0d941773c..65764654ee859be4f5d456a78440afba0c66999c 100644 (file)
@@ -701,7 +701,7 @@ void isis_vrf_init(void)
        vrf_init(isis_vrf_new, isis_vrf_enable, isis_vrf_disable,
                 isis_vrf_delete, isis_vrf_enable);
 
-       vrf_cmd_init(NULL, &isisd_privs);
+       vrf_cmd_init(NULL);
 }
 
 void isis_terminate()
@@ -3011,6 +3011,8 @@ static int isis_config_write(struct vty *vty)
 
                        write += area_write_mt_settings(area, vty);
                        write += fabricd_write_settings(area, vty);
+
+                       vty_out(vty, "exit\n");
                }
        }
 
index 4243bd60cf560246acae7e7bd55c8e09a33afac3..3e5816c16b9a04156f71ff05b29a6a4e92d0f0dc 100644 (file)
@@ -139,7 +139,7 @@ nodist_isisd_isisd_SOURCES = \
 
 isisd_isisd_snmp_la_SOURCES = isisd/isis_snmp.c
 isisd_isisd_snmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
-isisd_isisd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+isisd_isisd_snmp_la_LDFLAGS = $(MODULE_LDFLAGS)
 isisd_isisd_snmp_la_LIBADD = lib/libfrrsnmp.la
 
 # Building fabricd
index b35d3dfa00793e6d5e2b9bafa0a8049d3d892417..fbd718bb099d86eed46e9f5fc4d4b9ffdda0e3e9 100644 (file)
@@ -133,6 +133,8 @@ ldp_af_iface_config_write(struct vty *vty, int af)
                    ia->hello_interval != 0)
                        vty_out (vty, "   discovery hello interval %u\n",
                            ia->hello_interval);
+
+               vty_out (vty, "  exit\n");
        }
 }
 
@@ -314,6 +316,7 @@ ldp_config_write(struct vty *vty)
        ldp_af_config_write(vty, AF_INET, ldpd_conf, &ldpd_conf->ipv4);
        ldp_af_config_write(vty, AF_INET6, ldpd_conf, &ldpd_conf->ipv6);
        vty_out (vty, " !\n");
+       vty_out (vty, "exit\n");
        vty_out (vty, "!\n");
 
        return (1);
@@ -353,6 +356,8 @@ ldp_l2vpn_pw_config_write(struct vty *vty, struct l2vpn_pw *pw)
                          "  ! Incomplete config, specify a neighbor lsr-id\n");
        if (missing_pwid)
                vty_out (vty,"  ! Incomplete config, specify a pw-id\n");
+
+       vty_out (vty, " exit\n");
 }
 
 static int
@@ -383,6 +388,7 @@ ldp_l2vpn_config_write(struct vty *vty)
                        ldp_l2vpn_pw_config_write(vty, pw);
 
                vty_out (vty, " !\n");
+               vty_out (vty, "exit\n");
                vty_out (vty, "!\n");
        }
 
index 800b954d65253769e009a5bb5873443eb405f46f..000d1a33019202b656bc667ba789e6322798fc1d 100644 (file)
@@ -304,7 +304,6 @@ main(int argc, char *argv[])
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index b7e2ab72d6b33fbd74bfdb10c4a73d04bec3c518..083effb703ad80831de2816f951cdf9addff6193 100644 (file)
@@ -65,5 +65,5 @@ ldpd_ldpd_LDADD = ldpd/libldp.a lib/libfrr.la $(LIBCAP)
 
 ldpd_ldpd_snmp_la_SOURCES = ldpd/ldp_snmp.c
 ldpd_ldpd_snmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
-ldpd_ldpd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+ldpd_ldpd_snmp_la_LDFLAGS = $(MODULE_LDFLAGS)
 ldpd_ldpd_snmp_la_LIBADD = lib/libfrrsnmp.la
index 1a45ea1ff5ddba2d644963f10dad11fee173aa0f..ea363b7ca4a3404faf1f52d07b16615424eb44ab 100644 (file)
--- a/lib/bfd.c
+++ b/lib/bfd.c
@@ -366,6 +366,9 @@ int zclient_bfd_command(struct zclient *zc, struct bfd_session_arg *args)
                if (args->ifnamelen)
                        stream_put(s, args->ifname, args->ifnamelen);
        }
+
+       /* Send the C bit indicator. */
+       stream_putc(s, args->cbit);
 #endif /* HAVE_BFDD */
 
        /* Finish the message by writing the size. */
index 9dac60599c27ad0c18609d1120ea0919422f4dbc..fcaf466c655e73e469943731bcc4921561841880 100644 (file)
@@ -160,6 +160,9 @@ static bool vty_check_node_for_xpath_decrement(enum node_type target_node,
                || node == BGP_FLOWSPECV6_NODE))
                return false;
 
+       if (target_node == INTERFACE_NODE && node == LINK_PARAMS_NODE)
+               return false;
+
        return true;
 }
 
@@ -849,96 +852,13 @@ char **cmd_complete_command(vector vline, struct vty *vty, int *status)
 /* MUST eventually converge on CONFIG_NODE */
 enum node_type node_parent(enum node_type node)
 {
-       enum node_type ret;
+       struct cmd_node *cnode;
 
        assert(node > CONFIG_NODE);
 
-       switch (node) {
-       case BGP_VPNV4_NODE:
-       case BGP_VPNV6_NODE:
-       case BGP_FLOWSPECV4_NODE:
-       case BGP_FLOWSPECV6_NODE:
-       case BGP_VRF_POLICY_NODE:
-       case BGP_VNC_DEFAULTS_NODE:
-       case BGP_VNC_NVE_GROUP_NODE:
-       case BGP_VNC_L2_GROUP_NODE:
-       case BGP_IPV4_NODE:
-       case BGP_IPV4M_NODE:
-       case BGP_IPV4L_NODE:
-       case BGP_IPV6_NODE:
-       case BGP_IPV6M_NODE:
-       case BGP_EVPN_NODE:
-       case BGP_IPV6L_NODE:
-       case BMP_NODE:
-               ret = BGP_NODE;
-               break;
-       case BGP_EVPN_VNI_NODE:
-               ret = BGP_EVPN_NODE;
-               break;
-       case KEYCHAIN_KEY_NODE:
-               ret = KEYCHAIN_NODE;
-               break;
-       case LINK_PARAMS_NODE:
-               ret = INTERFACE_NODE;
-               break;
-       case LDP_IPV4_NODE:
-       case LDP_IPV6_NODE:
-               ret = LDP_NODE;
-               break;
-       case LDP_IPV4_IFACE_NODE:
-               ret = LDP_IPV4_NODE;
-               break;
-       case LDP_IPV6_IFACE_NODE:
-               ret = LDP_IPV6_NODE;
-               break;
-       case LDP_PSEUDOWIRE_NODE:
-               ret = LDP_L2VPN_NODE;
-               break;
-       case BFD_PEER_NODE:
-               ret = BFD_NODE;
-               break;
-       case BFD_PROFILE_NODE:
-               ret = BFD_NODE;
-               break;
-       case SR_TRAFFIC_ENG_NODE:
-               ret = SEGMENT_ROUTING_NODE;
-               break;
-       case SR_SEGMENT_LIST_NODE:
-               ret = SR_TRAFFIC_ENG_NODE;
-               break;
-       case SR_POLICY_NODE:
-               ret = SR_TRAFFIC_ENG_NODE;
-               break;
-       case SR_CANDIDATE_DYN_NODE:
-               ret = SR_POLICY_NODE;
-               break;
-       case PCEP_NODE:
-               ret = SR_TRAFFIC_ENG_NODE;
-               break;
-       case PCEP_PCE_CONFIG_NODE:
-               ret = PCEP_NODE;
-               break;
-       case PCEP_PCE_NODE:
-               ret = PCEP_NODE;
-               break;
-       case PCEP_PCC_NODE:
-               ret = PCEP_NODE;
-               break;
-       case SRV6_NODE:
-               ret = SEGMENT_ROUTING_NODE;
-               break;
-       case SRV6_LOCS_NODE:
-               ret = SRV6_NODE;
-               break;
-       case SRV6_LOC_NODE:
-               ret = SRV6_LOCS_NODE;
-               break;
-       default:
-               ret = CONFIG_NODE;
-               break;
-       }
+       cnode = vector_lookup(cmdvec, node);
 
-       return ret;
+       return cnode->parent_node;
 }
 
 /* Execute command by argument vline vector. */
@@ -2419,28 +2339,30 @@ DEFUN(find,
 }
 
 #if defined(DEV_BUILD) && defined(HAVE_SCRIPTING)
-DEFUN(script,
-      script_cmd,
-      "script SCRIPT",
-      "Test command - execute a script\n"
-      "Script name (same as filename in /etc/frr/scripts/\n")
+DEFUN(script, script_cmd, "script SCRIPT FUNCTION",
+      "Test command - execute a function in a script\n"
+      "Script name (same as filename in /etc/frr/scripts/)\n"
+      "Function name (in the script)\n")
 {
        struct prefix p;
 
        (void)str2prefix("1.2.3.4/24", &p);
-       struct frrscript *fs = frrscript_load(argv[1]->arg, NULL);
+       struct frrscript *fs = frrscript_new(argv[1]->arg);
 
-       if (fs == NULL) {
-               vty_out(vty, "Script '/etc/frr/scripts/%s.lua' not found\n",
-                       argv[1]->arg);
-       } else {
-               int ret = frrscript_call(fs, ("p", &p));
-               char buf[40];
-               prefix2str(&p, buf, sizeof(buf));
-               vty_out(vty, "p: %s\n", buf);
-               vty_out(vty, "Script result: %d\n", ret);
+       if (frrscript_load(fs, argv[2]->arg, NULL)) {
+               vty_out(vty,
+                       "/etc/frr/scripts/%s.lua or function '%s' not found\n",
+                       argv[1]->arg, argv[2]->arg);
        }
 
+       int ret = frrscript_call(fs, argv[2]->arg, ("p", &p));
+       char buf[40];
+       prefix2str(&p, buf, sizeof(buf));
+       vty_out(vty, "p: %s\n", buf);
+       vty_out(vty, "Script result: %d\n", ret);
+
+       frrscript_delete(fs);
+
        return CMD_SUCCESS;
 }
 #endif
index 2b50bc2374e890ddf79a879d3e6b98ecedc5cbcc..c76fc1e8eb5a68d1190446a9a97ab56e91e23e37 100644 (file)
@@ -389,6 +389,7 @@ struct cmd_node {
 #define SRTE_STR "SR-TE information\n"
 #define SRTE_COLOR_STR "SR-TE Color information\n"
 #define NO_STR "Negate a command or set its defaults\n"
+#define IGNORED_IN_NO_STR "Ignored value in no form\n"
 #define REDIST_STR "Redistribute information from another routing protocol\n"
 #define CLEAR_STR "Reset functions\n"
 #define RIP_STR "RIP information\n"
index b47aa3d7950a1cca63446de099f645b0f226a282..1c306893ad816f08d5ff31e45204f84253d28167 100644 (file)
@@ -860,6 +860,7 @@ static PyObject *elffile_find_note(PyObject *self, PyObject *args)
        Py_RETURN_NONE;
 }
 
+#ifdef HAVE_ELF_GETDATA_RAWCHUNK
 static bool elffile_virt2file(struct elffile *w, GElf_Addr virt,
                              GElf_Addr *offs)
 {
@@ -884,6 +885,7 @@ static bool elffile_virt2file(struct elffile *w, GElf_Addr virt,
 
        return false;
 }
+#endif /* HAVE_ELF_GETDATA_RAWCHUNK */
 
 static PyObject *elffile_subscript(PyObject *self, PyObject *key)
 {
@@ -1016,6 +1018,7 @@ static PyTypeObject typeobj_elffile = {
        .tp_methods = methods_elffile,
 };
 
+#ifdef HAVE_ELF_GETDATA_RAWCHUNK
 static char *elfdata_strptr(Elf_Data *data, size_t offset)
 {
        char *p;
@@ -1124,6 +1127,7 @@ static void elffile_add_dynreloc(struct elffile *w, Elf_Data *reldata,
        }
 
 }
+#endif /* HAVE_ELF_GETDATA_RAWCHUNK */
 
 /* primary (only, really) entry point to anything in this module */
 static PyObject *elffile_load(PyTypeObject *type, PyObject *args,
index 72a66d85ad7d073a323326fcbd35b7fc13cd8ad4..744ea9c480a2ac8497edaa24ac2779412fdaa24d 100644 (file)
@@ -30,6 +30,7 @@
 #include "routemap.h"
 #include "libfrr.h"
 #include "northbound_cli.h"
+#include "json.h"
 
 DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST, "Access List");
 DEFINE_MTYPE_STATIC(LIB, ACCESS_LIST_STR, "Access List Str");
@@ -443,71 +444,158 @@ void access_list_filter_add(struct access_list *access,
   host                 A single host address
 */
 
-static void config_write_access_zebra(struct vty *, struct filter *);
-static void config_write_access_cisco(struct vty *, struct filter *);
+static void config_write_access_zebra(struct vty *, struct filter *,
+                                     json_object *);
+static void config_write_access_cisco(struct vty *, struct filter *,
+                                     json_object *);
+
+static const char *filter_type2str(struct filter *filter)
+{
+       if (filter->cisco) {
+               if (filter->u.cfilter.extended)
+                       return "Extended";
+               else
+                       return "Standard";
+       } else
+               return "Zebra";
+}
 
 /* show access-list command. */
-static int filter_show(struct vty *vty, const char *name, afi_t afi)
+static int filter_show(struct vty *vty, const char *name, afi_t afi,
+                      bool use_json)
 {
        struct access_list *access;
        struct access_master *master;
        struct filter *mfilter;
        struct filter_cisco *filter;
-       int write = 0;
+       bool first;
+       json_object *json = NULL;
+       json_object *json_proto = NULL;
 
        master = access_master_get(afi);
-       if (master == NULL)
+       if (master == NULL) {
+               if (use_json)
+                       vty_out(vty, "{}\n");
                return 0;
+       }
+
+       if (use_json)
+               json = json_object_new_object();
 
        /* Print the name of the protocol */
-       vty_out(vty, "%s:\n", frr_protoname);
+       if (json) {
+               json_proto = json_object_new_object();
+               json_object_object_add(json, frr_protoname, json_proto);
+       } else
+               vty_out(vty, "%s:\n", frr_protoname);
 
        for (access = master->str.head; access; access = access->next) {
+               json_object *json_acl = NULL;
+               json_object *json_rules = NULL;
+
                if (name && strcmp(access->name, name) != 0)
                        continue;
 
-               write = 1;
+               first = true;
 
                for (mfilter = access->head; mfilter; mfilter = mfilter->next) {
+                       json_object *json_rule = NULL;
+
                        filter = &mfilter->u.cfilter;
 
-                       if (write) {
-                               vty_out(vty, "%s %s access list %s\n",
-                                       mfilter->cisco ? (filter->extended
-                                                                 ? "Extended"
-                                                                 : "Standard")
-                                                      : "Zebra",
-                                       (afi == AFI_IP)
-                                               ? ("IP")
-                                               : ((afi == AFI_IP6) ? ("IPv6 ")
-                                                                   : ("MAC ")),
-                                       access->name);
-                               write = 0;
+                       if (first) {
+                               const char *type = filter_type2str(mfilter);
+
+                               if (json) {
+                                       json_acl = json_object_new_object();
+                                       json_object_object_add(json_proto,
+                                                              access->name,
+                                                              json_acl);
+
+                                       json_object_string_add(json_acl, "type",
+                                                              type);
+                                       json_object_string_add(json_acl,
+                                                              "addressFamily",
+                                                              afi2str(afi));
+                                       json_rules = json_object_new_array();
+                                       json_object_object_add(
+                                               json_acl, "rules", json_rules);
+                               } else {
+                                       vty_out(vty, "%s %s access list %s\n",
+                                               type,
+                                               (afi == AFI_IP)
+                                                       ? ("IP")
+                                                       : ((afi == AFI_IP6)
+                                                                  ? ("IPv6 ")
+                                                                  : ("MAC ")),
+                                               access->name);
+                               }
+
+                               first = false;
                        }
 
-                       vty_out(vty, "    seq %" PRId64, mfilter->seq);
-                       vty_out(vty, " %s%s", filter_type_str(mfilter),
-                               mfilter->type == FILTER_DENY ? "  " : "");
+                       if (json) {
+                               json_rule = json_object_new_object();
+                               json_object_array_add(json_rules, json_rule);
+
+                               json_object_int_add(json_rule, "sequenceNumber",
+                                                   mfilter->seq);
+                               json_object_string_add(
+                                       json_rule, "filterType",
+                                       filter_type_str(mfilter));
+                       } else {
+                               vty_out(vty, "    seq %" PRId64, mfilter->seq);
+                               vty_out(vty, " %s%s", filter_type_str(mfilter),
+                                       mfilter->type == FILTER_DENY ? "  "
+                                                                    : "");
+                       }
 
                        if (!mfilter->cisco)
-                               config_write_access_zebra(vty, mfilter);
+                               config_write_access_zebra(vty, mfilter,
+                                                         json_rule);
                        else if (filter->extended)
-                               config_write_access_cisco(vty, mfilter);
+                               config_write_access_cisco(vty, mfilter,
+                                                         json_rule);
                        else {
-                               if (filter->addr_mask.s_addr == 0xffffffff)
-                                       vty_out(vty, " any\n");
-                               else {
-                                       vty_out(vty, " %pI4", &filter->addr);
+                               if (json) {
+                                       char buf[BUFSIZ];
+
+                                       json_object_string_add(
+                                               json_rule, "address",
+                                               inet_ntop(AF_INET,
+                                                         &filter->addr, buf,
+                                                         sizeof(buf)));
+                                       json_object_string_add(
+                                               json_rule, "mask",
+                                               inet_ntop(AF_INET,
+                                                         &filter->addr_mask,
+                                                         buf, sizeof(buf)));
+                               } else {
                                        if (filter->addr_mask.s_addr
-                                           != INADDR_ANY)
-                                               vty_out(vty,
-                                                       ", wildcard bits %pI4",
-                                                       &filter->addr_mask);
-                                       vty_out(vty, "\n");
+                                           == 0xffffffff)
+                                               vty_out(vty, " any\n");
+                                       else {
+                                               vty_out(vty, " %pI4",
+                                                       &filter->addr);
+                                               if (filter->addr_mask.s_addr
+                                                   != INADDR_ANY)
+                                                       vty_out(vty,
+                                                               ", wildcard bits %pI4",
+                                                               &filter->addr_mask);
+                                               vty_out(vty, "\n");
+                                       }
                                }
                        }
                }
        }
+
+       if (json) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
+
        return CMD_SUCCESS;
 }
 
@@ -519,7 +607,7 @@ DEFUN (show_mac_access_list,
        "mac access lists\n"
        "List mac access lists\n")
 {
-       return filter_show(vty, NULL, AFI_L2VPN);
+       return filter_show(vty, NULL, AFI_L2VPN, false);
 }
 
 DEFUN (show_mac_access_list_name,
@@ -530,22 +618,24 @@ DEFUN (show_mac_access_list_name,
        "List mac access lists\n"
        "mac address\n")
 {
-       return filter_show(vty, argv[3]->arg, AFI_L2VPN);
+       return filter_show(vty, argv[3]->arg, AFI_L2VPN, false);
 }
 
 DEFUN (show_ip_access_list,
        show_ip_access_list_cmd,
-       "show ip access-list",
+       "show ip access-list [json]",
        SHOW_STR
        IP_STR
-       "List IP access lists\n")
+       "List IP access lists\n"
+       JSON_STR)
 {
-       return filter_show(vty, NULL, AFI_IP);
+       bool uj = use_json(argc, argv);
+       return filter_show(vty, NULL, AFI_IP, uj);
 }
 
 DEFUN (show_ip_access_list_name,
        show_ip_access_list_name_cmd,
-       "show ip access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD>",
+       "show ip access-list <(1-99)|(100-199)|(1300-1999)|(2000-2699)|WORD> [json]",
        SHOW_STR
        IP_STR
        "List IP access lists\n"
@@ -553,41 +643,64 @@ DEFUN (show_ip_access_list_name,
        "IP extended access list\n"
        "IP standard access list (expanded range)\n"
        "IP extended access list (expanded range)\n"
-       "IP zebra access-list\n")
+       "IP zebra access-list\n"
+       JSON_STR)
 {
+       bool uj = use_json(argc, argv);
        int idx_acl = 3;
-       return filter_show(vty, argv[idx_acl]->arg, AFI_IP);
+       return filter_show(vty, argv[idx_acl]->arg, AFI_IP, uj);
 }
 
 DEFUN (show_ipv6_access_list,
        show_ipv6_access_list_cmd,
-       "show ipv6 access-list",
+       "show ipv6 access-list [json]",
        SHOW_STR
        IPV6_STR
-       "List IPv6 access lists\n")
+       "List IPv6 access lists\n"
+       JSON_STR)
 {
-       return filter_show(vty, NULL, AFI_IP6);
+       bool uj = use_json(argc, argv);
+       return filter_show(vty, NULL, AFI_IP6, uj);
 }
 
 DEFUN (show_ipv6_access_list_name,
        show_ipv6_access_list_name_cmd,
-       "show ipv6 access-list WORD",
+       "show ipv6 access-list WORD [json]",
        SHOW_STR
        IPV6_STR
        "List IPv6 access lists\n"
-       "IPv6 zebra access-list\n")
+       "IPv6 zebra access-list\n"
+       JSON_STR)
 {
+       bool uj = use_json(argc, argv);
        int idx_word = 3;
-       return filter_show(vty, argv[idx_word]->arg, AFI_IP6);
+       return filter_show(vty, argv[idx_word]->arg, AFI_IP6, uj);
 }
 
-static void config_write_access_cisco(struct vty *vty, struct filter *mfilter)
+static void config_write_access_cisco(struct vty *vty, struct filter *mfilter,
+                                     json_object *json)
 {
        struct filter_cisco *filter;
 
        filter = &mfilter->u.cfilter;
 
-       if (filter->extended) {
+       if (json) {
+               char buf[BUFSIZ];
+
+               json_object_boolean_add(json, "extended", !!filter->extended);
+               json_object_string_add(
+                       json, "sourceAddress",
+                       inet_ntop(AF_INET, &filter->addr, buf, sizeof(buf)));
+               json_object_string_add(json, "sourceMask",
+                                      inet_ntop(AF_INET, &filter->addr_mask,
+                                                buf, sizeof(buf)));
+               json_object_string_add(
+                       json, "destinationAddress",
+                       inet_ntop(AF_INET, &filter->mask, buf, sizeof(buf)));
+               json_object_string_add(json, "destinationMask",
+                                      inet_ntop(AF_INET, &filter->mask_mask,
+                                                buf, sizeof(buf)));
+       } else {
                vty_out(vty, " ip");
                if (filter->addr_mask.s_addr == 0xffffffff)
                        vty_out(vty, " any");
@@ -607,19 +720,11 @@ static void config_write_access_cisco(struct vty *vty, struct filter *mfilter)
                        vty_out(vty, " %pI4", &filter->mask_mask);
                }
                vty_out(vty, "\n");
-       } else {
-               if (filter->addr_mask.s_addr == 0xffffffff)
-                       vty_out(vty, " any\n");
-               else {
-                       vty_out(vty, " %pI4", &filter->addr);
-                       if (filter->addr_mask.s_addr != INADDR_ANY)
-                               vty_out(vty, " %pI4", &filter->addr_mask);
-                       vty_out(vty, "\n");
-               }
        }
 }
 
-static void config_write_access_zebra(struct vty *vty, struct filter *mfilter)
+static void config_write_access_zebra(struct vty *vty, struct filter *mfilter,
+                                     json_object *json)
 {
        struct filter_zebra *filter;
        struct prefix *p;
@@ -628,21 +733,29 @@ static void config_write_access_zebra(struct vty *vty, struct filter *mfilter)
        filter = &mfilter->u.zfilter;
        p = &filter->prefix;
 
-       if (p->prefixlen == 0 && !filter->exact)
-               vty_out(vty, " any");
-       else if (p->family == AF_INET6 || p->family == AF_INET)
-               vty_out(vty, " %s/%d%s",
-                       inet_ntop(p->family, &p->u.prefix, buf, BUFSIZ),
-                       p->prefixlen, filter->exact ? " exact-match" : "");
-       else if (p->family == AF_ETHERNET) {
-               if (p->prefixlen == 0)
+       if (json) {
+               json_object_string_add(json, "prefix",
+                                      prefix2str(p, buf, sizeof(buf)));
+               json_object_boolean_add(json, "exact-match", !!filter->exact);
+       } else {
+               if (p->prefixlen == 0 && !filter->exact)
                        vty_out(vty, " any");
-               else
-                       vty_out(vty, " %s", prefix_mac2str(&(p->u.prefix_eth),
-                                                          buf, sizeof(buf)));
-       }
+               else if (p->family == AF_INET6 || p->family == AF_INET)
+                       vty_out(vty, " %s/%d%s",
+                               inet_ntop(p->family, &p->u.prefix, buf, BUFSIZ),
+                               p->prefixlen,
+                               filter->exact ? " exact-match" : "");
+               else if (p->family == AF_ETHERNET) {
+                       if (p->prefixlen == 0)
+                               vty_out(vty, " any");
+                       else
+                               vty_out(vty, " %s",
+                                       prefix_mac2str(&(p->u.prefix_eth), buf,
+                                                      sizeof(buf)));
+               }
 
-       vty_out(vty, "\n");
+               vty_out(vty, "\n");
+       }
 }
 
 static struct cmd_node access_mac_node = {
index 941fabd38b8a7d77b311ac17032804a3bed0c6e0..d1956ec019fe8daff17f0b1acd824e7419ebef5e 100644 (file)
@@ -207,11 +207,10 @@ struct plist_dup_args {
        /** Entry action. */
        const char *pda_action;
 
-#define PDA_MAX_VALUES 4
-       /** Entry XPath for value. */
-       const char *pda_xpath[PDA_MAX_VALUES];
-       /** Entry value to match. */
-       const char *pda_value[PDA_MAX_VALUES];
+       bool any;
+       struct prefix prefix;
+       int ge;
+       int le;
 
        /** Duplicated entry found in list? */
        bool pda_found;
index f030ce1b335a6433a0b2922c59e0c9e0f4ef0a9f..45c7544a3b4031bfc0df5b4c9c695d5bf139a1fa 100644 (file)
@@ -1196,11 +1196,9 @@ static int plist_remove_if_empty(struct vty *vty, const char *iptype,
 
 static int plist_remove(struct vty *vty, const char *iptype, const char *name,
                        const char *seq, const char *action,
-                       const char *prefix_str, const char *ge_str,
-                       const char *le_str)
+                       union prefixconstptr prefix, int ge, int le)
 {
        int64_t sseq;
-       int arg_idx = 0;
        struct plist_dup_args pda = {};
        char xpath[XPATH_MAXLEN];
        char xpath_entry[XPATH_MAXLEN + 32];
@@ -1225,43 +1223,13 @@ static int plist_remove(struct vty *vty, const char *iptype, const char *name,
        pda.pda_type = iptype;
        pda.pda_name = name;
        pda.pda_action = action;
-       if (prefix_str) {
-               if (strmatch(iptype, "ipv4")) {
-                       pda.pda_xpath[arg_idx] = "./ipv4-prefix";
-                       pda.pda_value[arg_idx] = prefix_str;
-                       arg_idx++;
-                       if (ge_str) {
-                               pda.pda_xpath[arg_idx] =
-                                       "./ipv4-prefix-length-greater-or-equal";
-                               pda.pda_value[arg_idx] = ge_str;
-                               arg_idx++;
-                       }
-                       if (le_str) {
-                               pda.pda_xpath[arg_idx] =
-                                       "./ipv4-prefix-length-lesser-or-equal";
-                               pda.pda_value[arg_idx] = le_str;
-                               arg_idx++;
-                       }
-               } else {
-                       pda.pda_xpath[arg_idx] = "./ipv6-prefix";
-                       pda.pda_value[arg_idx] = prefix_str;
-                       arg_idx++;
-                       if (ge_str) {
-                               pda.pda_xpath[arg_idx] =
-                                       "./ipv6-prefix-length-greater-or-equal";
-                               pda.pda_value[arg_idx] = ge_str;
-                               arg_idx++;
-                       }
-                       if (le_str) {
-                               pda.pda_xpath[arg_idx] =
-                                       "./ipv6-prefix-length-lesser-or-equal";
-                               pda.pda_value[arg_idx] = le_str;
-                               arg_idx++;
-                       }
-               }
+       if (prefix.p) {
+               prefix_copy(&pda.prefix, prefix);
+               apply_mask(&pda.prefix);
+               pda.ge = ge;
+               pda.le = le;
        } else {
-               pda.pda_xpath[0] = "./any";
-               pda.pda_value[0] = "";
+               pda.any = true;
        }
 
        if (plist_is_dup(vty->candidate_config->dnode, &pda))
@@ -1298,7 +1266,6 @@ DEFPY_YANG(
        "Maximum prefix length\n")
 {
        int64_t sseq;
-       int arg_idx = 0;
        struct plist_dup_args pda = {};
        char xpath[XPATH_MAXLEN];
        char xpath_entry[XPATH_MAXLEN + 128];
@@ -1312,24 +1279,11 @@ DEFPY_YANG(
                pda.pda_name = name;
                pda.pda_action = action;
                if (prefix_str) {
-                       pda.pda_xpath[arg_idx] = "./ipv4-prefix";
-                       pda.pda_value[arg_idx] = prefix_str;
-                       arg_idx++;
-                       if (ge_str) {
-                               pda.pda_xpath[arg_idx] =
-                                       "./ipv4-prefix-length-greater-or-equal";
-                               pda.pda_value[arg_idx] = ge_str;
-                               arg_idx++;
-                       }
-                       if (le_str) {
-                               pda.pda_xpath[arg_idx] =
-                                       "./ipv4-prefix-length-lesser-or-equal";
-                               pda.pda_value[arg_idx] = le_str;
-                               arg_idx++;
-                       }
+                       prefix_copy(&pda.prefix, prefix);
+                       pda.ge = ge;
+                       pda.le = le;
                } else {
-                       pda.pda_xpath[0] = "./any";
-                       pda.pda_value[0] = "";
+                       pda.any = true;
                }
 
                /* Duplicated entry without sequence, just quit. */
@@ -1408,8 +1362,8 @@ DEFPY_YANG(
        "Maximum prefix length to be matched\n"
        "Maximum prefix length\n")
 {
-       return plist_remove(vty, "ipv4", name, seq_str, action, prefix_str,
-                           ge_str, le_str);
+       return plist_remove(vty, "ipv4", name, seq_str, action,
+                           prefix_str ? prefix : NULL, ge, le);
 }
 
 DEFPY_YANG(
@@ -1421,7 +1375,7 @@ DEFPY_YANG(
        PREFIX_LIST_NAME_STR
        ACCESS_LIST_SEQ_STR)
 {
-       return plist_remove(vty, "ipv4", name, seq_str, NULL, NULL, NULL, NULL);
+       return plist_remove(vty, "ipv4", name, seq_str, NULL, NULL, 0, 0);
 }
 
 DEFPY_YANG(
@@ -1516,7 +1470,6 @@ DEFPY_YANG(
        "Minimum prefix length\n")
 {
        int64_t sseq;
-       int arg_idx = 0;
        struct plist_dup_args pda = {};
        char xpath[XPATH_MAXLEN];
        char xpath_entry[XPATH_MAXLEN + 128];
@@ -1530,24 +1483,11 @@ DEFPY_YANG(
                pda.pda_name = name;
                pda.pda_action = action;
                if (prefix_str) {
-                       pda.pda_xpath[arg_idx] = "./ipv6-prefix";
-                       pda.pda_value[arg_idx] = prefix_str;
-                       arg_idx++;
-                       if (ge_str) {
-                               pda.pda_xpath[arg_idx] =
-                                       "./ipv6-prefix-length-greater-or-equal";
-                               pda.pda_value[arg_idx] = ge_str;
-                               arg_idx++;
-                       }
-                       if (le_str) {
-                               pda.pda_xpath[arg_idx] =
-                                       "./ipv6-prefix-length-lesser-or-equal";
-                               pda.pda_value[arg_idx] = le_str;
-                               arg_idx++;
-                       }
+                       prefix_copy(&pda.prefix, prefix);
+                       pda.ge = ge;
+                       pda.le = le;
                } else {
-                       pda.pda_xpath[0] = "./any";
-                       pda.pda_value[0] = "";
+                       pda.any = true;
                }
 
                /* Duplicated entry without sequence, just quit. */
@@ -1626,8 +1566,8 @@ DEFPY_YANG(
        "Minimum prefix length to be matched\n"
        "Minimum prefix length\n")
 {
-       return plist_remove(vty, "ipv6", name, seq_str, action, prefix_str,
-                           ge_str, le_str);
+       return plist_remove(vty, "ipv6", name, seq_str, action,
+                           prefix_str ? prefix : NULL, ge, le);
 }
 
 DEFPY_YANG(
@@ -1639,7 +1579,7 @@ DEFPY_YANG(
        PREFIX_LIST_NAME_STR
        ACCESS_LIST_SEQ_STR)
 {
-       return plist_remove(vty, "ipv6", name, seq_str, NULL, NULL, NULL, NULL);
+       return plist_remove(vty, "ipv6", name, seq_str, NULL, NULL, 0, 0);
 }
 
 DEFPY_YANG(
index 85805ffa47c190436e9e39b633e2d9a5e6baa3b6..80ea7a57cb22faef874736f867513bc157692a4d 100644 (file)
@@ -387,10 +387,50 @@ static bool acl_zebra_is_dup(const struct lyd_node *dnode,
        return acl_is_dup(entry_dnode, &ada);
 }
 
+static void plist_dnode_to_prefix(const struct lyd_node *dnode, bool *any,
+                                 struct prefix *p, int *ge, int *le)
+{
+       *any = false;
+       *ge = 0;
+       *le = 0;
+
+       if (yang_dnode_exists(dnode, "./any")) {
+               *any = true;
+               return;
+       }
+
+       switch (yang_dnode_get_enum(dnode, "../type")) {
+       case YPLT_IPV4:
+               yang_dnode_get_prefix(p, dnode, "./ipv4-prefix");
+               if (yang_dnode_exists(dnode,
+                                     "./ipv4-prefix-length-greater-or-equal"))
+                       *ge = yang_dnode_get_uint8(
+                               dnode, "./ipv4-prefix-length-greater-or-equal");
+               if (yang_dnode_exists(dnode,
+                                     "./ipv4-prefix-length-lesser-or-equal"))
+                       *le = yang_dnode_get_uint8(
+                               dnode, "./ipv4-prefix-length-lesser-or-equal");
+               break;
+       case YPLT_IPV6:
+               yang_dnode_get_prefix(p, dnode, "./ipv6-prefix");
+               if (yang_dnode_exists(dnode,
+                                     "./ipv6-prefix-length-greater-or-equal"))
+                       *ge = yang_dnode_get_uint8(
+                               dnode, "./ipv6-prefix-length-greater-or-equal");
+               if (yang_dnode_exists(dnode,
+                                     "./ipv6-prefix-length-lesser-or-equal"))
+                       *le = yang_dnode_get_uint8(
+                               dnode, "./ipv6-prefix-length-lesser-or-equal");
+               break;
+       }
+}
+
 static int _plist_is_dup(const struct lyd_node *dnode, void *arg)
 {
        struct plist_dup_args *pda = arg;
-       int idx;
+       struct prefix p;
+       int ge, le;
+       bool any;
 
        /* This entry is the caller, so skip it. */
        if (pda->pda_entry_dnode
@@ -400,19 +440,14 @@ static int _plist_is_dup(const struct lyd_node *dnode, void *arg)
        if (strcmp(yang_dnode_get_string(dnode, "action"), pda->pda_action))
                return YANG_ITER_CONTINUE;
 
-       /* Check if all values match. */
-       for (idx = 0; idx < PDA_MAX_VALUES; idx++) {
-               /* No more values. */
-               if (pda->pda_xpath[idx] == NULL)
-                       break;
+       plist_dnode_to_prefix(dnode, &any, &p, &ge, &le);
 
-               /* Not same type, just skip it. */
-               if (!yang_dnode_exists(dnode, pda->pda_xpath[idx]))
+       if (pda->any) {
+               if (!any)
                        return YANG_ITER_CONTINUE;
-
-               /* Check if different value. */
-               if (strcmp(yang_dnode_get_string(dnode, pda->pda_xpath[idx]),
-                          pda->pda_value[idx]))
+       } else {
+               if (!prefix_same(&pda->prefix, &p) || pda->ge != ge
+                   || pda->le != le)
                        return YANG_ITER_CONTINUE;
        }
 
@@ -439,17 +474,6 @@ static bool plist_is_dup_nb(const struct lyd_node *dnode)
        const struct lyd_node *entry_dnode =
                yang_dnode_get_parent(dnode, "entry");
        struct plist_dup_args pda = {};
-       int idx = 0, arg_idx = 0;
-       static const char *entries[] = {
-               "./ipv4-prefix",
-               "./ipv4-prefix-length-greater-or-equal",
-               "./ipv4-prefix-length-lesser-or-equal",
-               "./ipv6-prefix",
-               "./ipv6-prefix-length-greater-or-equal",
-               "./ipv6-prefix-length-lesser-or-equal",
-               "./any",
-               NULL
-       };
 
        /* Initialize. */
        pda.pda_type = yang_dnode_get_string(entry_dnode, "../type");
@@ -457,19 +481,8 @@ static bool plist_is_dup_nb(const struct lyd_node *dnode)
        pda.pda_action = yang_dnode_get_string(entry_dnode, "action");
        pda.pda_entry_dnode = entry_dnode;
 
-       /* Load all values/XPaths. */
-       while (entries[idx] != NULL) {
-               if (!yang_dnode_exists(entry_dnode, entries[idx])) {
-                       idx++;
-                       continue;
-               }
-
-               pda.pda_xpath[arg_idx] = entries[idx];
-               pda.pda_value[arg_idx] =
-                       yang_dnode_get_string(entry_dnode, entries[idx]);
-               arg_idx++;
-               idx++;
-       }
+       plist_dnode_to_prefix(entry_dnode, &pda.any, &pda.prefix, &pda.ge,
+                             &pda.le);
 
        return plist_is_dup(entry_dnode, &pda);
 }
index ce52848a2574962337638df7cc124330029b4e02..ea9c828f7c00af80b564912fefa6a223ca7acca5 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+/*
+ * IF YOU MODIFY THIS FILE PLEASE RUN `make check` and ensure that
+ * the test_zmq.c unit test is still working.  There are dependancies
+ * between the two that are extremely fragile.  My understanding
+ * is that there is specialized ownership of the cb pointer based
+ * upon what is happening.  Those assumptions are supposed to be
+ * tested in the test_zmq.c
+ */
 #include <zebra.h>
 #include <zmq.h>
 
@@ -309,8 +317,22 @@ void frrzmq_thread_cancel(struct frrzmq_cb **cb, struct cb_core *core)
        core->cancelled = true;
        thread_cancel(&core->thread);
 
+       /*
+        * Looking at this code one would assume that FRR
+        * would want a `!(*cb)->write.thread.  This was
+        * attempted in e08165def1c62beee0e87385 but this
+        * change caused `make check` to stop working
+        * which was not noticed because our CI system
+        * does not build with zeromq.  Put this back
+        * to the code as written in 2017.  e08165de..
+        * was introduced in 2021.  So someone was ok
+        * with frrzmq_thread_cancel for 4 years.  This will
+        * allow those people doing `make check` to continue
+        * working.  In the meantime if the people using
+        * this code see an issue they can fix it
+        */
        if ((*cb)->read.cancelled && !(*cb)->read.thread
-           && (*cb)->write.cancelled && !(*cb)->write.thread)
+           && (*cb)->write.cancelled && (*cb)->write.thread)
                XFREE(MTYPE_ZEROMQ_CB, *cb);
 }
 
index e97e48121c8aba1be0e7f944da18425b4b1e69d5..00491568f63efef42d36acd5c67b7c45fab5e561 100644 (file)
@@ -29,6 +29,8 @@
 #include "log.h"
 #include "buffer.h"
 
+DEFINE_MTYPE(LIB, SCRIPT_RES, "Scripting results");
+
 /* Lua stuff */
 
 /*
@@ -81,7 +83,7 @@ void lua_decode_prefix(lua_State *L, int idx, struct prefix *prefix)
 
 void *lua_toprefix(lua_State *L, int idx)
 {
-       struct prefix *p = XCALLOC(MTYPE_TMP, sizeof(struct prefix));
+       struct prefix *p = XCALLOC(MTYPE_SCRIPT_RES, sizeof(struct prefix));
        lua_decode_prefix(L, idx, p);
        return p;
 }
@@ -153,7 +155,8 @@ void lua_decode_interface(lua_State *L, int idx, struct interface *ifp)
 }
 void *lua_tointerface(lua_State *L, int idx)
 {
-       struct interface *ifp = XCALLOC(MTYPE_TMP, sizeof(struct interface));
+       struct interface *ifp =
+               XCALLOC(MTYPE_SCRIPT_RES, sizeof(struct interface));
 
        lua_decode_interface(L, idx, ifp);
        return ifp;
@@ -183,7 +186,8 @@ void lua_decode_inaddr(lua_State *L, int idx, struct in_addr *inaddr)
 
 void *lua_toinaddr(lua_State *L, int idx)
 {
-       struct in_addr *inaddr = XCALLOC(MTYPE_TMP, sizeof(struct in_addr));
+       struct in_addr *inaddr =
+               XCALLOC(MTYPE_SCRIPT_RES, sizeof(struct in_addr));
        lua_decode_inaddr(L, idx, inaddr);
        return inaddr;
 }
@@ -213,7 +217,8 @@ void lua_decode_in6addr(lua_State *L, int idx, struct in6_addr *in6addr)
 
 void *lua_toin6addr(lua_State *L, int idx)
 {
-       struct in6_addr *in6addr = XCALLOC(MTYPE_TMP, sizeof(struct in6_addr));
+       struct in6_addr *in6addr =
+               XCALLOC(MTYPE_SCRIPT_RES, sizeof(struct in6_addr));
        lua_decode_in6addr(L, idx, in6addr);
        return in6addr;
 }
@@ -235,7 +240,9 @@ void lua_pushsockunion(lua_State *L, const union sockunion *su)
 void lua_decode_sockunion(lua_State *L, int idx, union sockunion *su)
 {
        lua_getfield(L, idx, "string");
-       str2sockunion(lua_tostring(L, -1), su);
+       if (str2sockunion(lua_tostring(L, -1), su) < 0)
+               zlog_err("Lua hook call: Failed to decode sockunion");
+
        lua_pop(L, 1);
        /* pop the table */
        lua_pop(L, 1);
@@ -243,7 +250,8 @@ void lua_decode_sockunion(lua_State *L, int idx, union sockunion *su)
 
 void *lua_tosockunion(lua_State *L, int idx)
 {
-       union sockunion *su = XCALLOC(MTYPE_TMP, sizeof(union sockunion));
+       union sockunion *su =
+               XCALLOC(MTYPE_SCRIPT_RES, sizeof(union sockunion));
 
        lua_decode_sockunion(L, idx, su);
        return su;
@@ -262,7 +270,7 @@ void lua_decode_timet(lua_State *L, int idx, time_t *t)
 
 void *lua_totimet(lua_State *L, int idx)
 {
-       time_t *t = XCALLOC(MTYPE_TMP, sizeof(time_t));
+       time_t *t = XCALLOC(MTYPE_SCRIPT_RES, sizeof(time_t));
 
        lua_decode_timet(L, idx, t);
        return t;
@@ -283,7 +291,7 @@ void lua_decode_integerp(lua_State *L, int idx, long long *num)
 
 void *lua_tointegerp(lua_State *L, int idx)
 {
-       long long *num = XCALLOC(MTYPE_TMP, sizeof(long long));
+       long long *num = XCALLOC(MTYPE_SCRIPT_RES, sizeof(long long));
 
        lua_decode_integerp(L, idx, num);
        return num;
@@ -297,7 +305,7 @@ void lua_decode_stringp(lua_State *L, int idx, char *str)
 
 void *lua_tostringp(lua_State *L, int idx)
 {
-       char *string = XSTRDUP(MTYPE_TMP, lua_tostring(L, idx));
+       char *string = XSTRDUP(MTYPE_SCRIPT_RES, lua_tostring(L, idx));
 
        return string;
 }
@@ -309,6 +317,14 @@ void lua_decode_noop(lua_State *L, int idx, const void *ptr)
 {
 }
 
+
+/*
+ * Noop decoder for int.
+ */
+void lua_decode_integer_noop(lua_State *L, int idx, int i)
+{
+}
+
 /*
  * Logging.
  *
index c4de82740c3c709bc321ef37c64c76e618cd4149..3e16c82e2255eba59ac0a4eb2d147cda505fc2d0 100644 (file)
@@ -34,6 +34,8 @@
 extern "C" {
 #endif
 
+DECLARE_MTYPE(SCRIPT_RES);
+
 /*
  * gcc-10 is complaining about the wrapper function
  * not being compatible with lua_pushstring returning
@@ -162,10 +164,12 @@ void lua_decode_stringp(lua_State *L, int idx, char *str);
 void *lua_tostringp(lua_State *L, int idx);
 
 /*
- * No-op decocder
+ * No-op decoders
  */
 void lua_decode_noop(lua_State *L, int idx, const void *ptr);
 
+void lua_decode_integer_noop(lua_State *L, int idx, int i);
+
 /*
  * Retrieve an integer from table on the top of the stack.
  *
index 1a9f3639dd66ed7d2be326fa7772bdb62b369f81..0e0d3c030c8237842936773aa0f8768d51b98b45 100644 (file)
@@ -102,67 +102,136 @@ static void codec_free(struct codec *c)
 }
 #endif
 
-/* Generic script APIs */
+/* Lua function hash utils */
 
-int _frrscript_call(struct frrscript *fs)
+unsigned int lua_function_hash_key(const void *data)
 {
+       const struct lua_function_state *lfs = data;
 
-       int ret = lua_pcall(fs->L, 0, 0, 0);
+       return string_hash_make(lfs->name);
+}
+
+bool lua_function_hash_cmp(const void *d1, const void *d2)
+{
+       const struct lua_function_state *lfs1 = d1;
+       const struct lua_function_state *lfs2 = d2;
+
+       return strmatch(lfs1->name, lfs2->name);
+}
+
+void *lua_function_alloc(void *arg)
+{
+       struct lua_function_state *tmp = arg;
+
+       struct lua_function_state *lfs =
+               XCALLOC(MTYPE_SCRIPT, sizeof(struct lua_function_state));
+       lfs->name = tmp->name;
+       lfs->L = tmp->L;
+       return lfs;
+}
+
+static void lua_function_free(struct hash_bucket *b, void *data)
+{
+       struct lua_function_state *lfs = (struct lua_function_state *)b->data;
+       lua_close(lfs->L);
+       XFREE(MTYPE_SCRIPT, lfs);
+}
+
+/* internal frrscript APIs */
+
+int _frrscript_call_lua(struct lua_function_state *lfs, int nargs)
+{
+
+       int ret;
+       ret = lua_pcall(lfs->L, nargs, 1, 0);
 
        switch (ret) {
        case LUA_OK:
                break;
        case LUA_ERRRUN:
-               zlog_err("Script '%s' runtime error: %s", fs->name,
-                        lua_tostring(fs->L, -1));
+               zlog_err("Lua hook call '%s' : runtime error: %s", lfs->name,
+                        lua_tostring(lfs->L, -1));
                break;
        case LUA_ERRMEM:
-               zlog_err("Script '%s' memory error: %s", fs->name,
-                        lua_tostring(fs->L, -1));
+               zlog_err("Lua hook call '%s' : memory error: %s", lfs->name,
+                        lua_tostring(lfs->L, -1));
                break;
        case LUA_ERRERR:
-               zlog_err("Script '%s' error handler error: %s", fs->name,
-                        lua_tostring(fs->L, -1));
+               zlog_err("Lua hook call '%s' : error handler error: %s",
+                        lfs->name, lua_tostring(lfs->L, -1));
                break;
        case LUA_ERRGCMM:
-               zlog_err("Script '%s' garbage collector error: %s", fs->name,
-                        lua_tostring(fs->L, -1));
+               zlog_err("Lua hook call '%s' : garbage collector error: %s",
+                        lfs->name, lua_tostring(lfs->L, -1));
                break;
        default:
-               zlog_err("Script '%s' unknown error: %s", fs->name,
-                        lua_tostring(fs->L, -1));
+               zlog_err("Lua hook call '%s' : unknown error: %s", lfs->name,
+                        lua_tostring(lfs->L, -1));
                break;
        }
 
        if (ret != LUA_OK) {
-               lua_pop(fs->L, 1);
+               lua_pop(lfs->L, 1);
+               goto done;
+       }
+
+       if (lua_gettop(lfs->L) != 1) {
+               zlog_err(
+                       "Lua hook call '%s': Lua function should return only 1 result",
+                       lfs->name);
+               ret = 1;
                goto done;
        }
 
+       if (lua_istable(lfs->L, 1) != 1) {
+               zlog_err(
+                       "Lua hook call '%s': Lua function should return a Lua table",
+                       lfs->name);
+               ret = 1;
+       }
+
 done:
        /* LUA_OK is 0, so we can just return lua_pcall's result directly */
        return ret;
 }
 
-void *frrscript_get_result(struct frrscript *fs,
-                          const struct frrscript_env *result)
+void *frrscript_get_result(struct frrscript *fs, const char *function_name,
+                          const char *name,
+                          void *(*lua_to)(lua_State *L, int idx))
 {
-       void *r;
-       struct frrscript_codec c = {.typename = result->typename};
+       void *p;
+       struct lua_function_state *lfs;
+       struct lua_function_state lookup = {.name = function_name};
 
-       struct frrscript_codec *codec = hash_lookup(codec_hash, &c);
-       assert(codec && "No encoder for type");
+       lfs = hash_lookup(fs->lua_function_hash, &lookup);
 
-       if (!codec->decoder) {
-               zlog_err("No script decoder for type '%s'", result->typename);
+       if (lfs == NULL)
+               return NULL;
+
+       /* At this point, the Lua state should have only the returned table.
+        * We will then search the table for the key/value we're interested in.
+        * Then if the value is present (i.e. non-nil), call the lua_to*
+        * decoder.
+        */
+       assert(lua_gettop(lfs->L) == 1);
+       assert(lua_istable(lfs->L, -1) == 1);
+       lua_getfield(lfs->L, -1, name);
+       if (lua_isnil(lfs->L, -1)) {
+               lua_pop(lfs->L, 1);
+               zlog_warn(
+                       "frrscript: '%s.lua': '%s': tried to decode '%s' as result but failed",
+                       fs->name, function_name, name);
                return NULL;
        }
+       p = lua_to(lfs->L, 2);
 
-       lua_getglobal(fs->L, result->name);
-       r = codec->decoder(fs->L, -1);
-       lua_pop(fs->L, 1);
+       /* At the end, the Lua state should be same as it was at the start
+        * i.e. containing soley the returned table.
+        */
+       assert(lua_gettop(lfs->L) == 1);
+       assert(lua_istable(lfs->L, -1) == 1);
 
-       return r;
+       return p;
 }
 
 void frrscript_register_type_codec(struct frrscript_codec *codec)
@@ -183,61 +252,74 @@ void frrscript_register_type_codecs(struct frrscript_codec *codecs)
                frrscript_register_type_codec(&codecs[i]);
 }
 
-struct frrscript *frrscript_load(const char *name,
-                                int (*load_cb)(struct frrscript *))
+struct frrscript *frrscript_new(const char *name)
 {
        struct frrscript *fs = XCALLOC(MTYPE_SCRIPT, sizeof(struct frrscript));
 
        fs->name = XSTRDUP(MTYPE_SCRIPT, name);
-       fs->L = luaL_newstate();
-       frrlua_export_logging(fs->L);
+       fs->lua_function_hash =
+               hash_create(lua_function_hash_key, lua_function_hash_cmp,
+                           "Lua function state hash");
+       return fs;
+}
 
-       char fname[MAXPATHLEN * 2];
-       snprintf(fname, sizeof(fname), "%s/%s.lua", scriptdir, fs->name);
+int frrscript_load(struct frrscript *fs, const char *function_name,
+                  int (*load_cb)(struct frrscript *))
+{
 
-       int ret = luaL_loadfile(fs->L, fname);
+       /* Set up the Lua script */
+       lua_State *L = luaL_newstate();
 
-       switch (ret) {
-       case LUA_OK:
-               break;
-       case LUA_ERRSYNTAX:
-               zlog_err("Failed loading script '%s': syntax error: %s", fname,
-                        lua_tostring(fs->L, -1));
-               break;
-       case LUA_ERRMEM:
-               zlog_err("Failed loading script '%s': out-of-memory error: %s",
-                        fname, lua_tostring(fs->L, -1));
-               break;
-       case LUA_ERRGCMM:
-               zlog_err(
-                       "Failed loading script '%s': garbage collector error: %s",
-                       fname, lua_tostring(fs->L, -1));
-               break;
-       case LUA_ERRFILE:
-               zlog_err("Failed loading script '%s': file read error: %s",
-                        fname, lua_tostring(fs->L, -1));
-               break;
-       default:
-               zlog_err("Failed loading script '%s': unknown error: %s", fname,
-                        lua_tostring(fs->L, -1));
-               break;
+       frrlua_export_logging(L);
+
+       char script_name[MAXPATHLEN];
+
+       if (snprintf(script_name, sizeof(script_name), "%s/%s.lua", scriptdir,
+                    fs->name)
+           >= (int)sizeof(script_name)) {
+               zlog_err("frrscript: path to script %s/%s.lua is too long",
+                        scriptdir, fs->name);
+               goto fail;
        }
 
-       if (ret != LUA_OK)
+       if (luaL_dofile(L, script_name) != 0) {
+               zlog_err("frrscript: failed loading script '%s.lua': error: %s",
+                        script_name, lua_tostring(L, -1));
                goto fail;
+       }
 
-       if (load_cb && (*load_cb)(fs) != 0)
+       /* To check the Lua function, we get it from the global table */
+       lua_getglobal(L, function_name);
+       if (lua_isfunction(L, lua_gettop(L)) == 0) {
+               zlog_err("frrscript: loaded script '%s.lua' but %s not found",
+                        script_name, function_name);
                goto fail;
+       }
+       /* Then pop the function (frrscript_call will push it when it needs it)
+        */
+       lua_pop(L, 1);
 
-       return fs;
+       if (load_cb && (*load_cb)(fs) != 0) {
+               zlog_err(
+                       "frrscript: '%s.lua': %s: loaded but callback returned non-zero exit code",
+                       script_name, function_name);
+               goto fail;
+       }
+
+       /* Add the Lua function state to frrscript */
+       struct lua_function_state key = {.name = function_name, .L = L};
+
+       hash_get(fs->lua_function_hash, &key, lua_function_alloc);
+
+       return 0;
 fail:
-       frrscript_unload(fs);
-       return NULL;
+       lua_close(L);
+       return 1;
 }
 
-void frrscript_unload(struct frrscript *fs)
+void frrscript_delete(struct frrscript *fs)
 {
-       lua_close(fs->L);
+       hash_iterate(fs->lua_function_hash, lua_function_free, NULL);
        XFREE(MTYPE_SCRIPT, fs->name);
        XFREE(MTYPE_SCRIPT, fs);
 }
index 8612c602f3ca317a2115186b54720f48bfec487d..c089df61fc4fc8ba9713ee3a5d59607c66d960aa 100644 (file)
@@ -25,7 +25,7 @@
 
 #include <lua.h>
 #include "frrlua.h"
-#include "../bgpd/bgp_script.h"
+#include "bgpd/bgp_script.h" // for peer and attr encoders/decoders
 
 #ifdef __cplusplus
 extern "C" {
@@ -40,14 +40,30 @@ struct frrscript_codec {
        decoder_func decoder;
 };
 
+struct lua_function_state {
+       const char *name;
+       lua_State *L;
+};
+
 struct frrscript {
        /* Script name */
        char *name;
 
-       /* Lua state */
-       struct lua_State *L;
+       /* Hash of Lua function name to Lua function state */
+       struct hash *lua_function_hash;
 };
 
+
+/*
+ * Hash related functions for lua_function_hash
+ */
+
+void *lua_function_alloc(void *arg);
+
+unsigned int lua_function_hash_key(const void *data);
+
+bool lua_function_hash_cmp(const void *d1, const void *d2);
+
 struct frrscript_env {
        /* Value type */
        const char *typename;
@@ -60,15 +76,24 @@ struct frrscript_env {
 };
 
 /*
- * Create new FRR script.
+ * Create new struct frrscript for a Lua script.
+ * This will hold the states for the Lua functions in this script.
+ *
+ * scriptname
+ *     Name of the Lua script file, without the .lua
+ */
+struct frrscript *frrscript_new(const char *scriptname);
+
+/*
+ * Load a function into frrscript, run callback if any
  */
-struct frrscript *frrscript_load(const char *name,
-                                int (*load_cb)(struct frrscript *));
+int frrscript_load(struct frrscript *fs, const char *function_name,
+                  int (*load_cb)(struct frrscript *));
 
 /*
- * Destroy FRR script.
+ * Delete Lua function states and frrscript
  */
-void frrscript_unload(struct frrscript *fs);
+void frrscript_delete(struct frrscript *fs);
 
 /*
  * Register a Lua codec for a type.
@@ -97,16 +122,31 @@ void frrscript_register_type_codecs(struct frrscript_codec *codecs);
  */
 void frrscript_init(const char *scriptdir);
 
-#define ENCODE_ARGS(name, value)                                               \
-       do {                                                                   \
-               ENCODE_ARGS_WITH_STATE(L, value);                              \
-               lua_setglobal(L, name);                                        \
-       } while (0)
+/*
+ * This macro is mapped to every (name, value) in frrscript_call,
+ * so this in turn maps them onto their encoders
+ */
+#define ENCODE_ARGS(name, value) ENCODE_ARGS_WITH_STATE(lfs->L, (value))
 
+/*
+ * This macro is also mapped to every (name, value) in frrscript_call, but
+ * not every value can be mapped to its decoder - only those that appear
+ * in the returned table will. To find out if they appear in the returned
+ * table, first pop the value and check if its nil. Only call the decoder
+ * if non-nil.
+ *
+ * At the end, the only thing left on the stack should be the
+ * returned table.
+ */
 #define DECODE_ARGS(name, value)                                               \
        do {                                                                   \
-               lua_getglobal(L, name);                                        \
-               DECODE_ARGS_WITH_STATE(L, value);                              \
+               lua_getfield(lfs->L, 1, (name));                               \
+               if (lua_isnil(lfs->L, 2)) {                                    \
+                       lua_pop(lfs->L, 1);                                    \
+               } else {                                                       \
+                       DECODE_ARGS_WITH_STATE(lfs->L, (value));               \
+               }                                                              \
+               assert(lua_gettop(lfs->L) == 1);                               \
        } while (0)
 
 /*
@@ -120,6 +160,7 @@ void frrscript_init(const char *scriptdir);
  */
 #define ENCODE_ARGS_WITH_STATE(L, value)                                       \
        _Generic((value), \
+int : lua_pushinteger,                                          \
 long long * : lua_pushintegerp,                                 \
 struct prefix * : lua_pushprefix,                               \
 struct interface * : lua_pushinterface,                         \
@@ -131,10 +172,11 @@ char * : lua_pushstring_wrapper,                                \
 struct attr * : lua_pushattr,                                   \
 struct peer * : lua_pushpeer,                                   \
 const struct prefix * : lua_pushprefix                          \
-)(L, value)
+)((L), (value))
 
 #define DECODE_ARGS_WITH_STATE(L, value)                                       \
        _Generic((value), \
+int : lua_decode_integer_noop,                                  \
 long long * : lua_decode_integerp,                              \
 struct prefix * : lua_decode_prefix,                            \
 struct interface * : lua_decode_interface,                      \
@@ -146,56 +188,96 @@ char * : lua_decode_stringp,                                    \
 struct attr * : lua_decode_attr,                                \
 struct peer * : lua_decode_noop,                                \
 const struct prefix * : lua_decode_noop                         \
-)(L, -1, value)
+)((L), -1, (value))
 
 /*
- * Call script.
+ * Call Lua function state (abstraction for a single Lua function)
  *
- * fs
- *    The script to call; this is obtained from frrscript_load().
+ * lfs
+ *    The Lua function to call; this should have been loaded in by
+ *    frrscript_load(). nargs Number of arguments the function accepts
  *
  * Returns:
  *    0 if the script ran successfully, nonzero otherwise.
  */
-int _frrscript_call(struct frrscript *fs);
+int _frrscript_call_lua(struct lua_function_state *lfs, int nargs);
 
 /*
- * Wrapper for call script. Maps values passed in to their encoder
- * and decoder types.
+ * Wrapper for calling Lua function state.
+ *
+ * The Lua function name (f) to run should have already been checked by
+ * frrscript_load. So this wrapper will:
+ * 1) Find the Lua function state, which contains the Lua state
+ * 2) Clear the Lua state (there may be leftovers items from previous call)
+ * 3) Push the Lua function (f)
+ * 4) Map frrscript_call arguments onto their encoder and decoders, push those
+ * 5) Call _frrscript_call_lua (Lua execution takes place)
+ * 6) Write back to frrscript_call arguments using their decoders
+ *
+ * This wrapper can be called multiple times (after one frrscript_load).
  *
  * fs
- *    The script to call; this is obtained from frrscript_load().
+ *    The struct frrscript in which the Lua fuction was loaded into
+ * f
+ *    Name of the Lua function.
  *
  * Returns:
  *    0 if the script ran successfully, nonzero otherwise.
  */
-#define frrscript_call(fs, ...)                                                \
-       ({                                                                     \
-               lua_State *L = fs->L;                                          \
-               MAP_LISTS(ENCODE_ARGS, ##__VA_ARGS__);                         \
-               int ret = _frrscript_call(fs);                                 \
-               if (ret == 0) {                                                \
-                       MAP_LISTS(DECODE_ARGS, ##__VA_ARGS__);                 \
-               }                                                              \
-               ret;                                                           \
+#define frrscript_call(fs, f, ...)                                                                                                                                 \
+       ({                                                                                                                                                         \
+               struct lua_function_state lookup = {.name = (f)};                                                                                                  \
+               struct lua_function_state *lfs;                                                                                                                    \
+               lfs = hash_lookup((fs)->lua_function_hash, &lookup);                                                                                               \
+               lfs == NULL ? ({                                                                                                                                   \
+                       zlog_err(                                                                                                                                  \
+                               "frrscript: '%s.lua': '%s': tried to call this function but it was not loaded",                                                    \
+                               (fs)->name, (f));                                                                                                                  \
+                       1;                                                                                                                                         \
+               })                                                                                                                                                 \
+                           : ({                                                                                                                                   \
+                                     lua_settop(lfs->L, 0);                                                                                                       \
+                                     lua_getglobal(lfs->L, f);                                                                                                    \
+                                     MAP_LISTS(ENCODE_ARGS, ##__VA_ARGS__);                                                                                       \
+                                     _frrscript_call_lua(                                                                                                         \
+                                             lfs, PP_NARG(__VA_ARGS__));                                                                                          \
+                             }) != 0                                                                                                                              \
+                                     ? ({                                                                                                                         \
+                                               zlog_err(                                                                                                          \
+                                                       "frrscript: '%s.lua': '%s': this function called but returned non-zero exit code. No variables modified.", \
+                                                       (fs)->name, (f));                                                                                          \
+                                               1;                                                                                                                 \
+                                       })                                                                                                                         \
+                                     : ({                                                                                                                         \
+                                               MAP_LISTS(DECODE_ARGS,                                                                                             \
+                                                         ##__VA_ARGS__);                                                                                          \
+                                               0;                                                                                                                 \
+                                       });                                                                                                                        \
        })
 
 /*
- * Get result from finished script.
+ * Get result from finished function
  *
  * fs
  *    The script. This script must have been run already.
- *
- * result
- *    The result to extract from the script.
- *    This reuses the frrscript_env type, but only the typename and name fields
- *    need to be set. The value is returned directly.
+ * function_name
+ *    Name of the Lua function.
+ * name
+ *    Name of the result.
+ *    This will be used as a string key to retrieve from the table that the
+ *    Lua function returns.
+ *    The name here should *not* appear in frrscript_call.
+ * lua_to
+ *    Function pointer to a lua_to decoder function.
+ *    This function should allocate and decode a value from the Lua state.
  *
  * Returns:
- *    The script result of the specified name and type, or NULL.
+ *    A pointer to the decoded value from the Lua state, or NULL if no such
+ *    value.
  */
-void *frrscript_get_result(struct frrscript *fs,
-                          const struct frrscript_env *result);
+void *frrscript_get_result(struct frrscript *fs, const char *function_name,
+                          const char *name,
+                          void *(*lua_to)(lua_State *L, int idx));
 
 #ifdef __cplusplus
 }
index 7ef5fffd12011398771ca505989b3c9172e32407..1b98b224cc9e329d0fad8adbec15d2662feac4dc 100644 (file)
@@ -18,9 +18,7 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "zebra.h"
 
 #include <string.h>
 #include <ctype.h>
@@ -217,3 +215,21 @@ int all_digit(const char *str)
                        return 0;
        return 1;
 }
+
+
+char *frrstr_hex(char *buff, size_t bufsiz, const uint8_t *str, size_t num)
+{
+       if (bufsiz == 0)
+               return buff;
+
+       char tmp[3];
+
+       buff[0] = '\0';
+
+       for (size_t i = 0; i < num; i++) {
+               snprintf(tmp, sizeof(tmp), "%02x", (unsigned char)str[i]);
+               strlcat(buff, tmp, bufsiz);
+       }
+
+       return buff;
+}
index 441d7b86703c0839b27d1301830988c8c1e83454..d52d6a4482293440a758ea12f3abb5deb29342e8 100644 (file)
@@ -154,6 +154,26 @@ bool frrstr_endswith(const char *str, const char *suffix);
  */
 int all_digit(const char *str);
 
+/*
+ * Copy the hexadecimal representation of the string to a buffer.
+ *
+ * buff
+ *    Buffer to copy result into with size of at least (2 * num) + 1.
+ *
+ * bufsiz
+ *    Size of destination buffer.
+ *
+ * str
+ *    String to represent as hexadecimal.
+ *
+ * num
+ *    Number of characters to copy.
+ *
+ * Returns:
+ *    Pointer to buffer containing resulting hexadecimal representation.
+ */
+char *frrstr_hex(char *buff, size_t bufsiz, const uint8_t *str, size_t num);
+
 #ifdef __cplusplus
 }
 #endif
index e37b4f55b00bb4e1cef7eb45e62b154fc186738d..424880ff425a3a21e852f4a359f76b0682151efc 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -1291,6 +1291,11 @@ static void cli_show_interface(struct vty *vty, struct lyd_node *dnode,
        vty_out(vty, "\n");
 }
 
+static void cli_show_interface_end(struct vty *vty, struct lyd_node *dnode)
+{
+       vty_out(vty, "exit\n");
+}
+
 /*
  * XPath: /frr-interface:lib/interface/description
  */
@@ -1349,10 +1354,20 @@ static const struct cmd_variable_handler if_var_handlers[] = {
        {.tokenname = "INTERFACE", .completions = if_autocomplete},
        {.completions = NULL}};
 
-void if_cmd_init(void)
+static struct cmd_node interface_node = {
+       .name = "interface",
+       .node = INTERFACE_NODE,
+       .parent_node = CONFIG_NODE,
+       .prompt = "%s(config-if)# ",
+};
+
+void if_cmd_init(int (*config_write)(struct vty *))
 {
        cmd_variable_handler_register(if_var_handlers);
 
+       interface_node.config_write = config_write;
+       install_node(&interface_node);
+
        install_element(CONFIG_NODE, &interface_cmd);
        install_element(CONFIG_NODE, &no_interface_cmd);
 
@@ -1642,6 +1657,7 @@ const struct frr_yang_module_info frr_interface_info = {
                                .create = lib_interface_create,
                                .destroy = lib_interface_destroy,
                                .cli_show = cli_show_interface,
+                               .cli_show_end = cli_show_interface_end,
                                .get_next = lib_interface_get_next,
                                .get_keys = lib_interface_get_keys,
                                .lookup_entry = lib_interface_lookup_entry,
index 0d689fe14b9513c0bc034f36b441b4baac450a8a..43e2d3cffaaecead6d3455f702f4ab6e6895942d 100644 (file)
--- a/lib/if.h
+++ b/lib/if.h
@@ -597,7 +597,8 @@ struct if_link_params *if_link_params_get(struct interface *);
 void if_link_params_free(struct interface *);
 
 /* Northbound. */
-extern void if_cmd_init(void);
+struct vty;
+extern void if_cmd_init(int (*config_write)(struct vty *));
 extern void if_zapi_callbacks(int (*create)(struct interface *ifp),
                              int (*up)(struct interface *ifp),
                              int (*down)(struct interface *ifp),
index db5c23b1bae4c203cb180dd31aad61aa469deeba..02f83ef0a834f50ff06ce2f50a65c73a8b1c7333 100644 (file)
@@ -1044,6 +1044,7 @@ static int keychain_config_write(struct vty *vty)
 
                        vty_out(vty, " exit\n");
                }
+               vty_out(vty, "exit\n");
                vty_out(vty, "!\n");
        }
 
index 97dab74d9b937e4fc0b95cb838ec913ab488e037..d03437328b83cec356ab58da5994770b7b86668d 100644 (file)
@@ -418,7 +418,6 @@ static int frr_opt(int opt)
        switch (opt) {
        case 'h':
                frr_help_exit(0);
-               break;
        case 'v':
                print_version(di->progname);
                exit(0);
index 4fee9bde3c2cd06c141ba142ce89afd1feebdcf6..97d70189ff5f41567e04dcaccaa20cde0ce2dd5a 100644 (file)
@@ -1156,6 +1156,7 @@ static int nexthop_group_write(struct vty *vty)
                        nexthop_group_write_nexthop_internal(vty, nh);
                }
 
+               vty_out(vty, "exit\n");
                vty_out(vty, "!\n");
        }
 
index e365888662e193dde6e8d14d3c349a447bb965b4..cef1d9d380a44cf2632ed1e880ef0a7120ea2de9 100644 (file)
--- a/lib/pbr.h
+++ b/lib/pbr.h
@@ -49,7 +49,8 @@ struct pbr_filter {
 #define PBR_FILTER_PROTO               (1 << 5)
 #define PBR_FILTER_SRC_PORT_RANGE      (1 << 6)
 #define PBR_FILTER_DST_PORT_RANGE      (1 << 7)
-#define PBR_FILTER_DSFIELD                     (1 << 8)
+#define PBR_FILTER_DSFIELD             (1 << 8)
+#define PBR_FILTER_IP_PROTOCOL         (1 << 9)
 
 #define PBR_DSFIELD_DSCP (0xfc) /* Upper 6 bits of DS field: DSCP */
 #define PBR_DSFIELD_ECN (0x03) /* Lower 2 bits of DS field: BCN */
@@ -67,6 +68,9 @@ struct pbr_filter {
 
        /* Filter with fwmark */
        uint32_t fwmark;
+
+       /* Filter with the ip protocol */
+       uint8_t ip_proto;
 };
 
 /*
index 0ee02f8a0b5f09bb00a82feddd095c5ce6ef76ee..2f9f06f43b707ee8cb78fb0491f834fc88113905 100644 (file)
@@ -750,7 +750,7 @@ static const char *prefix_list_type_str(struct prefix_list_entry *pentry)
 }
 
 static int prefix_list_entry_match(struct prefix_list_entry *pentry,
-                                  const struct prefix *p)
+                                  const struct prefix *p, bool address_mode)
 {
        int ret;
 
@@ -761,6 +761,9 @@ static int prefix_list_entry_match(struct prefix_list_entry *pentry,
        if (!ret)
                return 0;
 
+       if (address_mode)
+               return 1;
+
        /* In case of le nor ge is specified, exact match is performed. */
        if (!pentry->le && !pentry->ge) {
                if (pentry->prefix.prefixlen != p->prefixlen)
@@ -777,14 +780,15 @@ static int prefix_list_entry_match(struct prefix_list_entry *pentry,
        return 1;
 }
 
-enum prefix_list_type prefix_list_apply_which_prefix(
+enum prefix_list_type prefix_list_apply_ext(
        struct prefix_list *plist,
-       const struct prefix **which,
-       const void *object)
+       const struct prefix_list_entry **which,
+       union prefixconstptr object,
+       bool address_mode)
 {
        struct prefix_list_entry *pentry, *pbest = NULL;
 
-       const struct prefix *p = (const struct prefix *)object;
+       const struct prefix *p = object.p;
        const uint8_t *byte = p->u.val;
        size_t depth;
        size_t validbits = p->prefixlen;
@@ -809,7 +813,7 @@ enum prefix_list_type prefix_list_apply_which_prefix(
                     pentry = pentry->next_best) {
                        if (pbest && pbest->seq < pentry->seq)
                                continue;
-                       if (prefix_list_entry_match(pentry, p))
+                       if (prefix_list_entry_match(pentry, p, address_mode))
                                pbest = pentry;
                }
 
@@ -830,7 +834,7 @@ enum prefix_list_type prefix_list_apply_which_prefix(
                     pentry = pentry->next_best) {
                        if (pbest && pbest->seq < pentry->seq)
                                continue;
-                       if (prefix_list_entry_match(pentry, p))
+                       if (prefix_list_entry_match(pentry, p, address_mode))
                                pbest = pentry;
                }
                break;
@@ -838,7 +842,7 @@ enum prefix_list_type prefix_list_apply_which_prefix(
 
        if (which) {
                if (pbest)
-                       *which = &pbest->prefix;
+                       *which = pbest;
                else
                        *which = NULL;
        }
@@ -878,7 +882,7 @@ static void __attribute__((unused)) prefix_list_print(struct prefix_list *plist)
        }
 }
 
-/* Retrun 1 when plist already include pentry policy. */
+/* Return 1 when plist already include pentry policy. */
 static struct prefix_list_entry *
 prefix_entry_dup_check(struct prefix_list *plist, struct prefix_list_entry *new)
 {
@@ -928,102 +932,206 @@ enum display_type {
        first_match_display
 };
 
-static void vty_show_prefix_entry(struct vty *vty, afi_t afi,
+static void vty_show_prefix_entry(struct vty *vty, json_object *json, afi_t afi,
                                  struct prefix_list *plist,
                                  struct prefix_master *master,
                                  enum display_type dtype, int seqnum)
 {
        struct prefix_list_entry *pentry;
+       json_object *json_pl = NULL;
 
        /* Print the name of the protocol */
-       vty_out(vty, "%s: ", frr_protoname);
+       if (json) {
+               json_pl = json_object_new_object();
+               json_object_object_add(json, plist->name, json_pl);
+       } else
+               vty_out(vty, "%s: ", frr_protoname);
 
        if (dtype == normal_display) {
-               vty_out(vty, "ip%s prefix-list %s: %d entries\n",
-                       afi == AFI_IP ? "" : "v6", plist->name, plist->count);
-               if (plist->desc)
-                       vty_out(vty, "   Description: %s\n", plist->desc);
+               if (json) {
+                       json_object_string_add(json_pl, "addressFamily",
+                                              afi2str(afi));
+                       json_object_int_add(json_pl, "entries", plist->count);
+                       if (plist->desc)
+                               json_object_string_add(json_pl, "description",
+                                                      plist->desc);
+               } else {
+                       vty_out(vty, "ip%s prefix-list %s: %d entries\n",
+                               afi == AFI_IP ? "" : "v6", plist->name,
+                               plist->count);
+                       if (plist->desc)
+                               vty_out(vty, "   Description: %s\n",
+                                       plist->desc);
+               }
        } else if (dtype == summary_display || dtype == detail_display) {
-               vty_out(vty, "ip%s prefix-list %s:\n",
-                       afi == AFI_IP ? "" : "v6", plist->name);
-
-               if (plist->desc)
-                       vty_out(vty, "   Description: %s\n", plist->desc);
-
-               vty_out(vty,
-                       "   count: %d, range entries: %d, sequences: %" PRId64 " - %" PRId64 "\n",
-                       plist->count, plist->rangecount,
-                       plist->head ? plist->head->seq : 0,
-                       plist->tail ? plist->tail->seq : 0);
+               if (json) {
+                       json_object_string_add(json_pl, "addressFamily",
+                                              afi2str(afi));
+                       if (plist->desc)
+                               json_object_string_add(json_pl, "description",
+                                                      plist->desc);
+                       json_object_int_add(json_pl, "count", plist->count);
+                       json_object_int_add(json_pl, "rangeEntries",
+                                           plist->rangecount);
+                       json_object_int_add(json_pl, "sequenceStart",
+                                           plist->head ? plist->head->seq : 0);
+                       json_object_int_add(json_pl, "sequenceEnd",
+                                           plist->tail ? plist->tail->seq : 0);
+               } else {
+                       vty_out(vty, "ip%s prefix-list %s:\n",
+                               afi == AFI_IP ? "" : "v6", plist->name);
+
+                       if (plist->desc)
+                               vty_out(vty, "   Description: %s\n",
+                                       plist->desc);
+
+                       vty_out(vty,
+                               "   count: %d, range entries: %d, sequences: %" PRId64
+                               " - %" PRId64 "\n",
+                               plist->count, plist->rangecount,
+                               plist->head ? plist->head->seq : 0,
+                               plist->tail ? plist->tail->seq : 0);
+               }
        }
 
        if (dtype != summary_display) {
+               json_object *json_entries = NULL;
+
+               if (json) {
+                       json_entries = json_object_new_array();
+                       json_object_object_add(json_pl, "entries",
+                                              json_entries);
+               }
+
                for (pentry = plist->head; pentry; pentry = pentry->next) {
                        if (dtype == sequential_display
                            && pentry->seq != seqnum)
                                continue;
 
-                       vty_out(vty, "   ");
+                       if (json) {
+                               json_object *json_entry;
+                               char buf[BUFSIZ];
 
-                       vty_out(vty, "seq %" PRId64 " ", pentry->seq);
+                               json_entry = json_object_new_object();
+                               json_object_array_add(json_entries, json_entry);
 
-                       vty_out(vty, "%s ", prefix_list_type_str(pentry));
-
-                       if (pentry->any)
-                               vty_out(vty, "any");
-                       else {
-                               struct prefix *p = &pentry->prefix;
-
-                               vty_out(vty, "%pFX", p);
+                               json_object_int_add(json_entry,
+                                                   "sequenceNumber",
+                                                   pentry->seq);
+                               json_object_string_add(
+                                       json_entry, "type",
+                                       prefix_list_type_str(pentry));
+                               json_object_string_add(
+                                       json_entry, "prefix",
+                                       prefix2str(&pentry->prefix, buf,
+                                                  sizeof(buf)));
 
                                if (pentry->ge)
-                                       vty_out(vty, " ge %d", pentry->ge);
+                                       json_object_int_add(
+                                               json_entry,
+                                               "minimumPrefixLength",
+                                               pentry->ge);
                                if (pentry->le)
-                                       vty_out(vty, " le %d", pentry->le);
+                                       json_object_int_add(
+                                               json_entry,
+                                               "maximumPrefixLength",
+                                               pentry->le);
+
+                               if (dtype == detail_display
+                                   || dtype == sequential_display) {
+                                       json_object_int_add(json_entry,
+                                                           "hitCount",
+                                                           pentry->hitcnt);
+                                       json_object_int_add(json_entry,
+                                                           "referenceCount",
+                                                           pentry->refcnt);
+                               }
+                       } else {
+                               vty_out(vty, "   ");
+
+                               vty_out(vty, "seq %" PRId64 " ", pentry->seq);
+
+                               vty_out(vty, "%s ",
+                                       prefix_list_type_str(pentry));
+
+                               if (pentry->any)
+                                       vty_out(vty, "any");
+                               else {
+                                       struct prefix *p = &pentry->prefix;
+
+                                       vty_out(vty, "%pFX", p);
+
+                                       if (pentry->ge)
+                                               vty_out(vty, " ge %d",
+                                                       pentry->ge);
+                                       if (pentry->le)
+                                               vty_out(vty, " le %d",
+                                                       pentry->le);
+                               }
+
+                               if (dtype == detail_display
+                                   || dtype == sequential_display)
+                                       vty_out(vty,
+                                               " (hit count: %ld, refcount: %ld)",
+                                               pentry->hitcnt, pentry->refcnt);
+
+                               vty_out(vty, "\n");
                        }
-
-                       if (dtype == detail_display
-                           || dtype == sequential_display)
-                               vty_out(vty, " (hit count: %ld, refcount: %ld)",
-                                       pentry->hitcnt, pentry->refcnt);
-
-                       vty_out(vty, "\n");
                }
        }
 }
 
 static int vty_show_prefix_list(struct vty *vty, afi_t afi, const char *name,
-                               const char *seq, enum display_type dtype)
+                               const char *seq, enum display_type dtype,
+                               bool uj)
 {
        struct prefix_list *plist;
        struct prefix_master *master;
        int64_t seqnum = 0;
+       json_object *json = NULL;
+       json_object *json_proto = NULL;
 
        master = prefix_master_get(afi, 0);
        if (master == NULL)
                return CMD_WARNING;
 
+       if (uj) {
+               json = json_object_new_object();
+               json_proto = json_object_new_object();
+               json_object_object_add(json, frr_protoname, json_proto);
+       }
+
        if (seq)
                seqnum = (int64_t)atol(seq);
 
        if (name) {
                plist = prefix_list_lookup(afi, name);
                if (!plist) {
-                       vty_out(vty, "%% Can't find specified prefix-list\n");
+                       if (!uj)
+                               vty_out(vty,
+                                       "%% Can't find specified prefix-list\n");
                        return CMD_WARNING;
                }
-               vty_show_prefix_entry(vty, afi, plist, master, dtype, seqnum);
+               vty_show_prefix_entry(vty, json_proto, afi, plist, master,
+                                     dtype, seqnum);
        } else {
                if (dtype == detail_display || dtype == summary_display) {
-                       if (master->recent)
+                       if (master->recent && !uj)
                                vty_out(vty,
                                        "Prefix-list with the last deletion/insertion: %s\n",
                                        master->recent->name);
                }
 
                for (plist = master->str.head; plist; plist = plist->next)
-                       vty_show_prefix_entry(vty, afi, plist, master, dtype,
-                                             seqnum);
+                       vty_show_prefix_entry(vty, json_proto, afi, plist,
+                                             master, dtype, seqnum);
+       }
+
+       if (uj) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
        }
 
        return CMD_SUCCESS;
@@ -1146,19 +1254,21 @@ static int vty_clear_prefix_list(struct vty *vty, afi_t afi, const char *name,
 
 DEFPY (show_ip_prefix_list,
        show_ip_prefix_list_cmd,
-       "show ip prefix-list [WORD [seq$dseq (1-4294967295)$arg]]",
+       "show ip prefix-list [WORD [seq$dseq (1-4294967295)$arg]] [json$uj]",
        SHOW_STR
        IP_STR
        PREFIX_LIST_STR
        "Name of a prefix list\n"
        "sequence number of an entry\n"
-       "Sequence number\n")
+       "Sequence number\n"
+       JSON_STR)
 {
        enum display_type dtype = normal_display;
        if (dseq)
                dtype = sequential_display;
 
-       return vty_show_prefix_list(vty, AFI_IP, prefix_list, arg_str, dtype);
+       return vty_show_prefix_list(vty, AFI_IP, prefix_list, arg_str, dtype,
+                                   !!uj);
 }
 
 DEFPY (show_ip_prefix_list_prefix,
@@ -1184,28 +1294,30 @@ DEFPY (show_ip_prefix_list_prefix,
 
 DEFPY (show_ip_prefix_list_summary,
        show_ip_prefix_list_summary_cmd,
-       "show ip prefix-list summary [WORD$prefix_list]",
+       "show ip prefix-list summary [WORD$prefix_list] [json$uj]",
        SHOW_STR
        IP_STR
        PREFIX_LIST_STR
        "Summary of prefix lists\n"
-       "Name of a prefix list\n")
+       "Name of a prefix list\n"
+       JSON_STR)
 {
        return vty_show_prefix_list(vty, AFI_IP, prefix_list, NULL,
-                                   summary_display);
+                                   summary_display, !!uj);
 }
 
 DEFPY (show_ip_prefix_list_detail,
        show_ip_prefix_list_detail_cmd,
-       "show ip prefix-list detail [WORD$prefix_list]",
+       "show ip prefix-list detail [WORD$prefix_list] [json$uj]",
        SHOW_STR
        IP_STR
        PREFIX_LIST_STR
        "Detail of prefix lists\n"
-       "Name of a prefix list\n")
+       "Name of a prefix list\n"
+       JSON_STR)
 {
        return vty_show_prefix_list(vty, AFI_IP, prefix_list, NULL,
-                                   detail_display);
+                                   detail_display, !!uj);
 }
 
 DEFPY (clear_ip_prefix_list,
@@ -1222,19 +1334,21 @@ DEFPY (clear_ip_prefix_list,
 
 DEFPY (show_ipv6_prefix_list,
        show_ipv6_prefix_list_cmd,
-       "show ipv6 prefix-list [WORD [seq$dseq (1-4294967295)$arg]]",
+       "show ipv6 prefix-list [WORD [seq$dseq (1-4294967295)$arg]] [json$uj]",
        SHOW_STR
        IPV6_STR
        PREFIX_LIST_STR
        "Name of a prefix list\n"
        "sequence number of an entry\n"
-       "Sequence number\n")
+       "Sequence number\n"
+       JSON_STR)
 {
        enum display_type dtype = normal_display;
        if (dseq)
                dtype = sequential_display;
 
-       return vty_show_prefix_list(vty, AFI_IP6, prefix_list, arg_str, dtype);
+       return vty_show_prefix_list(vty, AFI_IP6, prefix_list, arg_str, dtype,
+                                   !!uj);
 }
 
 DEFPY (show_ipv6_prefix_list_prefix,
@@ -1260,28 +1374,30 @@ DEFPY (show_ipv6_prefix_list_prefix,
 
 DEFPY (show_ipv6_prefix_list_summary,
        show_ipv6_prefix_list_summary_cmd,
-       "show ipv6 prefix-list summary [WORD$prefix-list]",
+       "show ipv6 prefix-list summary [WORD$prefix-list] [json$uj]",
        SHOW_STR
        IPV6_STR
        PREFIX_LIST_STR
        "Summary of prefix lists\n"
-       "Name of a prefix list\n")
+       "Name of a prefix list\n"
+       JSON_STR)
 {
        return vty_show_prefix_list(vty, AFI_IP6, prefix_list, NULL,
-                                   summary_display);
+                                   summary_display, !!uj);
 }
 
 DEFPY (show_ipv6_prefix_list_detail,
        show_ipv6_prefix_list_detail_cmd,
-       "show ipv6 prefix-list detail [WORD$prefix-list]",
+       "show ipv6 prefix-list detail [WORD$prefix-list] [json$uj]",
        SHOW_STR
        IPV6_STR
        PREFIX_LIST_STR
        "Detail of prefix lists\n"
-       "Name of a prefix list\n")
+       "Name of a prefix list\n"
+       JSON_STR)
 {
        return vty_show_prefix_list(vty, AFI_IP6, prefix_list, NULL,
-                                   detail_display);
+                                   detail_display, !!uj);
 }
 
 DEFPY (clear_ipv6_prefix_list,
@@ -1296,6 +1412,51 @@ DEFPY (clear_ipv6_prefix_list,
        return vty_clear_prefix_list(vty, AFI_IP6, prefix_list, prefix_str);
 }
 
+DEFPY (debug_prefix_list_match,
+       debug_prefix_list_match_cmd,
+       "debug prefix-list WORD$prefix-list match <A.B.C.D/M|X:X::X:X/M>"
+       " [address-mode$addr_mode]",
+       DEBUG_STR
+       "Prefix-list test access\n"
+       "Name of a prefix list\n"
+       "Test prefix for prefix list result\n"
+       "Prefix to test in ip prefix-list\n"
+       "Prefix to test in ipv6 prefix-list\n"
+       "Use address matching mode (PIM RP)\n")
+{
+       struct prefix_list *plist;
+       const struct prefix_list_entry *entry = NULL;
+       enum prefix_list_type ret;
+
+       plist = prefix_list_lookup(family2afi(match->family), prefix_list);
+       if (!plist) {
+               vty_out(vty, "%% no prefix list named %s for AFI %s\n",
+                       prefix_list, afi2str(family2afi(match->family)));
+               return CMD_WARNING;
+       }
+
+       ret = prefix_list_apply_ext(plist, &entry, match, !!addr_mode);
+
+       vty_out(vty, "%s prefix list %s yields %s for %pFX, ",
+               afi2str(family2afi(match->family)), prefix_list,
+               ret == PREFIX_DENY ? "DENY" : "PERMIT", match);
+
+       if (!entry)
+               vty_out(vty, "no match found\n");
+       else {
+               vty_out(vty, "matching entry #%"PRId64": %pFX", entry->seq,
+                       &entry->prefix);
+               if (entry->ge)
+                       vty_out(vty, " ge %d", entry->ge);
+               if (entry->le)
+                       vty_out(vty, " le %d", entry->le);
+               vty_out(vty, "\n");
+       }
+
+       /* allow using this in scripts for quick prefix-list member tests */
+       return (ret == PREFIX_PERMIT) ? CMD_SUCCESS : CMD_WARNING;
+}
+
 struct stream *prefix_bgp_orf_entry(struct stream *s, struct prefix_list *plist,
                                    uint8_t init_flag, uint8_t permit_flag,
                                    uint8_t deny_flag)
@@ -1537,6 +1698,7 @@ static void prefix_list_init_ipv6(void)
        install_element(VIEW_NODE, &show_ipv6_prefix_list_prefix_cmd);
        install_element(VIEW_NODE, &show_ipv6_prefix_list_summary_cmd);
        install_element(VIEW_NODE, &show_ipv6_prefix_list_detail_cmd);
+       install_element(VIEW_NODE, &debug_prefix_list_match_cmd);
 
        install_element(ENABLE_NODE, &clear_ipv6_prefix_list_cmd);
 }
index 57eb763a6838e051a76f443435d1763204bef12e..c9507df57c88235a0448402265d67a36a32fef12 100644 (file)
@@ -37,6 +37,7 @@ enum prefix_list_type {
 };
 
 struct prefix_list;
+struct prefix_list_entry;
 
 struct orf_prefix {
        uint32_t seq;
@@ -63,12 +64,18 @@ extern struct prefix_list *prefix_list_lookup(afi_t, const char *);
  *
  * If no pointer is sent in, do not return anything.
  * If it is a empty plist return a NULL pointer.
+ *
+ * address_mode = the "prefix" being passed in is really an address, match
+ * regardless of prefix length (i.e. ge/le are ignored.)  prefix->prefixlen
+ * must be /32.
  */
 extern enum prefix_list_type
-prefix_list_apply_which_prefix(struct prefix_list *plist,
-                              const struct prefix **which,
-                              const void *object);
-#define prefix_list_apply(A, B) prefix_list_apply_which_prefix((A), NULL, (B))
+prefix_list_apply_ext(struct prefix_list *plist,
+                     const struct prefix_list_entry **matches,
+                     union prefixconstptr prefix,
+                     bool address_mode);
+#define prefix_list_apply(A, B) \
+       prefix_list_apply_ext((A), NULL, (B), false)
 
 extern struct prefix_list *prefix_bgp_orf_lookup(afi_t, const char *);
 extern struct stream *prefix_bgp_orf_entry(struct stream *,
index 599a0363eb2c94c2d26dea47ffc9e63332ad6234..7c4e9a16e1c238450ab4e9b243f6164dacb1e152 100644 (file)
 #ifndef FRR_ROUTE_OPAQUE_H
 #define FRR_ROUTE_OPAQUE_H
 
+#include "assert.h"
+#include "zclient.h"
+
 #include "bgpd/bgp_aspath.h"
 #include "bgpd/bgp_community.h"
 #include "bgpd/bgp_lcommunity.h"
 
 struct bgp_zebra_opaque {
-       char aspath[ASPATH_STR_DEFAULT_LEN];
+       char aspath[256];
 
        /* Show at least 10 communities AA:BB */
        char community[COMMUNITY_SIZE * 20];
@@ -35,4 +38,7 @@ struct bgp_zebra_opaque {
        char lcommunity[LCOMMUNITY_SIZE * 30];
 };
 
+static_assert(sizeof(struct bgp_zebra_opaque) <= ZAPI_MESSAGE_OPAQUE_LENGTH,
+              "BGP opaque data shouldn't be larger than zebra's buffer");
+
 #endif /* FRR_ROUTE_OPAQUE_H */
index c48391545d0f4a36098ae9929f8d7b0191fd2e47..77639070c9c83b2e088c0532c1d1f5c1340af574 100644 (file)
@@ -1,4 +1,4 @@
-# Canonical Zserv route types information registry for Quagga.
+# Canonical Zserv route types information registry for FRR.
 #
 # Used to construct route_types.c and route_types.h
 #
@@ -60,7 +60,7 @@ ZEBRA_ROUTE_PIM,      pim,       pimd,   'P', 0, 0, 0,     "PIM",           pimd
 ZEBRA_ROUTE_EIGRP,      eigrp,     eigrpd, 'E', 1, 0, 1,     "EIGRP",         eigrpd
 ZEBRA_ROUTE_NHRP,       nhrp,      nhrpd,  'N', 1, 1, 1,     "NHRP",          nhrpd
 # HSLS and OLSR both are AFI independent (so: 1, 1), however
-# we want to disable for them for general Quagga distribution.
+# we want to disable for them for general FRR distribution.
 # This at least makes it trivial for users of these protocols
 # to 'switch on' redist support (direct numeric entry remaining
 # possible).
index 9dc1c7c82d92fd58673d1ef42d13b89b064aaec1..594dcf97cb8158f21c49d08f54c6cd7dbd7239c7 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "linklist.h"
 #include "memory.h"
+#include "command.h"
 #include "vector.h"
 #include "prefix.h"
 #include "vty.h"
@@ -32,6 +33,7 @@
 #include "libfrr.h"
 #include "lib_errors.h"
 #include "table.h"
+#include "json.h"
 
 DEFINE_MTYPE_STATIC(LIB, ROUTE_MAP, "Route map");
 DEFINE_MTYPE(LIB, ROUTE_MAP_NAME, "Route map name");
@@ -840,50 +842,140 @@ static const char *route_map_result_str(route_map_result_t res)
 }
 
 /* show route-map */
-static void vty_show_route_map_entry(struct vty *vty, struct route_map *map)
+static void vty_show_route_map_entry(struct vty *vty, struct route_map *map,
+                                    json_object *json)
 {
        struct route_map_index *index;
        struct route_map_rule *rule;
-
-       vty_out(vty, "route-map: %s Invoked: %" PRIu64 " Optimization: %s Processed Change: %s\n",
-               map->name, map->applied - map->applied_clear,
-               map->optimization_disabled ? "disabled" : "enabled",
-               map->to_be_processed ? "true" : "false");
+       json_object *json_rmap = NULL;
+       json_object *json_rules = NULL;
+
+       if (json) {
+               json_rmap = json_object_new_object();
+               json_object_object_add(json, map->name, json_rmap);
+
+               json_rules = json_object_new_array();
+               json_object_int_add(json_rmap, "invoked",
+                                   map->applied - map->applied_clear);
+               json_object_boolean_add(json_rmap, "disabledOptimization",
+                                       map->optimization_disabled);
+               json_object_boolean_add(json_rmap, "processedChange",
+                                       map->to_be_processed);
+               json_object_object_add(json_rmap, "rules", json_rules);
+       } else {
+               vty_out(vty,
+                       "route-map: %s Invoked: %" PRIu64
+                       " Optimization: %s Processed Change: %s\n",
+                       map->name, map->applied - map->applied_clear,
+                       map->optimization_disabled ? "disabled" : "enabled",
+                       map->to_be_processed ? "true" : "false");
+       }
 
        for (index = map->head; index; index = index->next) {
-               vty_out(vty, " %s, sequence %d Invoked %" PRIu64 "\n",
-                       route_map_type_str(index->type), index->pref,
-                       index->applied - index->applied_clear);
-
-               /* Description */
-               if (index->description)
-                       vty_out(vty, "  Description:\n    %s\n",
-                               index->description);
-
-               /* Match clauses */
-               vty_out(vty, "  Match clauses:\n");
-               for (rule = index->match_list.head; rule; rule = rule->next)
-                       vty_out(vty, "    %s %s\n", rule->cmd->str,
-                               rule->rule_str);
-
-               vty_out(vty, "  Set clauses:\n");
-               for (rule = index->set_list.head; rule; rule = rule->next)
-                       vty_out(vty, "    %s %s\n", rule->cmd->str,
-                               rule->rule_str);
-
-               /* Call clause */
-               vty_out(vty, "  Call clause:\n");
-               if (index->nextrm)
-                       vty_out(vty, "    Call %s\n", index->nextrm);
-
-               /* Exit Policy */
-               vty_out(vty, "  Action:\n");
-               if (index->exitpolicy == RMAP_GOTO)
-                       vty_out(vty, "    Goto %d\n", index->nextpref);
-               else if (index->exitpolicy == RMAP_NEXT)
-                       vty_out(vty, "    Continue to next entry\n");
-               else if (index->exitpolicy == RMAP_EXIT)
-                       vty_out(vty, "    Exit routemap\n");
+               if (json) {
+                       json_object *json_rule;
+                       json_object *json_matches;
+                       json_object *json_sets;
+                       char action[BUFSIZ] = {};
+
+                       json_rule = json_object_new_object();
+                       json_object_array_add(json_rules, json_rule);
+
+                       json_object_int_add(json_rule, "sequenceNumber",
+                                           index->pref);
+                       json_object_string_add(json_rule, "type",
+                                              route_map_type_str(index->type));
+                       json_object_int_add(json_rule, "invoked",
+                                           index->applied
+                                                   - index->applied_clear);
+
+                       /* Description */
+                       if (index->description)
+                               json_object_string_add(json_rule, "description",
+                                                      index->description);
+
+                       /* Match clauses */
+                       json_matches = json_object_new_array();
+                       json_object_object_add(json_rule, "matchClauses",
+                                              json_matches);
+                       for (rule = index->match_list.head; rule;
+                            rule = rule->next) {
+                               char buf[BUFSIZ];
+
+                               snprintf(buf, sizeof(buf), "%s %s",
+                                        rule->cmd->str, rule->rule_str);
+                               json_array_string_add(json_matches, buf);
+                       }
+
+                       /* Set clauses */
+                       json_sets = json_object_new_array();
+                       json_object_object_add(json_rule, "setClauses",
+                                              json_sets);
+                       for (rule = index->set_list.head; rule;
+                            rule = rule->next) {
+                               char buf[BUFSIZ];
+
+                               snprintf(buf, sizeof(buf), "%s %s",
+                                        rule->cmd->str, rule->rule_str);
+                               json_array_string_add(json_sets, buf);
+                       }
+
+                       /* Call clause */
+                       if (index->nextrm)
+                               json_object_string_add(json_rule, "callClause",
+                                                      index->nextrm);
+
+                       /* Exit Policy */
+                       if (index->exitpolicy == RMAP_GOTO)
+                               snprintf(action, sizeof(action), "Goto %d",
+                                        index->nextpref);
+                       else if (index->exitpolicy == RMAP_NEXT)
+                               snprintf(action, sizeof(action),
+                                        "Continue to next entry");
+                       else if (index->exitpolicy == RMAP_EXIT)
+                               snprintf(action, sizeof(action),
+                                        "Exit routemap");
+                       if (action[0] != '\0')
+                               json_object_string_add(json_rule, "action",
+                                                      action);
+               } else {
+                       vty_out(vty, " %s, sequence %d Invoked %" PRIu64 "\n",
+                               route_map_type_str(index->type), index->pref,
+                               index->applied - index->applied_clear);
+
+                       /* Description */
+                       if (index->description)
+                               vty_out(vty, "  Description:\n    %s\n",
+                                       index->description);
+
+                       /* Match clauses */
+                       vty_out(vty, "  Match clauses:\n");
+                       for (rule = index->match_list.head; rule;
+                            rule = rule->next)
+                               vty_out(vty, "    %s %s\n", rule->cmd->str,
+                                       rule->rule_str);
+
+                       /* Set clauses */
+                       vty_out(vty, "  Set clauses:\n");
+                       for (rule = index->set_list.head; rule;
+                            rule = rule->next)
+                               vty_out(vty, "    %s %s\n", rule->cmd->str,
+                                       rule->rule_str);
+
+                       /* Call clause */
+                       vty_out(vty, "  Call clause:\n");
+                       if (index->nextrm)
+                               vty_out(vty, "    Call %s\n", index->nextrm);
+
+                       /* Exit Policy */
+                       vty_out(vty, "  Action:\n");
+                       if (index->exitpolicy == RMAP_GOTO)
+                               vty_out(vty, "    Goto %d\n", index->nextpref);
+                       else if (index->exitpolicy == RMAP_NEXT)
+                               vty_out(vty, "    Continue to next entry\n");
+                       else if (index->exitpolicy == RMAP_EXIT)
+                               vty_out(vty, "    Exit routemap\n");
+               }
        }
 }
 
@@ -895,22 +987,28 @@ static int sort_route_map(const void **map1, const void **map2)
        return strcmp(m1->name, m2->name);
 }
 
-static int vty_show_route_map(struct vty *vty, const char *name)
+static int vty_show_route_map(struct vty *vty, const char *name, bool use_json)
 {
        struct route_map *map;
+       json_object *json = NULL;
+       json_object *json_proto = NULL;
 
-       vty_out(vty, "%s:\n", frr_protonameinst);
+       if (use_json) {
+               json = json_object_new_object();
+               json_proto = json_object_new_object();
+               json_object_object_add(json, frr_protonameinst, json_proto);
+       } else
+               vty_out(vty, "%s:\n", frr_protonameinst);
 
        if (name) {
                map = route_map_lookup_by_name(name);
 
                if (map) {
-                       vty_show_route_map_entry(vty, map);
+                       vty_show_route_map_entry(vty, map, json_proto);
                        return CMD_SUCCESS;
-               } else {
+               } else if (!use_json) {
                        vty_out(vty, "%s: 'route-map %s' not found\n",
                                frr_protonameinst, name);
-                       return CMD_SUCCESS;
                }
        } else {
 
@@ -923,10 +1021,18 @@ static int vty_show_route_map(struct vty *vty, const char *name)
                list_sort(maplist, sort_route_map);
 
                for (ALL_LIST_ELEMENTS_RO(maplist, ln, map))
-                       vty_show_route_map_entry(vty, map);
+                       vty_show_route_map_entry(vty, map, json_proto);
 
                list_delete(&maplist);
        }
+
+       if (use_json) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
+
        return CMD_SUCCESS;
 }
 
@@ -950,7 +1056,7 @@ static int vty_show_unused_route_map(struct vty *vty)
                list_sort(maplist, sort_route_map);
 
                for (ALL_LIST_ELEMENTS_RO(maplist, ln, map))
-                       vty_show_route_map_entry(vty, map);
+                       vty_show_route_map_entry(vty, map, NULL);
        } else {
                vty_out(vty, "\n%s: None\n", frr_protonameinst);
        }
@@ -1325,7 +1431,7 @@ enum rmap_compile_rets route_map_add_match(struct route_map_index *index,
                         * the same as the existing configuration then,
                         * ignore the duplicate configuration.
                         */
-                       if (strcmp(match_arg, rule->rule_str) == 0) {
+                       if (rulecmp(match_arg, rule->rule_str) == 0) {
                                if (cmd->func_free)
                                        (*cmd->func_free)(compile);
 
@@ -2957,14 +3063,20 @@ DEFUN (rmap_clear_counters,
 
 DEFUN (rmap_show_name,
        rmap_show_name_cmd,
-       "show route-map [WORD]",
+       "show route-map [WORD] [json]",
        SHOW_STR
        "route-map information\n"
-       "route-map name\n")
+       "route-map name\n"
+       JSON_STR)
 {
-       int idx_word = 2;
-       const char *name = (argc == 3) ? argv[idx_word]->arg : NULL;
-       return vty_show_route_map(vty, name);
+       bool uj = use_json(argc, argv);
+       int idx = 0;
+       const char *name = NULL;
+
+       if (argv_find(argv, argc, "WORD", &idx))
+               name = argv[idx]->arg;
+
+       return vty_show_route_map(vty, name, uj);
 }
 
 DEFUN (rmap_show_unused,
index 4a40ec08b9ffdd639c51279070b87b2f8ad531ee..b356dbf52e0755dbd56dec268398f00a55c571ab 100644 (file)
@@ -270,6 +270,7 @@ DECLARE_QOBJ_TYPE(route_map);
 /* BGP route-map match conditions */
 #define IS_MATCH_LOCAL_PREF(C)                                                 \
        (strmatch(C, "frr-bgp-route-map:match-local-preference"))
+#define IS_MATCH_ALIAS(C) (strmatch(C, "frr-bgp-route-map:match-alias"))
 #define IS_MATCH_ORIGIN(C)                                                     \
        (strmatch(C, "frr-bgp-route-map:match-origin"))
 #define IS_MATCH_RPKI(C) (strmatch(C, "frr-bgp-route-map:rpki"))
@@ -349,10 +350,14 @@ DECLARE_QOBJ_TYPE(route_map);
        (strmatch(A, "frr-bgp-route-map:set-large-community"))
 #define IS_SET_COMMUNITY(A)                                                    \
        (strmatch(A, "frr-bgp-route-map:set-community"))
+#define IS_SET_EXTCOMMUNITY_NONE(A)                                            \
+       (strmatch(A, "frr-bgp-route-map:set-extcommunity-none"))
 #define IS_SET_EXTCOMMUNITY_RT(A)                                              \
        (strmatch(A, "frr-bgp-route-map:set-extcommunity-rt"))
 #define IS_SET_EXTCOMMUNITY_SOO(A)                                             \
        (strmatch(A, "frr-bgp-route-map:set-extcommunity-soo"))
+#define IS_SET_EXTCOMMUNITY_LB(A)                                              \
+       (strmatch(A, "frr-bgp-route-map:set-extcommunity-lb"))
 #define IS_SET_AGGREGATOR(A)                                                   \
        (strmatch(A, "frr-bgp-route-map:aggregator"))
 #define IS_SET_AS_PREPEND(A)                                                   \
@@ -376,6 +381,12 @@ DECLARE_QOBJ_TYPE(route_map);
 #define IS_SET_BGP_EVPN_GATEWAY_IP_IPV6(A)                                     \
        (strmatch(A, "frr-bgp-route-map:set-evpn-gateway-ip-ipv6"))
 
+enum ecommunity_lb_type {
+       EXPLICIT_BANDWIDTH,
+       CUMULATIVE_BANDWIDTH,
+       COMPUTED_BANDWIDTH
+};
+
 /* Prototypes. */
 extern void route_map_init(void);
 
index bf982cfa2ba2c0ab4dac52a5234a76976f444536..cadad15fa7fdd82505d25818b948c7abbee4572d 100644 (file)
@@ -124,6 +124,7 @@ void route_map_instance_show(struct vty *vty, struct lyd_node *dnode,
 
 void route_map_instance_show_end(struct vty *vty, struct lyd_node *dnode)
 {
+       vty_out(vty, "exit\n");
        vty_out(vty, "!\n");
 }
 
@@ -634,6 +635,11 @@ void route_map_condition_show(struct vty *vty, struct lyd_node *dnode,
                        yang_dnode_get_string(
                                dnode,
                                "./rmap-match-condition/frr-bgp-route-map:local-preference"));
+       } else if (IS_MATCH_ALIAS(condition)) {
+               vty_out(vty, " match alias %s\n",
+                       yang_dnode_get_string(
+                               dnode,
+                               "./rmap-match-condition/frr-bgp-route-map:alias"));
        } else if (IS_MATCH_ORIGIN(condition)) {
                vty_out(vty, " match origin %s\n",
                        yang_dnode_get_string(
@@ -1189,6 +1195,39 @@ void route_map_action_show(struct vty *vty, struct lyd_node *dnode,
                        yang_dnode_get_string(
                                dnode,
                                "./rmap-set-action/frr-bgp-route-map:extcommunity-soo"));
+       } else if (IS_SET_EXTCOMMUNITY_LB(action)) {
+               enum ecommunity_lb_type lb_type;
+               char str[VTY_BUFSIZ];
+               uint16_t bandwidth;
+
+               lb_type = yang_dnode_get_enum(
+                       dnode,
+                       "./rmap-set-action/frr-bgp-route-map:extcommunity-lb/lb-type");
+               switch (lb_type) {
+               case EXPLICIT_BANDWIDTH:
+                       bandwidth = yang_dnode_get_uint16(
+                               dnode,
+                               "./rmap-set-action/frr-bgp-route-map:extcommunity-lb/bandwidth");
+                       snprintf(str, sizeof(str), "%d", bandwidth);
+                       break;
+               case CUMULATIVE_BANDWIDTH:
+                       snprintf(str, sizeof(str), "%s", "cumulative");
+                       break;
+               case COMPUTED_BANDWIDTH:
+                       snprintf(str, sizeof(str), "%s", "num-multipaths");
+               }
+
+               if (yang_dnode_get_bool(
+                           dnode,
+                           "./rmap-set-action/frr-bgp-route-map:extcommunity-lb/two-octet-as-specific"))
+                       strlcat(str, " non-transitive", sizeof(str));
+
+               vty_out(vty, " set extcommunity bandwidth %s\n", str);
+       } else if (IS_SET_EXTCOMMUNITY_NONE(action)) {
+               if (yang_dnode_get_bool(
+                           dnode,
+                           "./rmap-set-action/frr-bgp-route-map:extcommunity-none"))
+                       vty_out(vty, " set extcommunity none\n");
        } else if (IS_SET_AGGREGATOR(action)) {
                vty_out(vty, " set aggregator as %s %s\n",
                        yang_dnode_get_string(
index 90301d800aecc5106ac3abc81af593cad53e329a..dab5fb9e8391337e6f9e89bed050b015f91de99b 100644 (file)
@@ -2,7 +2,7 @@
 # libfrr
 #
 lib_LTLIBRARIES += lib/libfrr.la
-lib_libfrr_la_LDFLAGS = -version-info 0:0:0 -Xlinker -e_libfrr_version
+lib_libfrr_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0 -Xlinker -e_libfrr_version
 lib_libfrr_la_LIBADD = $(LIBCAP) $(UNWIND_LIBS) $(LIBYANG_LIBS) $(LUA_LIB) $(UST_LIBS) $(LIBM)
 
 lib_libfrr_la_SOURCES = \
@@ -144,7 +144,6 @@ vtysh_scan += \
        lib/log_vty.c \
        lib/nexthop_group.c \
        lib/plist.c \
-       lib/resolver.c \
        lib/routemap.c \
        lib/routemap_cli.c \
        lib/spf_backoff.c \
@@ -322,7 +321,7 @@ lib_LTLIBRARIES += lib/libfrrsnmp.la
 endif
 
 lib_libfrrsnmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
-lib_libfrrsnmp_la_LDFLAGS = -version-info 0:0:0
+lib_libfrrsnmp_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
 lib_libfrrsnmp_la_LIBADD = $(SNMP_LIBS)
 lib_libfrrsnmp_la_SOURCES = \
        lib/agentx.c \
@@ -335,10 +334,11 @@ lib_libfrrsnmp_la_SOURCES = \
 if CARES
 lib_LTLIBRARIES += lib/libfrrcares.la
 pkginclude_HEADERS += lib/resolver.h
+vtysh_scan += lib/resolver.c
 endif
 
 lib_libfrrcares_la_CFLAGS = $(AM_CFLAGS) $(CARES_CFLAGS)
-lib_libfrrcares_la_LDFLAGS = -version-info 0:0:0
+lib_libfrrcares_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
 lib_libfrrcares_la_LIBADD = $(CARES_LIBS)
 lib_libfrrcares_la_SOURCES = \
        lib/resolver.c \
@@ -353,7 +353,7 @@ pkginclude_HEADERS += lib/frr_zmq.h
 endif
 
 lib_libfrrzmq_la_CFLAGS = $(AM_CFLAGS) $(ZEROMQ_CFLAGS)
-lib_libfrrzmq_la_LDFLAGS = -version-info 0:0:0
+lib_libfrrzmq_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
 lib_libfrrzmq_la_LIBADD = $(ZEROMQ_LIBS)
 lib_libfrrzmq_la_SOURCES = \
        lib/frr_zmq.c \
@@ -367,7 +367,7 @@ module_LTLIBRARIES += lib/confd.la
 endif
 
 lib_confd_la_CFLAGS = $(AM_CFLAGS) $(CONFD_CFLAGS)
-lib_confd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+lib_confd_la_LDFLAGS = $(MODULE_LDFLAGS)
 lib_confd_la_LIBADD = lib/libfrr.la $(CONFD_LIBS)
 lib_confd_la_SOURCES = lib/northbound_confd.c
 
@@ -379,7 +379,7 @@ module_LTLIBRARIES += lib/sysrepo.la
 endif
 
 lib_sysrepo_la_CFLAGS = $(AM_CFLAGS) $(SYSREPO_CFLAGS)
-lib_sysrepo_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+lib_sysrepo_la_LDFLAGS = $(MODULE_LDFLAGS)
 lib_sysrepo_la_LIBADD = lib/libfrr.la $(SYSREPO_LIBS)
 lib_sysrepo_la_SOURCES = lib/northbound_sysrepo.c
 
@@ -391,7 +391,7 @@ module_LTLIBRARIES += lib/grpc.la
 endif
 
 lib_grpc_la_CXXFLAGS = $(WERROR) $(GRPC_CFLAGS)
-lib_grpc_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+lib_grpc_la_LDFLAGS = $(MODULE_LDFLAGS)
 lib_grpc_la_LIBADD = lib/libfrr.la grpc/libfrrgrpc_pb.la $(GRPC_LIBS)
 lib_grpc_la_SOURCES = lib/northbound_grpc.cpp
 
@@ -419,7 +419,8 @@ lib_grammar_sandbox_LDADD = \
 lib_clippy_CPPFLAGS = $(CPPFLAGS_BASE) -D_GNU_SOURCE -DBUILDING_CLIPPY
 lib_clippy_CFLAGS = $(AC_CFLAGS) $(PYTHON_CFLAGS)
 lib_clippy_LDADD = $(PYTHON_LIBS) $(UST_LIBS) -lelf
-lib_clippy_LDFLAGS = -export-dynamic
+# no $(SAN_FLAGS) here
+lib_clippy_LDFLAGS = -export-dynamic $(AC_LDFLAGS) $(AC_LDFLAGS_EXEC)
 lib_clippy_SOURCES = \
        lib/jhash.c \
        lib/clippy.c \
index 03d9a62c0f138b6b5fbde171e42268d83cd09408..f9307d303909a41fc5151979b67f4215d033e259 100644 (file)
--- a/lib/vrf.c
+++ b/lib/vrf.c
@@ -58,7 +58,6 @@ struct vrf_name_head vrfs_by_name = RB_INITIALIZER(&vrfs_by_name);
 
 static int vrf_backend;
 static int vrf_backend_configured;
-static struct zebra_privs_t *vrf_daemon_privs;
 static char vrf_default_name[VRF_NAMSIZ] = VRF_DEFAULT_NAME_INTERNAL;
 
 /*
@@ -287,6 +286,7 @@ void vrf_delete(struct vrf *vrf)
                        RB_REMOVE(vrf_id_head, &vrfs_by_id, vrf);
                        vrf->vrf_id = VRF_UNKNOWN;
                }
+               vrf->ns_ctxt = NULL;
                return;
        }
 
@@ -855,62 +855,6 @@ static struct cmd_node vrf_node = {
        .prompt = "%s(config-vrf)# ",
 };
 
-DEFUN_NOSH (vrf_netns,
-       vrf_netns_cmd,
-       "netns NAME",
-       "Attach VRF to a Namespace\n"
-       "The file name in " NS_RUN_DIR ", or a full pathname\n")
-{
-       int idx_name = 1, ret;
-       char *pathname = ns_netns_pathname(vty, argv[idx_name]->arg);
-
-       VTY_DECLVAR_CONTEXT(vrf, vrf);
-
-       if (!pathname)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       frr_with_privs(vrf_daemon_privs) {
-               ret = vrf_netns_handler_create(vty, vrf, pathname,
-                                              NS_UNKNOWN,
-                                              NS_UNKNOWN,
-                                              NS_UNKNOWN);
-       }
-       return ret;
-}
-
-DEFUN_NOSH (no_vrf_netns,
-       no_vrf_netns_cmd,
-       "no netns [NAME]",
-       NO_STR
-       "Detach VRF from a Namespace\n"
-       "The file name in " NS_RUN_DIR ", or a full pathname\n")
-{
-       struct ns *ns = NULL;
-
-       VTY_DECLVAR_CONTEXT(vrf, vrf);
-
-       if (!vrf_is_backend_netns()) {
-               vty_out(vty, "VRF backend is not Netns. Aborting\n");
-               return CMD_WARNING_CONFIG_FAILED;
-       }
-       if (!vrf->ns_ctxt) {
-               vty_out(vty, "VRF %s(%u) is not configured with NetNS\n",
-                       vrf->name, vrf->vrf_id);
-               return CMD_WARNING_CONFIG_FAILED;
-       }
-
-       ns = (struct ns *)vrf->ns_ctxt;
-
-       ns->vrf_ctxt = NULL;
-       vrf_disable(vrf);
-       /* vrf ID from VRF is necessary for Zebra
-        * so that propagate to other clients is done
-        */
-       ns_delete(ns);
-       vrf->ns_ctxt = NULL;
-       return CMD_SUCCESS;
-}
-
 /*
  * Debug CLI for vrf's
  */
@@ -963,8 +907,7 @@ void vrf_install_commands(void)
        install_element(ENABLE_NODE, &no_vrf_debug_cmd);
 }
 
-void vrf_cmd_init(int (*writefunc)(struct vty *vty),
-                 struct zebra_privs_t *daemon_privs)
+void vrf_cmd_init(int (*writefunc)(struct vty *vty))
 {
        install_element(CONFIG_NODE, &vrf_cmd);
        install_element(CONFIG_NODE, &no_vrf_cmd);
@@ -972,12 +915,6 @@ void vrf_cmd_init(int (*writefunc)(struct vty *vty),
        install_node(&vrf_node);
        install_default(VRF_NODE);
        install_element(VRF_NODE, &vrf_exit_cmd);
-       if (vrf_is_backend_netns() && ns_have_netns()) {
-               /* Install NS commands. */
-               vrf_daemon_privs = daemon_privs;
-               install_element(VRF_NODE, &vrf_netns_cmd);
-               install_element(VRF_NODE, &no_vrf_netns_cmd);
-       }
 }
 
 void vrf_set_default_name(const char *default_name, bool force)
@@ -1131,13 +1068,6 @@ int vrf_sockunion_socket(const union sockunion *su, vrf_id_t vrf_id,
        return ret;
 }
 
-vrf_id_t vrf_generate_id(void)
-{
-       static int vrf_id_local;
-
-       return ++vrf_id_local;
-}
-
 /* ------- Northbound callbacks ------- */
 
 /*
index 7ce03079dd8f1ca4fbf3db9a54a14aa7ee031c1f..9949ec411232a9ebddfa441595d781abf7c2ee84 100644 (file)
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -285,8 +285,7 @@ extern int vrf_switchback_to_initial(void);
 
 /* VRF vty command initialisation
  */
-extern void vrf_cmd_init(int (*writefunc)(struct vty *vty),
-                        struct zebra_privs_t *daemon_priv);
+extern void vrf_cmd_init(int (*writefunc)(struct vty *vty));
 
 /* VRF vty debugging
  */
@@ -324,7 +323,6 @@ extern int vrf_netns_handler_create(struct vty *vty, struct vrf *vrf,
 extern void vrf_disable(struct vrf *vrf);
 extern int vrf_enable(struct vrf *vrf);
 extern void vrf_delete(struct vrf *vrf);
-extern vrf_id_t vrf_generate_id(void);
 
 extern const struct frr_yang_module_info frr_vrf_info;
 
index f64ab83847af3695ce9121b86492fc4d2198000c..fef16f1ee7a6e3dab92bbd5eb4ee9a270f5a1d92 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -3040,7 +3040,7 @@ DEFPY (log_commands,
 /* Display current configuration. */
 static int vty_config_write(struct vty *vty)
 {
-       vty_out(vty, "line vty\n");
+       vty_frame(vty, "line vty\n");
 
        if (vty_accesslist_name)
                vty_out(vty, " access-class %s\n", vty_accesslist_name);
@@ -3058,6 +3058,8 @@ static int vty_config_write(struct vty *vty)
        if (no_password_check)
                vty_out(vty, " no login\n");
 
+       vty_endframe(vty, "exit\n");
+
        if (do_log_commands)
                vty_out(vty, "log commands\n");
 
index 0815e77d4edff76b9f8712531c5be807e0340918..a1e7194890fa69a9bdd4793fb5416567616c96c1 100644 (file)
@@ -1299,7 +1299,13 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api)
                stream_putl(s, api->tableid);
 
        if (CHECK_FLAG(api->message, ZAPI_MESSAGE_OPAQUE)) {
-               assert(api->opaque.length <= ZAPI_MESSAGE_OPAQUE_LENGTH);
+               if (api->opaque.length > ZAPI_MESSAGE_OPAQUE_LENGTH) {
+                       flog_err(
+                               EC_LIB_ZAPI_ENCODE,
+                               "%s: opaque length %u is greater than allowed value",
+                               __func__, api->opaque.length);
+                       return -1;
+               }
 
                stream_putw(s, api->opaque.length);
                stream_write(s, api->opaque.data, api->opaque.length);
@@ -1537,7 +1543,13 @@ int zapi_route_decode(struct stream *s, struct zapi_route *api)
 
        if (CHECK_FLAG(api->message, ZAPI_MESSAGE_OPAQUE)) {
                STREAM_GETW(s, api->opaque.length);
-               assert(api->opaque.length <= ZAPI_MESSAGE_OPAQUE_LENGTH);
+               if (api->opaque.length > ZAPI_MESSAGE_OPAQUE_LENGTH) {
+                       flog_err(
+                               EC_LIB_ZAPI_ENCODE,
+                               "%s: opaque length %u is greater than allowed value",
+                               __func__, api->opaque.length);
+                       return -1;
+               }
 
                STREAM_GET(api->opaque.data, s, api->opaque.length);
        }
@@ -3430,6 +3442,14 @@ int zapi_labels_decode(struct stream *s, struct zapi_labels *zl)
 
                if (zapi_nexthop_decode(s, znh, 0, 0) < 0)
                        return -1;
+
+               if (znh->type == NEXTHOP_TYPE_BLACKHOLE) {
+                       flog_warn(
+                               EC_LIB_ZAPI_ENCODE,
+                               "%s: Prefix %pFX has a blackhole nexthop which we cannot use for a label",
+                               __func__, &zl->route.prefix);
+                       return -1;
+               }
        }
 
        if (CHECK_FLAG(zl->message, ZAPI_LABELS_HAS_BACKUPS)) {
@@ -3451,6 +3471,14 @@ int zapi_labels_decode(struct stream *s, struct zapi_labels *zl)
 
                        if (zapi_nexthop_decode(s, znh, 0, 0) < 0)
                                return -1;
+
+                       if (znh->type == NEXTHOP_TYPE_BLACKHOLE) {
+                               flog_warn(
+                                       EC_LIB_ZAPI_ENCODE,
+                                       "%s: Prefix %pFX has a backup blackhole nexthop which we cannot use for a label",
+                                       __func__, &zl->route.prefix);
+                               return -1;
+                       }
                }
        }
 
@@ -4459,11 +4487,9 @@ static int zclient_neigh_ip_read_entry(struct stream *s, struct ipaddr *add)
        return -1;
 }
 
-int zclient_neigh_ip_encode(struct stream *s,
-                           uint16_t cmd,
-                           union sockunion *in,
-                           union sockunion *out,
-                           struct interface *ifp)
+int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in,
+                           union sockunion *out, struct interface *ifp,
+                           int ndm_state)
 {
        int ret = 0;
 
@@ -4478,7 +4504,7 @@ int zclient_neigh_ip_encode(struct stream *s,
                stream_putc(s, AF_UNSPEC);
        stream_putl(s, ifp->ifindex);
        if (out)
-               stream_putl(s, ZEBRA_NEIGH_STATE_REACHABLE);
+               stream_putl(s, ndm_state);
        else
                stream_putl(s, ZEBRA_NEIGH_STATE_FAILED);
        return ret;
index a25c5800b720fe1742319b86d3859317232e9cc0..71187ccae73cb497b95f7c90da116154898d5f19 100644 (file)
@@ -856,9 +856,18 @@ extern struct zclient_options zclient_options_default;
  * ip_in is the underlay IP, ip_out is the tunnel dest
  * index stands for the index of the interface
  * ndm state stands for the NDM value in netlink
+ * (see linux/neighbour.h)
  */
+#define ZEBRA_NEIGH_STATE_INCOMPLETE (0x01)
 #define ZEBRA_NEIGH_STATE_REACHABLE (0x02)
-#define ZEBRA_NEIGH_STATE_FAILED    (0x20)
+#define ZEBRA_NEIGH_STATE_STALE (0x04)
+#define ZEBRA_NEIGH_STATE_DELAY (0x08)
+#define ZEBRA_NEIGH_STATE_PROBE (0x10)
+#define ZEBRA_NEIGH_STATE_FAILED (0x20)
+#define ZEBRA_NEIGH_STATE_NOARP (0x40)
+#define ZEBRA_NEIGH_STATE_PERMANENT (0x80)
+#define ZEBRA_NEIGH_STATE_NONE (0x00)
+
 struct zapi_neigh_ip {
        int cmd;
        struct ipaddr ip_in;
@@ -867,11 +876,9 @@ struct zapi_neigh_ip {
        uint32_t ndm_state;
 };
 int zclient_neigh_ip_decode(struct stream *s, struct zapi_neigh_ip *api);
-int zclient_neigh_ip_encode(struct stream *s,
-                           uint16_t cmd,
-                           union sockunion *in,
-                           union sockunion *out,
-                           struct interface *ifp);
+int zclient_neigh_ip_encode(struct stream *s, uint16_t cmd, union sockunion *in,
+                           union sockunion *out, struct interface *ifp,
+                           int ndm_state);
 
 /*
  * We reserve the top 4 bits for l2-NHG, everything else
index 49d176150557a81a4a3bccc01e8a1c1fe69d1a7b..376eea8bc9b5831ad59d3207781996fb340835a2 100644 (file)
@@ -2,7 +2,7 @@ if HAVE_PROTOBUF3
 lib_LTLIBRARIES += mlag/libmlag_pb.la
 endif
 
-mlag_libmlag_pb_la_LDFLAGS = -version-info 0:0:0
+mlag_libmlag_pb_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
 mlag_libmlag_pb_la_CPPFLAGS = $(AM_CPPFLAGS) $(PROTOBUF_C_CFLAGS)
 mlag_libmlag_pb_la_SOURCES = \
        # end
index 54b785020727b8d53cc2b015a73b0adc30bbdaf6..73684046a8c1e45945f4059677b75d888020e44e 100644 (file)
@@ -71,7 +71,6 @@ static void parse_arguments(int argc, char **argv)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 }
index ee8db277d9a9a69b24966831af3b53ebf6da5605..12a2fc2fa0d9cea3e0906d56c218a54c67451987 100644 (file)
@@ -452,7 +452,8 @@ void nhrp_send_zebra_nbr(union sockunion *in,
        stream_reset(s);
        zclient_neigh_ip_encode(s, out ? ZEBRA_NEIGH_IP_ADD :
                                ZEBRA_NEIGH_IP_DEL, in, out,
-                               ifp);
+                               ifp, out ? ZEBRA_NEIGH_STATE_REACHABLE
+                               : ZEBRA_NEIGH_STATE_FAILED);
        stream_putw_at(s, 0, stream_get_endp(s));
        zclient_send_message(zclient);
 }
index 56861551eae54eac0b267cdf1cb9542f6ee2e82c..0905ceb72a4bcfa015a67e1d3e1d5e9bee1f4e2b 100644 (file)
@@ -427,8 +427,10 @@ static void nhrp_shortcut_send_resolution_req(struct nhrp_shortcut *s)
         * */
        /* FIXME: push CIE for each local protocol address */
        cie = nhrp_cie_push(zb, NHRP_CODE_SUCCESS, NULL, NULL);
-       cie->prefix_length = 0xff;
        if_ad = &nifp->afi[family2afi(sockunion_family(&s->addr))];
+       cie->prefix_length = (if_ad->flags & NHRP_IFF_REG_NO_UNIQUE)
+                               ? 8 * sockunion_get_addrlen(&s->addr)
+                               : 0xff;
        cie->holding_time = htons(if_ad->holdtime);
        cie->mtu = htons(if_ad->mtu);
        debugf(NHRP_DEBUG_COMMON,
index 963fa4d9957c9cf9f6966e6567146050030fc23e..50161dae2fc39735add099c593627d5a48f0af65 100644 (file)
@@ -26,15 +26,6 @@ static struct cmd_node zebra_node = {
        .config_write = nhrp_config_write,
 };
 
-static int interface_config_write(struct vty *vty);
-static struct cmd_node nhrp_interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = interface_config_write,
-};
-
 #define NHRP_DEBUG_FLAGS_CMD "<all|common|event|interface|kernel|route|vici>"
 
 #define NHRP_DEBUG_FLAGS_STR                                                   \
@@ -844,6 +835,7 @@ static void show_ip_nhrp_shortcut(struct nhrp_shortcut *s, void *pctx)
        ctx->count++;
 
        c = s->cache;
+       buf2[0] = '\0';
        if (c)
                sockunion2str(&c->remote_addr, buf2, sizeof(buf2));
        prefix2str(s->p, buf1, sizeof(buf1));
@@ -1075,7 +1067,8 @@ static void clear_nhrp_cache(struct nhrp_cache *c, void *data)
        if (c->cur.type <= NHRP_CACHE_DYNAMIC) {
                nhrp_cache_update_binding(c, c->cur.type, -1, NULL, 0, NULL,
                                          NULL);
-               ctx->count++;
+               if (ctx)
+                       ctx->count++;
        }
 }
 
@@ -1105,6 +1098,12 @@ DEFUN(clear_nhrp, clear_nhrp_cmd,
                        nhrp_cache_foreach(ifp, clear_nhrp_cache, &ctx);
        } else {
                nhrp_shortcut_foreach(ctx.afi, clear_nhrp_shortcut, &ctx);
+               /* Clear cache also because when a shortcut is cleared then its
+                * cache entry should be cleared as well (otherwise traffic
+                * continues via the shortcut path)
+                */
+               FOR_ALL_INTERFACES (vrf, ifp)
+                       nhrp_cache_foreach(ifp, clear_nhrp_cache, NULL);
        }
 
        if (!ctx.count) {
@@ -1210,7 +1209,7 @@ static int interface_config_write(struct vty *vty)
                                        vty_out(vty, "dynamic");
                                else
                                        vty_out(vty, "%pSU", &nhs->proto_addr);
-                               vty_out(vty, "nbma %s\n", nhs->nbma_fqdn);
+                               vty_out(vty, " nbma %s\n", nhs->nbma_fqdn);
                        }
 
                        list_for_each_entry(mcast, &ad->mcastlist_head,
@@ -1226,7 +1225,7 @@ static int interface_config_write(struct vty *vty)
                        }
                }
 
-               vty_endframe(vty, "!\n");
+               vty_endframe(vty, "exit\n!\n");
        }
 
        return 0;
@@ -1260,12 +1259,10 @@ void nhrp_config_init(void)
        install_element(CONFIG_NODE, &nhrp_multicast_nflog_group_cmd);
        install_element(CONFIG_NODE, &no_nhrp_multicast_nflog_group_cmd);
 
-       vrf_cmd_init(NULL, &nhrpd_privs);
+       vrf_cmd_init(NULL);
 
        /* interface specific commands */
-       install_node(&nhrp_interface_node);
-
-       if_cmd_init();
+       if_cmd_init(interface_config_write);
        install_element(INTERFACE_NODE, &tunnel_protection_cmd);
        install_element(INTERFACE_NODE, &no_tunnel_protection_cmd);
        install_element(INTERFACE_NODE, &tunnel_source_cmd);
index f289bf26b933279eb71250b2770d3b50bfb56296..650262f1aec851faf4788a4461a3c42afe606e3d 100644 (file)
@@ -172,9 +172,19 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route,
        uint16_t type;
        int is_debug = 0;
 
-       if (IS_OSPF6_DEBUG_ABR)
-               zlog_debug("%s : start area %s, route %pFX", __func__,
-                          area->name, &route->prefix);
+       if (IS_OSPF6_DEBUG_ABR) {
+               char buf[BUFSIZ];
+
+               if (route->type == OSPF6_DEST_TYPE_ROUTER)
+                       inet_ntop(AF_INET,
+                                 &ADV_ROUTER_IN_PREFIX(&route->prefix), buf,
+                                 sizeof(buf));
+               else
+                       prefix2str(&route->prefix, buf, sizeof(buf));
+
+               zlog_debug("%s : start area %s, route %s", __func__, area->name,
+                          buf);
+       }
 
        if (route->type == OSPF6_DEST_TYPE_ROUTER)
                summary_table = area->summary_router;
@@ -477,11 +487,11 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route,
                monotime(&summary->changed);
        }
 
+       summary->prefix_options = route->prefix_options;
        summary->path.router_bits = route->path.router_bits;
        summary->path.options[0] = route->path.options[0];
        summary->path.options[1] = route->path.options[1];
        summary->path.options[2] = route->path.options[2];
-       summary->path.prefix_options = route->path.prefix_options;
        summary->path.area_id = area->area_id;
        summary->path.type = OSPF6_PATH_TYPE_INTER;
        summary->path.subtype = route->path.subtype;
@@ -514,7 +524,7 @@ int ospf6_abr_originate_summary_to_area(struct ospf6_route *route,
                /* Fill Inter-Area-Prefix-LSA */
                OSPF6_ABR_SUMMARY_METRIC_SET(prefix_lsa, route->path.cost);
                prefix_lsa->prefix.prefix_length = route->prefix.prefixlen;
-               prefix_lsa->prefix.prefix_options = route->path.prefix_options;
+               prefix_lsa->prefix.prefix_options = route->prefix_options;
 
                /* set Prefix */
                memcpy(p, &route->prefix.u.prefix6,
@@ -684,8 +694,18 @@ void ospf6_abr_originate_summary(struct ospf6_route *route, struct ospf6 *ospf6)
        struct ospf6_area *oa;
        struct ospf6_route *range = NULL;
 
-       if (IS_OSPF6_DEBUG_ABR)
-               zlog_debug("%s: route %pFX", __func__, &route->prefix);
+       if (IS_OSPF6_DEBUG_ABR) {
+               char buf[BUFSIZ];
+
+               if (route->type == OSPF6_DEST_TYPE_ROUTER)
+                       inet_ntop(AF_INET,
+                                 &ADV_ROUTER_IN_PREFIX(&route->prefix), buf,
+                                 sizeof(buf));
+               else
+                       prefix2str(&route->prefix, buf, sizeof(buf));
+
+               zlog_debug("%s: route %s", __func__, buf);
+       }
 
        if (route->type == OSPF6_DEST_TYPE_NETWORK) {
                oa = ospf6_area_lookup(route->path.area_id, ospf6);
@@ -710,25 +730,12 @@ void ospf6_abr_defaults_to_stub(struct ospf6 *o)
        struct listnode *node, *nnode;
        struct ospf6_area *oa;
        struct ospf6_route *def, *route;
-       struct ospf6_redist *red;
        int type = DEFAULT_ROUTE;
-       struct prefix_ipv6 p = {};
 
        if (!o->backbone)
                return;
 
-       red = ospf6_redist_lookup(o, type, 0);
-       if (!red)
-               return;
-
-       p.family = AF_INET6;
-       p.prefixlen = 0;
-
-       route = ospf6_route_lookup((struct prefix *)&p, o->external_table);
-       if (!route)
-               return;
-
-       def = ospf6_route_create();
+       def = ospf6_route_create(o);
        def->type = OSPF6_DEST_TYPE_NETWORK;
        def->prefix.family = AF_INET6;
        def->prefix.prefixlen = 0;
@@ -1163,10 +1170,11 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
        /* (5),(6): the path preference is handled by the sorting
           in the routing table. Always install the path by substituting
           old route (if any). */
-       route = ospf6_route_create();
+       route = ospf6_route_create(oa->ospf6);
 
        route->type = type;
        route->prefix = prefix;
+       route->prefix_options = prefix_options;
        route->path.origin.type = lsa->header->type;
        route->path.origin.id = lsa->header->id;
        route->path.origin.adv_router = lsa->header->adv_router;
@@ -1174,7 +1182,6 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
        route->path.options[0] = options[0];
        route->path.options[1] = options[1];
        route->path.options[2] = options[2];
-       route->path.prefix_options = prefix_options;
        route->path.area_id = oa->area_id;
        route->path.type = OSPF6_PATH_TYPE_INTER;
        route->path.cost = abr_entry->path.cost + cost;
@@ -1250,7 +1257,9 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa)
                                        listcount(old_route->nh_list));
                        }
                } else {
-                       struct ospf6_route *tmp_route = ospf6_route_create();
+                       struct ospf6_route *tmp_route;
+
+                       tmp_route = ospf6_route_create(oa->ospf6);
 
                        ospf6_copy_nexthops(tmp_route->nh_list,
                                            o_path->nh_list);
index 355b8441bd462b4727e976b78054fbb9e132e711..098132b1f6c0b9e1f8bc4d04450379c5d11f2156 100644 (file)
@@ -189,6 +189,9 @@ static void ospf6_area_stub_update(struct ospf6_area *area)
 static int ospf6_area_stub_set(struct ospf6 *ospf6, struct ospf6_area *area)
 {
        if (!IS_AREA_STUB(area)) {
+               /* Disable NSSA first. */
+               ospf6_area_nssa_unset(ospf6, area);
+
                SET_FLAG(area->flag, OSPF6_AREA_STUB);
                ospf6_area_stub_update(area);
        }
@@ -196,7 +199,7 @@ static int ospf6_area_stub_set(struct ospf6 *ospf6, struct ospf6_area *area)
        return 1;
 }
 
-static void ospf6_area_stub_unset(struct ospf6 *ospf6, struct ospf6_area *area)
+void ospf6_area_stub_unset(struct ospf6 *ospf6, struct ospf6_area *area)
 {
        if (IS_AREA_STUB(area)) {
                UNSET_FLAG(area->flag, OSPF6_AREA_STUB);
@@ -504,7 +507,7 @@ DEFUN (area_range,
        struct ospf6_area *oa;
        struct prefix prefix;
        struct ospf6_route *range;
-       uint32_t cost = OSPF_AREA_RANGE_COST_UNSPEC;
+       uint32_t cost;
 
        VTY_DECLVAR_CONTEXT(ospf6, ospf6);
 
@@ -519,23 +522,22 @@ DEFUN (area_range,
 
        range = ospf6_route_lookup(&prefix, oa->range_table);
        if (range == NULL) {
-               range = ospf6_route_create();
+               range = ospf6_route_create(ospf6);
                range->type = OSPF6_DEST_TYPE_RANGE;
                range->prefix = prefix;
                range->path.area_id = oa->area_id;
                range->path.cost = OSPF_AREA_RANGE_COST_UNSPEC;
        }
 
+       /* default settings */
+       cost = OSPF_AREA_RANGE_COST_UNSPEC;
+       UNSET_FLAG(range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE);
+
        if (argc > idx_type) {
-               if (strmatch(argv[idx_type]->text, "not-advertise")) {
+               if (strmatch(argv[idx_type]->text, "not-advertise"))
                        SET_FLAG(range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE);
-               } else if (strmatch(argv[idx_type]->text, "advertise")) {
-                       UNSET_FLAG(range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE);
-                       cost = range->path.u.cost_config;
-               } else {
+               else if (strmatch(argv[idx_type]->text, "cost"))
                        cost = strtoul(argv[5]->arg, NULL, 10);
-                       UNSET_FLAG(range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE);
-               }
        }
 
        range->path.u.cost_config = cost;
@@ -1267,6 +1269,8 @@ DEFUN(ospf6_area_nssa, ospf6_area_nssa_cmd,
                return CMD_WARNING_CONFIG_FAILED;
        }
 
+       ospf6_area_no_summary_unset(ospf6, area);
+
        return CMD_SUCCESS;
 }
 
index dd4d019015caf440656b711d2debd59021d5b4a7..b2a275d745bedb0a5e27804de516e74b0bcf9704 100644 (file)
@@ -154,6 +154,7 @@ extern void ospf6_area_delete(struct ospf6_area *);
 extern struct ospf6_area *ospf6_area_lookup(uint32_t, struct ospf6 *);
 extern struct ospf6_area *ospf6_area_lookup_by_area_id(uint32_t area_id);
 
+extern void ospf6_area_stub_unset(struct ospf6 *ospf6, struct ospf6_area *area);
 extern void ospf6_area_enable(struct ospf6_area *);
 extern void ospf6_area_disable(struct ospf6_area *);
 
index 3e911a743a6813c68cfb25df3a1d1b9b9d6bb32c..f16a1975a8cbde85f9cecf4168a672f9164ba8b4 100644 (file)
@@ -57,6 +57,7 @@
 DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_EXTERNAL_INFO, "OSPF6 ext. info");
 DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_DIST_ARGS,     "OSPF6 Distribute arguments");
 DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_REDISTRIBUTE, "OSPF6 Redistribute arguments");
+DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_EXTERNAL_RT_AGGR, "OSPF6 ASBR Summarisation");
 
 static void ospf6_asbr_redistribute_set(struct ospf6 *ospf6, int type);
 static void ospf6_asbr_redistribute_unset(struct ospf6 *ospf6,
@@ -70,9 +71,28 @@ unsigned char conf_debug_ospf6_asbr = 0;
 
 #define ZROUTE_NAME(x) zebra_route_string(x)
 
+/* Originate Type-5 and Type-7 LSA */
+static struct ospf6_lsa *ospf6_originate_type5_type7_lsas(
+                                               struct ospf6_route *route,
+                                               struct ospf6 *ospf6)
+{
+       struct ospf6_lsa *lsa;
+       struct listnode *lnode;
+       struct ospf6_area *oa = NULL;
+
+       lsa = ospf6_as_external_lsa_originate(route, ospf6);
+
+       for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, lnode, oa)) {
+               if (IS_AREA_NSSA(oa))
+                       ospf6_nssa_lsa_originate(route, oa);
+       }
+
+       return lsa;
+}
+
 /* AS External LSA origination */
-void ospf6_as_external_lsa_originate(struct ospf6_route *route,
-                                    struct ospf6 *ospf6)
+struct ospf6_lsa *ospf6_as_external_lsa_originate(struct ospf6_route *route,
+                                           struct ospf6 *ospf6)
 {
        char buffer[OSPF6_MAX_LSASIZE];
        struct ospf6_lsa_header *lsa_header;
@@ -121,7 +141,7 @@ void ospf6_as_external_lsa_originate(struct ospf6_route *route,
        as_external_lsa->prefix.prefix_length = route->prefix.prefixlen;
 
        /* PrefixOptions */
-       as_external_lsa->prefix.prefix_options = route->path.prefix_options;
+       as_external_lsa->prefix.prefix_options = route->prefix_options;
 
        /* don't use refer LS-type */
        as_external_lsa->prefix.prefix_refer_lstype = htons(0);
@@ -164,6 +184,8 @@ void ospf6_as_external_lsa_originate(struct ospf6_route *route,
 
        /* Originate */
        ospf6_lsa_originate_process(lsa, ospf6);
+
+       return lsa;
 }
 
 int ospf6_orig_as_external_lsa(struct thread *thread)
@@ -548,6 +570,22 @@ void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa)
                                        &asbr_id);
                        return;
                }
+
+               /*
+                * RFC 3101 - Section 2.5:
+                * "For a Type-7 LSA the matching routing table entry must
+                * specify an intra-area path through the LSA's originating
+                * NSSA".
+                */
+               if (ntohs(lsa->header->type) == OSPF6_LSTYPE_TYPE_7
+                   && (asbr_entry->path.area_id != oa->area_id
+                       || asbr_entry->path.type != OSPF6_PATH_TYPE_INTRA)) {
+                       if (IS_OSPF6_DEBUG_EXAMIN(AS_EXTERNAL))
+                               zlog_debug(
+                                       "Intra-area route to NSSA ASBR not found: %pFX",
+                                       &asbr_id);
+                       return;
+               }
        }
 
        /* Check the forwarding address */
@@ -583,18 +621,18 @@ void ospf6_asbr_lsa_add(struct ospf6_lsa *lsa)
                }
        }
 
-       route = ospf6_route_create();
+       route = ospf6_route_create(ospf6);
        route->type = OSPF6_DEST_TYPE_NETWORK;
        route->prefix.family = AF_INET6;
        route->prefix.prefixlen = external->prefix.prefix_length;
        ospf6_prefix_in6_addr(&route->prefix.u.prefix6, external,
                              &external->prefix);
+       route->prefix_options = external->prefix.prefix_options;
 
        route->path.area_id = asbr_entry->path.area_id;
        route->path.origin.type = lsa->header->type;
        route->path.origin.id = lsa->header->id;
        route->path.origin.adv_router = lsa->header->adv_router;
-       route->path.prefix_options = external->prefix.prefix_options;
        memcpy(&route->path.ls_prefix, &asbr_id, sizeof(struct prefix));
 
        if (CHECK_FLAG(external->bits_metric, OSPF6_ASBR_BIT_E)) {
@@ -705,7 +743,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
                return;
        }
 
-       route_to_del = ospf6_route_create();
+       route_to_del = ospf6_route_create(ospf6);
        route_to_del->type = OSPF6_DEST_TYPE_NETWORK;
        route_to_del->prefix.family = AF_INET6;
        route_to_del->prefix.prefixlen = external->prefix.prefix_length;
@@ -789,7 +827,7 @@ void ospf6_asbr_lsa_remove(struct ospf6_lsa *lsa,
                                /* Compare LSA cost with current
                                 * route info.
                                 */
-                               if (!asbr_entry
+                               if (asbr_entry
                                    && (o_path->cost != route_to_del->path.cost
                                        || o_path->u.cost_e2
                                                   != route_to_del->path.u
@@ -1285,9 +1323,9 @@ void ospf6_asbr_remove_externals_from_area(struct ospf6_area *oa)
        struct ospf6 *ospf6 = oa->ospf6;
        const struct route_node *iterend;
 
-       /* skip if router is in other non-stub areas */
+       /* skip if router is in other non-stub/non-NSSA areas */
        for (ALL_LIST_ELEMENTS(ospf6->area_list, node, nnode, area))
-               if (!IS_AREA_STUB(area))
+               if (!IS_AREA_STUB(area) && !IS_AREA_NSSA(area))
                        return;
 
        /* if router is only in a stub area then purge AS-External LSAs */
@@ -1301,6 +1339,28 @@ void ospf6_asbr_remove_externals_from_area(struct ospf6_area *oa)
        }
 }
 
+static struct ospf6_external_aggr_rt *
+ospf6_external_aggr_match(struct ospf6 *ospf6, struct prefix *p)
+{
+       struct route_node *node;
+
+       node = route_node_match(ospf6->rt_aggr_tbl, p);
+       if (node == NULL)
+               return NULL;
+
+       if (IS_OSPF6_DEBUG_AGGR) {
+               struct ospf6_external_aggr_rt *ag = node->info;
+               zlog_debug("%s: Matching aggregator found.prefix: %pFX Aggregator %pFX",
+                       __func__,
+                       p,
+                       &ag->p);
+       }
+
+       route_unlock_node(node);
+
+       return node->info;
+}
+
 void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
                                 struct prefix *prefix,
                                 unsigned int nexthop_num,
@@ -1308,8 +1368,6 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
                                 struct ospf6 *ospf6)
 {
        route_map_result_t ret;
-       struct listnode *lnode;
-       struct ospf6_area *oa;
        struct ospf6_route troute;
        struct ospf6_external_info tinfo;
        struct ospf6_route *route, *match;
@@ -1378,6 +1436,7 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
                                match->path.cost = troute.path.cost;
                        else
                                match->path.cost = metric_value(ospf6, type, 0);
+
                        if (!IN6_IS_ADDR_UNSPECIFIED(&tinfo.forwarding))
                                memcpy(&info->forwarding, &tinfo.forwarding,
                                       sizeof(struct in6_addr));
@@ -1414,25 +1473,22 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
                }
 
                match->path.origin.id = htonl(info->id);
-               ospf6_as_external_lsa_originate(match, ospf6);
+               ospf6_handle_external_lsa_origination(ospf6, match, prefix);
+
                ospf6_asbr_status_update(ospf6, ospf6->redistribute);
-               for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, lnode, oa)) {
-                       if (IS_AREA_NSSA(oa))
-                               ospf6_nssa_lsa_originate(match, oa);
-               }
 
                return;
        }
 
        /* create new entry */
-       route = ospf6_route_create();
+       route = ospf6_route_create(ospf6);
        route->type = OSPF6_DEST_TYPE_NETWORK;
        prefix_copy(&route->prefix, prefix);
+       route->ospf6 = ospf6;
 
        info = (struct ospf6_external_info *)XCALLOC(
                MTYPE_OSPF6_EXTERNAL_INFO, sizeof(struct ospf6_external_info));
        route->route_option = info;
-       info->id = ospf6->external_id++;
 
        /* copy result of route-map */
        if (ROUTEMAP(red)) {
@@ -1463,43 +1519,93 @@ void ospf6_asbr_redistribute_add(int type, ifindex_t ifindex,
        else
                ospf6_route_add_nexthop(route, ifindex, NULL);
 
-       /* create/update binding in external_id_table */
-       prefix_id.family = AF_INET;
-       prefix_id.prefixlen = IPV4_MAX_BITLEN;
-       prefix_id.u.prefix4.s_addr = htonl(info->id);
-       node = route_node_get(ospf6->external_id_table, &prefix_id);
-       node->info = route;
-
        route = ospf6_route_add(route, ospf6->external_table);
-       route->route_option = info;
-
-       if (IS_OSPF6_DEBUG_ASBR) {
-               inet_ntop(AF_INET, &prefix_id.u.prefix4, ibuf, sizeof(ibuf));
-               zlog_debug(
-                       "Advertise as AS-External Id:%s prefix %pFX metric %u",
-                       ibuf, prefix, route->path.metric_type);
-       }
+       ospf6_handle_external_lsa_origination(ospf6, route, prefix);
 
-       route->path.origin.id = htonl(info->id);
-       ospf6_as_external_lsa_originate(route, ospf6);
        ospf6_asbr_status_update(ospf6, ospf6->redistribute);
-       for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, lnode, oa)) {
-               if (IS_AREA_NSSA(oa))
-                       ospf6_nssa_lsa_originate(route, oa);
+
+}
+
+static void ospf6_asbr_external_lsa_remove_by_id(struct ospf6 *ospf6,
+                                        uint32_t id)
+{
+       struct ospf6_lsa *lsa;
+
+       lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_AS_EXTERNAL),
+                               htonl(id), ospf6->router_id, ospf6->lsdb);
+       if (!lsa)
+               return;
+
+       ospf6_external_lsa_purge(ospf6, lsa);
+
+}
+
+static void
+ospf6_link_route_to_aggr(struct ospf6_external_aggr_rt *aggr,
+                       struct ospf6_route *rt)
+{
+       hash_get(aggr->match_extnl_hash, rt, hash_alloc_intern);
+       rt->aggr_route = aggr;
+}
+
+static void
+ospf6_asbr_summary_remove_lsa_and_route(struct ospf6 *ospf6,
+                                       struct ospf6_external_aggr_rt *aggr)
+{
+
+       /* Send a Max age LSA if it is already originated.*/
+       if (!CHECK_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_ORIGINATED))
+               return;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Flushing Aggregate route (%pFX)",
+                               __func__,
+                               &aggr->p);
+
+       ospf6_asbr_external_lsa_remove_by_id(ospf6, aggr->id);
+
+       if (aggr->route) {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug(
+                               "%s: Remove the blackhole route",
+                               __func__);
+               ospf6_zebra_route_update_remove(aggr->route, ospf6);
+               ospf6_route_delete(aggr->route);
+               aggr->route = NULL;
        }
+
+       aggr->id = 0;
+       /* Unset the Origination flag */
+       UNSET_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_ORIGINATED);
+}
+
+static void
+ospf6_unlink_route_from_aggr(struct ospf6 *ospf6,
+                            struct ospf6_external_aggr_rt *aggr,
+                            struct ospf6_route *rt)
+{
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Unlinking external route(%pFX) from aggregator(%pFX), external route count:%ld",
+                                       __func__,
+                                       &rt->prefix,
+                                       &aggr->p,
+                                       OSPF6_EXTERNAL_RT_COUNT(aggr));
+
+       hash_release(aggr->match_extnl_hash, rt);
+       rt->aggr_route = NULL;
+
+       /* Flush the aggregate route if matching
+        * external route count becomes zero.
+        */
+       if (!OSPF6_EXTERNAL_RT_COUNT(aggr))
+               ospf6_asbr_summary_remove_lsa_and_route(ospf6, aggr);
 }
 
 void ospf6_asbr_redistribute_remove(int type, ifindex_t ifindex,
                                    struct prefix *prefix, struct ospf6 *ospf6)
 {
-       struct ospf6_area *oa;
        struct ospf6_route *match;
        struct ospf6_external_info *info = NULL;
-       struct listnode *lnode;
-       struct route_node *node;
-       struct ospf6_lsa *lsa;
-       struct prefix prefix_id;
-       char ibuf[16];
 
        match = ospf6_route_lookup(prefix, ospf6->external_table);
        if (match == NULL) {
@@ -1517,44 +1623,17 @@ void ospf6_asbr_redistribute_remove(int type, ifindex_t ifindex,
                return;
        }
 
-       if (IS_OSPF6_DEBUG_ASBR) {
-               inet_ntop(AF_INET, &prefix_id.u.prefix4, ibuf, sizeof(ibuf));
-               zlog_debug("Withdraw %pFX (AS-External Id:%s)", prefix, ibuf);
-       }
-
-       lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_AS_EXTERNAL),
-                               htonl(info->id), ospf6->router_id, ospf6->lsdb);
-       if (lsa) {
-               if (IS_OSPF6_DEBUG_ASBR) {
-                       zlog_debug("withdraw type 5 LSA for route %pFX",
-                                  prefix);
-               }
-               ospf6_lsa_purge(lsa);
-       }
-
-       /* Delete the NSSA LSA */
-       for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, lnode, oa)) {
-               lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_TYPE_7),
-                                       htonl(info->id), ospf6->router_id,
-                                       oa->lsdb);
-               if (lsa) {
-                       if (IS_OSPF6_DEBUG_ASBR) {
-                               zlog_debug("withdraw type 7 LSA for route %pFX",
-                                          prefix);
-                       }
-                       ospf6_lsa_purge(lsa);
-               }
-       }
+       /* This means aggregation on this route was not done, hence remove LSA
+        * if any originated for this prefix
+        */
+       if (!match->aggr_route)
+               ospf6_asbr_external_lsa_remove_by_id(ospf6, info->id);
+       else
+               ospf6_unlink_route_from_aggr(ospf6, match->aggr_route, match);
 
-       /* remove binding in external_id_table */
-       prefix_id.family = AF_INET;
-       prefix_id.prefixlen = IPV4_MAX_BITLEN;
-       prefix_id.u.prefix4.s_addr = htonl(info->id);
-       node = route_node_lookup(ospf6->external_id_table, &prefix_id);
-       assert(node);
-       node->info = NULL;
-       route_unlock_node(node); /* to free the lookup lock */
-       route_unlock_node(node); /* to free the original lock */
+       if (IS_OSPF6_DEBUG_ASBR)
+               zlog_debug("Removing route from external table %pFX",
+                          prefix);
 
        ospf6_route_remove(match, ospf6->external_table);
        XFREE(MTYPE_OSPF6_EXTERNAL_INFO, info);
@@ -1562,60 +1641,55 @@ void ospf6_asbr_redistribute_remove(int type, ifindex_t ifindex,
        ospf6_asbr_status_update(ospf6, ospf6->redistribute);
 }
 
-DEFUN (ospf6_redistribute,
+DEFPY (ospf6_redistribute,
        ospf6_redistribute_cmd,
-       "redistribute " FRR_REDIST_STR_OSPF6D,
-       "Redistribute\n"
-       FRR_REDIST_HELP_STR_OSPF6D)
-{
-       int type;
-       struct ospf6_redist *red;
-
-       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
-
-       char *proto = argv[argc - 1]->text;
-       type = proto_redistnum(AFI_IP6, proto);
-       if (type < 0)
-               return CMD_WARNING_CONFIG_FAILED;
-
-       red = ospf6_redist_lookup(ospf6, type, 0);
-       if (!red)
-               ospf6_redist_add(ospf6, type, 0);
-       else
-               ospf6_asbr_redistribute_unset(ospf6, red, type);
-
-       ospf6_asbr_redistribute_set(ospf6, type);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (ospf6_redistribute_routemap,
-       ospf6_redistribute_routemap_cmd,
-       "redistribute " FRR_REDIST_STR_OSPF6D " route-map WORD",
+       "redistribute " FRR_REDIST_STR_OSPF6D "[{metric (0-16777214)|metric-type (1-2)$metric_type|route-map WORD$rmap_str}]",
        "Redistribute\n"
        FRR_REDIST_HELP_STR_OSPF6D
+       "Metric for redistributed routes\n"
+       "OSPF default metric\n"
+       "OSPF exterior metric type for redistributed routes\n"
+       "Set OSPF External Type 1/2 metrics\n"
        "Route map reference\n"
        "Route map name\n")
 {
-       int idx_protocol = 1;
-       int idx_word = 3;
        int type;
        struct ospf6_redist *red;
+       int idx_protocol = 1;
+       char *proto = argv[idx_protocol]->text;
 
        VTY_DECLVAR_CONTEXT(ospf6, ospf6);
 
-       char *proto = argv[idx_protocol]->text;
        type = proto_redistnum(AFI_IP6, proto);
        if (type < 0)
                return CMD_WARNING_CONFIG_FAILED;
 
+       if (!metric_str)
+               metric = -1;
+       if (!metric_type_str)
+               metric_type = -1;
+
        red = ospf6_redist_lookup(ospf6, type, 0);
-       if (!red)
+       if (!red) {
                red = ospf6_redist_add(ospf6, type, 0);
-       else
+       } else {
+               /* Check if nothing has changed. */
+               if (red->dmetric.value == metric
+                   && red->dmetric.type == metric_type
+                   && ((!ROUTEMAP_NAME(red) && !rmap_str)
+                       || (ROUTEMAP_NAME(red) && rmap_str
+                           && strmatch(ROUTEMAP_NAME(red), rmap_str))))
+                       return CMD_SUCCESS;
+
                ospf6_asbr_redistribute_unset(ospf6, red, type);
+       }
 
-       ospf6_asbr_routemap_set(red, argv[idx_word]->arg);
+       red->dmetric.value = metric;
+       red->dmetric.type = metric_type;
+       if (rmap_str)
+               ospf6_asbr_routemap_set(red, rmap_str);
+       else
+               ospf6_asbr_routemap_unset(red);
        ospf6_asbr_redistribute_set(ospf6, type);
 
        return CMD_SUCCESS;
@@ -1623,20 +1697,24 @@ DEFUN (ospf6_redistribute_routemap,
 
 DEFUN (no_ospf6_redistribute,
        no_ospf6_redistribute_cmd,
-       "no redistribute " FRR_REDIST_STR_OSPF6D " [route-map WORD]",
+       "no redistribute " FRR_REDIST_STR_OSPF6D "[{metric (0-16777214)|metric-type (1-2)|route-map WORD}]",
        NO_STR
        "Redistribute\n"
        FRR_REDIST_HELP_STR_OSPF6D
+       "Metric for redistributed routes\n"
+       "OSPF default metric\n"
+       "OSPF exterior metric type for redistributed routes\n"
+       "Set OSPF External Type 1/2 metrics\n"
        "Route map reference\n"
        "Route map name\n")
 {
-       int idx_protocol = 2;
        int type;
        struct ospf6_redist *red;
+       int idx_protocol = 2;
+       char *proto = argv[idx_protocol]->text;
 
        VTY_DECLVAR_CONTEXT(ospf6, ospf6);
 
-       char *proto = argv[idx_protocol]->text;
        type = proto_redistnum(AFI_IP6, proto);
        if (type < 0)
                return CMD_WARNING_CONFIG_FAILED;
@@ -1663,11 +1741,14 @@ int ospf6_redistribute_config_write(struct vty *vty, struct ospf6 *ospf6)
                if (type == ZEBRA_ROUTE_OSPF6)
                        continue;
 
+               vty_out(vty, " redistribute %s", ZROUTE_NAME(type));
+               if (red->dmetric.value >= 0)
+                       vty_out(vty, " metric %d", red->dmetric.value);
+               if (red->dmetric.type != DEFAULT_METRIC_TYPE)
+                       vty_out(vty, " metric-type 1");
                if (ROUTEMAP_NAME(red))
-                       vty_out(vty, " redistribute %s route-map %s\n",
-                               ZROUTE_NAME(type), ROUTEMAP_NAME(red));
-               else
-                       vty_out(vty, " redistribute %s\n", ZROUTE_NAME(type));
+                       vty_out(vty, " route-map %s", ROUTEMAP_NAME(red));
+               vty_out(vty, "\n");
        }
 
        return 0;
@@ -2475,7 +2556,6 @@ void ospf6_asbr_init(void)
        install_element(OSPF6_NODE,
                        &no_ospf6_default_information_originate_cmd);
        install_element(OSPF6_NODE, &ospf6_redistribute_cmd);
-       install_element(OSPF6_NODE, &ospf6_redistribute_routemap_cmd);
        install_element(OSPF6_NODE, &no_ospf6_redistribute_cmd);
 }
 
@@ -2613,3 +2693,996 @@ void install_element_ospf6_debug_asbr(void)
        install_element(CONFIG_NODE, &debug_ospf6_asbr_cmd);
        install_element(CONFIG_NODE, &no_debug_ospf6_asbr_cmd);
 }
+
+/* ASBR Summarisation */
+void ospf6_fill_aggr_route_details(struct ospf6 *ospf6,
+                                  struct ospf6_external_aggr_rt *aggr)
+{
+       struct ospf6_route *rt_aggr = aggr->route;
+       struct ospf6_external_info *ei_aggr = rt_aggr->route_option;
+
+       rt_aggr->prefix = aggr->p;
+       ei_aggr->tag = aggr->tag;
+       ei_aggr->type = 0;
+       ei_aggr->id = aggr->id;
+
+       /* When metric is not configured, apply the default metric */
+       rt_aggr->path.cost = ((aggr->metric == -1) ?
+                               DEFAULT_DEFAULT_METRIC
+                               : (unsigned int)(aggr->metric));
+       rt_aggr->path.metric_type = aggr->mtype;
+
+       rt_aggr->path.origin.id = htonl(aggr->id);
+}
+
+static void
+ospf6_summary_add_aggr_route_and_blackhole(struct ospf6 *ospf6,
+                                          struct ospf6_external_aggr_rt *aggr)
+{
+       struct ospf6_route *rt_aggr;
+       struct ospf6_external_info *info;
+
+       /* Create summary route and save it. */
+       rt_aggr = ospf6_route_create(ospf6);
+       rt_aggr->type = OSPF6_DEST_TYPE_NETWORK;
+       /* Needed to install route while calling zebra api */
+       SET_FLAG(rt_aggr->flag, OSPF6_ROUTE_BEST);
+
+       info = XCALLOC(MTYPE_OSPF6_EXTERNAL_INFO, sizeof(*info));
+       rt_aggr->route_option = info;
+       aggr->route = rt_aggr;
+
+       /* Prepare the external_info for aggregator
+        * Fill all the details which will get advertised
+        */
+       ospf6_fill_aggr_route_details(ospf6, aggr);
+
+       /* Add next-hop to Null interface. */
+       ospf6_add_route_nexthop_blackhole(rt_aggr);
+
+       ospf6_zebra_route_update_add(rt_aggr, ospf6);
+}
+
+static void ospf6_originate_new_aggr_lsa(struct ospf6 *ospf6,
+                                        struct ospf6_external_aggr_rt *aggr)
+{
+       struct prefix prefix_id;
+       struct route_node *node;
+       struct ospf6_lsa *lsa = NULL;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Originate new aggregate route(%pFX)", __func__,
+                          &aggr->p);
+
+       aggr->id = ospf6->external_id++;
+
+       /* create/update binding in external_id_table */
+       prefix_id.family = AF_INET;
+       prefix_id.prefixlen = 32;
+       prefix_id.u.prefix4.s_addr = htonl(aggr->id);
+       node = route_node_get(ospf6->external_id_table, &prefix_id);
+       node->info = aggr;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug(
+                       "Advertise AS-External Id:%pI4 prefix %pFX metric %u",
+                       &prefix_id.u.prefix4, &aggr->p, aggr->metric);
+
+       ospf6_summary_add_aggr_route_and_blackhole(ospf6, aggr);
+
+       /* Originate summary LSA */
+       lsa = ospf6_originate_type5_type7_lsas(aggr->route, ospf6);
+       if (lsa) {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug("%s: Set the origination bit for aggregator",
+                                       __func__);
+               SET_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_ORIGINATED);
+       }
+}
+
+static void
+ospf6_aggr_handle_advertise_change(struct ospf6 *ospf6,
+               struct ospf6_external_aggr_rt *aggr)
+{
+       /* Check if advertise option modified. */
+       if (CHECK_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE)) {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug("%s: Don't originate the summary address,It is configured to not-advertise.",
+                                       __func__);
+               ospf6_asbr_summary_remove_lsa_and_route(ospf6, aggr);
+
+               return;
+       }
+
+       /* There are no routes present under this aggregation config, hence
+        * nothing to originate here
+        */
+       if (OSPF6_EXTERNAL_RT_COUNT(aggr) == 0) {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug("%s: No routes present under this aggregation",
+                                       __func__);
+               return;
+       }
+
+       if (!CHECK_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_ORIGINATED)) {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug("%s: Now it is advertisable",
+                                       __func__);
+
+               ospf6_originate_new_aggr_lsa(ospf6, aggr);
+
+               return;
+       }
+}
+
+static void
+ospf6_originate_summary_lsa(struct ospf6 *ospf6,
+                           struct ospf6_external_aggr_rt *aggr,
+                           struct ospf6_route *rt)
+{
+       struct ospf6_lsa *lsa = NULL, *aggr_lsa = NULL;
+       struct ospf6_external_info *info = NULL;
+       struct ospf6_external_aggr_rt *old_aggr;
+       struct ospf6_as_external_lsa *external;
+       struct ospf6_route *rt_aggr = NULL;
+       route_tag_t tag = 0;
+       unsigned int metric = 0;
+       int mtype;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Prepare to originate Summary route(%pFX)",
+                          __func__, &aggr->p);
+
+       /* This case to handle when the overlapping aggregator address
+        * is available. Best match will be considered.So need to delink
+        * from old aggregator and link to the new aggr.
+        */
+       if (rt->aggr_route) {
+               if (rt->aggr_route != aggr) {
+                       old_aggr = rt->aggr_route;
+                       ospf6_unlink_route_from_aggr(ospf6, old_aggr, rt);
+               }
+       }
+
+       /* Add the external route to hash table */
+       ospf6_link_route_to_aggr(aggr, rt);
+
+       /* The key for ID field is a running number and not prefix */
+       info = rt->route_option;
+       assert(info);
+       if (info->id)
+               lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_AS_EXTERNAL),
+                                       htonl(info->id), ospf6->router_id,
+                                       ospf6->lsdb);
+
+       aggr_lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_AS_EXTERNAL),
+                               htonl(aggr->id), ospf6->router_id, ospf6->lsdb);
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Aggr LSA ID: %d flags %x.",
+                  __func__, aggr->id, aggr->aggrflags);
+       /* Dont originate external LSA,
+        * If it is configured not to advertise.
+        */
+       if (CHECK_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE)) {
+               /* If it is already originated as external LSA,
+                * But, it is configured not to advertise then
+                * flush the originated external lsa.
+                */
+               if (lsa) {
+                       if (IS_OSPF6_DEBUG_AGGR)
+                               zlog_debug("%s: Purge the external LSA %s.",
+                                          __func__, lsa->name);
+                       ospf6_external_lsa_purge(ospf6, lsa);
+                       info->id = 0;
+                       rt->path.origin.id = 0;
+               }
+
+               if (aggr_lsa) {
+                       if (IS_OSPF6_DEBUG_AGGR)
+                               zlog_debug("%s: Purge the aggr external LSA %s.",
+                                          __func__, lsa->name);
+                       ospf6_asbr_summary_remove_lsa_and_route(ospf6, aggr);
+               }
+
+               UNSET_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_ORIGINATED);
+
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug("%s: Don't originate the summary address,It is configured to not-advertise.",
+                               __func__);
+               return;
+       }
+
+       /* Summary route already originated,
+        * So, Do nothing.
+        */
+       if (CHECK_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_ORIGINATED)) {
+               if (!aggr_lsa) {
+                       zlog_warn(
+                               "%s: Could not refresh/originate %pFX",
+                                               __func__,
+                                               &aggr->p);
+                       /* Remove the assert later */
+                       assert(aggr_lsa);
+                       return;
+               }
+
+               external = (struct ospf6_as_external_lsa *)OSPF6_LSA_HEADER_END
+                                       (aggr_lsa->header);
+               metric = (unsigned long)OSPF6_ASBR_METRIC(external);
+               tag = ospf6_as_external_lsa_get_tag(aggr_lsa);
+               mtype = CHECK_FLAG(external->bits_metric,
+                                  OSPF6_ASBR_BIT_E) ? 2 : 1;
+
+               /* Prepare the external_info for aggregator */
+               ospf6_fill_aggr_route_details(ospf6, aggr);
+               rt_aggr = aggr->route;
+               /* If tag/metric/metric-type modified , then re-originate the
+                * route with modified tag/metric/metric-type details.
+                */
+               if ((tag != aggr->tag)
+                   || (metric != (unsigned int)rt_aggr->path.cost)
+                   || (mtype != aggr->mtype)) {
+
+                       if (IS_OSPF6_DEBUG_AGGR)
+                               zlog_debug(
+                                       "%s: Routetag(old:%d new:%d)/Metric(o:%u,n:%u)/mtype(o:%d n:%d) modified,So refresh the summary route.(%pFX)",
+                                       __func__, tag, aggr->tag,
+                                       metric,
+                                       aggr->metric,
+                                       mtype, aggr->mtype,
+                                       &aggr->p);
+
+                       aggr_lsa = ospf6_originate_type5_type7_lsas(aggr->route,
+                                                                   ospf6);
+                       if (aggr_lsa)
+                               SET_FLAG(aggr->aggrflags,
+                                       OSPF6_EXTERNAL_AGGRT_ORIGINATED);
+               }
+
+               return;
+       }
+
+       /* If the external route prefix same as aggregate route
+        * and if external route is already originated as TYPE-5
+        * then just update the aggr info and remove the route info
+        */
+       if (lsa && prefix_same(&aggr->p, &rt->prefix)) {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug(
+                               "%s: Route prefix is same as aggr so no need to re-originate LSA(%pFX)",
+                               __PRETTY_FUNCTION__, &aggr->p);
+
+               aggr->id = info->id;
+               info->id = 0;
+               rt->path.origin.id = 0;
+
+               ospf6_summary_add_aggr_route_and_blackhole(ospf6, aggr);
+
+               SET_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_ORIGINATED);
+
+               return;
+       }
+
+       ospf6_originate_new_aggr_lsa(ospf6, aggr);
+}
+
+static void ospf6_aggr_handle_external_info(void *data)
+{
+       struct ospf6_route *rt = (struct ospf6_route *)data;
+       struct ospf6_external_aggr_rt *aggr = NULL;
+       struct ospf6_lsa *lsa = NULL;
+       struct ospf6_external_info *info;
+       struct ospf6 *ospf6 = NULL;
+       struct prefix prefix_id;
+       struct route_node *node;
+
+       rt->aggr_route = NULL;
+
+       rt->to_be_processed = true;
+
+       if (IS_OSPF6_DEBUG_ASBR || IS_OSPF6_DEBUG_ORIGINATE(AS_EXTERNAL))
+               zlog_debug("%s: Handle external route for origination/refresh (%pFX)",
+                                       __func__,
+                                       &rt->prefix);
+
+       ospf6 = rt->ospf6;
+       assert(ospf6);
+
+       aggr = ospf6_external_aggr_match(ospf6,
+                                       &rt->prefix);
+       if (aggr) {
+               ospf6_originate_summary_lsa(ospf6, aggr, rt);
+               return;
+       }
+
+       info = rt->route_option;
+       if (info->id) {
+               lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_AS_EXTERNAL),
+                                       htonl(info->id), ospf6->router_id,
+                                       ospf6->lsdb);
+               if (lsa) {
+                       if (IS_OSPF6_DEBUG_AGGR)
+                               zlog_debug("%s: LSA found, refresh it",
+                                          __func__);
+                       THREAD_OFF(lsa->refresh);
+                       thread_add_event(master, ospf6_lsa_refresh, lsa, 0,
+                                        &lsa->refresh);
+                       return;
+               }
+       }
+
+       info->id  = ospf6->external_id++;
+       rt->path.origin.id = htonl(info->id);
+
+       /* create/update binding in external_id_table */
+       prefix_id.family = AF_INET;
+       prefix_id.prefixlen = 32;
+       prefix_id.u.prefix4.s_addr = htonl(info->id);
+       node = route_node_get(ospf6->external_id_table, &prefix_id);
+       node->info = rt;
+
+       (void)ospf6_originate_type5_type7_lsas(rt, ospf6);
+}
+
+static void
+ospf6_asbr_summary_config_delete(struct ospf6 *ospf6, struct route_node *rn)
+{
+       struct ospf6_external_aggr_rt *aggr = rn->info;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Deleting Aggregate route (%pFX)",
+                                               __func__,
+                                               &aggr->p);
+
+       ospf6_asbr_summary_remove_lsa_and_route(ospf6, aggr);
+
+       rn->info = NULL;
+       route_unlock_node(rn);
+}
+
+static int
+ospf6_handle_external_aggr_modify(struct ospf6 *ospf6,
+                                 struct ospf6_external_aggr_rt *aggr)
+{
+       struct ospf6_lsa *lsa = NULL;
+       struct ospf6_as_external_lsa *asel = NULL;
+       struct ospf6_route *rt_aggr;
+       unsigned int metric = 0;
+       route_tag_t tag = 0;
+       int mtype;
+
+       lsa = ospf6_lsdb_lookup(
+               htons(OSPF6_LSTYPE_AS_EXTERNAL),
+               htonl(aggr->id), ospf6->router_id,
+               ospf6->lsdb);
+       if (!lsa) {
+               zlog_warn(
+                       "%s: Could not refresh/originate %pFX",
+                       __func__,
+                       &aggr->p);
+
+               return OSPF6_FAILURE;
+       }
+
+       asel = (struct ospf6_as_external_lsa *)
+               OSPF6_LSA_HEADER_END(lsa->header);
+       metric = (unsigned long)OSPF6_ASBR_METRIC(asel);
+       tag = ospf6_as_external_lsa_get_tag(lsa);
+       mtype = CHECK_FLAG(asel->bits_metric,
+                          OSPF6_ASBR_BIT_E) ? 2 : 1;
+
+       /* Fill all the details for advertisement */
+       ospf6_fill_aggr_route_details(ospf6, aggr);
+       rt_aggr = aggr->route;
+       /* If tag/metric/metric-type modified , then
+        * re-originate the route with modified
+        * tag/metric/metric-type details.
+        */
+       if ((tag != aggr->tag)
+           || (metric
+               != (unsigned int)rt_aggr->path.cost)
+           || (mtype
+               != aggr->mtype)) {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug(
+                       "%s: Changed tag(old:%d new:%d)/metric(o:%u n:%d)/mtype(o:%d n:%d),So refresh the summary route.(%pFX)",
+                       __func__, tag,
+                       aggr->tag,
+                       metric,
+                       (unsigned int)rt_aggr->path.cost,
+                       mtype, aggr->mtype,
+                       &aggr->p);
+
+               (void)ospf6_originate_type5_type7_lsas(
+                                       aggr->route,
+                                       ospf6);
+       }
+
+       return OSPF6_SUCCESS;
+}
+
+static void ospf6_handle_external_aggr_update(struct ospf6 *ospf6)
+{
+       struct route_node *rn = NULL;
+       int ret;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Process modified aggregators.", __func__);
+
+       for (rn = route_top(ospf6->rt_aggr_tbl); rn; rn = route_next(rn)) {
+               struct ospf6_external_aggr_rt *aggr;
+
+               if (!rn->info)
+                       continue;
+
+               aggr = rn->info;
+
+               if (aggr->action == OSPF6_ROUTE_AGGR_DEL) {
+                       aggr->action = OSPF6_ROUTE_AGGR_NONE;
+                       ospf6_asbr_summary_config_delete(ospf6, rn);
+
+                       if (OSPF6_EXTERNAL_RT_COUNT(aggr))
+                               hash_clean(aggr->match_extnl_hash,
+                               ospf6_aggr_handle_external_info);
+
+                       hash_free(aggr->match_extnl_hash);
+                       XFREE(MTYPE_OSPF6_EXTERNAL_RT_AGGR, aggr);
+
+               } else if (aggr->action == OSPF6_ROUTE_AGGR_MODIFY) {
+
+                       aggr->action = OSPF6_ROUTE_AGGR_NONE;
+
+                       /* Check if tag/metric/metric-type modified */
+                       if (CHECK_FLAG(aggr->aggrflags,
+                               OSPF6_EXTERNAL_AGGRT_ORIGINATED)
+                           && !CHECK_FLAG(aggr->aggrflags,
+                               OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE)) {
+
+                               ret = ospf6_handle_external_aggr_modify(ospf6,
+                                                                       aggr);
+                               if (ret == OSPF6_FAILURE)
+                                       continue;
+                       }
+
+                       /* Advertise option modified ?
+                        * If so, handled it here.
+                        */
+                       ospf6_aggr_handle_advertise_change(ospf6, aggr);
+               }
+       }
+}
+
+static void ospf6_aggr_unlink_external_info(void *data)
+{
+       struct ospf6_route *rt = (struct ospf6_route *)data;
+
+       rt->aggr_route = NULL;
+
+       rt->to_be_processed = true;
+}
+
+void ospf6_external_aggregator_free(struct ospf6_external_aggr_rt *aggr)
+{
+       if (OSPF6_EXTERNAL_RT_COUNT(aggr))
+               hash_clean(aggr->match_extnl_hash,
+                       ospf6_aggr_unlink_external_info);
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Release the aggregator Address(%pFX)",
+                                               __func__,
+                                               &aggr->p);
+
+       hash_free(aggr->match_extnl_hash);
+       aggr->match_extnl_hash = NULL;
+
+       XFREE(MTYPE_OSPF6_EXTERNAL_RT_AGGR, aggr);
+}
+
+static void
+ospf6_delete_all_marked_aggregators(struct ospf6 *ospf6)
+{
+       struct route_node *rn = NULL;
+       struct ospf6_external_aggr_rt *aggr;
+
+       /* Loop through all the aggregators, Delete all aggregators
+        * which are marked as DELETE. Set action to NONE for remaining
+        * aggregators
+        */
+       for (rn = route_top(ospf6->rt_aggr_tbl); rn; rn = route_next(rn)) {
+               if (!rn->info)
+                       continue;
+
+               aggr = rn->info;
+
+               if (aggr->action != OSPF6_ROUTE_AGGR_DEL) {
+                       aggr->action = OSPF6_ROUTE_AGGR_NONE;
+                       continue;
+               }
+               ospf6_asbr_summary_config_delete(ospf6, rn);
+               ospf6_external_aggregator_free(aggr);
+       }
+}
+
+static void ospf6_handle_exnl_rt_after_aggr_del(struct ospf6 *ospf6,
+                                              struct ospf6_route *rt)
+{
+       struct ospf6_lsa *lsa;
+
+       /* Process only marked external routes.
+        * These routes were part of a deleted
+        * aggregator.So, originate now.
+        */
+       if (!rt->to_be_processed)
+               return;
+
+       rt->to_be_processed = false;
+
+       lsa = ospf6_find_external_lsa(ospf6, &rt->prefix);
+
+       if (lsa) {
+               THREAD_OFF(lsa->refresh);
+               thread_add_event(master, ospf6_lsa_refresh, lsa, 0,
+                                &lsa->refresh);
+       } else {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug("%s: Originate external route(%pFX)",
+                               __func__,
+                               &rt->prefix);
+
+               (void)ospf6_originate_type5_type7_lsas(rt, ospf6);
+       }
+}
+
+static void ospf6_handle_aggregated_exnl_rt(struct ospf6 *ospf6,
+                                          struct ospf6_external_aggr_rt *aggr,
+                                          struct ospf6_route *rt)
+{
+       struct ospf6_lsa *lsa;
+       struct ospf6_as_external_lsa *ext_lsa;
+       struct ospf6_external_info *info;
+
+       /* Handling the case where the external route prefix
+        * and aggegate prefix is same
+        * If same dont flush the originated external LSA.
+        */
+       if (prefix_same(&aggr->p, &rt->prefix)) {
+               if (IS_OSPF6_DEBUG_AGGR)
+                       zlog_debug("%s: External Route prefix same as Aggregator(%pFX), so dont flush.",
+                               __func__,
+                               &rt->prefix);
+
+               return;
+       }
+
+       info = rt->route_option;
+       assert(info);
+
+       lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_AS_EXTERNAL),
+                               htonl(info->id), ospf6->router_id, ospf6->lsdb);
+       if (lsa) {
+               ext_lsa = (struct ospf6_as_external_lsa
+                       *)((char *)(lsa->header)
+                       + sizeof(struct ospf6_lsa_header));
+
+               if (rt->prefix.prefixlen != ext_lsa->prefix.prefix_length)
+                       return;
+
+               ospf6_external_lsa_purge(ospf6, lsa);
+
+               /* Resetting the ID of route */
+               rt->path.origin.id = 0;
+               info->id = 0;
+       }
+}
+
+static void
+ospf6_handle_external_aggr_add(struct ospf6 *ospf6)
+{
+       struct ospf6_route *rt = NULL;
+       struct ospf6_external_info *ei = NULL;
+       struct ospf6_external_aggr_rt *aggr;
+
+       /* Delete all the aggregators which are marked as
+        * OSPF6_ROUTE_AGGR_DEL.
+        */
+       ospf6_delete_all_marked_aggregators(ospf6);
+
+       for (rt = ospf6_route_head(ospf6->external_table); rt;
+               rt = ospf6_route_next(rt)) {
+               ei = rt->route_option;
+               if (ei == NULL)
+                       continue;
+
+               if (is_default_prefix(&rt->prefix))
+                       continue;
+
+               aggr = ospf6_external_aggr_match(ospf6,
+                                       &rt->prefix);
+
+               /* If matching aggregator found, Add
+                * the external route refrenace to the
+                * aggregator and originate the aggr
+                * route if it is advertisable.
+                * flush the external LSA if it is
+                * already originated for this external
+                * prefix.
+                */
+               if (aggr) {
+                       ospf6_originate_summary_lsa(ospf6, aggr, rt);
+
+                       /* All aggregated external rts
+                        * are handled here.
+                        */
+                       ospf6_handle_aggregated_exnl_rt(
+                               ospf6, aggr, rt);
+                       continue;
+               }
+
+               /* External routes which are only out
+                * of aggregation will be handled here.
+                */
+               ospf6_handle_exnl_rt_after_aggr_del(
+                                       ospf6, rt);
+       }
+}
+
+static int ospf6_asbr_summary_process(struct thread *thread)
+{
+       struct ospf6 *ospf6 = THREAD_ARG(thread);
+       int operation = 0;
+
+       ospf6->t_external_aggr = NULL;
+       operation = ospf6->aggr_action;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: operation:%d",
+                               __func__,
+                               operation);
+
+       switch (operation) {
+       case OSPF6_ROUTE_AGGR_ADD:
+               ospf6_handle_external_aggr_add(ospf6);
+               break;
+       case OSPF6_ROUTE_AGGR_DEL:
+       case OSPF6_ROUTE_AGGR_MODIFY:
+               ospf6_handle_external_aggr_update(ospf6);
+               break;
+       default:
+               break;
+       }
+
+       return OSPF6_SUCCESS;
+}
+
+static void
+ospf6_start_asbr_summary_delay_timer(struct ospf6 *ospf6,
+                       struct ospf6_external_aggr_rt *aggr,
+                       ospf6_aggr_action_t operation)
+{
+       aggr->action = operation;
+
+       if (ospf6->t_external_aggr) {
+               if (ospf6->aggr_action == OSPF6_ROUTE_AGGR_ADD) {
+
+                       if (IS_OSPF6_DEBUG_AGGR)
+                               zlog_debug("%s: Not required to restart timer,set is already added.",
+                                       __func__);
+                       return;
+               }
+
+               if (operation == OSPF6_ROUTE_AGGR_ADD) {
+                       if (IS_OSPF6_DEBUG_AGGR)
+                               zlog_debug("%s, Restarting Aggregator delay timer.",
+                                                       __func__);
+                       THREAD_OFF(ospf6->t_external_aggr);
+               }
+       }
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Start Aggregator delay timer %d(in seconds).",
+                       __func__, ospf6->aggr_delay_interval);
+
+       ospf6->aggr_action = operation;
+       thread_add_timer(master,
+                       ospf6_asbr_summary_process,
+                       ospf6, ospf6->aggr_delay_interval,
+                       &ospf6->t_external_aggr);
+}
+
+int ospf6_asbr_external_rt_advertise(struct ospf6 *ospf6,
+                               struct prefix *p)
+{
+       struct route_node *rn;
+       struct ospf6_external_aggr_rt *aggr;
+
+       rn = route_node_lookup(ospf6->rt_aggr_tbl, p);
+       if (!rn)
+               return OSPF6_INVALID;
+
+       aggr = rn->info;
+
+       route_unlock_node(rn);
+
+       if (!CHECK_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE))
+               return OSPF6_INVALID;
+
+       UNSET_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE);
+
+       if (!OSPF6_EXTERNAL_RT_COUNT(aggr))
+               return OSPF6_SUCCESS;
+
+       ospf6_start_asbr_summary_delay_timer(ospf6, aggr,
+                                            OSPF6_ROUTE_AGGR_MODIFY);
+
+       return OSPF6_SUCCESS;
+}
+
+int ospf6_external_aggr_delay_timer_set(struct ospf6 *ospf6,
+                       unsigned int interval)
+{
+       ospf6->aggr_delay_interval = interval;
+
+       return OSPF6_SUCCESS;
+}
+
+static unsigned int ospf6_external_rt_hash_key(const void *data)
+{
+       const struct ospf6_route *rt = data;
+       unsigned int key = 0;
+
+       key = prefix_hash_key(&rt->prefix);
+       return key;
+}
+
+static bool ospf6_external_rt_hash_cmp(const void *d1, const void *d2)
+{
+       const struct ospf6_route *rt1 = d1;
+       const struct ospf6_route *rt2 = d2;
+
+       return prefix_same(&rt1->prefix, &rt2->prefix);
+}
+
+static struct ospf6_external_aggr_rt *
+ospf6_external_aggr_new(struct prefix *p)
+{
+       struct ospf6_external_aggr_rt *aggr;
+
+       aggr = XCALLOC(MTYPE_OSPF6_EXTERNAL_RT_AGGR,
+                      sizeof(struct ospf6_external_aggr_rt));
+
+       prefix_copy(&aggr->p, p);
+       aggr->metric = -1;
+       aggr->mtype = DEFAULT_METRIC_TYPE;
+       aggr->match_extnl_hash = hash_create(ospf6_external_rt_hash_key,
+                                            ospf6_external_rt_hash_cmp,
+                                            "Ospf6 external route hash");
+       return aggr;
+}
+
+static void ospf6_external_aggr_add(struct ospf6 *ospf6,
+               struct ospf6_external_aggr_rt *aggr)
+{
+       struct route_node *rn;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("%s: Adding Aggregate route to Aggr table (%pFX)",
+                                       __func__,
+                                       &aggr->p);
+
+       rn = route_node_get(ospf6->rt_aggr_tbl, &aggr->p);
+       if (rn->info)
+               route_unlock_node(rn);
+       else
+               rn->info = aggr;
+}
+
+int ospf6_asbr_external_rt_no_advertise(struct ospf6 *ospf6,
+                               struct prefix *p)
+{
+       struct ospf6_external_aggr_rt *aggr;
+       route_tag_t tag = 0;
+
+       aggr = ospf6_external_aggr_config_lookup(ospf6, p);
+       if (aggr) {
+               if (CHECK_FLAG(aggr->aggrflags,
+                       OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE))
+                       return OSPF6_SUCCESS;
+
+               SET_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE);
+
+               aggr->tag = tag;
+               aggr->metric = -1;
+
+               if (!OSPF6_EXTERNAL_RT_COUNT(aggr))
+                       return OSPF6_SUCCESS;
+
+               ospf6_start_asbr_summary_delay_timer(ospf6, aggr,
+                       OSPF6_ROUTE_AGGR_MODIFY);
+       } else {
+               aggr = ospf6_external_aggr_new(p);
+
+               if (!aggr)
+                       return OSPF6_FAILURE;
+
+               SET_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE);
+               ospf6_external_aggr_add(ospf6, aggr);
+               ospf6_start_asbr_summary_delay_timer(ospf6, aggr,
+                                       OSPF6_ROUTE_AGGR_ADD);
+       }
+
+       return OSPF6_SUCCESS;
+}
+
+struct ospf6_external_aggr_rt *
+ospf6_external_aggr_config_lookup(struct ospf6 *ospf6, struct prefix *p)
+{
+       struct route_node *rn;
+
+       rn = route_node_lookup(ospf6->rt_aggr_tbl, p);
+       if (rn) {
+               route_unlock_node(rn);
+               return rn->info;
+       }
+
+       return NULL;
+}
+
+
+int ospf6_external_aggr_config_set(struct ospf6 *ospf6, struct prefix *p,
+                                     route_tag_t tag, int metric, int mtype)
+{
+       struct ospf6_external_aggr_rt *aggregator;
+
+       aggregator = ospf6_external_aggr_config_lookup(ospf6, p);
+
+       if (aggregator) {
+               if (CHECK_FLAG(aggregator->aggrflags,
+                              OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE))
+                       UNSET_FLAG(aggregator->aggrflags,
+                                  OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE);
+               else if ((aggregator->tag == tag)
+                        && (aggregator->metric == metric)
+                        && (aggregator->mtype == mtype))
+                       return OSPF6_SUCCESS;
+
+               aggregator->tag = tag;
+               aggregator->metric = metric;
+               aggregator->mtype = mtype;
+
+               ospf6_start_asbr_summary_delay_timer(ospf6, aggregator,
+                                        OSPF6_ROUTE_AGGR_MODIFY);
+       } else {
+               aggregator = ospf6_external_aggr_new(p);
+               if (!aggregator)
+                       return OSPF6_FAILURE;
+
+               aggregator->tag = tag;
+               aggregator->metric = metric;
+               aggregator->mtype = mtype;
+
+               ospf6_external_aggr_add(ospf6, aggregator);
+               ospf6_start_asbr_summary_delay_timer(ospf6, aggregator,
+                                               OSPF6_ROUTE_AGGR_ADD);
+       }
+
+       return OSPF6_SUCCESS;
+}
+
+int ospf6_external_aggr_config_unset(struct ospf6 *ospf6,
+                                       struct prefix *p)
+{
+       struct route_node *rn;
+       struct ospf6_external_aggr_rt *aggr;
+
+       rn = route_node_lookup(ospf6->rt_aggr_tbl, p);
+       if (!rn)
+               return OSPF6_INVALID;
+
+       aggr = rn->info;
+
+       route_unlock_node(rn);
+
+       if (!OSPF6_EXTERNAL_RT_COUNT(aggr)) {
+               ospf6_asbr_summary_config_delete(ospf6, rn);
+               ospf6_external_aggregator_free(aggr);
+               return OSPF6_SUCCESS;
+       }
+
+       ospf6_start_asbr_summary_delay_timer(ospf6, aggr,
+                               OSPF6_ROUTE_AGGR_DEL);
+
+       return OSPF6_SUCCESS;
+}
+
+void ospf6_handle_external_lsa_origination(struct ospf6 *ospf6,
+                                              struct ospf6_route *rt,
+                                              struct prefix *p)
+{
+
+       struct ospf6_external_aggr_rt *aggr;
+       struct ospf6_external_info *info;
+       struct prefix prefix_id;
+       struct route_node *node;
+
+       if (!is_default_prefix(p)) {
+               aggr = ospf6_external_aggr_match(ospf6,
+                                               p);
+
+               if (aggr) {
+
+                       if (IS_OSPF6_DEBUG_AGGR)
+                               zlog_debug("%s: Send Aggregate LSA (%pFX)",
+                               __func__,
+                               &aggr->p);
+
+                       ospf6_originate_summary_lsa(
+                               ospf6, aggr, rt);
+
+                       /* Handling the case where the
+                        * external route prefix
+                        * and aggegate prefix is same
+                        * If same dont flush the
+                        * originated
+                        * external LSA.
+                        */
+                       ospf6_handle_aggregated_exnl_rt(
+                                       ospf6, aggr, rt);
+                       return;
+               }
+       }
+
+       info = rt->route_option;
+
+       /* When the info->id = 0, it means it is being originated for the
+        * first time.
+        */
+       if (!info->id) {
+               info->id = ospf6->external_id++;
+
+               /* create/update binding in external_id_table */
+               prefix_id.family = AF_INET;
+               prefix_id.prefixlen = 32;
+               prefix_id.u.prefix4.s_addr = htonl(info->id);
+               node = route_node_get(ospf6->external_id_table, &prefix_id);
+               node->info = rt;
+
+       } else {
+               prefix_id.family = AF_INET;
+               prefix_id.prefixlen = 32;
+               prefix_id.u.prefix4.s_addr = htonl(info->id);
+       }
+
+       rt->path.origin.id = htonl(info->id);
+
+       if (IS_OSPF6_DEBUG_ASBR) {
+               zlog_debug("Advertise new AS-External Id:%pI4 prefix %pFX metric %u",
+                          &prefix_id.u.prefix4, p, rt->path.metric_type);
+       }
+
+       ospf6_originate_type5_type7_lsas(rt, ospf6);
+
+}
+
+void ospf6_unset_all_aggr_flag(struct ospf6 *ospf6)
+{
+       struct route_node *rn = NULL;
+       struct ospf6_external_aggr_rt *aggr;
+
+       if (IS_OSPF6_DEBUG_AGGR)
+               zlog_debug("Unset the origination bit for all aggregator");
+
+       /* Resetting the running external ID counter so that the origination
+        * of external LSAs starts from the beginning 0.0.0.1
+        */
+       ospf6->external_id = OSPF6_EXT_INIT_LS_ID;
+
+       for (rn = route_top(ospf6->rt_aggr_tbl); rn; rn = route_next(rn)) {
+               if (!rn->info)
+                       continue;
+
+               aggr = rn->info;
+
+               UNSET_FLAG(aggr->aggrflags, OSPF6_EXTERNAL_AGGRT_ORIGINATED);
+       }
+}
index 7ccd1c992b3aaba0e6b03c703bd8ea999c561970..0aa1374a468e964562e2993565c5fe5fc759dd4a 100644 (file)
@@ -46,6 +46,52 @@ struct ospf6_external_info {
        route_tag_t tag;
 
        ifindex_t ifindex;
+
+};
+
+/* OSPF6 ASBR Summarisation */
+typedef enum {
+       OSPF6_ROUTE_AGGR_NONE = 0,
+       OSPF6_ROUTE_AGGR_ADD,
+       OSPF6_ROUTE_AGGR_DEL,
+       OSPF6_ROUTE_AGGR_MODIFY
+} ospf6_aggr_action_t;
+
+#define OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE 0x1
+#define OSPF6_EXTERNAL_AGGRT_ORIGINATED 0x2
+
+#define OSPF6_EXTERNAL_RT_COUNT(aggr)    \
+       (((struct ospf6_external_aggr_rt *)aggr)->match_extnl_hash->count)
+
+struct ospf6_external_aggr_rt {
+       /* range address and masklen */
+       struct prefix p;
+
+       /* use bits for OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE and
+        * OSPF6_EXTERNAL_AGGRT_ORIGINATED
+        */
+       uint16_t aggrflags;
+
+       /* To store external metric-type */
+       uint8_t mtype;
+
+       /* Route tag for summary address */
+       route_tag_t tag;
+
+       /* To store aggregated metric config */
+       int metric;
+
+       /* To Store the LS ID when LSA is originated */
+       uint32_t id;
+
+       /* Action to be done after delay timer expiry */
+       int action;
+
+       /* OSPFv3 route generated by summary address. */
+       struct ospf6_route *route;
+
+       /* Hash table of matching external routes */
+       struct hash *match_extnl_hash;
 };
 
 /* AS-External-LSA */
@@ -110,8 +156,31 @@ extern void ospf6_asbr_distribute_list_update(struct ospf6 *ospf6,
 struct ospf6_redist *ospf6_redist_lookup(struct ospf6 *ospf6, int type,
                                         unsigned short instance);
 extern void ospf6_asbr_routemap_update(const char *mapname);
-extern void ospf6_as_external_lsa_originate(struct ospf6_route *route,
-                                           struct ospf6 *ospf6);
+extern struct ospf6_lsa *
+ospf6_as_external_lsa_originate(struct ospf6_route *route,
+                               struct ospf6 *ospf6);
 extern void ospf6_asbr_status_update(struct ospf6 *ospf6, int status);
 
+int ospf6_asbr_external_rt_advertise(struct ospf6 *ospf6,
+                                    struct prefix *p);
+int ospf6_external_aggr_delay_timer_set(struct ospf6 *ospf6,
+                                       unsigned int interval);
+int ospf6_asbr_external_rt_no_advertise(struct ospf6 *ospf6,
+                                               struct prefix *p);
+
+struct ospf6_external_aggr_rt *
+ospf6_external_aggr_config_lookup(struct ospf6 *ospf6, struct prefix *p);
+
+int ospf6_external_aggr_config_set(struct ospf6 *ospf6, struct prefix *p,
+                                  route_tag_t tag, int metric, int mtype);
+
+int ospf6_external_aggr_config_unset(struct ospf6 *ospf6,
+                                       struct prefix *p);
+void ospf6_handle_external_lsa_origination(struct ospf6 *ospf6,
+                                              struct ospf6_route *rt,
+                                              struct prefix *p);
+void ospf6_external_aggregator_free(struct ospf6_external_aggr_rt *aggr);
+void ospf6_unset_all_aggr_flag(struct ospf6 *ospf6);
+void ospf6_fill_aggr_route_details(struct ospf6 *ospf6,
+                                  struct ospf6_external_aggr_rt *aggr);
 #endif /* OSPF6_ASBR_H */
index 738c2218fa43a7c6e0aa4d719749278a06a60fcb..f13ed3e3bbf2fed816008c873c8f58f519fdbb24 100644 (file)
@@ -41,6 +41,7 @@
 
 #include "ospf6_flood.h"
 #include "ospf6_nssa.h"
+#include "ospf6_gr.h"
 
 unsigned char conf_debug_ospf6_flooding;
 
@@ -89,6 +90,16 @@ void ospf6_lsa_originate(struct ospf6_lsa *lsa)
        struct ospf6_lsa *old;
        struct ospf6_lsdb *lsdb_self;
 
+       if (lsa->header->adv_router == INADDR_ANY) {
+               if (IS_OSPF6_DEBUG_ORIGINATE_TYPE(lsa->header->type))
+                       zlog_debug(
+                               "Refusing to originate LSA (zero router ID): %s",
+                               lsa->name);
+
+               ospf6_lsa_delete(lsa);
+               return;
+       }
+
        /* find previous LSA */
        old = ospf6_lsdb_lookup(lsa->header->type, lsa->header->id,
                                lsa->header->adv_router, lsa->lsdb);
@@ -106,7 +117,7 @@ void ospf6_lsa_originate(struct ospf6_lsa *lsa)
        lsdb_self = ospf6_get_scoped_lsdb_self(lsa);
        ospf6_lsdb_add(ospf6_lsa_copy(lsa), lsdb_self);
 
-       lsa->refresh = NULL;
+       THREAD_OFF(lsa->refresh);
        thread_add_timer(master, ospf6_lsa_refresh, lsa, OSPF_LS_REFRESH_TIME,
                         &lsa->refresh);
 
@@ -139,6 +150,48 @@ void ospf6_lsa_originate_interface(struct ospf6_lsa *lsa,
        ospf6_lsa_originate(lsa);
 }
 
+void ospf6_remove_id_from_external_id_table(struct ospf6 *ospf6,
+                                               uint32_t id)
+{
+       struct prefix prefix_id;
+       struct route_node *node;
+
+       /* remove binding in external_id_table */
+       prefix_id.family = AF_INET;
+       prefix_id.prefixlen = 32;
+       prefix_id.u.prefix4.s_addr = id;
+       node = route_node_lookup(ospf6->external_id_table, &prefix_id);
+       assert(node);
+       node->info = NULL;
+       route_unlock_node(node); /* to free the lookup lock */
+       route_unlock_node(node); /* to free the original lock */
+
+}
+
+void ospf6_external_lsa_purge(struct ospf6 *ospf6, struct ospf6_lsa *lsa)
+{
+       uint32_t id = lsa->header->id;
+       struct ospf6_area *oa;
+       struct listnode *lnode;
+
+       ospf6_lsa_purge(lsa);
+
+       ospf6_remove_id_from_external_id_table(ospf6, id);
+
+       /* Delete the corresponding NSSA LSA */
+       for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, lnode, oa)) {
+               lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_TYPE_7), id,
+                                       ospf6->router_id, oa->lsdb);
+               if (lsa) {
+                       if (IS_OSPF6_DEBUG_NSSA)
+                               zlog_debug("withdraw type 7 lsa, LS ID: %u",
+                                          htonl(id));
+
+                       ospf6_lsa_purge(lsa);
+               }
+       }
+}
+
 void ospf6_lsa_purge(struct ospf6_lsa *lsa)
 {
        struct ospf6_lsa *self;
@@ -271,6 +324,22 @@ void ospf6_install_lsa(struct ospf6_lsa *lsa)
 
        /* actually install */
        lsa->installed = now;
+
+       /* Topo change handling */
+       if (CHECK_LSA_TOPO_CHG_ELIGIBLE(ntohs(lsa->header->type))) {
+
+               /* check if it is new lsa ? or existing lsa got modified ?*/
+               if (!old || OSPF6_LSA_IS_CHANGED(old, lsa)) {
+                       struct ospf6 *ospf6;
+
+                       ospf6 = ospf6_get_by_lsdb(lsa);
+
+                       assert(ospf6);
+
+                       ospf6_helper_handle_topo_chg(ospf6, lsa);
+               }
+       }
+
        ospf6_lsdb_add(lsa, lsa->lsdb);
 
        if (ntohs(lsa->header->type) == OSPF6_LSTYPE_TYPE_7) {
@@ -964,6 +1033,50 @@ void ospf6_receive_lsa(struct ospf6_neighbor *from,
                    != from->ospf6_if->area->ospf6->router_id)
                        ospf6_flood(from, new);
 
+               /* Received Grace-LSA */
+               if (IS_GRACE_LSA(new)) {
+                       struct ospf6 *ospf6;
+
+                       ospf6 = ospf6_get_by_lsdb(new);
+
+                       assert(ospf6);
+
+                       if (OSPF6_LSA_IS_MAXAGE(new)) {
+
+                               if (IS_DEBUG_OSPF6_GR)
+                                       zlog_debug(
+                                               "%s, Received a maxage GraceLSA from router %pI4",
+                                               __func__,
+                                               &new->header->adv_router);
+                               if (old) {
+                                       ospf6_process_maxage_grace_lsa(
+                                               ospf6, new, from);
+                               } else {
+                                       if (IS_DEBUG_OSPF6_GR)
+                                               zlog_debug(
+                                                       "%s, GraceLSA doesn't exist in lsdb, so discarding GraceLSA",
+                                                       __func__);
+                                       return;
+                               }
+                       } else {
+
+                               if (IS_DEBUG_OSPF6_GR)
+                                       zlog_debug(
+                                               "%s, Received a GraceLSA from router %pI4",
+                                               __func__,
+                                               &new->header->adv_router);
+
+                               if (ospf6_process_grace_lsa(ospf6, new, from)
+                                   == OSPF6_GR_NOT_HELPER) {
+                                       if (IS_DEBUG_OSPF6_GR)
+                                               zlog_debug(
+                                                       "%s, Not moving to HELPER role, So dicarding GraceLSA",
+                                                       __func__);
+                                       return;
+                               }
+                       }
+               }
+
                /* (d), installing lsdb, which may cause routing
                        table calculation (replacing database copy) */
                ospf6_install_lsa(new);
index 5515a1c3feac8ada7e0e4571961267c5b9e96e1a..4e4fc55ed4a501efa797c518c948d1b4706aae92 100644 (file)
@@ -39,6 +39,9 @@ extern void ospf6_lsa_originate_area(struct ospf6_lsa *lsa,
                                     struct ospf6_area *oa);
 extern void ospf6_lsa_originate_interface(struct ospf6_lsa *lsa,
                                          struct ospf6_interface *oi);
+void ospf6_remove_id_from_external_id_table(struct ospf6 *ospf6,
+                                               uint32_t id);
+void ospf6_external_lsa_purge(struct ospf6 *ospf6, struct ospf6_lsa *lsa);
 extern void ospf6_lsa_purge(struct ospf6_lsa *lsa);
 
 extern void ospf6_lsa_purge_multi_ls_id(struct ospf6_area *oa,
diff --git a/ospf6d/ospf6_gr.h b/ospf6d/ospf6_gr.h
new file mode 100644 (file)
index 0000000..378b719
--- /dev/null
@@ -0,0 +1,161 @@
+/*
+ * OSPF6 Graceful Retsart helper functions.
+ *
+ * Copyright (C) 2021-22 Vmware, Inc.
+ * Rajesh Kumar Girada
+ *
+ * This file is part of GNU Zebra.
+ *
+ * GNU Zebra is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * GNU Zebra is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef OSPF6_GR_H
+#define OSPF6_GR_H
+
+#define OSPF6_GR_NOT_HELPER 0
+#define OSPF6_GR_ACTIVE_HELPER 1
+
+#define OSPF6_GR_HELPER_NO_LSACHECK 0
+#define OSPF6_GR_HELPER_LSACHECK 1
+
+#define OSPF6_MAX_GRACE_INTERVAL 1800
+#define OSPF6_MIN_GRACE_INTERVAL 1
+
+/* Debug option */
+extern unsigned char conf_debug_ospf6_gr;
+
+#define OSPF6_DEBUG_GR 0x01
+
+#define OSPF6_DEBUG_GR_ON() (conf_debug_ospf6_gr |= OSPF6_DEBUG_GR)
+
+#define OSPF6_DEBUG_GR_OFF() (conf_debug_ospf6_gr &= ~OSPF6_DEBUG_GR)
+
+#define IS_DEBUG_OSPF6_GR conf_debug_ospf6_gr
+
+
+enum ospf6_helper_exit_reason {
+       OSPF6_GR_HELPER_EXIT_NONE = 0,
+       OSPF6_GR_HELPER_INPROGRESS,
+       OSPF6_GR_HELPER_TOPO_CHG,
+       OSPF6_GR_HELPER_GRACE_TIMEOUT,
+       OSPF6_GR_HELPER_COMPLETED
+};
+
+enum ospf6_gr_restart_reason {
+       OSPF6_GR_UNKNOWN_RESTART = 0,
+       OSPF6_GR_SW_RESTART = 1,
+       OSPF6_GR_SW_UPGRADE = 2,
+       OSPF6_GR_SWITCH_REDUNDANT_CARD = 3,
+       OSPF6_GR_INVALID_REASON_CODE = 4
+};
+
+enum ospf6_gr_helper_rejected_reason {
+       OSPF6_HELPER_REJECTED_NONE,
+       OSPF6_HELPER_SUPPORT_DISABLED,
+       OSPF6_HELPER_NOT_A_VALID_NEIGHBOUR,
+       OSPF6_HELPER_PLANNED_ONLY_RESTART,
+       OSPF6_HELPER_TOPO_CHANGE_RTXMT_LIST,
+       OSPF6_HELPER_LSA_AGE_MORE
+};
+
+#ifdef roundup
+#define ROUNDUP(val, gran) roundup(val, gran)
+#else /* roundup */
+#define ROUNDUP(val, gran) (((val)-1 | (gran)-1) + 1)
+#endif /* roundup */
+
+/*
+ * Generic TLV (type, length, value) macros
+ */
+struct tlv_header {
+       uint16_t type;   /* Type of Value */
+       uint16_t length; /* Length of Value portion only, in bytes */
+};
+
+#define TLV_HDR_SIZE (sizeof(struct tlv_header))
+
+#define TLV_BODY_SIZE(tlvh) (ROUNDUP(ntohs((tlvh)->length), sizeof(uint32_t)))
+
+#define TLV_SIZE(tlvh) (TLV_HDR_SIZE + TLV_BODY_SIZE(tlvh))
+
+#define TLV_HDR_TOP(lsah)                                                      \
+       (struct tlv_header *)((char *)(lsah) + OSPF6_LSA_HEADER_SIZE)
+
+#define TLV_HDR_NEXT(tlvh)                                                     \
+       (struct tlv_header *)((char *)(tlvh) + TLV_SIZE(tlvh))
+
+/* Ref RFC5187 appendix-A */
+/* Grace period TLV */
+#define GRACE_PERIOD_TYPE 1
+#define GRACE_PERIOD_LENGTH 4
+struct grace_tlv_graceperiod {
+       struct tlv_header header;
+       uint32_t interval;
+};
+#define GRACE_PERIOD_TLV_SIZE sizeof(struct grace_tlv_graceperiod)
+
+/* Restart reason TLV */
+#define RESTART_REASON_TYPE 2
+#define RESTART_REASON_LENGTH 1
+struct grace_tlv_restart_reason {
+       struct tlv_header header;
+       uint8_t reason;
+       uint8_t reserved[3];
+};
+#define GRACE_RESTART_REASON_TLV_SIZE sizeof(struct grace_tlv_restart_reason)
+
+#define OSPF6_GRACE_LSA_MIN_SIZE                                               \
+       GRACE_PERIOD_TLV_SIZE + GRACE_RESTART_REASON_TLV_SIZE
+
+struct advRtr {
+       in_addr_t advRtrAddr;
+};
+
+#define OSPF6_HELPER_ENABLE_RTR_COUNT(ospf)                                    \
+       (ospf6->ospf6_helper_cfg.enable_rtr_list->count)
+
+/* Check , it is a planned restart */
+#define OSPF6_GR_IS_PLANNED_RESTART(reason)                                    \
+       ((reason == OSPF6_GR_SW_RESTART) || (reason == OSPF6_GR_SW_UPGRADE))
+
+/* Check the router is HELPER for current neighbour */
+#define OSPF6_GR_IS_ACTIVE_HELPER(N)                                           \
+       ((N)->gr_helper_info.gr_helper_status == OSPF6_GR_ACTIVE_HELPER)
+
+/* Check the LSA is GRACE LSA */
+#define IS_GRACE_LSA(lsa) (ntohs(lsa->header->type) == OSPF6_LSTYPE_GRACE_LSA)
+
+/* Check neighbour is in FULL state */
+#define IS_NBR_STATE_FULL(nbr) (nbr->state == OSPF6_NEIGHBOR_FULL)
+
+extern const char *ospf6_exit_reason_desc[];
+extern const char *ospf6_restart_reason_desc[];
+extern const char *ospf6_rejected_reason_desc[];
+
+extern void ospf6_gr_helper_config_init(void);
+extern void ospf6_gr_helper_init(struct ospf6 *ospf6);
+extern void ospf6_gr_helper_deinit(struct ospf6 *ospf6);
+extern void ospf6_gr_helper_exit(struct ospf6_neighbor *nbr,
+                                enum ospf6_helper_exit_reason reason);
+extern int ospf6_process_grace_lsa(struct ospf6 *ospf6, struct ospf6_lsa *lsa,
+                                  struct ospf6_neighbor *nbr);
+extern void ospf6_process_maxage_grace_lsa(struct ospf6 *ospf,
+                                          struct ospf6_lsa *lsa,
+                                          struct ospf6_neighbor *nbr);
+extern void ospf6_helper_handle_topo_chg(struct ospf6 *ospf6,
+                                        struct ospf6_lsa *lsa);
+extern int config_write_ospf6_gr_helper(struct vty *vty, struct ospf6 *ospf6);
+extern int config_write_ospf6_debug_gr_helper(struct vty *vty);
+#endif /* OSPF6_GR_H */
diff --git a/ospf6d/ospf6_gr_helper.c b/ospf6d/ospf6_gr_helper.c
new file mode 100644 (file)
index 0000000..d053608
--- /dev/null
@@ -0,0 +1,1378 @@
+/*
+ * OSPF6 Graceful Restart helper functions.
+ *
+ * Copyright (C) 2021-22 Vmware, Inc.
+ * Rajesh Kumar Girada
+ *
+ * This file is part of GNU Zebra.
+ *
+ * GNU Zebra is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * GNU Zebra is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <zebra.h>
+
+#include "log.h"
+#include "vty.h"
+#include "command.h"
+#include "prefix.h"
+#include "stream.h"
+#include "zclient.h"
+#include "memory.h"
+#include "table.h"
+#include "lib/bfd.h"
+#include "lib_errors.h"
+#include "jhash.h"
+
+#include "ospf6_proto.h"
+#include "ospf6_lsa.h"
+#include "ospf6_lsdb.h"
+#include "ospf6_route.h"
+#include "ospf6_message.h"
+
+#include "ospf6_top.h"
+#include "ospf6_area.h"
+#include "ospf6_interface.h"
+#include "ospf6_neighbor.h"
+#include "ospf6_intra.h"
+#include "ospf6d.h"
+#include "ospf6_gr.h"
+#include "lib/json.h"
+#ifndef VTYSH_EXTRACT_PL
+#include "ospf6d/ospf6_gr_helper_clippy.c"
+#endif
+
+DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_GR_HELPER, "OSPF6 Graceful restart helper");
+
+unsigned char conf_debug_ospf6_gr;
+
+static int ospf6_grace_lsa_show_info(struct vty *vty, struct ospf6_lsa *lsa,
+                                    json_object *json, bool use_json);
+
+struct ospf6_lsa_handler grace_lsa_handler = {.lh_type = OSPF6_LSTYPE_GRACE_LSA,
+                                             .lh_name = "Grace",
+                                             .lh_short_name = "GR",
+                                             .lh_show =
+                                                     ospf6_grace_lsa_show_info,
+                                             .lh_get_prefix_str = NULL,
+                                             .lh_debug = 0};
+
+const char *ospf6_exit_reason_desc[] = {
+       "Unknown reason",
+       "Helper in progress",
+       "Topology Change",
+       "Grace timer expiry",
+       "Successful graceful restart",
+};
+
+const char *ospf6_restart_reason_desc[] = {
+       "Unknown restart",
+       "Software restart",
+       "Software reload/upgrade",
+       "Switch to redundant control processor",
+};
+
+const char *ospf6_rejected_reason_desc[] = {
+       "Unknown reason",
+       "Helper support disabled",
+       "Neighbour is not in FULL state",
+       "Supports only planned restart but received for unplanned",
+       "Topo change due to change in lsa rxmt list",
+       "LSA age is more than Grace interval",
+};
+
+static unsigned int ospf6_enable_rtr_hash_key(const void *data)
+{
+       const struct advRtr *rtr = data;
+
+       return jhash_1word(rtr->advRtrAddr, 0);
+}
+
+static bool ospf6_enable_rtr_hash_cmp(const void *d1, const void *d2)
+{
+       const struct advRtr *rtr1 = d1;
+       const struct advRtr *rtr2 = d2;
+
+       return (rtr1->advRtrAddr == rtr2->advRtrAddr);
+}
+
+static void *ospf6_enable_rtr_hash_alloc(void *p)
+{
+       struct advRtr *rid;
+
+       rid = XCALLOC(MTYPE_OSPF6_GR_HELPER, sizeof(struct advRtr));
+       rid->advRtrAddr = ((struct advRtr *)p)->advRtrAddr;
+
+       return rid;
+}
+
+static void ospf6_disable_rtr_hash_free(void *rtr)
+{
+       XFREE(MTYPE_OSPF6_GR_HELPER, rtr);
+}
+
+static void ospf6_enable_rtr_hash_destroy(struct ospf6 *ospf6)
+{
+       if (ospf6->ospf6_helper_cfg.enable_rtr_list == NULL)
+               return;
+
+       hash_clean(ospf6->ospf6_helper_cfg.enable_rtr_list,
+                  ospf6_disable_rtr_hash_free);
+       hash_free(ospf6->ospf6_helper_cfg.enable_rtr_list);
+       ospf6->ospf6_helper_cfg.enable_rtr_list = NULL;
+}
+
+/*
+ * Extracting tlv info from GRACE LSA.
+ *
+ * lsa
+ *   ospf6 grace lsa
+ *
+ * Returns:
+ * interval : grace interval.
+ * reason   : Restarting reason.
+ */
+static int ospf6_extract_grace_lsa_fields(struct ospf6_lsa *lsa,
+                                         uint32_t *interval, uint8_t *reason)
+{
+       struct ospf6_lsa_header *lsah = NULL;
+       struct tlv_header *tlvh = NULL;
+       struct grace_tlv_graceperiod *gracePeriod;
+       struct grace_tlv_restart_reason *grReason;
+       uint16_t length = 0;
+       int sum = 0;
+
+       lsah = (struct ospf6_lsa_header *)lsa->header;
+
+       length = ntohs(lsah->length) - OSPF6_LSA_HEADER_SIZE;
+
+       for (tlvh = TLV_HDR_TOP(lsah); sum < length;
+            tlvh = TLV_HDR_NEXT(tlvh)) {
+               switch (ntohs(tlvh->type)) {
+               case GRACE_PERIOD_TYPE:
+                       gracePeriod = (struct grace_tlv_graceperiod *)tlvh;
+                       *interval = ntohl(gracePeriod->interval);
+                       sum += TLV_SIZE(tlvh);
+
+                       /* Check if grace interval is valid */
+                       if (*interval > OSPF6_MAX_GRACE_INTERVAL
+                           || *interval < OSPF6_MIN_GRACE_INTERVAL)
+                               return OSPF6_FAILURE;
+                       break;
+               case RESTART_REASON_TYPE:
+                       grReason = (struct grace_tlv_restart_reason *)tlvh;
+                       *reason = grReason->reason;
+                       sum += TLV_SIZE(tlvh);
+
+                       if (*reason >= OSPF6_GR_INVALID_REASON_CODE)
+                               return OSPF6_FAILURE;
+                       break;
+               default:
+                       if (IS_DEBUG_OSPF6_GR)
+                               zlog_debug("%s, Ignoring unknown TLV type:%d",
+                                          __func__, ntohs(tlvh->type));
+               }
+       }
+
+       return OSPF6_SUCCESS;
+}
+
+/*
+ * Grace timer expiry handler.
+ * HELPER aborts its role at grace timer expiry.
+ *
+ * thread
+ *    thread pointer
+ *
+ * Returns:
+ *    Nothing
+ */
+static int ospf6_handle_grace_timer_expiry(struct thread *thread)
+{
+       struct ospf6_neighbor *nbr = THREAD_ARG(thread);
+
+       nbr->gr_helper_info.t_grace_timer = NULL;
+
+       ospf6_gr_helper_exit(nbr, OSPF6_GR_HELPER_GRACE_TIMEOUT);
+       return OSPF6_SUCCESS;
+}
+
+/*
+ * API to check any change in the neighbor's
+ * retransmission list.
+ *
+ * nbr
+ *    ospf6 neighbor
+ *
+ * Returns:
+ *    TRUE  - if any change in the lsa.
+ *    FALSE - no change in the lsas.
+ */
+static bool ospf6_check_chg_in_rxmt_list(struct ospf6_neighbor *nbr)
+{
+       struct ospf6_lsa *lsa, *lsanext;
+
+       for (ALL_LSDB(nbr->retrans_list, lsa, lsanext)) {
+               struct ospf6_lsa *lsa_in_db = NULL;
+
+               /* Fetching the same copy of LSA form LSDB to validate the
+                * topochange.
+                */
+               lsa_in_db =
+                       ospf6_lsdb_lookup(lsa->header->type, lsa->header->id,
+                                         lsa->header->adv_router, lsa->lsdb);
+
+               if (lsa_in_db && lsa_in_db->tobe_acknowledged) {
+                       ospf6_lsa_unlock(lsa);
+                       if (lsanext)
+                               ospf6_lsa_unlock(lsanext);
+
+                       return OSPF6_TRUE;
+               }
+       }
+
+       return OSPF6_FALSE;
+}
+
+/*
+ * Process Grace LSA.If it is eligible move to HELPER role.
+ * Ref rfc3623 section 3.1 and rfc5187
+ *
+ * ospf
+ *    Ospf6 pointer.
+ *
+ * lsa
+ *    Grace LSA received from RESTARTER.
+ *
+ * restarter
+ *    ospf6 neighbour which requests the router to act as
+ *    HELPER.
+ *
+ * Returns:
+ *    status.
+ *    If supported as HELPER : OSPF_GR_HELPER_INPROGRESS
+ *    If Not supported as HELPER : OSPF_GR_HELPER_NONE
+ */
+int ospf6_process_grace_lsa(struct ospf6 *ospf6, struct ospf6_lsa *lsa,
+                           struct ospf6_neighbor *restarter)
+{
+       uint8_t restart_reason = 0;
+       uint32_t grace_interval = 0;
+       uint32_t actual_grace_interval = 0;
+       struct advRtr lookup;
+       int ret;
+
+       /* Extract the grace lsa packet fields */
+       ret = ospf6_extract_grace_lsa_fields(lsa, &grace_interval,
+                                            &restart_reason);
+       if (ret != OSPF6_SUCCESS) {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug("%s, Wrong Grace LSA packet.", __func__);
+               return OSPF6_GR_NOT_HELPER;
+       }
+
+       if (IS_DEBUG_OSPF6_GR)
+               zlog_debug(
+                       "%s, Grace LSA received from  %pI4, grace interval:%u, restart reason :%s",
+                       __func__, &restarter->router_id, grace_interval,
+                       ospf6_restart_reason_desc[restart_reason]);
+
+       /* Verify Helper enabled globally */
+       if (!ospf6->ospf6_helper_cfg.is_helper_supported) {
+               /* Verify Helper support is enabled for the
+                * current neighbour router-id.
+                */
+               lookup.advRtrAddr = restarter->router_id;
+
+               if (!hash_lookup(ospf6->ospf6_helper_cfg.enable_rtr_list,
+                                &lookup)) {
+                       if (IS_DEBUG_OSPF6_GR)
+                               zlog_debug(
+                                       "%s, HELPER support is disabled, So not a HELPER",
+                                       __func__);
+                       restarter->gr_helper_info.rejected_reason =
+                               OSPF6_HELPER_SUPPORT_DISABLED;
+                       return OSPF6_GR_NOT_HELPER;
+               }
+       }
+
+       /* Check neighbour is in FULL state and
+        * became a adjacency.
+        */
+       if (!IS_NBR_STATE_FULL(restarter)) {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, This Neighbour %pI6 is not in FULL state.",
+                               __func__, &restarter->linklocal_addr);
+               restarter->gr_helper_info.rejected_reason =
+                       OSPF6_HELPER_NOT_A_VALID_NEIGHBOUR;
+               return OSPF6_GR_NOT_HELPER;
+       }
+
+       /* Based on the restart reason from grace lsa
+        * check the current router is supporting or not
+        */
+       if (ospf6->ospf6_helper_cfg.only_planned_restart
+           && !OSPF6_GR_IS_PLANNED_RESTART(restart_reason)) {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, Router supports only planned restarts but received the GRACE LSA due a unplanned restart",
+                               __func__);
+               restarter->gr_helper_info.rejected_reason =
+                       OSPF6_HELPER_PLANNED_ONLY_RESTART;
+               return OSPF6_GR_NOT_HELPER;
+       }
+
+       /* Check the retransmission list of this
+        * neighbour, check any change in lsas.
+        */
+       if (ospf6->ospf6_helper_cfg.strict_lsa_check
+           && restarter->retrans_list->count
+           && ospf6_check_chg_in_rxmt_list(restarter)) {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, Changed LSA in Rxmt list.So not Helper.",
+                               __func__);
+               restarter->gr_helper_info.rejected_reason =
+                       OSPF6_HELPER_TOPO_CHANGE_RTXMT_LIST;
+               return OSPF6_GR_NOT_HELPER;
+       }
+
+       /* LSA age must be less than the grace period */
+       if (ntohs(lsa->header->age) >= grace_interval) {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, Grace LSA age(%d) is more than the grace interval(%d)",
+                               __func__, lsa->header->age, grace_interval);
+               restarter->gr_helper_info.rejected_reason =
+                       OSPF6_HELPER_LSA_AGE_MORE;
+               return OSPF6_GR_NOT_HELPER;
+       }
+
+       /* check supported grace period configured
+        * if configured, use this to start the grace
+        * timer otherwise use the interval received
+        * in grace LSA packet.
+        */
+       actual_grace_interval = grace_interval;
+       if (grace_interval > ospf6->ospf6_helper_cfg.supported_grace_time) {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, Received grace period %d is larger than supported grace %d",
+                               __func__, grace_interval,
+                               ospf6->ospf6_helper_cfg.supported_grace_time);
+               actual_grace_interval =
+                       ospf6->ospf6_helper_cfg.supported_grace_time;
+       }
+
+       if (OSPF6_GR_IS_ACTIVE_HELPER(restarter)) {
+               if (restarter->gr_helper_info.t_grace_timer)
+                       THREAD_OFF(restarter->gr_helper_info.t_grace_timer);
+
+               if (ospf6->ospf6_helper_cfg.active_restarter_cnt > 0)
+                       ospf6->ospf6_helper_cfg.active_restarter_cnt--;
+
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, Router is already acting as a HELPER for this nbr,so restart the grace timer",
+                               __func__);
+       } else {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, This Router becomes a HELPER for the neighbour %pI6",
+                               __func__, &restarter->linklocal_addr);
+       }
+
+       /* Became a Helper to the RESTART neighbour.
+        * change the helper status.
+        */
+       restarter->gr_helper_info.gr_helper_status = OSPF6_GR_ACTIVE_HELPER;
+       restarter->gr_helper_info.recvd_grace_period = grace_interval;
+       restarter->gr_helper_info.actual_grace_period = actual_grace_interval;
+       restarter->gr_helper_info.gr_restart_reason = restart_reason;
+       restarter->gr_helper_info.rejected_reason = OSPF6_HELPER_REJECTED_NONE;
+
+       /* Increment the active restart nbr count */
+       ospf6->ospf6_helper_cfg.active_restarter_cnt++;
+
+       if (IS_DEBUG_OSPF6_GR)
+               zlog_debug("%s, Grace timer started.interval:%u", __func__,
+                          actual_grace_interval);
+
+       /* Start the grace timer */
+       thread_add_timer(master, ospf6_handle_grace_timer_expiry, restarter,
+                        actual_grace_interval,
+                        &restarter->gr_helper_info.t_grace_timer);
+
+       return OSPF6_GR_ACTIVE_HELPER;
+}
+
+/*
+ * Api to exit from HELPER role to take all actions
+ * required at exit.
+ * Ref rfc3623 section 3. and rfc51872
+ *
+ * ospf6
+ *    Ospf6 pointer.
+ *
+ * nbr
+ *    Ospf6 neighbour for which it is acting as HELPER.
+ *
+ * reason
+ *    The reason for exiting from HELPER.
+ *
+ * Returns:
+ *    Nothing.
+ */
+void ospf6_gr_helper_exit(struct ospf6_neighbor *nbr,
+                         enum ospf6_helper_exit_reason reason)
+{
+       struct ospf6_interface *oi = nbr->ospf6_if;
+       struct ospf6 *ospf6;
+
+       if (!oi)
+               return;
+
+       ospf6 = oi->area->ospf6;
+
+       if (!OSPF6_GR_IS_ACTIVE_HELPER(nbr))
+               return;
+
+       if (IS_DEBUG_OSPF6_GR)
+               zlog_debug("%s, Exiting from HELPER support to %pI6, due to %s",
+                          __func__, &nbr->linklocal_addr,
+                          ospf6_exit_reason_desc[reason]);
+
+       /* Reset helper status*/
+       nbr->gr_helper_info.gr_helper_status = OSPF6_GR_NOT_HELPER;
+       nbr->gr_helper_info.helper_exit_reason = reason;
+       nbr->gr_helper_info.actual_grace_period = 0;
+       nbr->gr_helper_info.recvd_grace_period = 0;
+       nbr->gr_helper_info.gr_restart_reason = 0;
+       ospf6->ospf6_helper_cfg.last_exit_reason = reason;
+
+       /* If the exit not triggered due to grace timer
+        * expiry, stop the grace timer.
+        */
+       if (reason != OSPF6_GR_HELPER_GRACE_TIMEOUT)
+               THREAD_OFF(nbr->gr_helper_info.t_grace_timer);
+
+       if (ospf6->ospf6_helper_cfg.active_restarter_cnt <= 0) {
+               zlog_err(
+                       "OSPF6 GR-Helper: Number of active Restarters should be greater than zero.");
+               return;
+       }
+       /* Decrement active restarter count */
+       ospf6->ospf6_helper_cfg.active_restarter_cnt--;
+
+       /* check exit triggered due to successful completion
+        * of graceful restart.
+        */
+       if (reason != OSPF6_GR_HELPER_COMPLETED) {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug("%s, Unsuccessful GR exit. RESTARTER : %pI6",
+                                  __func__, &nbr->linklocal_addr);
+       }
+
+       /*Recalculate the DR for the network segment */
+       dr_election(oi);
+
+       /* Originate a router LSA */
+       OSPF6_ROUTER_LSA_SCHEDULE(nbr->ospf6_if->area);
+
+       /* Originate network lsa if it is an DR in the LAN */
+       if (nbr->ospf6_if->state == OSPF6_INTERFACE_DR)
+               OSPF6_NETWORK_LSA_SCHEDULE(nbr->ospf6_if);
+}
+
+/*
+ * Process max age Grace LSA.
+ * It is a indication for successful completion of GR.
+ * If router acting as HELPER, It exits from helper role.
+ *
+ * ospf6
+ *    Ospf6 pointer.
+ *
+ * lsa
+ *    Grace LSA received from RESTARTER.
+ *
+ * nbr
+ *    ospf6 neighbour which request the router to act as
+ *    HELPER.
+ *
+ * Returns:
+ *    Nothing.
+ */
+void ospf6_process_maxage_grace_lsa(struct ospf6 *ospf6, struct ospf6_lsa *lsa,
+                                   struct ospf6_neighbor *restarter)
+{
+       uint8_t restart_reason = 0;
+       uint32_t grace_interval = 0;
+       int ret;
+
+       /* Extract the grace lsa packet fields */
+       ret = ospf6_extract_grace_lsa_fields(lsa, &grace_interval,
+                                            &restart_reason);
+       if (ret != OSPF6_SUCCESS) {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug("%s, Wrong Grace LSA packet.", __func__);
+               return;
+       }
+
+       if (IS_DEBUG_OSPF6_GR)
+               zlog_debug("%s, GraceLSA received for neighbour %pI4.",
+                          __func__, &restarter->router_id);
+
+       ospf6_gr_helper_exit(restarter, OSPF6_GR_HELPER_COMPLETED);
+}
+
+/*
+ * Actions to be taken  when topo change detected
+ * HELPER will be exited upon a topo change.
+ *
+ * ospf6
+ *    ospf6 pointer
+ * lsa
+ *    topo change occurred due to this lsa(type (1-5  and 7)
+ *
+ * Returns:
+ *    Nothing
+ */
+void ospf6_helper_handle_topo_chg(struct ospf6 *ospf6, struct ospf6_lsa *lsa)
+{
+       struct listnode *i, *j, *k;
+       struct ospf6_neighbor *nbr = NULL;
+       struct ospf6_area *oa = NULL;
+       struct ospf6_interface *oi = NULL;
+
+       if (!ospf6->ospf6_helper_cfg.active_restarter_cnt)
+               return;
+
+       /* Topo change not required to be handled if strict
+        * LSA check is disabled for this router.
+        */
+       if (!ospf6->ospf6_helper_cfg.strict_lsa_check)
+               return;
+
+       if (IS_DEBUG_OSPF6_GR)
+               zlog_debug("%s, Topo change detected due to lsa details : %s",
+                          __func__, lsa->name);
+
+       lsa->tobe_acknowledged = OSPF6_TRUE;
+
+       for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa))
+               for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) {
+
+                       /* Ref rfc3623 section 3.2.3.b and rfc5187
+                        * If change due to external LSA and if the area is
+                        * stub, then it is not a topo change. Since Type-5
+                        * lsas will not be flooded in stub area.
+                        */
+                       if (IS_AREA_STUB(oi->area)
+                           && ((lsa->header->type == OSPF6_LSTYPE_AS_EXTERNAL)
+                               || (lsa->header->type == OSPF6_LSTYPE_TYPE_7)
+                               || (lsa->header->type
+                                   == OSPF6_LSTYPE_INTER_ROUTER))) {
+                               continue;
+                       }
+
+                       for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, k, nbr)) {
+
+                               ospf6_gr_helper_exit(nbr,
+                                                    OSPF6_GR_HELPER_TOPO_CHG);
+                       }
+               }
+}
+
+/* Configuration handlers */
+/*
+ * Disable/Enable HELPER support on router level.
+ *
+ * ospf6
+ *    Ospf6 pointer.
+ *
+ * status
+ *    TRUE/FALSE
+ *
+ * Returns:
+ *    Nothing.
+ */
+static void ospf6_gr_helper_support_set(struct ospf6 *ospf6, bool support)
+{
+       struct ospf6_interface *oi;
+       struct advRtr lookup;
+       struct listnode *i, *j, *k;
+       struct ospf6_neighbor *nbr = NULL;
+       struct ospf6_area *oa = NULL;
+
+       if (ospf6->ospf6_helper_cfg.is_helper_supported == support)
+               return;
+
+       ospf6->ospf6_helper_cfg.is_helper_supported = support;
+
+       /* If helper support disabled, cease HELPER role for all
+        * supporting neighbors.
+        */
+       if (support == OSPF6_FALSE) {
+               for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa))
+                       for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) {
+
+                               for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, k,
+                                                         nbr)) {
+
+                                       lookup.advRtrAddr = nbr->router_id;
+                                       /* check if helper support enabled for
+                                        * the corresponding  routerid.
+                                        * If enabled,
+                                        * dont exit from helper role.
+                                        */
+                                       if (hash_lookup(
+                                                   ospf6->ospf6_helper_cfg
+                                                           .enable_rtr_list,
+                                                   &lookup))
+                                               continue;
+
+                                       ospf6_gr_helper_exit(
+                                               nbr, OSPF6_GR_HELPER_TOPO_CHG);
+                               }
+                       }
+       }
+}
+
+/*
+ * Api to enable/disable strict lsa check on the HELPER.
+ *
+ * ospf6
+ *    Ospf6 pointer.
+ *
+ * enabled
+ *    True - disable the lsa check.
+ *    False - enable the strict lsa check.
+ *
+ * Returns:
+ *    Nothing.
+ */
+static void ospf6_gr_helper_lsacheck_set(struct ospf6 *ospf6, bool enabled)
+{
+       if (ospf6->ospf6_helper_cfg.strict_lsa_check == enabled)
+               return;
+
+       ospf6->ospf6_helper_cfg.strict_lsa_check = enabled;
+}
+
+/*
+ * Api to set the supported restart reason.
+ *
+ * ospf6
+ *    Ospf6 pointer.
+ *
+ * only_planned
+ *    True: support only planned restart.
+ *    False: support for planned/unplanned restarts.
+ *
+ * Returns:
+ *    Nothing.
+ */
+
+static void
+ospf6_gr_helper_set_supported_onlyPlanned_restart(struct ospf6 *ospf6,
+                                                 bool only_planned)
+{
+       ospf6->ospf6_helper_cfg.only_planned_restart = only_planned;
+}
+
+/*
+ * Api to set the supported grace interval in this router.
+ *
+ * ospf6
+ *    Ospf6 pointer.
+ *
+ * interval
+ *    The supported grace interval..
+ *
+ * Returns:
+ *    Nothing.
+ */
+static void ospf6_gr_helper_supported_gracetime_set(struct ospf6 *ospf6,
+                                                   uint32_t interval)
+{
+       ospf6->ospf6_helper_cfg.supported_grace_time = interval;
+}
+
+/* API to walk and print  all the Helper supported router ids */
+static int ospf6_print_vty_helper_dis_rtr_walkcb(struct hash_bucket *bucket,
+                                                void *arg)
+{
+       struct advRtr *rtr = bucket->data;
+       struct vty *vty = (struct vty *)arg;
+       static unsigned int count;
+
+       vty_out(vty, "%-6pI4,", &rtr->advRtrAddr);
+       count++;
+
+       if (count % 5 == 0)
+               vty_out(vty, "\n");
+
+       return HASHWALK_CONTINUE;
+}
+
+/* API to walk and print  all the Helper supported router ids.*/
+static int ospf6_print_json_helper_dis_rtr_walkcb(struct hash_bucket *bucket,
+                                                 void *arg)
+{
+       struct advRtr *rtr = bucket->data;
+       struct json_object *json_rid_array = (struct json_object *)arg;
+       struct json_object *json_rid;
+       char router_id[16];
+
+       inet_ntop(AF_INET, &rtr->advRtrAddr, router_id, sizeof(router_id));
+
+       json_rid = json_object_new_object();
+
+       json_object_string_add(json_rid, "routerId", router_id);
+       json_object_array_add(json_rid_array, json_rid);
+
+       return HASHWALK_CONTINUE;
+}
+
+/*
+ * Enable/Disable HELPER support on a specified advertisement
+ * router.
+ *
+ * ospf6
+ *    Ospf6 pointer.
+ *
+ * advRtr
+ *    HELPER support for given Advertisement Router.
+ *
+ * support
+ *    True - Enable Helper Support.
+ *    False - Disable Helper Support.
+ *
+ * Returns:
+ *    Nothing.
+ */
+static void ospf6_gr_helper_support_set_per_routerid(struct ospf6 *ospf6,
+                                                    struct in_addr router_id,
+                                                    bool support)
+{
+       struct advRtr temp;
+       struct advRtr *rtr;
+       struct listnode *i, *j, *k;
+       struct ospf6_interface *oi;
+       struct ospf6_neighbor *nbr;
+       struct ospf6_area *oa;
+
+       temp.advRtrAddr = router_id.s_addr;
+
+       if (support == OSPF6_FALSE) {
+               /*Delete the routerid from the enable router hash table */
+               rtr = hash_lookup(ospf6->ospf6_helper_cfg.enable_rtr_list,
+                                 &temp);
+
+               if (rtr) {
+                       hash_release(ospf6->ospf6_helper_cfg.enable_rtr_list,
+                                    rtr);
+                       ospf6_disable_rtr_hash_free(rtr);
+               }
+
+               /* If helper support is enabled globally
+                * no action is required.
+                */
+               if (ospf6->ospf6_helper_cfg.is_helper_supported)
+                       return;
+
+               /* Cease the HELPER role fore neighbours from the
+                * specified advertisement router.
+                */
+               for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa))
+                       for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) {
+
+                               for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, k,
+                                                         nbr)) {
+
+                                       if (nbr->router_id != router_id.s_addr)
+                                               continue;
+
+                                       if (OSPF6_GR_IS_ACTIVE_HELPER(nbr))
+                                               ospf6_gr_helper_exit(
+                                               nbr,
+                                               OSPF6_GR_HELPER_TOPO_CHG);
+                               }
+                       }
+
+       } else {
+               /* Add the routerid to the enable router hash table */
+               hash_get(ospf6->ospf6_helper_cfg.enable_rtr_list, &temp,
+                        ospf6_enable_rtr_hash_alloc);
+       }
+}
+
+static void show_ospfv6_gr_helper_per_nbr(struct vty *vty, json_object *json,
+                                         bool uj, struct ospf6_neighbor *nbr)
+{
+       if (!uj) {
+               vty_out(vty, "   Routerid : %pI4\n", &nbr->router_id);
+               vty_out(vty, "   Received Grace period : %d(in seconds).\n",
+                       nbr->gr_helper_info.recvd_grace_period);
+               vty_out(vty, "   Actual Grace period : %d(in seconds)\n",
+                       nbr->gr_helper_info.actual_grace_period);
+               vty_out(vty, "   Remaining GraceTime:%ld(in seconds).\n",
+                       thread_timer_remain_second(
+                               nbr->gr_helper_info.t_grace_timer));
+               vty_out(vty, "   Graceful Restart reason: %s.\n\n",
+                       ospf6_restart_reason_desc[nbr->gr_helper_info
+                                                         .gr_restart_reason]);
+       } else {
+               char nbrid[16];
+               json_object *json_neigh = NULL;
+
+               inet_ntop(AF_INET, &nbr->router_id, nbrid, sizeof(nbrid));
+               json_neigh = json_object_new_object();
+               json_object_string_add(json_neigh, "routerid", nbrid);
+               json_object_int_add(json_neigh, "recvdGraceInterval",
+                                   nbr->gr_helper_info.recvd_grace_period);
+               json_object_int_add(json_neigh, "actualGraceInterval",
+                       nbr->gr_helper_info.actual_grace_period);
+               json_object_int_add(json_neigh, "remainGracetime",
+                       thread_timer_remain_second(
+                               nbr->gr_helper_info.t_grace_timer));
+               json_object_string_add(json_neigh, "restartReason",
+                       ospf6_restart_reason_desc[
+                               nbr->gr_helper_info.gr_restart_reason]);
+               json_object_object_add(json, nbr->name, json_neigh);
+       }
+}
+
+static void show_ospf6_gr_helper_details(struct vty *vty, struct ospf6 *ospf6,
+                                       json_object *json, bool uj, bool detail)
+{
+       struct ospf6_interface *oi;
+
+       /* Show Router ID. */
+       if (uj) {
+               char router_id[16];
+
+               inet_ntop(AF_INET, &ospf6->router_id, router_id,
+                         sizeof(router_id));
+               json_object_string_add(json, "routerId", router_id);
+       } else
+               vty_out(vty,
+                       " OSPFv3 Routing Process (0) with Router-ID %pI4\n",
+                       &ospf6->router_id);
+
+       if (!uj) {
+
+               if (ospf6->ospf6_helper_cfg.is_helper_supported)
+                       vty_out(vty,
+                               " Graceful restart helper support enabled.\n");
+               else
+                       vty_out(vty,
+                               " Graceful restart helper support disabled.\n");
+
+               if (ospf6->ospf6_helper_cfg.strict_lsa_check)
+                       vty_out(vty, " Strict LSA check is enabled.\n");
+               else
+                       vty_out(vty, " Strict LSA check is disabled.\n");
+
+               if (ospf6->ospf6_helper_cfg.only_planned_restart)
+                       vty_out(vty,
+                               " Helper supported for planned restarts only.\n");
+               else
+                       vty_out(vty,
+                               " Helper supported for Planned and Unplanned Restarts.\n");
+
+               vty_out(vty,
+                       " Supported Graceful restart interval: %d(in seconds).\n",
+                       ospf6->ospf6_helper_cfg.supported_grace_time);
+
+               if (OSPF6_HELPER_ENABLE_RTR_COUNT(ospf)) {
+                       vty_out(vty, " Enable Router list:\n");
+                       vty_out(vty, "   ");
+                       hash_walk(ospf6->ospf6_helper_cfg.enable_rtr_list,
+                                 ospf6_print_vty_helper_dis_rtr_walkcb, vty);
+                       vty_out(vty, "\n\n");
+               }
+
+               if (ospf6->ospf6_helper_cfg.last_exit_reason
+                   != OSPF6_GR_HELPER_EXIT_NONE) {
+                       vty_out(vty, " Last Helper exit Reason :%s\n",
+                               ospf6_exit_reason_desc
+                                       [ospf6->ospf6_helper_cfg
+                                                .last_exit_reason]);
+
+                       if (ospf6->ospf6_helper_cfg.active_restarter_cnt)
+                               vty_out(vty,
+                                       " Number of Active neighbours in graceful restart: %d\n",
+                                       ospf6->ospf6_helper_cfg
+                                               .active_restarter_cnt);
+                       else
+                               vty_out(vty, "\n");
+               }
+
+
+       } else {
+               json_object_string_add(
+                       json, "helperSupport",
+                       (ospf6->ospf6_helper_cfg.is_helper_supported)
+                               ? "Enabled"
+                               : "Disabled");
+               json_object_string_add(
+                       json, "strictLsaCheck",
+                       (ospf6->ospf6_helper_cfg.strict_lsa_check)
+                               ? "Enabled"
+                               : "Disabled");
+               json_object_string_add(
+                       json, "restartSupoort",
+                       (ospf6->ospf6_helper_cfg.only_planned_restart)
+                               ? "Planned Restart only"
+                               : "Planned and Unplanned Restarts");
+
+               json_object_int_add(
+                       json, "supportedGracePeriod",
+                       ospf6->ospf6_helper_cfg.supported_grace_time);
+
+               if (ospf6->ospf6_helper_cfg.last_exit_reason
+                   != OSPF6_GR_HELPER_EXIT_NONE)
+                       json_object_string_add(
+                               json, "LastExitReason",
+                               ospf6_exit_reason_desc
+                                       [ospf6->ospf6_helper_cfg
+                                                .last_exit_reason]);
+
+               if (OSPF6_HELPER_ENABLE_RTR_COUNT(ospf6)) {
+                       struct json_object *json_rid_array =
+                               json_object_new_array();
+
+                       json_object_object_add(json, "enabledRouterIds",
+                                              json_rid_array);
+
+                       hash_walk(ospf6->ospf6_helper_cfg.enable_rtr_list,
+                                 ospf6_print_json_helper_dis_rtr_walkcb,
+                                 json_rid_array);
+               }
+       }
+
+       if (detail) {
+               int cnt = 1;
+               struct listnode *i, *j, *k;
+               struct ospf6_area *oa;
+               json_object *json_neighbors = NULL;
+
+               for (ALL_LIST_ELEMENTS_RO(ospf6->area_list, i, oa))
+                       for (ALL_LIST_ELEMENTS_RO(oa->if_list, j, oi)) {
+                               struct ospf6_neighbor *nbr;
+
+                               if (uj) {
+                                       json_object_object_get_ex(
+                                               json, "Neighbors",
+                                               &json_neighbors);
+                                       if (!json_neighbors) {
+                                               json_neighbors =
+                                               json_object_new_object();
+                                               json_object_object_add(
+                                                       json, "Neighbors",
+                                                       json_neighbors);
+                                       }
+                               }
+
+                               for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, k,
+                                                         nbr)) {
+
+                                       if (!OSPF6_GR_IS_ACTIVE_HELPER(nbr))
+                                               continue;
+
+                                       if (!uj)
+                                               vty_out(vty,
+                                                       " Neighbour %d :\n",
+                                                       cnt++);
+
+                                       show_ospfv6_gr_helper_per_nbr(
+                                               vty, json_neighbors, uj, nbr);
+
+                               }
+                       }
+       }
+}
+
+/* Graceful Restart HELPER  config Commands */
+DEFPY(ospf6_gr_helper_enable,
+      ospf6_gr_helper_enable_cmd,
+      "graceful-restart helper-only [A.B.C.D$rtr_id]",
+      "ospf6 graceful restart\n"
+      "Enable Helper support\n"
+      "Advertisement RouterId\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       if (rtr_id_str != NULL) {
+
+               ospf6_gr_helper_support_set_per_routerid(ospf6, rtr_id,
+                                                        OSPF6_TRUE);
+
+               return CMD_SUCCESS;
+       }
+
+       ospf6_gr_helper_support_set(ospf6, OSPF6_TRUE);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(ospf6_gr_helper_disable,
+      ospf6_gr_helper_disable_cmd,
+      "no graceful-restart helper-only [A.B.C.D$rtr_id]",
+      NO_STR
+      "ospf6 graceful restart\n"
+      "Disable Helper support\n"
+      "Advertisement RouterId\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       if (rtr_id_str != NULL) {
+
+               ospf6_gr_helper_support_set_per_routerid(ospf6, rtr_id,
+                                                        OSPF6_FALSE);
+
+               return CMD_SUCCESS;
+       }
+
+       ospf6_gr_helper_support_set(ospf6, OSPF6_FALSE);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(ospf6_gr_helper_disable_lsacheck,
+      ospf6_gr_helper_disable_lsacheck_cmd,
+      "graceful-restart helper lsa-check-disable",
+      "ospf6 graceful restart\n"
+      "ospf6 GR Helper\n"
+      "disable strict LSA check\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       ospf6_gr_helper_lsacheck_set(ospf6, OSPF6_FALSE);
+       return CMD_SUCCESS;
+}
+
+DEFPY(no_ospf6_gr_helper_disable_lsacheck,
+      no_ospf6_gr_helper_disable_lsacheck_cmd,
+      "no graceful-restart helper lsa-check-disable",
+      NO_STR
+      "ospf6 graceful restart\n"
+      "ospf6 GR Helper\n"
+      "diasble strict LSA check\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       ospf6_gr_helper_lsacheck_set(ospf6, OSPF6_TRUE);
+       return CMD_SUCCESS;
+}
+
+DEFPY(ospf6_gr_helper_planned_only,
+      ospf6_gr_helper_planned_only_cmd,
+      "graceful-restart helper planned-only",
+      "ospf6 graceful restart\n"
+      "ospf6 GR Helper\n"
+      "supported only planned restart\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       ospf6_gr_helper_set_supported_onlyPlanned_restart(ospf6, OSPF6_TRUE);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(no_ospf6_gr_helper_planned_only, no_ospf6_gr_helper_planned_only_cmd,
+      "no graceful-restart helper planned-only",
+      NO_STR
+      "ospf6 graceful restart\n"
+      "ospf6 GR Helper\n"
+      "supported only for planned restart\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       ospf6_gr_helper_set_supported_onlyPlanned_restart(ospf6, OSPF6_FALSE);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(ospf6_gr_helper_supported_grace_time,
+      ospf6_gr_helper_supported_grace_time_cmd,
+      "graceful-restart helper supported-grace-time (10-1800)$interval",
+      "ospf6 graceful restart\n"
+      "ospf6 GR Helper\n"
+      "supported grace timer\n"
+      "grace interval(in seconds)\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       ospf6_gr_helper_supported_gracetime_set(ospf6, interval);
+       return CMD_SUCCESS;
+}
+
+DEFPY(no_ospf6_gr_helper_supported_grace_time,
+      no_ospf6_gr_helper_supported_grace_time_cmd,
+      "no graceful-restart helper supported-grace-time (10-1800)$interval",
+      NO_STR
+      "ospf6 graceful restart\n"
+      "ospf6 GR Helper\n"
+      "supported grace timer\n"
+      "grace interval(in seconds)\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       ospf6_gr_helper_supported_gracetime_set(ospf6,
+                                               OSPF6_MAX_GRACE_INTERVAL);
+       return CMD_SUCCESS;
+}
+
+/* Show commands */
+DEFPY(show_ipv6_ospf6_gr_helper,
+      show_ipv6_ospf6_gr_helper_cmd,
+      "show ipv6 ospf6 graceful-restart helper [detail] [json]",
+      SHOW_STR
+      "Ipv6 Information\n"
+      "OSPF6 information\n"
+      "ospf6 graceful restart\n"
+      "helper details in the router\n"
+      "detailed information\n" JSON_STR)
+{
+       int idx = 0;
+       bool uj = use_json(argc, argv);
+       struct ospf6 *ospf6 = NULL;
+       json_object *json = NULL;
+       bool detail = false;
+
+       ospf6 = ospf6_lookup_by_vrf_name(VRF_DEFAULT_NAME);
+       OSPF6_CMD_CHECK_RUNNING();
+
+       if (argv_find(argv, argc, "detail", &idx))
+               detail = true;
+
+       if (uj)
+               json = json_object_new_object();
+
+       show_ospf6_gr_helper_details(vty, ospf6, json, uj, detail);
+
+       if (uj) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
+
+       return CMD_SUCCESS;
+}
+
+/* Debug commands */
+DEFPY(debug_ospf6_gr, debug_ospf6_gr_cmd,
+      "[no$no] debug ospf6 graceful-restart",
+      NO_STR DEBUG_STR OSPF6_STR "Graceful restart\n")
+{
+       if (!no)
+               OSPF6_DEBUG_GR_ON();
+       else
+               OSPF6_DEBUG_GR_OFF();
+
+       return CMD_SUCCESS;
+}
+
+/*
+ * Api to display the grace LSA information.
+ *
+ * vty
+ *    vty pointer.
+ * lsa
+ *    Grace LSA.
+ * json
+ *    json object
+ *
+ * Returns:
+ *    Nothing.
+ */
+static int ospf6_grace_lsa_show_info(struct vty *vty, struct ospf6_lsa *lsa,
+                                    json_object *json, bool use_json)
+{
+       struct ospf6_lsa_header *lsah = NULL;
+       struct tlv_header *tlvh = NULL;
+       struct grace_tlv_graceperiod *gracePeriod;
+       struct grace_tlv_restart_reason *grReason;
+       uint16_t length = 0;
+       int sum = 0;
+
+       lsah = (struct ospf6_lsa_header *)lsa->header;
+
+       length = ntohs(lsah->length) - OSPF6_LSA_HEADER_SIZE;
+
+       if (vty) {
+               if (!use_json)
+                       vty_out(vty, "TLV info:\n");
+       } else {
+               zlog_debug("  TLV info:");
+       }
+
+       for (tlvh = TLV_HDR_TOP(lsah); sum < length;
+            tlvh = TLV_HDR_NEXT(tlvh)) {
+               switch (ntohs(tlvh->type)) {
+               case GRACE_PERIOD_TYPE:
+                       gracePeriod = (struct grace_tlv_graceperiod *)tlvh;
+                       sum += TLV_SIZE(tlvh);
+
+                       if (vty) {
+                               if (use_json)
+                                       json_object_int_add(
+                                               json, "gracePeriod",
+                                               ntohl(gracePeriod->interval));
+                               else
+                                       vty_out(vty, "   Grace period:%d\n",
+                                               ntohl(gracePeriod->interval));
+                       } else {
+                               zlog_debug("    Grace period:%d",
+                                          ntohl(gracePeriod->interval));
+                       }
+                       break;
+               case RESTART_REASON_TYPE:
+                       grReason = (struct grace_tlv_restart_reason *)tlvh;
+                       sum += TLV_SIZE(tlvh);
+                       if (vty) {
+                               if (use_json)
+                                       json_object_string_add(
+                                               json, "restartReason",
+                                               ospf6_restart_reason_desc
+                                                       [grReason->reason]);
+                               else
+                                       vty_out(vty, "   Restart reason:%s\n",
+                                               ospf6_restart_reason_desc
+                                                       [grReason->reason]);
+                       } else {
+                               zlog_debug("    Restart reason:%s",
+                                          ospf6_restart_reason_desc
+                                                  [grReason->reason]);
+                       }
+                       break;
+               default:
+                       break;
+               }
+       }
+
+       return 0;
+}
+
+void ospf6_gr_helper_config_init(void)
+{
+
+       ospf6_install_lsa_handler(&grace_lsa_handler);
+
+       install_element(OSPF6_NODE, &ospf6_gr_helper_enable_cmd);
+       install_element(OSPF6_NODE, &ospf6_gr_helper_disable_cmd);
+       install_element(OSPF6_NODE, &ospf6_gr_helper_disable_lsacheck_cmd);
+       install_element(OSPF6_NODE, &no_ospf6_gr_helper_disable_lsacheck_cmd);
+       install_element(OSPF6_NODE, &ospf6_gr_helper_planned_only_cmd);
+       install_element(OSPF6_NODE, &no_ospf6_gr_helper_planned_only_cmd);
+       install_element(OSPF6_NODE, &ospf6_gr_helper_supported_grace_time_cmd);
+       install_element(OSPF6_NODE,
+                       &no_ospf6_gr_helper_supported_grace_time_cmd);
+
+       install_element(VIEW_NODE, &show_ipv6_ospf6_gr_helper_cmd);
+
+       install_element(CONFIG_NODE, &debug_ospf6_gr_cmd);
+       install_element(ENABLE_NODE, &debug_ospf6_gr_cmd);
+}
+
+
+/*
+ * Initialize GR helper config data structure.
+ *
+ * ospf6
+ *    ospf6 pointer
+ *
+ * Returns:
+ *    Nothing
+ */
+void ospf6_gr_helper_init(struct ospf6 *ospf6)
+{
+       if (IS_DEBUG_OSPF6_GR)
+               zlog_debug("%s, GR Helper init.", __func__);
+
+       ospf6->ospf6_helper_cfg.is_helper_supported = OSPF6_FALSE;
+       ospf6->ospf6_helper_cfg.strict_lsa_check = OSPF6_TRUE;
+       ospf6->ospf6_helper_cfg.only_planned_restart = OSPF6_FALSE;
+       ospf6->ospf6_helper_cfg.supported_grace_time = OSPF6_MAX_GRACE_INTERVAL;
+       ospf6->ospf6_helper_cfg.last_exit_reason = OSPF6_GR_HELPER_EXIT_NONE;
+       ospf6->ospf6_helper_cfg.active_restarter_cnt = 0;
+
+       ospf6->ospf6_helper_cfg.enable_rtr_list = hash_create(
+               ospf6_enable_rtr_hash_key, ospf6_enable_rtr_hash_cmp,
+               "Ospf6 enable router hash");
+}
+
+/*
+ * De-initialize GR helper config data structure.
+ *
+ * ospf6
+ *    ospf6 pointer
+ *
+ * Returns:
+ *    Nothing
+ */
+void ospf6_gr_helper_deinit(struct ospf6 *ospf6)
+{
+
+       if (IS_DEBUG_OSPF6_GR)
+               zlog_debug("%s, GR helper deinit.", __func__);
+
+       ospf6_enable_rtr_hash_destroy(ospf6);
+}
+
+static int ospf6_cfg_write_helper_enable_rtr_walkcb(struct hash_bucket *backet,
+                                                   void *arg)
+{
+       struct advRtr *rtr = backet->data;
+       struct vty *vty = (struct vty *)arg;
+
+       vty_out(vty, " graceful-restart helper-only %pI4\n", &rtr->advRtrAddr);
+       return HASHWALK_CONTINUE;
+}
+
+int config_write_ospf6_gr_helper(struct vty *vty, struct ospf6 *ospf6)
+{
+       if (ospf6->ospf6_helper_cfg.is_helper_supported)
+               vty_out(vty, " graceful-restart helper-only\n");
+
+       if (!ospf6->ospf6_helper_cfg.strict_lsa_check)
+               vty_out(vty, " graceful-restart helper lsa-check-disable\n");
+
+       if (ospf6->ospf6_helper_cfg.only_planned_restart)
+               vty_out(vty, " graceful-restart helper planned-only\n");
+
+       if (ospf6->ospf6_helper_cfg.supported_grace_time
+           != OSPF6_MAX_GRACE_INTERVAL)
+               vty_out(vty,
+                       " graceful-restart helper supported-grace-time %d\n",
+                       ospf6->ospf6_helper_cfg.supported_grace_time);
+
+       if (OSPF6_HELPER_ENABLE_RTR_COUNT(ospf6)) {
+               hash_walk(ospf6->ospf6_helper_cfg.enable_rtr_list,
+                         ospf6_cfg_write_helper_enable_rtr_walkcb, vty);
+       }
+
+       return 0;
+}
+
+int config_write_ospf6_debug_gr_helper(struct vty *vty)
+{
+       if (IS_DEBUG_OSPF6_GR)
+               vty_out(vty, "debug ospf6 gr helper\n");
+       return 0;
+}
index b52d6af90ec4c424ecfaabc523c84967bcd80067..b427a0c9bde3ed34cb966487df1e4560e445f407 100644 (file)
 #include "ospf6d.h"
 #include "ospf6_bfd.h"
 #include "ospf6_zebra.h"
+#include "ospf6_gr.h"
 #include "lib/json.h"
 
-DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_IF,       "OSPF6 interface");
+DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_IF, "OSPF6 interface");
 DEFINE_MTYPE_STATIC(OSPF6D, CFG_PLIST_NAME, "configured prefix list names");
 DEFINE_QOBJ_TYPE(ospf6_interface);
 DEFINE_HOOK(ospf6_interface_change,
@@ -59,6 +60,22 @@ const char *const ospf6_interface_state_str[] = {
        "None",    "Down", "Loopback", "Waiting", "PointToPoint",
        "DROther", "BDR",  "DR",       NULL};
 
+int ospf6_interface_neighbor_count(struct ospf6_interface *oi)
+{
+       int count = 0;
+       struct ospf6_neighbor *nbr = NULL;
+       struct listnode *node;
+
+       for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, node, nbr)) {
+               /* Down state is not shown. */
+               if (nbr->state == OSPF6_NEIGHBOR_DOWN)
+                       continue;
+               count++;
+       }
+
+       return count;
+}
+
 struct ospf6_interface *ospf6_interface_lookup_by_ifindex(ifindex_t ifindex,
                                                          vrf_id_t vrf_id)
 {
@@ -385,7 +402,6 @@ void ospf6_interface_connected_route_update(struct interface *ifp)
        struct connected *c;
        struct listnode *node, *nnode;
        struct in6_addr nh_addr;
-       int count = 0, max_addr_count;
 
        oi = (struct ospf6_interface *)ifp->info;
        if (oi == NULL)
@@ -404,22 +420,10 @@ void ospf6_interface_connected_route_update(struct interface *ifp)
        /* update "route to advertise" interface route table */
        ospf6_route_remove_all(oi->route_connected);
 
-       if (oi->ifmtu >= OSPF6_JUMBO_MTU)
-               max_addr_count = OSPF6_MAX_IF_ADDRS_JUMBO;
-       else
-               max_addr_count = OSPF6_MAX_IF_ADDRS;
-
        for (ALL_LIST_ELEMENTS(oi->interface->connected, node, nnode, c)) {
                if (c->address->family != AF_INET6)
                        continue;
 
-               /* number of interface addresses supported is based on MTU
-                * size of OSPFv3 packet
-                */
-               count++;
-               if (count >= max_addr_count)
-                       break;
-
                CONTINUE_IF_ADDRESS_LINKLOCAL(IS_OSPF6_DEBUG_INTERFACE,
                                              c->address);
                CONTINUE_IF_ADDRESS_UNSPECIFIED(IS_OSPF6_DEBUG_INTERFACE,
@@ -448,7 +452,7 @@ void ospf6_interface_connected_route_update(struct interface *ifp)
                        }
                }
 
-               route = ospf6_route_create();
+               route = ospf6_route_create(oi->area->ospf6);
                memcpy(&route->prefix, c->address, sizeof(struct prefix));
                apply_mask(&route->prefix);
                route->type = OSPF6_DEST_TYPE_NETWORK;
@@ -592,7 +596,7 @@ static struct ospf6_neighbor *better_drouter(struct ospf6_neighbor *a,
        return a;
 }
 
-static uint8_t dr_election(struct ospf6_interface *oi)
+uint8_t dr_election(struct ospf6_interface *oi)
 {
        struct listnode *node, *nnode;
        struct ospf6_neighbor *on, *drouter, *bdrouter, myself;
@@ -821,7 +825,9 @@ int interface_up(struct thread *thread)
        }
 
        /* decide next interface state */
-       if (oi->type == OSPF_IFTYPE_POINTOPOINT) {
+       if (oi->type == OSPF_IFTYPE_LOOPBACK) {
+               ospf6_interface_state_change(OSPF6_INTERFACE_LOOPBACK, oi);
+       } else if (oi->type == OSPF_IFTYPE_POINTOPOINT) {
                ospf6_interface_state_change(OSPF6_INTERFACE_POINTTOPOINT, oi);
        } else if (oi->priority == 0)
                ospf6_interface_state_change(OSPF6_INTERFACE_DROTHER, oi);
@@ -907,6 +913,17 @@ int interface_down(struct thread *thread)
        /* Stop trying to set socket options. */
        THREAD_OFF(oi->thread_sso);
 
+       /* Cease the HELPER role for all the neighbours
+        * of this interface.
+        */
+       if (ospf6_interface_neighbor_count(oi)) {
+               struct listnode *ln;
+               struct ospf6_neighbor *nbr = NULL;
+
+               for (ALL_LIST_ELEMENTS_RO(oi->neighbor_list, ln, nbr))
+                       ospf6_gr_helper_exit(nbr, OSPF6_GR_HELPER_TOPO_CHG);
+       }
+
        for (ALL_LIST_ELEMENTS(oi->neighbor_list, node, nnode, on))
                ospf6_neighbor_delete(on);
 
@@ -1728,7 +1745,6 @@ DEFUN (ipv6_ospf6_area,
        int idx_ipv4 = 3;
        uint32_t area_id;
        int format;
-       int ipv6_count = 0;
 
        assert(ifp);
 
@@ -1743,23 +1759,6 @@ DEFUN (ipv6_ospf6_area,
                return CMD_SUCCESS;
        }
 
-       /* if more than OSPF6_MAX_IF_ADDRS are configured on this interface
-        * then don't allow ospfv3 to be configured
-        */
-       ipv6_count = connected_count_by_family(ifp, AF_INET6);
-       if (oi->ifmtu == OSPF6_DEFAULT_MTU && ipv6_count > OSPF6_MAX_IF_ADDRS) {
-               vty_out(vty,
-                       "can not configure OSPFv3 on if %s, must have less than %d interface addresses but has %d addresses\n",
-                       ifp->name, OSPF6_MAX_IF_ADDRS, ipv6_count);
-               return CMD_WARNING_CONFIG_FAILED;
-       } else if (oi->ifmtu >= OSPF6_JUMBO_MTU
-                  && ipv6_count > OSPF6_MAX_IF_ADDRS_JUMBO) {
-               vty_out(vty,
-                       "can not configure OSPFv3 on if %s, must have less than %d interface addresses but has %d addresses\n",
-                       ifp->name, OSPF6_MAX_IF_ADDRS_JUMBO, ipv6_count);
-               return CMD_WARNING_CONFIG_FAILED;
-       }
-
        if (str2area_id(argv[idx_ipv4]->arg, &area_id, &format)) {
                vty_out(vty, "Malformed Area-ID: %s\n", argv[idx_ipv4]->arg);
                return CMD_WARNING_CONFIG_FAILED;
@@ -2594,7 +2593,7 @@ static int config_write_ospf6_interface(struct vty *vty, struct vrf *vrf)
 
                ospf6_bfd_write_config(vty, oi);
 
-               vty_endframe(vty, "!\n");
+               vty_endframe(vty, "exit\n!\n");
        }
        return 0;
 }
@@ -2613,15 +2612,6 @@ static int config_write_interface(struct vty *vty)
        return write;
 }
 
-static int config_write_ospf6_interface(struct vty *vty, struct vrf *vrf);
-static struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = config_write_interface,
-};
-
 static int ospf6_ifp_create(struct interface *ifp)
 {
        if (IS_OSPF6_DEBUG_ZEBRA(RECV))
@@ -2679,8 +2669,7 @@ static int ospf6_ifp_destroy(struct interface *ifp)
 void ospf6_interface_init(void)
 {
        /* Install interface node. */
-       install_node(&interface_node);
-       if_cmd_init();
+       if_cmd_init(config_write_interface);
        if_zapi_callbacks(ospf6_ifp_create, ospf6_ifp_up,
                          ospf6_ifp_down, ospf6_ifp_destroy);
 
index c9cd74b6919a95b1e60c5a6f7c08599ed139546b..ccdf8b1c8fc7d0424ef32f15483ef3906d5c4749 100644 (file)
@@ -201,7 +201,6 @@ extern void ospf6_interface_disable(struct ospf6_interface *);
 
 extern void ospf6_interface_state_update(struct interface *);
 extern void ospf6_interface_connected_route_update(struct interface *);
-extern void ospf6_interface_connected_route_add(struct connected *);
 extern struct in6_addr *
 ospf6_interface_get_global_address(struct interface *ifp);
 
@@ -219,6 +218,8 @@ extern void install_element_ospf6_clear_interface(void);
 
 extern int config_write_ospf6_debug_interface(struct vty *vty);
 extern void install_element_ospf6_debug_interface(void);
+extern int ospf6_interface_neighbor_count(struct ospf6_interface *oi);
+extern uint8_t dr_election(struct ospf6_interface *oi);
 
 DECLARE_HOOK(ospf6_interface_change,
             (struct ospf6_interface * oi, int state, int old_state),
index c971c6180e8536cfe5e6889d27869b8e43909266..e4db8f3a026e5cc24e43ee0ce586369a57f52e2a 100644 (file)
@@ -767,7 +767,6 @@ int ospf6_link_lsa_originate(struct thread *thread)
        struct ospf6_link_lsa *link_lsa;
        struct ospf6_route *route;
        struct ospf6_prefix *op;
-       int count, max_addr_count;
 
        oi = (struct ospf6_interface *)THREAD_ARG(thread);
        oi->thread_link_lsa = NULL;
@@ -811,30 +810,22 @@ int ospf6_link_lsa_originate(struct thread *thread)
        memcpy(link_lsa->options, oi->area->options, 3);
        memcpy(&link_lsa->linklocal_addr, oi->linklocal_addr,
               sizeof(struct in6_addr));
+       link_lsa->prefix_num = htonl(oi->route_connected->count);
 
        op = (struct ospf6_prefix *)((caddr_t)link_lsa
                                     + sizeof(struct ospf6_link_lsa));
 
-       /* connected prefix to advertise, number of interface addresses
-        * supported is based on MTU size of OSPFv3 packets
-        */
-       if (oi->ifmtu >= OSPF6_JUMBO_MTU)
-               max_addr_count = OSPF6_MAX_IF_ADDRS_JUMBO;
-       else
-               max_addr_count = OSPF6_MAX_IF_ADDRS;
-       for (route = ospf6_route_head(oi->route_connected), count = 0;
-            route && count < max_addr_count;
-            route = ospf6_route_next(route), count++) {
+       /* connected prefix to advertise */
+       for (route = ospf6_route_head(oi->route_connected); route;
+            route = ospf6_route_next(route)) {
                op->prefix_length = route->prefix.prefixlen;
-               op->prefix_options = route->path.prefix_options;
+               op->prefix_options = route->prefix_options;
                op->prefix_metric = htons(0);
                memcpy(OSPF6_PREFIX_BODY(op), &route->prefix.u.prefix6,
                       OSPF6_PREFIX_SPACE(op->prefix_length));
                op = OSPF6_PREFIX_NEXT(op);
        }
 
-       link_lsa->prefix_num = htonl(count);
-
        /* Fill LSA Header */
        lsa_header->age = 0;
        lsa_header->type = htons(OSPF6_LSTYPE_LINK);
@@ -1014,7 +1005,6 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
        unsigned short prefix_num = 0;
        struct ospf6_route_table *route_advertise;
        int ls_id = 0;
-       int count, max_addr_count;
 
        oa = (struct ospf6_area *)THREAD_ARG(thread);
        oa->thread_intra_prefix_lsa = NULL;
@@ -1060,8 +1050,6 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
        intra_prefix_lsa->ref_adv_router = oa->ospf6->router_id;
 
        route_advertise = ospf6_route_table_create(0, 0);
-       route_advertise->hook_add = NULL;
-       route_advertise->hook_remove = NULL;
 
        for (ALL_LIST_ELEMENTS_RO(oa->if_list, i, oi)) {
                if (oi->state == OSPF6_INTERFACE_DOWN) {
@@ -1090,14 +1078,8 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
                        zlog_debug("  Interface %s:", oi->interface->name);
 
                /* connected prefix to advertise */
-               if (oi->ifmtu >= OSPF6_JUMBO_MTU)
-                       max_addr_count = OSPF6_MAX_IF_ADDRS_JUMBO;
-               else
-                       max_addr_count = OSPF6_MAX_IF_ADDRS;
-
-               for (route = ospf6_route_head(oi->route_connected), count = 0;
-                    route && count < max_addr_count;
-                    route = ospf6_route_best_next(route), count++) {
+               for (route = ospf6_route_head(oi->route_connected); route;
+                    route = ospf6_route_best_next(route)) {
                        if (IS_OSPF6_DEBUG_ORIGINATE(INTRA_PREFIX))
                                zlog_debug("    include %pFX", &route->prefix);
                        ospf6_route_add(ospf6_route_copy(route),
@@ -1193,7 +1175,7 @@ int ospf6_intra_prefix_lsa_originate_stub(struct thread *thread)
                }
 
                op->prefix_length = route->prefix.prefixlen;
-               op->prefix_options = route->path.prefix_options;
+               op->prefix_options = route->prefix_options;
                op->prefix_metric = htons(route->path.cost);
                memcpy(OSPF6_PREFIX_BODY(op), &route->prefix.u.prefix6,
                       OSPF6_PREFIX_SPACE(op->prefix_length));
@@ -1312,8 +1294,6 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
 
        /* connected prefix to advertise */
        route_advertise = ospf6_route_table_create(0, 0);
-       route_advertise->hook_add = NULL;
-       route_advertise->hook_remove = NULL;
 
        type = ntohs(OSPF6_LSTYPE_LINK);
        for (ALL_LSDB_TYPED(oi->lsdb, type, lsa)) {
@@ -1347,7 +1327,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
                            || current + OSPF6_PREFIX_SIZE(op) > end)
                                break;
 
-                       route = ospf6_route_create();
+                       route = ospf6_route_create(oi->area->ospf6);
 
                        route->type = OSPF6_DEST_TYPE_NETWORK;
                        route->prefix.family = AF_INET6;
@@ -1356,6 +1336,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
                               sizeof(struct in6_addr));
                        memcpy(&route->prefix.u.prefix6, OSPF6_PREFIX_BODY(op),
                               OSPF6_PREFIX_SPACE(op->prefix_length));
+                       route->prefix_options = op->prefix_options;
 
                        route->path.origin.type = lsa->header->type;
                        route->path.origin.id = lsa->header->id;
@@ -1363,7 +1344,6 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
                        route->path.options[0] = link_lsa->options[0];
                        route->path.options[1] = link_lsa->options[1];
                        route->path.options[2] = link_lsa->options[2];
-                       route->path.prefix_options = op->prefix_options;
                        route->path.area_id = oi->area->area_id;
                        route->path.type = OSPF6_PATH_TYPE_INTRA;
 
@@ -1384,7 +1364,7 @@ int ospf6_intra_prefix_lsa_originate_transit(struct thread *thread)
        for (route = ospf6_route_head(route_advertise); route;
             route = ospf6_route_best_next(route)) {
                op->prefix_length = route->prefix.prefixlen;
-               op->prefix_options = route->path.prefix_options;
+               op->prefix_options = route->prefix_options;
                op->prefix_metric = htons(0);
                memcpy(OSPF6_PREFIX_BODY(op), &route->prefix.u.prefix6,
                       OSPF6_PREFIX_SPACE(op->prefix_length));
@@ -1810,19 +1790,19 @@ void ospf6_intra_prefix_lsa_add(struct ospf6_lsa *lsa)
                        continue;
                }
 
-               route = ospf6_route_create();
+               route = ospf6_route_create(oa->ospf6);
 
                memset(&route->prefix, 0, sizeof(struct prefix));
                route->prefix.family = AF_INET6;
                route->prefix.prefixlen = op->prefix_length;
                ospf6_prefix_in6_addr(&route->prefix.u.prefix6,
                                      intra_prefix_lsa, op);
+               route->prefix_options = op->prefix_options;
 
                route->type = OSPF6_DEST_TYPE_NETWORK;
                route->path.origin.type = lsa->header->type;
                route->path.origin.id = lsa->header->id;
                route->path.origin.adv_router = lsa->header->adv_router;
-               route->path.prefix_options = op->prefix_options;
                route->path.area_id = oa->area_id;
                route->path.type = OSPF6_PATH_TYPE_INTRA;
                route->path.metric_type = 1;
index bab5fdaae8fefc41b31672af9488f7ce590870a9..1bc1ce9cdf7c00c9edecdcac34fce281feadf7e6 100644 (file)
@@ -29,6 +29,7 @@
 #include "memory.h"
 #include "thread.h"
 #include "checksum.h"
+#include "frrstr.h"
 
 #include "ospf6_proto.h"
 #include "ospf6_lsa.h"
 #include "ospf6_flood.h"
 #include "ospf6d.h"
 
+#ifndef VTYSH_EXTRACT_PL
+#include "ospf6d/ospf6_lsa_clippy.c"
+#endif
+
 DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_LSA,         "OSPF6 LSA");
 DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_LSA_HEADER,  "OSPF6 LSA header");
 DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_LSA_SUMMARY, "OSPF6 LSA summary");
@@ -76,7 +81,6 @@ static int ospf6_unknown_lsa_show(struct vty *vty, struct ospf6_lsa *lsa,
                                  json_object *json_obj, bool use_json)
 {
        uint8_t *start, *end, *current;
-       char byte[4];
 
        start = (uint8_t *)lsa->header + sizeof(struct ospf6_lsa_header);
        end = (uint8_t *)lsa->header + ntohs(lsa->header->length);
@@ -91,8 +95,7 @@ static int ospf6_unknown_lsa_show(struct vty *vty, struct ospf6_lsa *lsa,
                        else if ((current - start) % 4 == 0)
                                vty_out(vty, " ");
 
-                       snprintf(byte, sizeof(byte), "%02x", *current);
-                       vty_out(vty, "%s", byte);
+                       vty_out(vty, "%02x", *current);
                }
 
                vty_out(vty, "\n\n");
@@ -549,29 +552,51 @@ void ospf6_lsa_show_summary(struct vty *vty, struct ospf6_lsa *lsa,
 void ospf6_lsa_show_dump(struct vty *vty, struct ospf6_lsa *lsa,
                         json_object *json_array, bool use_json)
 {
-       uint8_t *start, *end, *current;
+       uint8_t *start = NULL;
+       uint8_t *end = NULL;
+       uint8_t *current = NULL;
        char byte[4];
+       char *header_str = NULL;
+       char adv_router[INET6_ADDRSTRLEN];
+       char id[INET6_ADDRSTRLEN];
+       json_object *json = NULL;
 
        start = (uint8_t *)lsa->header;
        end = (uint8_t *)lsa->header + ntohs(lsa->header->length);
 
-       if (use_json)
-               return;
+       if (use_json) {
+               json = json_object_new_object();
+               size_t header_str_sz = (2 * (end - start)) + 1;
 
-       vty_out(vty, "\n");
-       vty_out(vty, "%s:\n", lsa->name);
+               header_str = XMALLOC(MTYPE_TMP, header_str_sz);
 
-       for (current = start; current < end; current++) {
-               if ((current - start) % 16 == 0)
-                       vty_out(vty, "\n        ");
-               else if ((current - start) % 4 == 0)
-                       vty_out(vty, " ");
+               inet_ntop(AF_INET, &lsa->header->id, id, sizeof(id));
+               inet_ntop(AF_INET, &lsa->header->adv_router, adv_router,
+                         sizeof(adv_router));
 
-               snprintf(byte, sizeof(byte), "%02x", *current);
-               vty_out(vty, "%s", byte);
-       }
+               frrstr_hex(header_str, header_str_sz, start, end - start);
+
+               json_object_string_add(json, "linkStateId", id);
+               json_object_string_add(json, "advertisingRouter", adv_router);
+               json_object_string_add(json, "header", header_str);
+               json_object_array_add(json_array, json);
+
+               XFREE(MTYPE_TMP, header_str);
+       } else {
+               vty_out(vty, "\n%s:\n", lsa->name);
+
+               for (current = start; current < end; current++) {
+                       if ((current - start) % 16 == 0)
+                               vty_out(vty, "\n        ");
+                       else if ((current - start) % 4 == 0)
+                               vty_out(vty, " ");
 
-       vty_out(vty, "\n\n");
+                       snprintf(byte, sizeof(byte), "%02x", *current);
+                       vty_out(vty, "%s", byte);
+               }
+
+               vty_out(vty, "\n\n");
+       }
 
        return;
 }
@@ -822,6 +847,8 @@ int ospf6_lsa_expire(struct thread *thread)
        if (CHECK_FLAG(lsa->flag, OSPF6_LSA_HEADERONLY))
                return 0; /* dbexchange will do something ... */
        ospf6 = ospf6_get_by_lsdb(lsa);
+       assert(ospf6);
+
        /* reinstall lsa */
        ospf6_install_lsa(lsa);
 
@@ -994,6 +1021,30 @@ static char *ospf6_lsa_handler_name(const struct ospf6_lsa_handler *h)
        return buf;
 }
 
+DEFPY (debug_ospf6_lsa_aggregation,
+       debug_ospf6_lsa_aggregation_cmd,
+       "[no] debug ospf6 lsa aggregation",
+       NO_STR
+       DEBUG_STR
+       OSPF6_STR
+       "Debug Link State Advertisements (LSAs)\n"
+       "External LSA Aggregation\n")
+{
+
+       struct ospf6_lsa_handler *handler;
+
+       handler = ospf6_get_lsa_handler(OSPF6_LSTYPE_AS_EXTERNAL);
+       if (handler == NULL)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       if (no)
+               UNSET_FLAG(handler->lh_debug, OSPF6_LSA_DEBUG_AGGR);
+       else
+               SET_FLAG(handler->lh_debug, OSPF6_LSA_DEBUG_AGGR);
+
+       return CMD_SUCCESS;
+}
+
 DEFUN (debug_ospf6_lsa_type,
        debug_ospf6_lsa_hex_cmd,
        "debug ospf6 lsa <router|network|inter-prefix|inter-router|as-external|link|intra-prefix|unknown> [<originate|examine|flooding>]",
@@ -1105,6 +1156,9 @@ void install_element_ospf6_debug_lsa(void)
        install_element(ENABLE_NODE, &no_debug_ospf6_lsa_hex_cmd);
        install_element(CONFIG_NODE, &debug_ospf6_lsa_hex_cmd);
        install_element(CONFIG_NODE, &no_debug_ospf6_lsa_hex_cmd);
+
+       install_element(ENABLE_NODE, &debug_ospf6_lsa_aggregation_cmd);
+       install_element(CONFIG_NODE, &debug_ospf6_lsa_aggregation_cmd);
 }
 
 int config_write_ospf6_debug_lsa(struct vty *vty)
@@ -1128,6 +1182,8 @@ int config_write_ospf6_debug_lsa(struct vty *vty)
                if (CHECK_FLAG(handler->lh_debug, OSPF6_LSA_DEBUG_FLOOD))
                        vty_out(vty, "debug ospf6 lsa %s flooding\n",
                                ospf6_lsa_handler_name(handler));
+               if (CHECK_FLAG(handler->lh_debug, OSPF6_LSA_DEBUG_AGGR))
+                       vty_out(vty, "debug ospf6 lsa aggregation\n");
        }
 
        return 0;
index 15b0d4ebbc8a845258e621075d9f970a858e5be3..a8ed9132dd9b1ca1cc360d2ce640ad549742350c 100644 (file)
@@ -28,6 +28,7 @@
 #define OSPF6_LSA_DEBUG_ORIGINATE 0x02
 #define OSPF6_LSA_DEBUG_EXAMIN    0x04
 #define OSPF6_LSA_DEBUG_FLOOD     0x08
+#define OSPF6_LSA_DEBUG_AGGR      0x10
 
 /* OSPF LSA Default metric values */
 #define DEFAULT_DEFAULT_METRIC 20
@@ -51,6 +52,8 @@
        (ospf6_lstype_debug(type) & OSPF6_LSA_DEBUG_EXAMIN)
 #define IS_OSPF6_DEBUG_FLOOD_TYPE(type)                                        \
        (ospf6_lstype_debug(type) & OSPF6_LSA_DEBUG_FLOOD)
+#define IS_OSPF6_DEBUG_AGGR                                                   \
+       (ospf6_lstype_debug(OSPF6_LSTYPE_AS_EXTERNAL) & OSPF6_LSA_DEBUG_AGGR)  \
 
 /* LSA definition */
 
@@ -67,7 +70,8 @@
 #define OSPF6_LSTYPE_TYPE_7           0x2007
 #define OSPF6_LSTYPE_LINK             0x0008
 #define OSPF6_LSTYPE_INTRA_PREFIX     0x2009
-#define OSPF6_LSTYPE_SIZE             0x000a
+#define OSPF6_LSTYPE_GRACE_LSA       0x000b
+#define OSPF6_LSTYPE_SIZE             0x000c
 
 /* Masks for LS Type : RFC 2740 A.4.2.1 "LS type" */
 #define OSPF6_LSTYPE_UBIT_MASK        0x8000
@@ -143,6 +147,9 @@ struct ospf6_lsa {
 
        /* lsa instance */
        struct ospf6_lsa_header *header;
+
+       /*For topo chg detection in HELPER role*/
+       bool tobe_acknowledged;
 };
 
 #define OSPF6_LSA_HEADERONLY 0x01
@@ -207,6 +214,14 @@ extern vector ospf6_lsa_handler_vector;
                continue;                                                      \
        }
 
+#define CHECK_LSA_TOPO_CHG_ELIGIBLE(type)              \
+       ((type == OSPF6_LSTYPE_ROUTER)                  \
+        || (type == OSPF6_LSTYPE_NETWORK)              \
+        || (type == OSPF6_LSTYPE_INTER_PREFIX)         \
+        || (type == OSPF6_LSTYPE_INTER_ROUTER)         \
+        || (type == OSPF6_LSTYPE_AS_EXTERNAL)          \
+        || (type == OSPF6_LSTYPE_TYPE_7)               \
+        || (type == OSPF6_LSTYPE_INTRA_PREFIX))
 
 /* Function Prototypes */
 extern const char *ospf6_lstype_name(uint16_t type);
@@ -263,4 +278,6 @@ extern void install_element_ospf6_debug_lsa(void);
 extern void ospf6_lsa_age_set(struct ospf6_lsa *lsa);
 extern void ospf6_flush_self_originated_lsas_now(struct ospf6 *ospf6);
 extern struct ospf6 *ospf6_get_by_lsdb(struct ospf6_lsa *lsa);
+struct ospf6_lsa *ospf6_find_external_lsa(struct ospf6 *ospf6,
+                                         struct prefix *p);
 #endif /* OSPF6_LSA_H */
index 304f03fde8a8373783d1b6a4ebbbccbc550fa35e..039c65d7398b7c85a6497b7777477ad23e40db3a 100644 (file)
@@ -30,6 +30,7 @@
 #include "ospf6_proto.h"
 #include "ospf6_lsa.h"
 #include "ospf6_lsdb.h"
+#include "ospf6_asbr.h"
 #include "ospf6_route.h"
 #include "ospf6d.h"
 #include "bitfield.h"
@@ -194,6 +195,28 @@ struct ospf6_lsa *ospf6_lsdb_lookup(uint16_t type, uint32_t id,
        return (struct ospf6_lsa *)node->info;
 }
 
+struct ospf6_lsa *ospf6_find_external_lsa(struct ospf6 *ospf6, struct prefix *p)
+{
+       struct ospf6_route *match;
+       struct ospf6_lsa *lsa;
+       struct ospf6_external_info *info;
+
+       match = ospf6_route_lookup(p, ospf6->external_table);
+       if (match == NULL) {
+               if (IS_OSPF6_DEBUG_ASBR)
+                       zlog_debug("No such route %pFX to withdraw", p);
+
+               return NULL;
+       }
+
+       info = match->route_option;
+       assert(info);
+
+       lsa = ospf6_lsdb_lookup(htons(OSPF6_LSTYPE_AS_EXTERNAL),
+                               htonl(info->id), ospf6->router_id, ospf6->lsdb);
+       return lsa;
+}
+
 struct ospf6_lsa *ospf6_lsdb_lookup_next(uint16_t type, uint32_t id,
                                         uint32_t adv_router,
                                         struct ospf6_lsdb *lsdb)
index 7a62c46b02a3a6451e5000a3aa2c51ff5403ecd1..9789e8c4e0b4026df0c658fe2a6a6a2bb9337a1c 100644 (file)
@@ -68,7 +68,7 @@ extern struct ospf6_lsa *ospf6_lsdb_next(const struct route_node *iterend,
 
 /*
  * Since we are locking the lsa in ospf6_lsdb_head
- * and then unlocking it in lspf6_lsa_lock, when
+ * and then unlocking it in ospf6_lsa_unlock, when
  * we cache the next pointer we need to increment
  * the lock for the lsa so we don't accidently free
  * it really early.
@@ -76,7 +76,7 @@ extern struct ospf6_lsa *ospf6_lsdb_next(const struct route_node *iterend,
 #define ALL_LSDB(lsdb, lsa, lsanext)                                           \
        const struct route_node *iterend =                                     \
                ospf6_lsdb_head(lsdb, 0, 0, 0, &lsa);                          \
-       (lsa) != NULL &&ospf6_lsa_lock(lsa)                                    \
+       (lsa) != NULL && ospf6_lsa_lock(lsa)                                   \
                && ((lsanext) = ospf6_lsdb_next(iterend, (lsa)), 1);           \
        ospf6_lsa_unlock(lsa), (lsa) = (lsanext)
 
index e233611690b2ce3441fa47b5575970c53efa1503..54cf142ba8739eb9506824cfe6c4ba6a3ba1ba7f 100644 (file)
@@ -208,7 +208,6 @@ int main(int argc, char *argv[], char *envp[])
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index 549f5668b9121c3d46a81521d6417a8a08e51481..cd73e3d4062632c7cd83c42606e1a196a16024cf 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "ospf6_flood.h"
 #include "ospf6d.h"
-
+#include "ospf6_gr.h"
 #include <netinet/ip6.h>
 
 DEFINE_MTYPE_STATIC(OSPF6D, OSPF6_MESSAGE, "OSPF6 message");
@@ -84,7 +84,9 @@ const uint16_t ospf6_lsa_minlen[OSPF6_LSTYPE_SIZE] = {
        /* 0x2006 */ 0,
        /* 0x2007 */ OSPF6_AS_EXTERNAL_LSA_MIN_SIZE,
        /* 0x0008 */ OSPF6_LINK_LSA_MIN_SIZE,
-       /* 0x2009 */ OSPF6_INTRA_PREFIX_LSA_MIN_SIZE};
+       /* 0x2009 */ OSPF6_INTRA_PREFIX_LSA_MIN_SIZE,
+       /* 0x200a */ 0,
+       /* 0x000b */ OSPF6_GRACE_LSA_MIN_SIZE};
 
 /* print functions */
 
@@ -512,8 +514,44 @@ static void ospf6_hello_recv(struct in6_addr *src, struct in6_addr *dst,
        thread_execute(master, hello_received, on, 0);
        if (twoway)
                thread_execute(master, twoway_received, on, 0);
-       else
-               thread_execute(master, oneway_received, on, 0);
+       else {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, Received oneway hello from RESTARTER so ignore here.",
+                               __PRETTY_FUNCTION__);
+
+               if (!OSPF6_GR_IS_ACTIVE_HELPER(on)) {
+                       /* If the router is DR_OTHER, RESTARTER will not wait
+                        * until it receives the hello from it if it receives
+                        * from DR and BDR.
+                        * So, helper might receives ONE_WAY hello from
+                        * RESTARTER. So not allowing to change the state if it
+                        * receives one_way hellow when it acts as HELPER for
+                        * that specific neighbor.
+                        */
+                       thread_execute(master, oneway_received, on, 0);
+               }
+       }
+
+       if (OSPF6_GR_IS_ACTIVE_HELPER(on)) {
+               /* As per the GR Conformance Test Case 7.2. Section 3
+                * "Also, if X was the Designated Router on network segment S
+                * when the helping relationship began, Y maintains X as the
+                * Designated Router until the helping relationship is
+                * terminated."
+                * When it is a helper for this neighbor, It should not trigger
+                * the ISM Events. Also Intentionally not setting the priority
+                * and other fields so that when the neighbor exits the Grace
+                * period, it can handle if there is any change before GR and
+                * after GR.
+                */
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, Neighbor is under GR Restart, hence ignoring the ISM Events",
+                               __PRETTY_FUNCTION__);
+
+               return;
+       }
 
        /* Schedule interface events */
        if (backupseen)
@@ -1260,7 +1298,15 @@ static unsigned ospf6_lsa_examin(struct ospf6_lsa_header *lsah,
                        lsalen - OSPF6_LSA_HEADER_SIZE
                                - OSPF6_INTRA_PREFIX_LSA_MIN_SIZE,
                        ntohs(intra_prefix_lsa->prefix_num) /* 16 bits */
-                       );
+               );
+       case OSPF6_LSTYPE_GRACE_LSA:
+               if (lsalen < OSPF6_LSA_HEADER_SIZE + GRACE_PERIOD_TLV_SIZE
+                                    + GRACE_RESTART_REASON_TLV_SIZE) {
+                       if (IS_DEBUG_OSPF6_GR)
+                               zlog_debug("%s: Undersized GraceLSA.",
+                                          __func__);
+                       return MSG_NG;
+               }
        }
        /* No additional validation is possible for unknown LSA types, which are
           themselves valid in OPSFv3, hence the default decision is to accept.
index 8cf05183e15370cd78ce72723d9e3fb505f5589f..4ea615f32b7f5923bb84ba44bfe5a7dbb3b6b18a 100644 (file)
@@ -45,6 +45,7 @@
 #include "ospf6_lsa.h"
 #include "ospf6_spf.h"
 #include "ospf6_zebra.h"
+#include "ospf6_gr.h"
 #include "lib/json.h"
 
 DEFINE_MTYPE(OSPF6D, OSPF6_NEIGHBOR, "OSPF6 neighbor");
@@ -151,6 +152,7 @@ void ospf6_neighbor_delete(struct ospf6_neighbor *on)
        THREAD_OFF(on->thread_send_lsreq);
        THREAD_OFF(on->thread_send_lsupdate);
        THREAD_OFF(on->thread_send_lsack);
+       THREAD_OFF(on->gr_helper_info.t_grace_timer);
 
        bfd_sess_free(&on->bfd_session);
        XFREE(MTYPE_OSPF6_NEIGHBOR, on);
@@ -192,19 +194,24 @@ static void ospf6_neighbor_state_change(uint8_t next_state,
 
        if (prev_state == OSPF6_NEIGHBOR_FULL
            || next_state == OSPF6_NEIGHBOR_FULL) {
-               OSPF6_ROUTER_LSA_SCHEDULE(on->ospf6_if->area);
-               if (on->ospf6_if->state == OSPF6_INTERFACE_DR) {
-                       OSPF6_NETWORK_LSA_SCHEDULE(on->ospf6_if);
-                       OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT(on->ospf6_if);
+               if (!OSPF6_GR_IS_ACTIVE_HELPER(on)) {
+                       OSPF6_ROUTER_LSA_SCHEDULE(on->ospf6_if->area);
+                       if (on->ospf6_if->state == OSPF6_INTERFACE_DR) {
+                               OSPF6_NETWORK_LSA_SCHEDULE(on->ospf6_if);
+                               OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT(
+                                       on->ospf6_if);
+                       }
                }
                if (next_state == OSPF6_NEIGHBOR_FULL)
                        on->ospf6_if->area->intra_prefix_originate = 1;
 
-               OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB(on->ospf6_if->area);
+               if (!OSPF6_GR_IS_ACTIVE_HELPER(on))
+                       OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB(
+                               on->ospf6_if->area);
 
-               if ((prev_state == OSPF6_NEIGHBOR_LOADING ||
-                    prev_state == OSPF6_NEIGHBOR_EXCHANGE) &&
-                   next_state == OSPF6_NEIGHBOR_FULL) {
+               if ((prev_state == OSPF6_NEIGHBOR_LOADING
+                    || prev_state == OSPF6_NEIGHBOR_EXCHANGE)
+                   && next_state == OSPF6_NEIGHBOR_FULL) {
                        OSPF6_AS_EXTERN_LSA_SCHEDULE(on->ospf6_if);
                        on->ospf6_if->area->full_nbrs++;
                }
@@ -601,12 +608,29 @@ int inactivity_timer(struct thread *thread)
        on->drouter = on->prev_drouter = 0;
        on->bdrouter = on->prev_bdrouter = 0;
 
-       ospf6_neighbor_state_change(OSPF6_NEIGHBOR_DOWN, on,
-                                   OSPF6_NEIGHBOR_EVENT_INACTIVITY_TIMER);
-       thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
+       if (!OSPF6_GR_IS_ACTIVE_HELPER(on)) {
+               on->drouter = on->prev_drouter = 0;
+               on->bdrouter = on->prev_bdrouter = 0;
+
+               ospf6_neighbor_state_change(
+                       OSPF6_NEIGHBOR_DOWN, on,
+                       OSPF6_NEIGHBOR_EVENT_INACTIVITY_TIMER);
+               thread_add_event(master, neighbor_change, on->ospf6_if, 0,
+                                NULL);
+
+               listnode_delete(on->ospf6_if->neighbor_list, on);
+               ospf6_neighbor_delete(on);
 
-       listnode_delete(on->ospf6_if->neighbor_list, on);
-       ospf6_neighbor_delete(on);
+       } else {
+               if (IS_DEBUG_OSPF6_GR)
+                       zlog_debug(
+                               "%s, Acting as HELPER for this neighbour, So restart the dead timer.",
+                               __PRETTY_FUNCTION__);
+
+               thread_add_timer(master, inactivity_timer, on,
+                                on->ospf6_if->dead_interval,
+                                &on->inactivity_timer);
+       }
 
        return 0;
 }
index 729b1d2e85d2e9de7be35798d9c57d2d12a707ce..a229897226be6e95517b7cd2101959d2e223402b 100644 (file)
@@ -32,6 +32,38 @@ extern unsigned char conf_debug_ospf6_neighbor;
 #define IS_OSPF6_DEBUG_NEIGHBOR(level)                                         \
        (conf_debug_ospf6_neighbor & OSPF6_DEBUG_NEIGHBOR_##level)
 
+struct ospf6_helper_info {
+
+       /* Grace interval received from
+        * Restarting Router.
+        */
+       uint32_t recvd_grace_period;
+
+       /* Grace interval used for grace
+        * gracetimer.
+        */
+       uint32_t actual_grace_period;
+
+       /* Grace timer,This Router acts as
+        * helper until this timer until
+        * this timer expires.
+        */
+       struct thread *t_grace_timer;
+
+       /* Helper status */
+       uint32_t gr_helper_status;
+
+       /* Helper exit reason*/
+       uint32_t helper_exit_reason;
+
+       /* Planned/Unplanned restart*/
+       uint32_t gr_restart_reason;
+
+
+       /* Helper rejected reason */
+       uint32_t rejected_reason;
+};
+
 /* Neighbor structure */
 struct ospf6_neighbor {
        /* Neighbor Router ID String */
@@ -104,6 +136,9 @@ struct ospf6_neighbor {
 
        /* BFD information */
        struct bfd_session_params *bfd_session;
+
+       /* ospf6 graceful restart HELPER info */
+       struct ospf6_helper_info gr_helper_info;
 };
 
 /* Neighbor state */
index 9f8cdf8fb7be657736b329263c5cafab020d94c8..10b7d2d9f65addd7f2d75e74f20818be02f0dfd5 100644 (file)
@@ -1130,18 +1130,17 @@ static void ospf6_nssa_flush_area(struct ospf6_area *area)
        uint16_t type;
        struct ospf6_lsa *lsa = NULL, *type5 = NULL;
        struct ospf6 *ospf6 = area->ospf6;
-       const struct route_node *rt = NULL;
 
        if (IS_OSPF6_DEBUG_NSSA)
                zlog_debug("%s: area %s", __func__, area->name);
 
        /* Flush the NSSA LSA */
        type = htons(OSPF6_LSTYPE_TYPE_7);
-       rt = ospf6_lsdb_head(area->lsdb_self, 0, type, ospf6->router_id, &lsa);
-       while (lsa) {
+       for (ALL_LSDB_TYPED_ADVRTR(area->lsdb, type, ospf6->router_id, lsa)) {
                lsa->header->age = htons(OSPF_LSA_MAXAGE);
                SET_FLAG(lsa->flag, OSPF6_LSA_FLUSH);
                ospf6_flood(NULL, lsa);
+
                /* Flush the translated LSA */
                if (ospf6_check_and_set_router_abr(ospf6)) {
                        type = htons(OSPF6_LSTYPE_AS_EXTERNAL);
@@ -1155,17 +1154,54 @@ static void ospf6_nssa_flush_area(struct ospf6_area *area)
                                ospf6_flood(NULL, type5);
                        }
                }
-               lsa = ospf6_lsdb_next(rt, lsa);
        }
 }
 
-static void ospf6_area_nssa_update(struct ospf6_area *area)
+static void ospf6_check_and_originate_type7_lsa(struct ospf6_area *area)
 {
        struct ospf6_route *route;
+       struct route_node *rn = NULL;
+       struct ospf6_external_aggr_rt *aggr;
+
+       /* Loop through the external_table to find the LSAs originated
+        * without aggregation and originate type-7 LSAs for them.
+        */
+       for (route = ospf6_route_head(
+                    area->ospf6->external_table);
+            route; route = ospf6_route_next(route)) {
+               /* This means the Type-5 LSA was originated for this route */
+               if (route->path.origin.id != 0)
+                       ospf6_nssa_lsa_originate(route, area);
 
+       }
+
+       /* Loop through the aggregation table to originate type-7 LSAs
+        * for the aggregated type-5 LSAs
+        */
+       for (rn = route_top(area->ospf6->rt_aggr_tbl); rn;
+            rn = route_next(rn)) {
+               if (!rn->info)
+                       continue;
+
+               aggr = rn->info;
+
+               if (CHECK_FLAG(aggr->aggrflags,
+                   OSPF6_EXTERNAL_AGGRT_ORIGINATED)) {
+                       if (IS_OSPF6_DEBUG_NSSA)
+                               zlog_debug(
+                                       "Originating Type-7 LSAs for area %s",
+                                       area->name);
+
+                       ospf6_nssa_lsa_originate(aggr->route, area);
+               }
+       }
+
+}
+
+void ospf6_area_nssa_update(struct ospf6_area *area)
+{
        if (IS_AREA_NSSA(area)) {
-               if (!ospf6_check_and_set_router_abr(area->ospf6))
-                       OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_E);
+               OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_E);
                area->ospf6->anyNSSA++;
                OSPF6_OPT_SET(area->options, OSPF6_OPT_N);
                area->NSSATranslatorRole = OSPF6_NSSA_ROLE_CANDIDATE;
@@ -1173,8 +1209,7 @@ static void ospf6_area_nssa_update(struct ospf6_area *area)
                if (IS_OSPF6_DEBUG_ORIGINATE(ROUTER))
                        zlog_debug("Normal area for if %s", area->name);
                OSPF6_OPT_CLEAR(area->options, OSPF6_OPT_N);
-               if (ospf6_check_and_set_router_abr(area->ospf6))
-                       OSPF6_OPT_SET(area->options, OSPF6_OPT_E);
+               OSPF6_OPT_SET(area->options, OSPF6_OPT_E);
                area->ospf6->anyNSSA--;
                area->NSSATranslatorState = OSPF6_NSSA_TRANSLATE_DISABLED;
        }
@@ -1183,6 +1218,9 @@ static void ospf6_area_nssa_update(struct ospf6_area *area)
        if (IS_AREA_NSSA(area)) {
                OSPF6_ROUTER_LSA_SCHEDULE(area);
 
+               /* Flush external LSAs. */
+               ospf6_asbr_remove_externals_from_area(area);
+
                /* Check if router is ABR */
                if (ospf6_check_and_set_router_abr(area->ospf6)) {
                        if (IS_OSPF6_DEBUG_NSSA)
@@ -1194,18 +1232,13 @@ static void ospf6_area_nssa_update(struct ospf6_area *area)
                                zlog_debug("NSSA area %s", area->name);
 
                        /* Originate NSSA LSA */
-                       for (route = ospf6_route_head(
-                                    area->ospf6->external_table);
-                            route; route = ospf6_route_next(route))
-                               ospf6_nssa_lsa_originate(route, area);
+                       ospf6_check_and_originate_type7_lsa(area);
                }
        } else {
                /* Disable NSSA */
                if (IS_OSPF6_DEBUG_NSSA)
                        zlog_debug("Normal area %s", area->name);
                ospf6_nssa_flush_area(area);
-               ospf6_area_disable(area);
-               ospf6_area_delete(area);
        }
 }
 
@@ -1213,6 +1246,9 @@ int ospf6_area_nssa_set(struct ospf6 *ospf6, struct ospf6_area *area)
 {
 
        if (!IS_AREA_NSSA(area)) {
+               /* Disable stub first. */
+               ospf6_area_stub_unset(ospf6, area);
+
                SET_FLAG(area->flag, OSPF6_AREA_NSSA);
                if (IS_OSPF6_DEBUG_NSSA)
                        zlog_debug("area %s nssa set", area->name);
@@ -1259,13 +1295,10 @@ void ospf6_nssa_lsa_originate(struct ospf6_route *route,
        struct in6_addr *fwd_addr;
 
        struct ospf6_as_external_lsa *as_external_lsa;
-       char buf[PREFIX2STR_BUFFER];
        caddr_t p;
 
-       if (IS_OSPF6_DEBUG_ASBR || IS_OSPF6_DEBUG_ORIGINATE(AS_EXTERNAL)) {
-               prefix2str(&route->prefix, buf, sizeof(buf));
-               zlog_debug("Originate AS-External-LSA for %s", buf);
-       }
+       if (IS_OSPF6_DEBUG_ASBR || IS_OSPF6_DEBUG_ORIGINATE(AS_EXTERNAL))
+               zlog_debug("Originate NSSA-LSA for %pFX", &route->prefix);
 
        /* prepare buffer */
        memset(buffer, 0, sizeof(buffer));
@@ -1296,7 +1329,7 @@ void ospf6_nssa_lsa_originate(struct ospf6_route *route,
        as_external_lsa->prefix.prefix_length = route->prefix.prefixlen;
 
        /* PrefixOptions */
-       as_external_lsa->prefix.prefix_options = route->path.prefix_options;
+       as_external_lsa->prefix.prefix_options = route->prefix_options;
 
        /* Set the P bit */
        as_external_lsa->prefix.prefix_options |= OSPF6_PREFIX_OPTION_P;
@@ -1334,7 +1367,7 @@ void ospf6_nssa_lsa_originate(struct ospf6_route *route,
        lsa_header->adv_router = area->ospf6->router_id;
        lsa_header->seqnum =
                ospf6_new_ls_seqnum(lsa_header->type, lsa_header->id,
-                                   lsa_header->adv_router, area->ospf6->lsdb);
+                                   lsa_header->adv_router, area->lsdb);
        lsa_header->length = htons((caddr_t)p - (caddr_t)lsa_header);
 
        /* LSA checksum */
index a171d76d4413f456c228f129d34b63aaed2842b0..454bdd7fe2eb692185b5dbbea599e7d48abd85e3 100644 (file)
@@ -61,6 +61,7 @@ extern struct ospf6_lsa *ospf6_translated_nssa_originate(struct ospf6_area *,
 extern void ospf6_asbr_nssa_redist_task(struct ospf6 *ospf6);
 
 extern void ospf6_schedule_abr_task(struct ospf6 *ospf6);
+extern void ospf6_area_nssa_update(struct ospf6_area *area);
 void ospf6_asbr_prefix_readvertise(struct ospf6 *ospf6);
 extern void ospf6_nssa_lsa_originate(struct ospf6_route *route,
                                     struct ospf6_area *area);
index 0a026785f47ca689d842de4fbc4ac3181424ebb0..13003b4151802cc50e29130936068260b8140613 100644 (file)
@@ -284,12 +284,21 @@ void ospf6_add_nexthop(struct list *nh_list, int ifindex, struct in6_addr *addr)
        struct ospf6_nexthop nh_match;
 
        if (nh_list) {
-               nh_match.ifindex = ifindex;
-               if (addr != NULL)
+               if (addr) {
+                       if (ifindex)
+                               nh_match.type = NEXTHOP_TYPE_IPV6_IFINDEX;
+                       else
+                               nh_match.type = NEXTHOP_TYPE_IPV6;
+
                        memcpy(&nh_match.address, addr,
                               sizeof(struct in6_addr));
-               else
+               } else {
+                       nh_match.type = NEXTHOP_TYPE_IFINDEX;
+
                        memset(&nh_match.address, 0, sizeof(struct in6_addr));
+               }
+
+               nh_match.ifindex = ifindex;
 
                if (!ospf6_route_find_nexthop(nh_list, &nh_match)) {
                        nh = ospf6_nexthop_create();
@@ -299,36 +308,76 @@ void ospf6_add_nexthop(struct list *nh_list, int ifindex, struct in6_addr *addr)
        }
 }
 
+void ospf6_add_route_nexthop_blackhole(struct ospf6_route *route)
+{
+       struct ospf6_nexthop *nh;
+       struct ospf6_nexthop nh_match = {};
+
+       /* List not allocated. */
+       if (route->nh_list == NULL)
+               return;
+
+       /* Entry already exists. */
+       nh_match.type = NEXTHOP_TYPE_BLACKHOLE;
+       if (ospf6_route_find_nexthop(route->nh_list, &nh_match))
+               return;
+
+       nh = ospf6_nexthop_create();
+       ospf6_nexthop_copy(nh, &nh_match);
+       listnode_add(route->nh_list, nh);
+}
+
 void ospf6_route_zebra_copy_nexthops(struct ospf6_route *route,
                                     struct zapi_nexthop nexthops[],
                                     int entries, vrf_id_t vrf_id)
 {
        struct ospf6_nexthop *nh;
        struct listnode *node;
-       char buf[64];
        int i;
 
        if (route) {
                i = 0;
                for (ALL_LIST_ELEMENTS_RO(route->nh_list, node, nh)) {
                        if (IS_OSPF6_DEBUG_ZEBRA(SEND)) {
-                               const char *ifname;
-                               inet_ntop(AF_INET6, &nh->address, buf,
-                                         sizeof(buf));
-                               ifname = ifindex2ifname(nh->ifindex, vrf_id);
-                               zlog_debug("  nexthop: %s%%%.*s(%d)", buf,
-                                          IFNAMSIZ, ifname, nh->ifindex);
+                               zlog_debug("  nexthop: %s %pI6%%%.*s(%d)",
+                                          nexthop_type_to_str(nh->type),
+                                          &nh->address, IFNAMSIZ,
+                                          ifindex2ifname(nh->ifindex, vrf_id),
+                                          nh->ifindex);
                        }
+
                        if (i >= entries)
                                return;
 
                        nexthops[i].vrf_id = vrf_id;
-                       nexthops[i].ifindex = nh->ifindex;
-                       if (!IN6_IS_ADDR_UNSPECIFIED(&nh->address)) {
+                       nexthops[i].type = nh->type;
+
+                       switch (nh->type) {
+                       case NEXTHOP_TYPE_BLACKHOLE:
+                               /* NOTHING */
+                               break;
+
+                       case NEXTHOP_TYPE_IFINDEX:
+                               nexthops[i].ifindex = nh->ifindex;
+                               break;
+
+                       case NEXTHOP_TYPE_IPV4_IFINDEX:
+                       case NEXTHOP_TYPE_IPV4:
+                               /*
+                                * OSPFv3 with IPv4 routes is not supported
+                                * yet. Skip this next hop.
+                                */
+                               if (IS_OSPF6_DEBUG_ZEBRA(SEND))
+                                       zlog_debug("  Skipping IPv4 next hop");
+                               continue;
+
+                       case NEXTHOP_TYPE_IPV6_IFINDEX:
+                               nexthops[i].ifindex = nh->ifindex;
+                               /* FALLTHROUGH */
+                       case NEXTHOP_TYPE_IPV6:
                                nexthops[i].gate.ipv6 = nh->address;
-                               nexthops[i].type = NEXTHOP_TYPE_IPV6_IFINDEX;
-                       } else
-                               nexthops[i].type = NEXTHOP_TYPE_IFINDEX;
+                               break;
+                       }
                        i++;
                }
        }
@@ -404,7 +453,7 @@ void ospf6_copy_paths(struct list *dst, struct list *src)
        }
 }
 
-struct ospf6_route *ospf6_route_create(void)
+struct ospf6_route *ospf6_route_create(struct ospf6 *ospf6)
 {
        struct ospf6_route *route;
 
@@ -415,6 +464,8 @@ struct ospf6_route *ospf6_route_create(void)
        route->paths = list_new();
        route->paths->cmp = (int (*)(void *, void *))ospf6_path_cmp;
        route->paths->del = (void (*)(void *))ospf6_path_free;
+       route->ospf6 = ospf6;
+
        return route;
 }
 
@@ -433,9 +484,10 @@ struct ospf6_route *ospf6_route_copy(struct ospf6_route *route)
 {
        struct ospf6_route *new;
 
-       new = ospf6_route_create();
+       new = ospf6_route_create(route->ospf6);
        new->type = route->type;
        memcpy(&new->prefix, &route->prefix, sizeof(struct prefix));
+       new->prefix_options = route->prefix_options;
        new->installed = route->installed;
        new->changed = route->changed;
        new->flag = route->flag;
@@ -615,6 +667,9 @@ struct ospf6_route *ospf6_route_add(struct ospf6_route *route,
 
        if (route->type == OSPF6_DEST_TYPE_LINKSTATE)
                ospf6_linkstate_prefix2str(&route->prefix, buf, sizeof(buf));
+       else if (route->type == OSPF6_DEST_TYPE_ROUTER)
+               inet_ntop(AF_INET, &ADV_ROUTER_IN_PREFIX(&route->prefix), buf,
+                         sizeof(buf));
        else
                prefix2str(&route->prefix, buf, sizeof(buf));
 
@@ -847,6 +902,9 @@ void ospf6_route_remove(struct ospf6_route *route,
 
        if (route->type == OSPF6_DEST_TYPE_LINKSTATE)
                ospf6_linkstate_prefix2str(&route->prefix, buf, sizeof(buf));
+       else if (route->type == OSPF6_DEST_TYPE_ROUTER)
+               inet_ntop(AF_INET, &ADV_ROUTER_IN_PREFIX(&route->prefix), buf,
+                         sizeof(buf));
        else
                prefix2str(&route->prefix, buf, sizeof(buf));
 
@@ -1137,6 +1195,7 @@ void ospf6_route_show_detail(struct vty *vty, struct ospf6_route *route,
 {
        char destination[PREFIX2STR_BUFFER], nexthop[64];
        char area_id[16], id[16], adv_router[16], capa[16], options[16];
+       char pfx_options[16];
        struct timeval now, res;
        char duration[64];
        struct listnode *node;
@@ -1264,10 +1323,13 @@ void ospf6_route_show_detail(struct vty *vty, struct ospf6_route *route,
                vty_out(vty, "Router Bits: %s\n", capa);
 
        /* Prefix Options */
+       ospf6_prefix_options_printbuf(route->prefix_options, pfx_options,
+                                     sizeof(pfx_options));
        if (use_json)
-               json_object_string_add(json_route, "prefixOptions", "xxx");
+               json_object_string_add(json_route, "prefixOptions",
+                                      pfx_options);
        else
-               vty_out(vty, "Prefix Options: xxx\n");
+               vty_out(vty, "Prefix Options: %s\n", pfx_options);
 
        /* Metrics */
        if (use_json) {
index a791a82cd4b03260e56a80c3c7c2650f14c6973b..991720ec2e6ed1446cd191209adc45c2d6031db7 100644 (file)
@@ -24,6 +24,7 @@
 #include "command.h"
 #include "zclient.h"
 #include "lib/json.h"
+#include "lib/nexthop.h"
 
 #define OSPF6_MULTI_PATH_LIMIT    4
 
@@ -44,23 +45,60 @@ struct ospf6_nexthop {
 
        /* IP address, if any */
        struct in6_addr address;
+
+       /** Next-hop type information. */
+       enum nexthop_types_t type;
 };
 
-#define ospf6_nexthop_is_set(x)                                                \
-       ((x)->ifindex || !IN6_IS_ADDR_UNSPECIFIED(&(x)->address))
-#define ospf6_nexthop_is_same(a, b)                                            \
-       ((a)->ifindex == (b)->ifindex                                          \
-        && IN6_ARE_ADDR_EQUAL(&(a)->address, &(b)->address))
-#define ospf6_nexthop_clear(x)                                                 \
-       do {                                                                   \
-               (x)->ifindex = 0;                                              \
-               memset(&(x)->address, 0, sizeof(struct in6_addr));             \
-       } while (0)
-#define ospf6_nexthop_copy(a, b)                                               \
-       do {                                                                   \
-               (a)->ifindex = (b)->ifindex;                                   \
-               memcpy(&(a)->address, &(b)->address, sizeof(struct in6_addr)); \
-       } while (0)
+static inline bool ospf6_nexthop_is_set(const struct ospf6_nexthop *nh)
+{
+       return nh->type != 0;
+}
+
+static inline bool ospf6_nexthop_is_same(const struct ospf6_nexthop *nha,
+                                        const struct ospf6_nexthop *nhb)
+{
+       if (nha->type != nhb->type)
+               return false;
+
+       switch (nha->type) {
+       case NEXTHOP_TYPE_BLACKHOLE:
+               /* NOTHING */
+               break;
+
+       case NEXTHOP_TYPE_IFINDEX:
+               if (nha->ifindex != nhb->ifindex)
+                       return false;
+               break;
+
+       case NEXTHOP_TYPE_IPV4_IFINDEX:
+       case NEXTHOP_TYPE_IPV4:
+               /* OSPFv3 does not support IPv4 next hops. */
+               return false;
+
+       case NEXTHOP_TYPE_IPV6_IFINDEX:
+               if (nha->ifindex != nhb->ifindex)
+                       return false;
+               /* FALLTHROUGH */
+       case NEXTHOP_TYPE_IPV6:
+               if (!IN6_ARE_ADDR_EQUAL(&nha->address, &nhb->address))
+                       return false;
+               break;
+       }
+
+       return true;
+}
+
+static inline void ospf6_nexthop_clear(struct ospf6_nexthop *nh)
+{
+       memset(nh, 0, sizeof(*nh));
+}
+
+static inline void ospf6_nexthop_copy(struct ospf6_nexthop *nha,
+                                     const struct ospf6_nexthop *nhb)
+{
+       memcpy(nha, nhb, sizeof(*nha));
+}
 
 /* Path */
 struct ospf6_ls_origin {
@@ -79,9 +117,6 @@ struct ospf6_path {
        /* Optional Capabilities */
        uint8_t options[3];
 
-       /* Prefix Options */
-       uint8_t prefix_options;
-
        /* Associated Area */
        in_addr_t area_id;
 
@@ -127,6 +162,9 @@ struct ospf6_route {
        struct ospf6_route *prev;
        struct ospf6_route *next;
 
+       /* Back pointer to ospf6 */
+       struct ospf6 *ospf6;
+
        unsigned int lock;
 
        /* Destination Type */
@@ -147,6 +185,9 @@ struct ospf6_route {
        /* flag */
        uint8_t flag;
 
+       /* Prefix Options */
+       uint8_t prefix_options;
+
        /* route option */
        void *route_option;
 
@@ -161,6 +202,12 @@ struct ospf6_route {
 
        /* nexthop */
        struct list *nh_list;
+
+       /* points to the summarised route */
+       struct ospf6_external_aggr_rt *aggr_route;
+
+       /* For Aggr routes */
+       bool to_be_processed;
 };
 
 #define OSPF6_DEST_TYPE_NONE       0
@@ -279,6 +326,7 @@ extern void ospf6_copy_nexthops(struct list *dst, struct list *src);
 extern void ospf6_merge_nexthops(struct list *dst, struct list *src);
 extern void ospf6_add_nexthop(struct list *nh_list, int ifindex,
                              struct in6_addr *addr);
+extern void ospf6_add_route_nexthop_blackhole(struct ospf6_route *route);
 extern int ospf6_num_nexthops(struct list *nh_list);
 extern int ospf6_route_cmp_nexthops(struct ospf6_route *a,
                                    struct ospf6_route *b);
@@ -294,7 +342,7 @@ extern int ospf6_route_get_first_nh_index(struct ospf6_route *route);
 #define ospf6_route_add_nexthop(route, ifindex, addr)                          \
        ospf6_add_nexthop(route->nh_list, ifindex, addr)
 
-extern struct ospf6_route *ospf6_route_create(void);
+extern struct ospf6_route *ospf6_route_create(struct ospf6 *ospf6);
 extern void ospf6_route_delete(struct ospf6_route *);
 extern struct ospf6_route *ospf6_route_copy(struct ospf6_route *route);
 extern int ospf6_route_cmp(struct ospf6_route *ra, struct ospf6_route *rb);
index 051b3a63efa6ba9879b7d0531658e798cace262c..14122988025e369619bfecf0c54f880379b1023a 100644 (file)
@@ -374,7 +374,7 @@ static int ospf6_spf_install(struct ospf6_vertex *v,
           up to here. */
        assert(route == NULL);
 
-       route = ospf6_route_create();
+       route = ospf6_route_create(v->area->ospf6);
        memcpy(&route->prefix, &v->vertex_id, sizeof(struct prefix));
        route->type = OSPF6_DEST_TYPE_LINKSTATE;
        route->path.type = OSPF6_PATH_TYPE_INTRA;
@@ -1250,12 +1250,9 @@ static int ospf6_ase_calculate_timer(struct thread *t)
                                zlog_debug("%s : looking at area %s", __func__,
                                           area->name);
 
-                       if (IS_OSPF6_DEBUG_SPF(PROCESS)) {
-                               type = htons(OSPF6_LSTYPE_TYPE_7);
-                               for (ALL_LSDB_TYPED(area->lsdb, type, lsa))
-                                       ospf6_ase_calculate_route(ospf6, lsa,
-                                                                 area);
-                       }
+                       type = htons(OSPF6_LSTYPE_TYPE_7);
+                       for (ALL_LSDB_TYPED(area->lsdb, type, lsa))
+                               ospf6_ase_calculate_route(ospf6, lsa, area);
                }
        }
        return 0;
index 6f40989efddc9ffcb025d4d0dab91ba1f0700e41..6ff3789a804ac00bf126250c1f8734cb5f6c403b 100644 (file)
@@ -51,6 +51,7 @@
 #include "ospf6_intra.h"
 #include "ospf6_spf.h"
 #include "ospf6d.h"
+#include "ospf6_gr.h"
 #include "lib/json.h"
 #include "ospf6_nssa.h"
 
@@ -237,7 +238,7 @@ void ospf6_vrf_init(void)
        vrf_init(ospf6_vrf_new, ospf6_vrf_enable, ospf6_vrf_disable,
                 ospf6_vrf_delete, ospf6_vrf_enable);
 
-       vrf_cmd_init(NULL, &ospf6d_privs);
+       vrf_cmd_init(NULL);
 }
 
 static void ospf6_top_lsdb_hook_add(struct ospf6_lsa *lsa)
@@ -409,19 +410,38 @@ static struct ospf6 *ospf6_create(const char *name)
 
        o->external_table = OSPF6_ROUTE_TABLE_CREATE(GLOBAL, EXTERNAL_ROUTES);
        o->external_table->scope = o;
-
+       /* Setting this to 1, so that the LS ID 0 can be considered as invalid
+        * for self originated external LSAs. This helps in differentiating if
+        * an LSA is originated for any route or not in the route data.
+        * rt->route_option->id is by default 0
+        * Consider a route having id as 0 and prefix as 1::1, an external LSA
+        * is originated with ID 0.0.0.0. Now consider another route 2::2
+        * and for this LSA was not originated because of some configuration
+        * but the ID field rt->route_option->id is still 0.Consider now this
+        * 2::2 is being deleted, it will search LSA with LS ID as 0 and it
+        * will find the LSA and hence delete it but the LSA belonged to prefix
+        * 1::1, this happened because of LS ID 0.
+        */
+       o->external_id = OSPF6_EXT_INIT_LS_ID;
        o->external_id_table = route_table_init();
 
        o->write_oi_count = OSPF6_WRITE_INTERFACE_COUNT_DEFAULT;
        o->ref_bandwidth = OSPF6_REFERENCE_BANDWIDTH;
 
        o->distance_table = route_table_init();
+
+       o->rt_aggr_tbl = route_table_init();
+       o->aggr_delay_interval = OSPF6_EXTL_AGGR_DEFAULT_DELAY;
+       o->t_external_aggr = NULL;
+       o->aggr_action = OSPF6_ROUTE_AGGR_NONE;
+
        o->fd = -1;
 
        o->max_multipath = MULTIPATH_NUM;
 
        o->oi_write_q = list_new();
 
+       ospf6_gr_helper_init(o);
        QOBJ_REG(o, ospf6);
 
        /* Make ospf protocol socket. */
@@ -461,11 +481,13 @@ struct ospf6 *ospf6_instance_create(const char *name)
 void ospf6_delete(struct ospf6 *o)
 {
        struct listnode *node, *nnode;
+       struct route_node *rn = NULL;
        struct ospf6_area *oa;
        struct vrf *vrf;
 
        QOBJ_UNREG(o);
 
+       ospf6_gr_helper_deinit(o);
        ospf6_flush_self_originated_lsas_now(o);
        ospf6_disable(o);
        ospf6_del(o);
@@ -499,6 +521,11 @@ void ospf6_delete(struct ospf6 *o)
                        ospf6_vrf_unlink(o, vrf);
        }
 
+       for (rn = route_top(o->rt_aggr_tbl); rn; rn = route_next(rn))
+               if (rn->info)
+                       ospf6_external_aggregator_free(rn->info);
+       route_table_finish(o->rt_aggr_tbl);
+
        XFREE(MTYPE_OSPF6_TOP, o->name);
        XFREE(MTYPE_OSPF6_TOP, o);
 }
@@ -527,6 +554,7 @@ static void ospf6_disable(struct ospf6 *o)
                THREAD_OFF(o->t_ase_calc);
                THREAD_OFF(o->t_distribute_update);
                THREAD_OFF(o->t_ospf6_receive);
+               THREAD_OFF(o->t_external_aggr);
        }
 }
 
@@ -690,6 +718,7 @@ static void ospf6_process_reset(struct ospf6 *ospf6)
        struct interface *ifp;
        struct vrf *vrf = vrf_lookup_by_id(ospf6->vrf_id);
 
+       ospf6_unset_all_aggr_flag(ospf6);
        ospf6_flush_self_originated_lsas_now(ospf6);
        ospf6->inst_shutdown = 0;
        ospf6_db_clear(ospf6);
@@ -989,7 +1018,6 @@ DEFUN_HIDDEN (ospf6_interface_area,
        struct ospf6_interface *oi;
        struct interface *ifp;
        vrf_id_t vrf_id = VRF_DEFAULT;
-       int ipv6_count = 0;
        uint32_t area_id;
        int format;
 
@@ -1012,23 +1040,6 @@ DEFUN_HIDDEN (ospf6_interface_area,
                return CMD_SUCCESS;
        }
 
-       /* if more than OSPF6_MAX_IF_ADDRS are configured on this interface
-        * then don't allow ospfv3 to be configured
-        */
-       ipv6_count = connected_count_by_family(ifp, AF_INET6);
-       if (oi->ifmtu == OSPF6_DEFAULT_MTU && ipv6_count > OSPF6_MAX_IF_ADDRS) {
-               vty_out(vty,
-                       "can not configure OSPFv3 on if %s, must have less than %d interface addresses but has %d addresses\n",
-                       ifp->name, OSPF6_MAX_IF_ADDRS, ipv6_count);
-               return CMD_WARNING_CONFIG_FAILED;
-       } else if (oi->ifmtu >= OSPF6_JUMBO_MTU
-                  && ipv6_count > OSPF6_MAX_IF_ADDRS_JUMBO) {
-               vty_out(vty,
-                       "can not configure OSPFv3 on if %s, must have less than %d interface addresses but has %d addresses\n",
-                       ifp->name, OSPF6_MAX_IF_ADDRS_JUMBO, ipv6_count);
-               return CMD_WARNING_CONFIG_FAILED;
-       }
-
        if (str2area_id(argv[idx_ipv4]->arg, &area_id, &format)) {
                vty_out(vty, "Malformed Area-ID: %s\n", argv[idx_ipv4]->arg);
                return CMD_WARNING_CONFIG_FAILED;
@@ -1672,6 +1683,424 @@ DEFUN(show_ipv6_ospf6_route_type_detail, show_ipv6_ospf6_route_type_detail_cmd,
        return CMD_SUCCESS;
 }
 
+bool ospf6_is_valid_summary_addr(struct vty *vty, struct prefix *p)
+{
+       struct in6_addr addr_zero;
+
+       memset(&addr_zero, 0, sizeof(struct in6_addr));
+
+        /* Default prefix validation*/
+       if ((is_default_prefix((struct prefix *)p))
+          || (!memcmp(&p->u.prefix6, &addr_zero, sizeof(struct in6_addr)))) {
+               vty_out(vty, "Default address should not be configured as summary address.\n");
+               return false;
+       }
+
+       /* Host route should not be configured as summary address */
+       if (p->prefixlen == IPV6_MAX_BITLEN) {
+               vty_out(vty, "Host route should not be configured as summary address.\n");
+               return false;
+       }
+
+       return true;
+}
+
+/* External Route Aggregation */
+DEFPY (ospf6_external_route_aggregation,
+       ospf6_external_route_aggregation_cmd,
+       "summary-address X:X::X:X/M$prefix [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)$mtype}]",
+       "External summary address\n"
+       "Specify IPv6 prefix\n"
+       "Router tag \n"
+       "Router tag value\n"
+       "Metric \n"
+       "Advertised metric for this route\n"
+       "OSPFv3 exterior metric type for summarised routes\n"
+       "Set OSPFv3 External Type 1/2 metrics\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       struct prefix p;
+       int ret = CMD_SUCCESS;
+
+       p.family = AF_INET6;
+       ret = str2prefix(prefix_str, &p);
+       if (ret == 0) {
+               vty_out(vty, "Malformed prefix\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       /* Apply mask for given prefix. */
+       apply_mask((struct prefix *)&p);
+
+       if (!ospf6_is_valid_summary_addr(vty, &p))
+               return CMD_WARNING_CONFIG_FAILED;
+
+       if (!tag_str)
+               tag = 0;
+
+       if (!metric_str)
+               metric = -1;
+
+       if (!mtype_str)
+               mtype = DEFAULT_METRIC_TYPE;
+
+       ret = ospf6_external_aggr_config_set(ospf6, &p, tag, metric, mtype);
+       if (ret == OSPF6_FAILURE) {
+               vty_out(vty, "Invalid configuration!!\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(no_ospf6_external_route_aggregation,
+      no_ospf6_external_route_aggregation_cmd,
+      "no summary-address X:X::X:X/M$prefix [tag (1-4294967295)] [{metric (0-16777215) | metric-type (1-2)}]",
+      NO_STR
+      "External summary address\n"
+      "Specify IPv6 prefix\n"
+      "Router tag\n"
+      "Router tag value\n"
+      "Metric \n"
+      "Advertised metric for this route\n"
+      "OSPFv3 exterior metric type for summarised routes\n"
+      "Set OSPFv3 External Type 1/2 metrics\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       struct prefix p;
+       int ret = CMD_SUCCESS;
+
+       ret = str2prefix(prefix_str, &p);
+       if (ret == 0) {
+               vty_out(vty, "Malformed prefix\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       /* Apply mask for given prefix. */
+       apply_mask((struct prefix *)&p);
+
+       if (!ospf6_is_valid_summary_addr(vty, &p))
+               return CMD_WARNING_CONFIG_FAILED;
+
+       ret = ospf6_external_aggr_config_unset(ospf6, &p);
+       if (ret == OSPF6_INVALID)
+               vty_out(vty, "Invalid configuration!!\n");
+
+       return CMD_SUCCESS;
+}
+
+DEFPY (ospf6_external_route_aggregation_no_advertise,
+       ospf6_external_route_aggregation_no_advertise_cmd,
+       "summary-address X:X::X:X/M$prefix no-advertise",
+       "External summary address\n"
+       "Specify IPv6 prefix\n"
+       "Don't advertise summary route \n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       struct prefix p;
+       int ret = CMD_SUCCESS;
+
+       ret = str2prefix(prefix_str, &p);
+       if (ret == 0) {
+               vty_out(vty, "Malformed prefix\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       /* Apply mask for given prefix. */
+       apply_mask((struct prefix *)&p);
+
+       if (!ospf6_is_valid_summary_addr(vty, &p))
+               return CMD_WARNING_CONFIG_FAILED;
+
+       ret = ospf6_asbr_external_rt_no_advertise(ospf6, &p);
+       if (ret == OSPF6_INVALID)
+               vty_out(vty, "!!Invalid configuration\n");
+
+       return CMD_SUCCESS;
+}
+
+DEFPY (no_ospf6_external_route_aggregation_no_advertise,
+       no_ospf6_external_route_aggregation_no_advertise_cmd,
+       "no summary-address X:X::X:X/M$prefix no-advertise",
+       NO_STR
+       "External summary address\n"
+       "Specify IPv6 prefix\n"
+       "Adverise summary route to the AS \n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       struct prefix p;
+       int ret = CMD_SUCCESS;
+
+       ret = str2prefix(prefix_str, &p);
+       if (ret == 0) {
+               vty_out(vty, "Malformed prefix\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       /* Apply mask for given prefix. */
+       apply_mask((struct prefix *)&p);
+
+       if (!ospf6_is_valid_summary_addr(vty, &p))
+               return CMD_WARNING_CONFIG_FAILED;
+
+       ret = ospf6_asbr_external_rt_advertise(ospf6, &p);
+       if (ret == OSPF6_INVALID)
+               vty_out(vty, "!!Invalid configuration\n");
+
+       return CMD_SUCCESS;
+}
+
+DEFPY (ospf6_route_aggregation_timer,
+       ospf6_route_aggregation_timer_cmd,
+       "aggregation timer (5-1800)",
+       "External route aggregation\n"
+       "Delay timer (in seconds)\n"
+       "Timer interval(in seconds)\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       ospf6_external_aggr_delay_timer_set(ospf6, timer);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY (no_ospf6_route_aggregation_timer,
+       no_ospf6_route_aggregation_timer_cmd,
+       "no aggregation timer [5-1800]",
+       NO_STR
+       "External route aggregation\n"
+       "Delay timer\n"
+       "Timer interval(in seconds)\n")
+{
+       VTY_DECLVAR_CONTEXT(ospf6, ospf6);
+
+       ospf6_external_aggr_delay_timer_set(ospf6,
+                       OSPF6_EXTL_AGGR_DEFAULT_DELAY);
+       return CMD_SUCCESS;
+}
+
+static int
+ospf6_print_vty_external_routes_walkcb(struct hash_bucket *bucket, void *arg)
+{
+       struct ospf6_route *rt = bucket->data;
+       struct vty *vty = (struct vty *)arg;
+       static unsigned int count;
+
+       vty_out(vty, "%pFX ", &rt->prefix);
+
+       count++;
+
+       if (count%5 == 0)
+               vty_out(vty, "\n");
+
+       if (OSPF6_EXTERNAL_RT_COUNT(rt->aggr_route) == count)
+               count = 0;
+
+       return HASHWALK_CONTINUE;
+}
+
+static int
+ospf6_print_json_external_routes_walkcb(struct hash_bucket *bucket, void *arg)
+{
+       struct ospf6_route *rt = bucket->data;
+       struct json_object *json = (struct json_object *)arg;
+       char buf[PREFIX2STR_BUFFER];
+       char exnalbuf[20];
+       static unsigned int count;
+
+       prefix2str(&rt->prefix, buf, sizeof(buf));
+
+       snprintf(exnalbuf, sizeof(exnalbuf), "Exnl Addr-%d", count);
+
+       json_object_string_add(json, exnalbuf, buf);
+
+       count++;
+
+       if (OSPF6_EXTERNAL_RT_COUNT(rt->aggr_route) == count)
+               count = 0;
+
+       return HASHWALK_CONTINUE;
+}
+
+static void
+ospf6_show_vrf_name(struct vty *vty, struct ospf6 *ospf6,
+                   json_object *json)
+{
+       if (json) {
+               if (ospf6->vrf_id == VRF_DEFAULT)
+                       json_object_string_add(json, "vrfName",
+                                              "default");
+               else
+                       json_object_string_add(json, "vrfName",
+                                              ospf6->name);
+               json_object_int_add(json, "vrfId", ospf6->vrf_id);
+       } else {
+               if (ospf6->vrf_id == VRF_DEFAULT)
+                       vty_out(vty, "VRF Name: %s\n", "default");
+               else if (ospf6->name)
+                       vty_out(vty, "VRF Name: %s\n", ospf6->name);
+       }
+}
+
+static int
+ospf6_show_summary_address(struct vty *vty, struct ospf6 *ospf6,
+                       json_object *json,
+                       bool uj, const char *detail)
+{
+       struct route_node *rn;
+       static const char header[] = "Summary-address       Metric-type     Metric     Tag         External_Rt_count\n";
+       json_object *json_vrf = NULL;
+
+       if (!uj) {
+               ospf6_show_vrf_name(vty, ospf6, json_vrf);
+               vty_out(vty, "aggregation delay interval :%d(in seconds)\n\n",
+                               ospf6->aggr_delay_interval);
+               vty_out(vty, "%s\n", header);
+       } else {
+               json_vrf = json_object_new_object();
+
+               ospf6_show_vrf_name(vty, ospf6, json_vrf);
+
+               json_object_int_add(json_vrf, "aggregation delay interval",
+                               ospf6->aggr_delay_interval);
+       }
+
+
+       for (rn = route_top(ospf6->rt_aggr_tbl); rn; rn = route_next(rn)) {
+               if (!rn->info)
+                       continue;
+
+               struct ospf6_external_aggr_rt *aggr = rn->info;
+               json_object *json_aggr = NULL;
+               char buf[PREFIX2STR_BUFFER];
+
+               prefix2str(&aggr->p, buf, sizeof(buf));
+
+               if (uj) {
+
+                       json_aggr = json_object_new_object();
+
+                       json_object_object_add(json_vrf,
+                                               buf,
+                                               json_aggr);
+
+                       json_object_string_add(json_aggr,
+                                       "Summary address",
+                                       buf);
+
+                       json_object_string_add(
+                               json_aggr, "Metric-type",
+                               (aggr->mtype == DEFAULT_METRIC_TYPE)
+                                       ? "E2"
+                                       : "E1");
+
+                       json_object_int_add(json_aggr, "Metric",
+                                          (aggr->metric != -1)
+                                           ? aggr->metric
+                                           : DEFAULT_DEFAULT_METRIC);
+
+                       json_object_int_add(json_aggr, "Tag",
+                                           aggr->tag);
+
+                       json_object_int_add(json_aggr,
+                                       "External route count",
+                                       OSPF6_EXTERNAL_RT_COUNT(aggr));
+
+                       if (OSPF6_EXTERNAL_RT_COUNT(aggr) && detail) {
+                               json_object_int_add(json_aggr, "ID",
+                                                   aggr->id);
+                               json_object_int_add(json_aggr, "Flags",
+                                                   aggr->aggrflags);
+                               hash_walk(aggr->match_extnl_hash,
+                                       ospf6_print_json_external_routes_walkcb,
+                                                       json_aggr);
+                       }
+
+               } else {
+                       vty_out(vty, "%-22s", buf);
+
+                       (aggr->mtype == DEFAULT_METRIC_TYPE)
+                               ? vty_out(vty, "%-16s", "E2")
+                               : vty_out(vty, "%-16s", "E1");
+                       vty_out(vty, "%-11d", (aggr->metric != -1)
+                                       ? aggr->metric
+                                       : DEFAULT_DEFAULT_METRIC);
+
+                       vty_out(vty, "%-12u", aggr->tag);
+
+                       vty_out(vty, "%-5ld\n",
+                               OSPF6_EXTERNAL_RT_COUNT(aggr));
+
+                       if (OSPF6_EXTERNAL_RT_COUNT(aggr) && detail) {
+                               vty_out(vty,
+                                       "Matched External routes:\n");
+                               hash_walk(aggr->match_extnl_hash,
+                               ospf6_print_vty_external_routes_walkcb,
+                                                       vty);
+                               vty_out(vty, "\n");
+                       }
+
+                       vty_out(vty, "\n");
+               }
+       }
+
+       if (uj)
+               json_object_object_add(json, ospf6->name,
+                                       json_vrf);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY (show_ipv6_ospf6_external_aggregator,
+       show_ipv6_ospf6_external_aggregator_cmd,
+       "show ipv6 ospf6 [vrf <NAME|all>] summary-address [detail$detail] [json]",
+       SHOW_STR
+       IP6_STR
+       OSPF6_STR
+       VRF_CMD_HELP_STR
+       "All VRFs\n"
+       "Show external summary addresses\n"
+       "detailed informtion\n"
+       JSON_STR)
+{
+       bool uj = use_json(argc, argv);
+       struct ospf6 *ospf6 = NULL;
+       json_object *json = NULL;
+       const char *vrf_name = NULL;
+       struct listnode *node;
+       bool all_vrf = false;
+       int idx_vrf = 0;
+
+       if (uj)
+               json = json_object_new_object();
+
+       OSPF6_CMD_CHECK_RUNNING();
+       OSPF6_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
+
+       for (ALL_LIST_ELEMENTS_RO(om6->ospf6, node, ospf6)) {
+               if (all_vrf || strcmp(ospf6->name, vrf_name) == 0) {
+
+                       ospf6_show_summary_address(vty, ospf6, json, uj,
+                                                  detail);
+
+                       if (!all_vrf)
+                               break;
+               }
+       }
+
+       if (uj) {
+               vty_out(vty, "%s\n", json_object_to_json_string_ext(
+                                       json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
+
+       return CMD_SUCCESS;
+}
+
 static void ospf6_stub_router_config_write(struct vty *vty, struct ospf6 *ospf6)
 {
        if (CHECK_FLAG(ospf6->flag, OSPF6_STUB_ROUTER)) {
@@ -1711,6 +2140,44 @@ static int ospf6_distance_config_write(struct vty *vty, struct ospf6 *ospf6)
        return 0;
 }
 
+static int ospf6_asbr_summary_config_write(struct vty *vty, struct ospf6 *ospf6)
+{
+       struct route_node *rn;
+       struct ospf6_external_aggr_rt *aggr;
+       char buf[PREFIX2STR_BUFFER];
+
+       if (ospf6->aggr_delay_interval != OSPF6_EXTL_AGGR_DEFAULT_DELAY)
+               vty_out(vty, " aggregation timer %u\n",
+                               ospf6->aggr_delay_interval);
+
+       /* print 'summary-address A:B::C:D/M' */
+       for (rn = route_top(ospf6->rt_aggr_tbl); rn; rn = route_next(rn)) {
+               if (!rn->info)
+                       continue;
+
+               aggr = rn->info;
+
+               prefix2str(&aggr->p, buf, sizeof(buf));
+               vty_out(vty, " summary-address %s", buf);
+               if (aggr->tag)
+                       vty_out(vty, " tag %u", aggr->tag);
+
+               if (aggr->metric != -1)
+                       vty_out(vty, " metric %d", aggr->metric);
+
+               if (aggr->mtype != DEFAULT_METRIC_TYPE)
+                       vty_out(vty, " metric-type %d", aggr->mtype);
+
+               if (CHECK_FLAG(aggr->aggrflags,
+                              OSPF6_EXTERNAL_AGGRT_NO_ADVERTISE))
+                       vty_out(vty, " no-advertise");
+
+               vty_out(vty, "\n");
+       }
+
+       return 0;
+}
+
 /* OSPF configuration write function. */
 static int config_write_ospf6(struct vty *vty)
 {
@@ -1768,7 +2235,10 @@ static int config_write_ospf6(struct vty *vty)
                ospf6_spf_config_write(vty, ospf6);
                ospf6_distance_config_write(vty, ospf6);
                ospf6_distribute_config_write(vty, ospf6);
+               ospf6_asbr_summary_config_write(vty, ospf6);
+               config_write_ospf6_gr_helper(vty, ospf6);
 
+               vty_out(vty, "exit\n");
                vty_out(vty, "!\n");
        }
        return 0;
@@ -1826,6 +2296,17 @@ void ospf6_top_init(void)
        install_element(OSPF6_NODE, &ospf6_max_multipath_cmd);
        install_element(OSPF6_NODE, &no_ospf6_max_multipath_cmd);
 
+       /* ASBR Summarisation */
+       install_element(OSPF6_NODE, &ospf6_external_route_aggregation_cmd);
+       install_element(OSPF6_NODE, &no_ospf6_external_route_aggregation_cmd);
+       install_element(OSPF6_NODE,
+               &ospf6_external_route_aggregation_no_advertise_cmd);
+       install_element(OSPF6_NODE,
+                       &no_ospf6_external_route_aggregation_no_advertise_cmd);
+       install_element(OSPF6_NODE, &ospf6_route_aggregation_timer_cmd);
+       install_element(OSPF6_NODE, &no_ospf6_route_aggregation_timer_cmd);
+       install_element(VIEW_NODE, &show_ipv6_ospf6_external_aggregator_cmd);
+
        install_element(OSPF6_NODE, &ospf6_distance_cmd);
        install_element(OSPF6_NODE, &no_ospf6_distance_cmd);
        install_element(OSPF6_NODE, &ospf6_distance_ospf6_cmd);
index 3eb423f68155816e6f80cc3f8e73bdd5748f9553..58ecf08495b9413ff9e36bb8b97b76587fae7a48 100644 (file)
@@ -60,6 +60,43 @@ struct ospf6_redist {
 #define ROUTEMAP(R) (R->route_map.map)
 };
 
+struct ospf6_gr_helper {
+       /* Gracefull restart Helper supported configs*/
+       /* Supported grace interval*/
+       uint32_t supported_grace_time;
+
+       /* Helper support
+        * Supported : True
+        * Not Supported : False.
+        */
+       bool is_helper_supported;
+
+       /* Support for strict LSA check.
+        * if it is set,Helper aborted
+        * upon a TOPO change.
+        */
+       bool strict_lsa_check;
+
+       /* Support as HELPER only for
+        * planned restarts.
+        */
+       bool only_planned_restart;
+
+       /* This list contains the advertisement
+        * routerids for which Helper support is
+        * enabled.
+        */
+       struct hash *enable_rtr_list;
+
+       /* HELPER for number of active
+        * RESTARTERs.
+        */
+       int active_restarter_cnt;
+
+       /* last HELPER exit reason */
+       uint32_t last_exit_reason;
+};
+
 /* OSPFv3 top level data structure */
 struct ospf6 {
        /* The relevant vrf_id */
@@ -91,6 +128,7 @@ struct ospf6 {
 
        struct ospf6_route_table *external_table;
        struct route_table *external_id_table;
+#define OSPF6_EXT_INIT_LS_ID 1
        uint32_t external_id;
 
        /* OSPF6 redistribute configuration */
@@ -130,6 +168,7 @@ struct ospf6 {
        struct thread *maxage_remover;
        struct thread *t_distribute_update; /* Distirbute update timer. */
        struct thread *t_ospf6_receive; /* OSPF6 receive timer */
+       struct thread *t_external_aggr; /* OSPF6 aggregation timer */
 #define OSPF6_WRITE_INTERFACE_COUNT_DEFAULT 20
        struct thread *t_write;
 
@@ -152,22 +191,32 @@ struct ospf6 {
         * to support ECMP.
         */
        uint16_t max_multipath;
+
+       /*ospf6 Graceful restart helper info */
+       struct ospf6_gr_helper ospf6_helper_cfg;
+
        /* Count of NSSA areas */
        uint8_t anyNSSA;
        struct thread *t_abr_task; /* ABR task timer. */
        struct list *oi_write_q;
 
        uint32_t redist_count;
+
+       /* Action for aggregation of external LSAs */
+       int aggr_action;
+
+#define OSPF6_EXTL_AGGR_DEFAULT_DELAY 5
+       /* For ASBR summary delay timer */
+       int aggr_delay_interval;
+       /* Table of configured Aggregate addresses */
+       struct route_table *rt_aggr_tbl;
+
        QOBJ_FIELDS;
 };
 DECLARE_QOBJ_TYPE(ospf6);
 
 #define OSPF6_DISABLED    0x01
 #define OSPF6_STUB_ROUTER 0x02
-#define OSPF6_MAX_IF_ADDRS 100
-#define OSPF6_MAX_IF_ADDRS_JUMBO 200
-#define OSPF6_DEFAULT_MTU 1500
-#define OSPF6_JUMBO_MTU 9000
 
 /* global pointer for OSPF top data structure */
 extern struct ospf6 *ospf6;
@@ -188,4 +237,5 @@ struct ospf6 *ospf6_lookup_by_vrf_id(vrf_id_t vrf_id);
 struct ospf6 *ospf6_lookup_by_vrf_name(const char *name);
 const char *ospf6_vrf_id_to_name(vrf_id_t vrf_id);
 void ospf6_vrf_init(void);
+bool ospf6_is_valid_summary_addr(struct vty *vty, struct prefix *p);
 #endif /* OSPF6_TOP_H */
index 72bc3a2f3ac052d6f2d8d01d877854bd54e9bff4..5403e643dc664b542d7ed1b13a71695355f576f0 100644 (file)
@@ -131,38 +131,17 @@ void ospf6_zebra_no_redistribute(int type, vrf_id_t vrf_id)
 static int ospf6_zebra_if_address_update_add(ZAPI_CALLBACK_ARGS)
 {
        struct connected *c;
-       struct ospf6_interface *oi;
-       int ipv6_count = 0;
 
        c = zebra_interface_address_read(ZEBRA_INTERFACE_ADDRESS_ADD,
                                         zclient->ibuf, vrf_id);
        if (c == NULL)
                return 0;
 
-       oi = (struct ospf6_interface *)c->ifp->info;
-       if (oi == NULL)
-               oi = ospf6_interface_create(c->ifp);
-       assert(oi);
-
        if (IS_OSPF6_DEBUG_ZEBRA(RECV))
                zlog_debug("Zebra Interface address add: %s %5s %pFX",
                           c->ifp->name, prefix_family_str(c->address),
                           c->address);
 
-       ipv6_count = connected_count_by_family(c->ifp, AF_INET6);
-       if (oi->ifmtu == OSPF6_DEFAULT_MTU && ipv6_count > OSPF6_MAX_IF_ADDRS) {
-               zlog_warn(
-                       "Zebra Interface : %s has too many interface addresses %d only support %d, increase MTU",
-                       c->ifp->name, ipv6_count, OSPF6_MAX_IF_ADDRS);
-               return 0;
-       } else if (oi->ifmtu >= OSPF6_JUMBO_MTU
-                  && ipv6_count > OSPF6_MAX_IF_ADDRS_JUMBO) {
-               zlog_warn(
-                       "Zebra Interface : %s has too many interface addresses %d only support %d",
-                       c->ifp->name, ipv6_count, OSPF6_MAX_IF_ADDRS_JUMBO);
-               return 0;
-       }
-
        if (c->address->family == AF_INET6) {
                ospf6_interface_state_update(c->ifp);
                ospf6_interface_connected_route_update(c->ifp);
index fb6ac4402a9bb11487c4ef7d7514b3080705568a..0e8185cfeb81415a9ee48be13b03407e57f68ba7 100644 (file)
@@ -45,6 +45,7 @@
 #include "ospf6_flood.h"
 #include "ospf6d.h"
 #include "ospf6_bfd.h"
+#include "ospf6_gr.h"
 #include "lib/json.h"
 #include "ospf6_nssa.h"
 
@@ -96,6 +97,7 @@ static int config_write_ospf6_debug(struct vty *vty)
        config_write_ospf6_debug_abr(vty);
        config_write_ospf6_debug_flood(vty);
        config_write_ospf6_debug_nssa(vty);
+       config_write_ospf6_debug_gr_helper(vty);
 
        return 0;
 }
@@ -831,7 +833,6 @@ DEFUN(show_ipv6_ospf6_database_adv_router_linkstate_id,
        bool all_vrf = false;
        int idx_vrf = 0;
 
-
        OSPF6_CMD_CHECK_RUNNING();
        OSPF6_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf);
        if (idx_vrf > 0) {
@@ -845,9 +846,8 @@ DEFUN(show_ipv6_ospf6_database_adv_router_linkstate_id,
 
        for (ALL_LIST_ELEMENTS_RO(om6->ospf6, node, ospf6)) {
                if (all_vrf || strcmp(ospf6->name, vrf_name) == 0) {
-                       ospf6_lsdb_type_show_wrapper(vty, level, NULL, &id,
-                                                    &adv_router, uj, ospf6);
-
+                       ospf6_lsdb_show_wrapper(vty, level, NULL, &id,
+                                               &adv_router, uj, ospf6);
                        if (!all_vrf)
                                break;
                }
@@ -1402,6 +1402,7 @@ void ospf6_init(struct thread_master *master)
        ospf6_intra_init();
        ospf6_asbr_init();
        ospf6_abr_init();
+       ospf6_gr_helper_config_init();
 
        /* initialize hooks for modifying filter rules */
        prefix_list_add_hook(ospf6_plist_add);
index e054803df357cc0ca6c9ed7c94852e601e18b1ef..d5170be7cc8a6d28817386ac4c19bd325a767021 100644 (file)
@@ -49,6 +49,10 @@ extern struct thread_master *master;
 #define MSG_OK    0
 #define MSG_NG    1
 
+#define OSPF6_SUCCESS 1
+#define OSPF6_FAILURE 0
+#define OSPF6_INVALID -1
+
 /* cast macro: XXX - these *must* die, ick ick. */
 #define OSPF6_PROCESS(x) ((struct ospf6 *) (x))
 #define OSPF6_AREA(x) ((struct ospf6_area *) (x))
@@ -104,6 +108,12 @@ extern struct thread_master *master;
                vrf_name = VRF_DEFAULT_NAME;                                   \
        }
 
+#define OSPF6_FALSE false
+#define OSPF6_TRUE true
+#define OSPF6_SUCCESS 1
+#define OSPF6_FAILURE 0
+#define OSPF6_INVALID -1
+
 extern struct zebra_privs_t ospf6d_privs;
 
 /* Function Prototypes */
index 2b7bce53924a100059c94c58f44cd1bd43833c73..ac99e90b263adc904c9eb6a04718d6e53a00c10b 100644 (file)
@@ -12,6 +12,7 @@ vtysh_scan += \
        ospf6d/ospf6_area.c \
        ospf6d/ospf6_bfd.c \
        ospf6d/ospf6_flood.c \
+       ospf6d/ospf6_gr_helper.c \
        ospf6d/ospf6_interface.c \
        ospf6d/ospf6_intra.c \
        ospf6d/ospf6_lsa.c \
@@ -39,6 +40,7 @@ ospf6d_libospf6_a_SOURCES = \
        ospf6d/ospf6_routemap_nb_config.c \
        ospf6d/ospf6_bfd.c \
        ospf6d/ospf6_flood.c \
+       ospf6d/ospf6_gr_helper.c \
        ospf6d/ospf6_interface.c \
        ospf6d/ospf6_intra.c \
        ospf6d/ospf6_lsa.c \
@@ -61,6 +63,7 @@ noinst_HEADERS += \
        ospf6d/ospf6_asbr.h \
        ospf6d/ospf6_bfd.h \
        ospf6d/ospf6_flood.h \
+       ospf6d/ospf6_gr.h \
        ospf6d/ospf6_interface.h \
        ospf6d/ospf6_intra.h \
        ospf6d/ospf6_lsa.h \
@@ -84,12 +87,14 @@ ospf6d_ospf6d_SOURCES = \
 
 ospf6d_ospf6d_snmp_la_SOURCES = ospf6d/ospf6_snmp.c
 ospf6d_ospf6d_snmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
-ospf6d_ospf6d_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+ospf6d_ospf6d_snmp_la_LDFLAGS = $(MODULE_LDFLAGS)
 ospf6d_ospf6d_snmp_la_LIBADD = lib/libfrrsnmp.la
 
 clippy_scan += \
        ospf6d/ospf6_top.c \
        ospf6d/ospf6_asbr.c \
+       ospf6d/ospf6_lsa.c \
+       ospf6d/ospf6_gr_helper.c \
        # end
 
 nodist_ospf6d_ospf6d_SOURCES = \
index 756ad88f151359753d7c4fe5dc6539116c7a6b6a..1f9547ab8765d200c1680e9946d151320c3970e7 100644 (file)
@@ -8,7 +8,7 @@ noinst_PROGRAMS += ospfclient/ospfclient
 #man8 += $(MANBUILD)/frr-ospfclient.8
 endif
 
-ospfclient_libfrrospfapiclient_la_LDFLAGS = -version-info 0:0:0
+ospfclient_libfrrospfapiclient_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
 ospfclient_libfrrospfapiclient_la_LIBADD = lib/libfrr.la
 ospfclient_libfrrospfapiclient_la_SOURCES = \
        ospfclient/ospf_apiclient.c \
index 7fddb65a862cb8e25217ec0ac619d117f75a588f..8f9153d766ae64d49c6219d8e8b20f6f323a684c 100644 (file)
@@ -267,6 +267,8 @@ static void ospf_process_self_originated_lsa(struct ospf *ospf,
 
                                ospf_external_lsa_refresh(ospf, new, &ei_aggr,
                                                  LSA_REFRESH_FORCE, true);
+                               SET_FLAG(aggr->flags,
+                                        OSPF_EXTERNAL_AGGRT_ORIGINATED);
                        } else
                                ospf_lsa_flush_as(ospf, new);
                }
index 029f929c110d784cdaab4731c58ff91b47600a44..eb7a8348e832e0452953229f137dc0dee754067c 100644 (file)
@@ -1447,6 +1447,59 @@ static int ospf_ifp_destroy(struct interface *ifp)
        return 0;
 }
 
+/* Resetting ospf hello timer */
+void ospf_reset_hello_timer(struct interface *ifp, struct in_addr addr,
+                           bool is_addr)
+{
+       struct route_node *rn;
+
+       if (is_addr) {
+               struct prefix p;
+               struct ospf_interface *oi = NULL;
+
+               p.u.prefix4 = addr;
+               p.family = AF_INET;
+               p.prefixlen = IPV4_MAX_BITLEN;
+
+               oi = ospf_if_table_lookup(ifp, &p);
+
+               if (oi) {
+                       /* Send hello before restart the hello timer
+                        * to avoid session flaps in case of bigger
+                        * hello interval configurations.
+                        */
+                       ospf_hello_send(oi);
+
+                       /* Restart hello timer for this interface */
+                       OSPF_ISM_TIMER_OFF(oi->t_hello);
+                       OSPF_HELLO_TIMER_ON(oi);
+               }
+
+               return;
+       }
+
+       for (rn = route_top(IF_OIFS(ifp)); rn; rn = route_next(rn)) {
+               struct ospf_interface *oi = rn->info;
+
+               if (!oi)
+                       continue;
+
+               /* If hello interval configured on this oi, don't restart. */
+               if (OSPF_IF_PARAM_CONFIGURED(oi->params, v_hello))
+                       continue;
+
+               /* Send hello before restart the hello timer
+                * to avoid session flaps in case of bigger
+                * hello interval configurations.
+                */
+               ospf_hello_send(oi);
+
+               /* Restart the hello timer. */
+               OSPF_ISM_TIMER_OFF(oi->t_hello);
+               OSPF_HELLO_TIMER_ON(oi);
+       }
+}
+
 void ospf_if_init(void)
 {
        if_zapi_callbacks(ospf_ifp_create, ospf_ifp_up,
index 4a211472468a256d16b5c70515fbe209556228e8..e4410164067a75a8ec085eed26d961a40dde7757 100644 (file)
@@ -273,79 +273,84 @@ struct ospf_interface {
 DECLARE_QOBJ_TYPE(ospf_interface);
 
 /* Prototypes. */
-extern char *ospf_if_name(struct ospf_interface *);
-extern struct ospf_interface *ospf_if_new(struct ospf *, struct interface *,
-                                         struct prefix *);
-extern void ospf_if_cleanup(struct ospf_interface *);
-extern void ospf_if_free(struct ospf_interface *);
-extern int ospf_if_up(struct ospf_interface *);
-extern int ospf_if_down(struct ospf_interface *);
-
-extern int ospf_if_is_up(struct ospf_interface *);
-extern struct ospf_interface *ospf_if_exists(struct ospf_interface *);
-extern struct ospf_interface *ospf_if_lookup_by_lsa_pos(struct ospf_area *,
-                                                       int);
+extern char *ospf_if_name(struct ospf_interface *oi);
 extern struct ospf_interface *
-ospf_if_lookup_by_local_addr(struct ospf *, struct interface *, struct in_addr);
-extern struct ospf_interface *ospf_if_lookup_by_prefix(struct ospf *,
-                                                      struct prefix_ipv4 *);
-extern struct ospf_interface *ospf_if_table_lookup(struct interface *,
-                                                  struct prefix *);
-extern struct ospf_interface *ospf_if_addr_local(struct in_addr);
+ospf_if_new(struct ospf *ospf, struct interface *ifp, struct prefix *p);
+extern void ospf_if_cleanup(struct ospf_interface *oi);
+extern void ospf_if_free(struct ospf_interface *oi);
+extern int ospf_if_up(struct ospf_interface *oi);
+extern int ospf_if_down(struct ospf_interface *oi);
+
+extern int ospf_if_is_up(struct ospf_interface *oi);
+extern struct ospf_interface *ospf_if_exists(struct ospf_interface *oi);
+extern struct ospf_interface *ospf_if_lookup_by_lsa_pos(struct ospf_area *area,
+                                                       int lsa_pos);
 extern struct ospf_interface *
-ospf_if_lookup_recv_if(struct ospf *, struct in_addr, struct interface *);
-extern struct ospf_interface *ospf_if_is_configured(struct ospf *,
-                                                   struct in_addr *);
-
-extern struct ospf_if_params *ospf_lookup_if_params(struct interface *,
-                                                   struct in_addr);
-extern struct ospf_if_params *ospf_get_if_params(struct interface *,
-                                                struct in_addr);
-extern void ospf_free_if_params(struct interface *, struct in_addr);
-extern void ospf_if_update_params(struct interface *, struct in_addr);
-
-extern int ospf_if_new_hook(struct interface *);
+ospf_if_lookup_by_local_addr(struct ospf *ospf, struct interface *ifp,
+                            struct in_addr addr);
+extern struct ospf_interface *ospf_if_lookup_by_prefix(struct ospf *ospf,
+                                                      struct prefix_ipv4 *p);
+extern struct ospf_interface *ospf_if_table_lookup(struct interface *ifp,
+                                                  struct prefix *p);
+extern struct ospf_interface *ospf_if_addr_local(struct in_addr addr);
+extern struct ospf_interface *ospf_if_lookup_recv_if(struct ospf *ospf,
+                                                    struct in_addr addr,
+                                                    struct interface *ifp);
+extern struct ospf_interface *ospf_if_is_configured(struct ospf *ospf,
+                                                   struct in_addr *addr);
+
+extern struct ospf_if_params *ospf_lookup_if_params(struct interface *ifp,
+                                                   struct in_addr addr);
+extern struct ospf_if_params *ospf_get_if_params(struct interface *ifp,
+                                                struct in_addr addr);
+extern void ospf_free_if_params(struct interface *ifp, struct in_addr addr);
+extern void ospf_if_update_params(struct interface *ifp, struct in_addr addr);
+
+extern int ospf_if_new_hook(struct interface *ifp);
 extern void ospf_if_init(void);
-extern void ospf_if_stream_unset(struct ospf_interface *);
-extern void ospf_if_reset_variables(struct ospf_interface *);
-extern int ospf_if_is_enable(struct ospf_interface *);
-extern int ospf_if_get_output_cost(struct ospf_interface *);
-extern void ospf_if_recalculate_output_cost(struct interface *);
+extern void ospf_if_stream_unset(struct ospf_interface *oi);
+extern void ospf_if_reset_variables(struct ospf_interface *oi);
+extern int ospf_if_is_enable(struct ospf_interface *oi);
+extern int ospf_if_get_output_cost(struct ospf_interface *oi);
+extern void ospf_if_recalculate_output_cost(struct interface *ifp);
 
 /* Simulate down/up on the interface. */
-extern void ospf_if_reset(struct interface *);
-
-extern struct ospf_interface *ospf_vl_new(struct ospf *, struct ospf_vl_data *);
-extern struct ospf_vl_data *ospf_vl_data_new(struct ospf_area *,
-                                            struct in_addr);
-extern struct ospf_vl_data *ospf_vl_lookup(struct ospf *, struct ospf_area *,
-                                          struct in_addr);
+extern void ospf_if_reset(struct interface *ifp);
+
+extern struct ospf_interface *ospf_vl_new(struct ospf *ospf,
+                                         struct ospf_vl_data *vl_data);
+extern struct ospf_vl_data *ospf_vl_data_new(struct ospf_area *area,
+                                            struct in_addr addr);
+extern struct ospf_vl_data *
+ospf_vl_lookup(struct ospf *ospf, struct ospf_area *area, struct in_addr addr);
 extern int ospf_vl_count(struct ospf *ospf, struct ospf_area *area);
-extern void ospf_vl_data_free(struct ospf_vl_data *);
-extern void ospf_vl_add(struct ospf *, struct ospf_vl_data *);
-extern void ospf_vl_delete(struct ospf *, struct ospf_vl_data *);
-extern void ospf_vl_up_check(struct ospf_area *, struct in_addr,
-                            struct vertex *);
-extern void ospf_vl_unapprove(struct ospf *);
-extern void ospf_vl_shut_unapproved(struct ospf *);
-extern int ospf_full_virtual_nbrs(struct ospf_area *);
-extern int ospf_vls_in_area(struct ospf_area *);
-
-extern struct crypt_key *ospf_crypt_key_lookup(struct list *, uint8_t);
+extern void ospf_vl_data_free(struct ospf_vl_data *vl_data);
+extern void ospf_vl_add(struct ospf *ospf, struct ospf_vl_data *vl_data);
+extern void ospf_vl_delete(struct ospf *ospf, struct ospf_vl_data *vl_data);
+extern void ospf_vl_up_check(struct ospf_area *area, struct in_addr addr,
+                            struct vertex *vertex);
+extern void ospf_vl_unapprove(struct ospf *ospf);
+extern void ospf_vl_shut_unapproved(struct ospf *ospf);
+extern int ospf_full_virtual_nbrs(struct ospf_area *area);
+extern int ospf_vls_in_area(struct ospf_area *area);
+
+extern struct crypt_key *ospf_crypt_key_lookup(struct list *list,
+                                              uint8_t key_id);
 extern struct crypt_key *ospf_crypt_key_new(void);
-extern void ospf_crypt_key_add(struct list *, struct crypt_key *);
-extern int ospf_crypt_key_delete(struct list *, uint8_t);
+extern void ospf_crypt_key_add(struct list *list, struct crypt_key *key);
+extern int ospf_crypt_key_delete(struct list *list, uint8_t key_id);
 extern uint8_t ospf_default_iftype(struct interface *ifp);
 extern int ospf_interface_neighbor_count(struct ospf_interface *oi);
 
 /* Set all multicast memberships appropriately based on the type and
    state of the interface. */
-extern void ospf_if_set_multicast(struct ospf_interface *);
+extern void ospf_if_set_multicast(struct ospf_interface *oi);
 
 extern void ospf_if_interface(struct interface *ifp);
 
 extern uint32_t ospf_if_count_area_params(struct interface *ifp);
-
+extern void ospf_reset_hello_timer(struct interface *ifp, struct in_addr addr,
+                                  bool is_addr);
 DECLARE_HOOK(ospf_vl_add, (struct ospf_vl_data * vd), (vd));
 DECLARE_HOOK(ospf_vl_delete, (struct ospf_vl_data * vd), (vd));
 
index 9ef2a6520adc1393bf112b04a81bd01734d5c482..d209ae053c54359feb35726f7b7843e1900bef4a 100644 (file)
@@ -3631,6 +3631,8 @@ struct ospf_lsa *ospf_lsa_refresh(struct ospf *ospf, struct ospf_lsa *lsa)
 
                                ospf_external_lsa_refresh(ospf, lsa, &ei_aggr,
                                                  LSA_REFRESH_FORCE, true);
+                               SET_FLAG(aggr->flags,
+                                        OSPF_EXTERNAL_AGGRT_ORIGINATED);
                        } else
                                ospf_lsa_flush_as(ospf, lsa);
                }
index 73d596b0304d34ce6978d2a0a5ed12688bb617ba..257429ebe8fc900d96865ddf225dc4449e609b3a 100644 (file)
@@ -185,7 +185,6 @@ int main(int argc, char **argv)
 #endif /* SUPPORT_OSPF_API */
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index 00fbdc21a1dff4721f5f425f8d508865454b2691..be06afe532620e162dbde3d4bc82809ce34df9ae 100644 (file)
@@ -190,7 +190,7 @@ int ospf_sock_init(struct ospf *ospf)
                        flog_err(EC_LIB_SOCKET,
                                 "ospf_read_sock_init: socket: %s",
                                 safe_strerror(errno));
-                       exit(1);
+                       return -1;
                }
 
 #ifdef IP_HDRINCL
index 892d264a2d5e3ca59f6947f5d0de13c53d49fd6b..268fb81e52a9fd97d5c7b30e6d302f655df041a0 100644 (file)
@@ -298,8 +298,6 @@ static int nsm_negotiation_done(struct ospf_neighbor *nbr)
                ospf_db_summary_add(nbr, lsa);
        LSDB_LOOP (SUMMARY_LSDB(area), rn, lsa)
                ospf_db_summary_add(nbr, lsa);
-       LSDB_LOOP (ASBR_SUMMARY_LSDB(area), rn, lsa)
-               ospf_db_summary_add(nbr, lsa);
 
        /* Process only if the neighbor is opaque capable. */
        if (CHECK_FLAG(nbr->options, OSPF_OPTION_O)) {
@@ -314,10 +312,14 @@ static int nsm_negotiation_done(struct ospf_neighbor *nbr)
                        ospf_db_summary_add(nbr, lsa);
        }
 
+       /* For Stub/NSSA area, we should not send Type-4 and Type-5 LSAs */
        if (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK
-           && area->external_routing == OSPF_AREA_DEFAULT)
+           && area->external_routing == OSPF_AREA_DEFAULT) {
+               LSDB_LOOP (ASBR_SUMMARY_LSDB(area), rn, lsa)
+                       ospf_db_summary_add(nbr, lsa);
                LSDB_LOOP (EXTERNAL_LSDB(nbr->oi->ospf), rn, lsa)
                        ospf_db_summary_add(nbr, lsa);
+       }
 
        if (CHECK_FLAG(nbr->options, OSPF_OPTION_O)
            && (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK
index 6a51440266e0a501146a9e4817610ca66f60cfad..8b4d55984c8044d2b2a6873d8bd1d400643e1a91 100644 (file)
@@ -1781,6 +1781,9 @@ void ospf_spf_calculate_area(struct ospf *ospf, struct ospf_area *area,
                                    ospf->ti_lfa_protection_type);
 
        ospf_spf_cleanup(area->spf, area->spf_vertex_list);
+
+       area->spf = NULL;
+       area->spf_vertex_list = NULL;
 }
 
 void ospf_spf_calculate_areas(struct ospf *ospf, struct route_table *new_table,
index 2cb3ec0894bada8bb4c6289eb196be812ceb87d3..515ec28b1b092c05d7347ca8faa65a0115b5b60d 100644 (file)
@@ -286,7 +286,7 @@ DEFPY (ospf_router_id,
        for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area))
                if (area->full_nbrs) {
                        vty_out(vty,
-                               "For this router-id change to take effect, use “clear ip ospf process” command\n");
+                               "For this router-id change to take effect, use \"clear ip ospf process\" command\n");
                        return CMD_SUCCESS;
                }
 
@@ -319,7 +319,7 @@ DEFUN_HIDDEN (ospf_router_id_old,
        for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area))
                if (area->full_nbrs) {
                        vty_out(vty,
-                               "For this router-id change to take effect, use “clear ip ospf process” command\n");
+                               "For this router-id change to take effect, use \"clear ip ospf process\" command\n");
                        return CMD_SUCCESS;
                }
 
@@ -352,7 +352,7 @@ DEFPY (no_ospf_router_id,
        for (ALL_LIST_ELEMENTS_RO(ospf->areas, node, area))
                if (area->full_nbrs) {
                        vty_out(vty,
-                               "For this router-id change to take effect, use “clear ip ospf process” command\n");
+                               "For this router-id change to take effect, use \"clear ip ospf process\" command\n");
                        return CMD_SUCCESS;
                }
 
@@ -375,10 +375,27 @@ static void ospf_passive_interface_default_update(struct ospf *ospf,
                ospf_if_set_multicast(oi);
 }
 
-static void ospf_passive_interface_update(struct interface *ifp)
+static void ospf_passive_interface_update(struct interface *ifp,
+                                         struct ospf_if_params *params,
+                                         struct in_addr addr, uint8_t newval)
 {
        struct route_node *rn;
 
+       if (OSPF_IF_PARAM_CONFIGURED(params, passive_interface)) {
+               if (params->passive_interface == newval)
+                       return;
+
+               params->passive_interface = newval;
+               UNSET_IF_PARAM(params, passive_interface);
+               if (params != IF_DEF_PARAMS(ifp)) {
+                       ospf_free_if_params(ifp, addr);
+                       ospf_if_update_params(ifp, addr);
+               }
+       } else {
+               params->passive_interface = newval;
+               SET_IF_PARAM(params, passive_interface);
+       }
+
        /*
         * XXX We should call ospf_if_set_multicast on exactly those
         * interfaces for which the passive property changed.  It is too much
@@ -457,10 +474,7 @@ DEFUN_HIDDEN (ospf_passive_interface_addr,
                params = IF_DEF_PARAMS(ifp);
        }
 
-       params->passive_interface = OSPF_IF_PASSIVE;
-       SET_IF_PARAM(params, passive_interface);
-
-       ospf_passive_interface_update(ifp);
+       ospf_passive_interface_update(ifp, params, addr, OSPF_IF_PASSIVE);
 
        return CMD_SUCCESS;
 }
@@ -521,14 +535,7 @@ DEFUN_HIDDEN (no_ospf_passive_interface,
                params = IF_DEF_PARAMS(ifp);
        }
 
-       params->passive_interface = OSPF_IF_ACTIVE;
-       UNSET_IF_PARAM(params, passive_interface);
-       if (params != IF_DEF_PARAMS(ifp)) {
-               ospf_free_if_params(ifp, addr);
-               ospf_if_update_params(ifp, addr);
-       }
-
-       ospf_passive_interface_update(ifp);
+       ospf_passive_interface_update(ifp, params, addr, OSPF_IF_ACTIVE);
 
        return CMD_SUCCESS;
 }
@@ -8305,10 +8312,12 @@ DEFUN (ip_ospf_hello_interval,
 {
        VTY_DECLVAR_CONTEXT(interface, ifp);
        int idx = 0;
-       struct in_addr addr;
+       struct in_addr addr = {.s_addr = 0L};
        struct ospf_if_params *params;
        params = IF_DEF_PARAMS(ifp);
        uint32_t seconds = 0;
+       bool is_addr = false;
+       uint32_t old_interval = 0;
 
        argv_find(argv, argc, "(1-65535)", &idx);
        seconds = strtol(argv[idx]->arg, NULL, 10);
@@ -8322,8 +8331,15 @@ DEFUN (ip_ospf_hello_interval,
 
                params = ospf_get_if_params(ifp, addr);
                ospf_if_update_params(ifp, addr);
+               is_addr = true;
        }
 
+       old_interval = params->v_hello;
+
+       /* Return, if same interval is configured. */
+       if (old_interval == seconds)
+               return CMD_SUCCESS;
+
        SET_IF_PARAM(params, v_hello);
        params->v_hello = seconds;
 
@@ -8338,6 +8354,8 @@ DEFUN (ip_ospf_hello_interval,
                params->v_wait  = 4 * seconds;
        }
 
+       ospf_reset_hello_timer(ifp, addr, is_addr);
+
        return CMD_SUCCESS;
 }
 
@@ -8364,7 +8382,7 @@ DEFUN (no_ip_ospf_hello_interval,
 {
        VTY_DECLVAR_CONTEXT(interface, ifp);
        int idx = 0;
-       struct in_addr addr;
+       struct in_addr addr = {.s_addr = 0L};
        struct ospf_if_params *params;
        struct route_node *rn;
 
@@ -9082,7 +9100,7 @@ DEFUN (ip_ospf_passive,
 {
        VTY_DECLVAR_CONTEXT(interface, ifp);
        int idx_ipv4 = 3;
-       struct in_addr addr;
+       struct in_addr addr = {.s_addr = INADDR_ANY};
        struct ospf_if_params *params;
        int ret;
 
@@ -9099,10 +9117,7 @@ DEFUN (ip_ospf_passive,
                params = IF_DEF_PARAMS(ifp);
        }
 
-       params->passive_interface = OSPF_IF_PASSIVE;
-       SET_IF_PARAM(params, passive_interface);
-
-       ospf_passive_interface_update(ifp);
+       ospf_passive_interface_update(ifp, params, addr, OSPF_IF_PASSIVE);
 
        return CMD_SUCCESS;
 }
@@ -9118,7 +9133,7 @@ DEFUN (no_ip_ospf_passive,
 {
        VTY_DECLVAR_CONTEXT(interface, ifp);
        int idx_ipv4 = 4;
-       struct in_addr addr;
+       struct in_addr addr = {.s_addr = INADDR_ANY};
        struct ospf_if_params *params;
        int ret;
 
@@ -9136,14 +9151,7 @@ DEFUN (no_ip_ospf_passive,
                params = IF_DEF_PARAMS(ifp);
        }
 
-       params->passive_interface = OSPF_IF_ACTIVE;
-       UNSET_IF_PARAM(params, passive_interface);
-       if (params != IF_DEF_PARAMS(ifp)) {
-               ospf_free_if_params(ifp, addr);
-               ospf_if_update_params(ifp, addr);
-       }
-
-       ospf_passive_interface_update(ifp);
+       ospf_passive_interface_update(ifp, params, addr, OSPF_IF_ACTIVE);
 
        return CMD_SUCCESS;
 }
@@ -11389,6 +11397,11 @@ DEFPY (clear_ip_ospf_neighbor,
                if (!ospf->oi_running)
                        continue;
 
+               if (nbr_id_str && IPV4_ADDR_SAME(&ospf->router_id, &nbr_id)) {
+                       vty_out(vty, "Self router-id is not allowed.\r\n ");
+                       return CMD_SUCCESS;
+               }
+
                ospf_neighbor_reset(ospf, nbr_id, nbr_id_str);
        }
 
@@ -11832,9 +11845,7 @@ static int config_write_interface_one(struct vty *vty, struct vrf *vrf)
 
                        /* Router Dead Interval print. */
                        if (OSPF_IF_PARAM_CONFIGURED(params, v_wait)
-                           && params->is_v_wait_set
-                           && params->v_wait
-                                      != OSPF_ROUTER_DEAD_INTERVAL_DEFAULT) {
+                           && params->is_v_wait_set) {
                                vty_out(vty, " ip ospf dead-interval ");
 
                                /* fast hello ? */
@@ -11927,7 +11938,11 @@ static int config_write_interface_one(struct vty *vty, struct vrf *vrf)
 
                        if (OSPF_IF_PARAM_CONFIGURED(params,
                                                     passive_interface)) {
-                               vty_out(vty, " ip ospf passive");
+                               vty_out(vty, " %sip ospf passive",
+                                       params->passive_interface
+                                                       == OSPF_IF_ACTIVE
+                                               ? "no "
+                                               : "");
                                if (params != IF_DEF_PARAMS(ifp) && rn)
                                        vty_out(vty, " %pI4", &rn->p.u.prefix4);
                                vty_out(vty, "\n");
@@ -11953,7 +11968,7 @@ static int config_write_interface_one(struct vty *vty, struct vrf *vrf)
 
                ospf_opaque_config_write_if(vty, ifp);
 
-               vty_endframe(vty, NULL);
+               vty_endframe(vty, "exit\n!\n");
        }
 
        return write;
@@ -12529,6 +12544,8 @@ static int ospf_config_write_one(struct vty *vty, struct ospf *ospf)
        /* LDP-Sync print */
        ospf_ldp_sync_write_config(vty, ospf);
 
+       vty_out(vty, "exit\n");
+
        write++;
        return write;
 }
@@ -12617,22 +12634,11 @@ void ospf_vty_show_init(void)
        install_element(VIEW_NODE, &show_ip_ospf_external_aggregator_cmd);
 }
 
-static int config_write_interface(struct vty *vty);
-/* ospfd's interface node. */
-static struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = config_write_interface,
-};
-
 /* Initialization of OSPF interface. */
 static void ospf_vty_if_init(void)
 {
        /* Install interface node. */
-       install_node(&interface_node);
-       if_cmd_init();
+       if_cmd_init(config_write_interface);
 
        /* "ip ospf authentication" commands. */
        install_element(INTERFACE_NODE, &ip_ospf_authentication_args_addr_cmd);
@@ -12978,7 +12984,7 @@ void ospf_vty_init(void)
        install_element(OSPF_NODE, &ospf_max_multipath_cmd);
        install_element(OSPF_NODE, &no_ospf_max_multipath_cmd);
 
-       vrf_cmd_init(NULL, &ospfd_privs);
+       vrf_cmd_init(NULL);
 
        /* Init interface related vty commands. */
        ospf_vty_if_init();
index 3226d66444c0d08bf65ccf9721ab65e007ad8de1..9a421de0174dc25b08d24e1358f6f427db385a9f 100644 (file)
@@ -291,6 +291,16 @@ static int ospf_area_id_cmp(struct ospf_area *a1, struct ospf_area *a2)
        return 0;
 }
 
+static void ospf_add(struct ospf *ospf)
+{
+       listnode_add(om->ospf, ospf);
+}
+
+static void ospf_delete(struct ospf *ospf)
+{
+       listnode_delete(om->ospf, ospf);
+}
+
 struct ospf *ospf_new_alloc(unsigned short instance, const char *name)
 {
        int i;
@@ -366,6 +376,8 @@ struct ospf *ospf_new_alloc(unsigned short instance, const char *name)
        new->maxage_delay = OSPF_LSA_MAXAGE_REMOVE_DELAY_DEFAULT;
        new->maxage_lsa = route_table_init();
        new->t_maxage_walker = NULL;
+       thread_add_timer(master, ospf_lsa_maxage_walker, new,
+                        OSPF_LSA_MAXAGE_CHECK_INTERVAL, &new->t_maxage_walker);
 
        /* Max paths initialization */
        new->max_multipath = MULTIPATH_NUM;
@@ -376,6 +388,8 @@ struct ospf *ospf_new_alloc(unsigned short instance, const char *name)
        new->lsa_refresh_queue.index = 0;
        new->lsa_refresh_interval = OSPF_LSA_REFRESH_INTERVAL_DEFAULT;
        new->t_lsa_refresher = NULL;
+       thread_add_timer(master, ospf_lsa_refresh_walker, new,
+                        new->lsa_refresh_interval, &new->t_lsa_refresher);
        new->lsa_refresher_started = monotime(NULL);
 
        new->ibuf = stream_new(OSPF_MAX_PACKET_SIZE + 1);
@@ -390,6 +404,8 @@ struct ospf *ospf_new_alloc(unsigned short instance, const char *name)
 
        ospf_asbr_external_aggregator_init(new);
 
+       ospf_opaque_type11_lsa_init(new);
+
        QOBJ_REG(new, ospf);
 
        new->fd = -1;
@@ -403,23 +419,23 @@ static struct ospf *ospf_new(unsigned short instance, const char *name)
        struct ospf *new;
 
        new = ospf_new_alloc(instance, name);
+       ospf_add(new);
+
+       if (new->vrf_id == VRF_UNKNOWN)
+               return new;
 
        if ((ospf_sock_init(new)) < 0) {
-               if (new->vrf_id != VRF_UNKNOWN)
-                       flog_err(
-                               EC_LIB_SOCKET,
-                               "%s: ospf_sock_init is unable to open a socket",
-                               __func__);
+               flog_err(EC_LIB_SOCKET,
+                        "%s: ospf_sock_init is unable to open a socket",
+                        __func__);
                return new;
        }
 
-       thread_add_timer(master, ospf_lsa_maxage_walker, new,
-                        OSPF_LSA_MAXAGE_CHECK_INTERVAL, &new->t_maxage_walker);
-       thread_add_timer(master, ospf_lsa_refresh_walker, new,
-                        new->lsa_refresh_interval, &new->t_lsa_refresher);
-
        thread_add_read(master, ospf_read, new, new->fd, &new->t_read);
 
+       new->oi_running = 1;
+       ospf_router_id_update(new);
+
        /*
         * Read from non-volatile memory whether this instance is performing a
         * graceful restart or not.
@@ -455,16 +471,6 @@ static int ospf_is_ready(struct ospf *ospf)
        return 1;
 }
 
-static void ospf_add(struct ospf *ospf)
-{
-       listnode_add(om->ospf, ospf);
-}
-
-static void ospf_delete(struct ospf *ospf)
-{
-       listnode_delete(om->ospf, ospf);
-}
-
 struct ospf *ospf_lookup_by_inst_name(unsigned short instance, const char *name)
 {
        struct ospf *ospf = NULL;
@@ -483,16 +489,6 @@ struct ospf *ospf_lookup_by_inst_name(unsigned short instance, const char *name)
        return NULL;
 }
 
-static void ospf_init(struct ospf *ospf)
-{
-       ospf_opaque_type11_lsa_init(ospf);
-
-       if (ospf->vrf_id != VRF_UNKNOWN)
-               ospf->oi_running = 1;
-
-       ospf_router_id_update(ospf);
-}
-
 struct ospf *ospf_lookup(unsigned short instance, const char *name)
 {
        struct ospf *ospf;
@@ -513,12 +509,8 @@ struct ospf *ospf_get(unsigned short instance, const char *name, bool *created)
        ospf = ospf_lookup(instance, name);
 
        *created = (ospf == NULL);
-       if (ospf == NULL) {
+       if (ospf == NULL)
                ospf = ospf_new(instance, name);
-               ospf_add(ospf);
-
-               ospf_init(ospf);
-       }
 
        return ospf;
 }
@@ -1130,8 +1122,8 @@ static void update_redistributed(struct ospf *ospf, int add_to_ospf)
                                if (add_to_ospf) {
                                        if (ospf_external_info_find_lsa(ospf,
                                                                        &ei->p))
-                                               if (!ospf_distribute_check_connected(
-                                                           ospf, ei))
+                                               if (!ospf_redistribute_check(
+                                                           ospf, ei, NULL))
                                                        ospf_external_lsa_flush(
                                                                ospf, ei->type,
                                                                &ei->p,
@@ -1139,8 +1131,8 @@ static void update_redistributed(struct ospf *ospf, int add_to_ospf)
                                } else {
                                        if (!ospf_external_info_find_lsa(
                                                    ospf, &ei->p))
-                                               if (ospf_distribute_check_connected(
-                                                           ospf, ei))
+                                               if (ospf_redistribute_check(
+                                                           ospf, ei, NULL))
                                                        ospf_external_lsa_originate(
                                                                ospf, ei);
                                }
index 2c4cc262c17106ca2a5c48cabc258e3b02ce70e3..4f9cbc7b1ee691c3efa2c323065bb3ed3e674cf4 100644 (file)
@@ -119,7 +119,7 @@ ospfd_ospfd_SOURCES = ospfd/ospf_main.c
 
 ospfd_ospfd_snmp_la_SOURCES = ospfd/ospf_snmp.c
 ospfd_ospfd_snmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
-ospfd_ospfd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+ospfd_ospfd_snmp_la_LDFLAGS = $(MODULE_LDFLAGS)
 ospfd_ospfd_snmp_la_LIBADD = lib/libfrrsnmp.la
 
 EXTRA_DIST += \
index da41c96414d4817b34cec5d2596d7f6f42782550..bd629a2b7048feaa4e3fdca249cdce7bbfd3be0e 100644 (file)
@@ -45,9 +45,6 @@
 
 
 static int config_write_segment_routing(struct vty *vty);
-static int config_write_traffic_eng(struct vty *vty);
-static int config_write_segment_lists(struct vty *vty);
-static int config_write_sr_policies(struct vty *vty);
 static int segment_list_has_src_dst(
        struct vty *vty, char *xpath, long index, const char *index_str,
        struct in_addr adj_src_ipv4, struct in_addr adj_dst_ipv4,
@@ -63,6 +60,8 @@ static int segment_list_has_prefix(
 
 DEFINE_MTYPE_STATIC(PATHD, PATH_CLI, "Client");
 
+DEFINE_HOOK(pathd_srte_config_write, (struct vty *vty), (vty));
+
 /* Vty node structures. */
 static struct cmd_node segment_routing_node = {
        .name = "segment-routing",
@@ -77,7 +76,6 @@ static struct cmd_node sr_traffic_eng_node = {
        .node = SR_TRAFFIC_ENG_NODE,
        .parent_node = SEGMENT_ROUTING_NODE,
        .prompt = "%s(config-sr-te)# ",
-       .config_write = config_write_traffic_eng,
 };
 
 static struct cmd_node srte_segment_list_node = {
@@ -85,7 +83,6 @@ static struct cmd_node srte_segment_list_node = {
        .node = SR_SEGMENT_LIST_NODE,
        .parent_node = SR_TRAFFIC_ENG_NODE,
        .prompt = "%s(config-sr-te-segment-list)# ",
-       .config_write = config_write_segment_lists,
 };
 
 static struct cmd_node srte_policy_node = {
@@ -93,7 +90,6 @@ static struct cmd_node srte_policy_node = {
        .node = SR_POLICY_NODE,
        .parent_node = SR_TRAFFIC_ENG_NODE,
        .prompt = "%s(config-sr-te-policy)# ",
-       .config_write = config_write_sr_policies,
 };
 
 static struct cmd_node srte_candidate_dyn_node = {
@@ -309,6 +305,11 @@ void cli_show_srte_segment_list(struct vty *vty, struct lyd_node *dnode,
                yang_dnode_get_string(dnode, "./name"));
 }
 
+void cli_show_srte_segment_list_end(struct vty *vty, struct lyd_node *dnode)
+{
+       vty_out(vty, "  exit\n");
+}
+
 static int segment_list_has_src_dst(
        struct vty *vty, char *xpath, long index, const char *index_str,
        struct in_addr adj_src_ipv4, struct in_addr adj_dst_ipv4,
@@ -550,7 +551,7 @@ void cli_show_srte_segment_list_segment(struct vty *vty,
                                        struct lyd_node *dnode,
                                        bool show_defaults)
 {
-       vty_out(vty, " index %s ", yang_dnode_get_string(dnode, "./index"));
+       vty_out(vty, "   index %s", yang_dnode_get_string(dnode, "./index"));
        if (yang_dnode_exists(dnode, "./sid-value")) {
                vty_out(vty, " mpls label %s",
                        yang_dnode_get_string(dnode, "./sid-value"));
@@ -666,6 +667,11 @@ void cli_show_srte_policy(struct vty *vty, struct lyd_node *dnode,
                yang_dnode_get_string(dnode, "./endpoint"));
 }
 
+void cli_show_srte_policy_end(struct vty *vty, struct lyd_node *dnode)
+{
+       vty_out(vty, "  exit\n");
+}
+
 /*
  * XPath: /frr-pathd:pathd/srte/policy/name
  */
@@ -1237,6 +1243,15 @@ void cli_show_srte_policy_candidate_path(struct vty *vty,
        }
 }
 
+void cli_show_srte_policy_candidate_path_end(struct vty *vty,
+                                            struct lyd_node *dnode)
+{
+       const char *type = yang_dnode_get_string(dnode, "./type");
+
+       if (strmatch(type, "dynamic"))
+               vty_out(vty, "   exit\n");
+}
+
 static int config_write_dnode(const struct lyd_node *dnode, void *arg)
 {
        struct vty *vty = arg;
@@ -1249,29 +1264,20 @@ static int config_write_dnode(const struct lyd_node *dnode, void *arg)
 int config_write_segment_routing(struct vty *vty)
 {
        vty_out(vty, "segment-routing\n");
-       return 1;
-}
-
-int config_write_traffic_eng(struct vty *vty)
-{
        vty_out(vty, " traffic-eng\n");
+
        path_ted_config_write(vty);
-       return 1;
-}
 
-int config_write_segment_lists(struct vty *vty)
-{
        yang_dnode_iterate(config_write_dnode, vty, running_config->dnode,
                           "/frr-pathd:pathd/srte/segment-list");
-
-       return 1;
-}
-
-int config_write_sr_policies(struct vty *vty)
-{
        yang_dnode_iterate(config_write_dnode, vty, running_config->dnode,
                           "/frr-pathd:pathd/srte/policy");
 
+       hook_call(pathd_srte_config_write, vty);
+
+       vty_out(vty, " exit\n");
+       vty_out(vty, "exit\n");
+
        return 1;
 }
 
index 8d884752065ae5e6f294515a81a7837945a34dc6..7b702cca310393f0475295d51fcea5890a2afae2 100644 (file)
@@ -138,7 +138,6 @@ int main(int argc, char **argv, char **envp)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index 9c622883bc21db17361a14abc4c1dfa0d91b41a3..1ab8b7f39bc494597c17f07c50c26f527e410ea9 100644 (file)
@@ -56,6 +56,7 @@ const struct frr_yang_module_info frr_pathd_info = {
                        .cbs = {
                                .create = pathd_srte_segment_list_create,
                                .cli_show = cli_show_srte_segment_list,
+                               .cli_show_end = cli_show_srte_segment_list_end,
                                .destroy = pathd_srte_segment_list_destroy,
                                .get_next = pathd_srte_segment_list_get_next,
                                .get_keys = pathd_srte_segment_list_get_keys,
@@ -136,6 +137,7 @@ const struct frr_yang_module_info frr_pathd_info = {
                        .cbs = {
                                .create = pathd_srte_policy_create,
                                .cli_show = cli_show_srte_policy,
+                               .cli_show_end = cli_show_srte_policy_end,
                                .destroy = pathd_srte_policy_destroy,
                                .get_next = pathd_srte_policy_get_next,
                                .get_keys = pathd_srte_policy_get_keys,
@@ -169,6 +171,7 @@ const struct frr_yang_module_info frr_pathd_info = {
                        .cbs = {
                                .create = pathd_srte_policy_candidate_path_create,
                                .cli_show = cli_show_srte_policy_candidate_path,
+                               .cli_show_end = cli_show_srte_policy_candidate_path_end,
                                .destroy = pathd_srte_policy_candidate_path_destroy,
                                .get_next = pathd_srte_policy_candidate_path_get_next,
                                .get_keys = pathd_srte_policy_candidate_path_get_keys,
index caeadd9cccc1fc63f98a977fc88d6df7f362607b..6a918b8b824d693abceee9df5b8a0851aa0b8e3e 100644 (file)
@@ -112,10 +112,12 @@ void pathd_apply_finish(struct nb_cb_apply_finish_args *args);
 /* Optional 'cli_show' callbacks. */
 void cli_show_srte_segment_list(struct vty *vty, struct lyd_node *dnode,
                                bool show_defaults);
+void cli_show_srte_segment_list_end(struct vty *vty, struct lyd_node *dnode);
 void cli_show_srte_segment_list_segment(struct vty *vty, struct lyd_node *dnode,
                                        bool show_defaults);
 void cli_show_srte_policy(struct vty *vty, struct lyd_node *dnode,
                          bool show_defaults);
+void cli_show_srte_policy_end(struct vty *vty, struct lyd_node *dnode);
 void cli_show_srte_policy_name(struct vty *vty, struct lyd_node *dnode,
                               bool show_defaults);
 void cli_show_srte_policy_binding_sid(struct vty *vty, struct lyd_node *dnode,
@@ -123,6 +125,8 @@ void cli_show_srte_policy_binding_sid(struct vty *vty, struct lyd_node *dnode,
 void cli_show_srte_policy_candidate_path(struct vty *vty,
                                         struct lyd_node *dnode,
                                         bool show_defaults);
+void cli_show_srte_policy_candidate_path_end(struct vty *vty,
+                                            struct lyd_node *dnode);
 
 /* Utility functions */
 typedef void (*of_pref_cp_t)(enum objfun_type type, void *arg);
index 2e4e331ad970f072c001c6d0d654e04c6d2c15a2..829df3179c267d7baf2712279a7b1e5fcd92ad9c 100644 (file)
@@ -175,7 +175,6 @@ static struct cmd_node pcep_node = {
        .name = "srte pcep",
        .node = PCEP_NODE,
        .parent_node = SR_TRAFFIC_ENG_NODE,
-       .config_write = pcep_cli_pcep_config_write,
        .prompt = "%s(config-sr-te-pcep)# "
 };
 
@@ -183,7 +182,6 @@ static struct cmd_node pcep_pcc_node = {
        .name = "srte pcep pcc",
        .node = PCEP_PCC_NODE,
        .parent_node = PCEP_NODE,
-       .config_write = pcep_cli_pcc_config_write,
        .prompt = "%s(config-sr-te-pcep-pcc)# "
 };
 
@@ -191,7 +189,6 @@ static struct cmd_node pcep_pce_node = {
        .name = "srte pcep pce",
        .node = PCEP_PCE_NODE,
        .parent_node = PCEP_NODE,
-       .config_write = pcep_cli_pce_config_write,
        .prompt = "%s(config-sr-te-pcep-pce)# "
 };
 
@@ -199,7 +196,6 @@ static struct cmd_node pcep_pce_config_node = {
        .name = "srte pcep pce-config",
        .node = PCEP_PCE_CONFIG_NODE,
        .parent_node = PCEP_NODE,
-       .config_write = pcep_cli_pcep_pce_config_write,
        .prompt = "%s(pce-sr-te-pcep-pce-config)# "
 };
 
@@ -505,7 +501,7 @@ static int path_pcep_cli_show_srte_pcep_counters(struct vty *vty)
 {
        int i, j, row;
        time_t diff_time;
-       struct tm *tm_info;
+       struct tm tm_info;
        char tm_buffer[26];
        struct counters_group *group;
        struct counters_subgroup *subgroup;
@@ -522,8 +518,8 @@ static int path_pcep_cli_show_srte_pcep_counters(struct vty *vty)
        }
 
        diff_time = time(NULL) - group->start_time;
-       tm_info = localtime(&group->start_time);
-       strftime(tm_buffer, sizeof(tm_buffer), "%Y-%m-%d %H:%M:%S", tm_info);
+       localtime_r(&group->start_time, &tm_info);
+       strftime(tm_buffer, sizeof(tm_buffer), "%Y-%m-%d %H:%M:%S", &tm_info);
 
        vty_out(vty, "PCEP counters since %s (%uh %um %us):\n", tm_buffer,
                (uint32_t)(diff_time / 3600), (uint32_t)((diff_time / 60) % 60),
@@ -1444,6 +1440,10 @@ int pcep_cli_debug_set_all(uint32_t flags, bool set)
 int pcep_cli_pcep_config_write(struct vty *vty)
 {
        vty_out(vty, "  pcep\n");
+       pcep_cli_pcep_pce_config_write(vty);
+       pcep_cli_pce_config_write(vty);
+       pcep_cli_pcc_config_write(vty);
+       vty_out(vty, "  exit\n");
        return 1;
 }
 
@@ -1468,7 +1468,7 @@ int pcep_cli_pcc_config_write(struct vty *vty)
        }
 
        if (pce_connections_g.num_connections == 0) {
-               return lines;
+               goto exit;
        }
 
        buf[0] = 0;
@@ -1495,6 +1495,8 @@ int pcep_cli_pcc_config_write(struct vty *vty)
                lines++;
                buf[0] = 0;
        }
+exit:
+       vty_out(vty, "   exit\n");
 
        return lines;
 }
@@ -1655,6 +1657,8 @@ int pcep_cli_pce_config_write(struct vty *vty)
 
                vty_out(vty, "%s", buf);
                buf[0] = '\0';
+
+               vty_out(vty, "   exit\n");
        }
 
        return lines;
@@ -1679,6 +1683,8 @@ int pcep_cli_pcep_pce_config_write(struct vty *vty)
                        pcep_cli_print_pce_config(group_opts, buf, sizeof(buf));
                vty_out(vty, "%s", buf);
                buf[0] = 0;
+
+               vty_out(vty, "   exit\n");
        }
 
        return lines;
@@ -1755,13 +1761,20 @@ DEFPY_NOSH(
 DEFPY_NOSH(
       pcep_cli_pcep_pce_config,
       pcep_cli_pcep_pce_config_cmd,
-      "[no] pce-config WORD$name",
+      "pce-config WORD$name",
+      "Shared configuration\n"
+      "Shared configuration name\n")
+{
+       return path_pcep_cli_pcep_pce_config(vty, name);
+}
+
+DEFPY(pcep_cli_pcep_no_pce_config,
+      pcep_cli_pcep_no_pce_config_cmd,
+      "no pce-config WORD$name",
       NO_STR
       "Shared configuration\n"
       "Shared configuration name\n")
 {
-       if (no == NULL)
-               return path_pcep_cli_pcep_pce_config(vty, name);
        return path_pcep_cli_pcep_pce_config_delete(vty, name);
 }
 
@@ -1781,13 +1794,20 @@ DEFPY(pcep_cli_show_srte_pcep_pce_config,
 DEFPY_NOSH(
       pcep_cli_pce,
       pcep_cli_pce_cmd,
-      "[no] pce WORD$name",
+      "pce WORD$name",
+      "PCE configuration, address sub-config is mandatory\n"
+      "PCE name\n")
+{
+       return path_pcep_cli_pce(vty, name);
+}
+
+DEFPY(pcep_cli_no_pce,
+      pcep_cli_no_pce_cmd,
+      "no pce WORD$name",
       NO_STR
       "PCE configuration, address sub-config is mandatory\n"
       "PCE name\n")
 {
-       if (no == NULL)
-               return path_pcep_cli_pce(vty, name);
        return path_pcep_cli_pce_delete(vty, name);
 }
 
@@ -1906,15 +1926,19 @@ DEFPY(pcep_cli_peer_timers,
 DEFPY_NOSH(
       pcep_cli_pcc,
       pcep_cli_pcc_cmd,
-      "[no] pcc",
+      "pcc",
+      "PCC configuration\n")
+{
+       return path_pcep_cli_pcc(vty);
+}
+
+DEFPY(pcep_cli_no_pcc,
+      pcep_cli_no_pcc_cmd,
+      "no pcc",
       NO_STR
       "PCC configuration\n")
 {
-       if (no != NULL) {
-               return path_pcep_cli_pcc_delete(vty);
-       } else {
-               return path_pcep_cli_pcc(vty);
-       }
+       return path_pcep_cli_pcc_delete(vty);
 }
 
 DEFPY(pcep_cli_pcc_pcc_msd,
@@ -1981,6 +2005,7 @@ DEFPY(pcep_cli_clear_srte_pcep_session,
 
 void pcep_cli_init(void)
 {
+       hook_register(pathd_srte_config_write, pcep_cli_pcep_config_write);
        hook_register(nb_client_debug_config_write,
                      pcep_cli_debug_config_write);
        hook_register(nb_client_debug_set_all, pcep_cli_debug_set_all);
@@ -2001,6 +2026,7 @@ void pcep_cli_init(void)
 
        /* PCEP configuration group related configuration commands */
        install_element(PCEP_NODE, &pcep_cli_pcep_pce_config_cmd);
+       install_element(PCEP_NODE, &pcep_cli_pcep_no_pce_config_cmd);
        install_element(PCEP_PCE_CONFIG_NODE,
                        &pcep_cli_peer_source_address_cmd);
        install_element(PCEP_PCE_CONFIG_NODE, &pcep_cli_peer_timers_cmd);
@@ -2010,6 +2036,7 @@ void pcep_cli_init(void)
 
        /* PCE peer related configuration commands */
        install_element(PCEP_NODE, &pcep_cli_pce_cmd);
+       install_element(PCEP_NODE, &pcep_cli_no_pce_cmd);
        install_element(PCEP_PCE_NODE, &pcep_cli_peer_address_cmd);
        install_element(PCEP_PCE_NODE, &pcep_cli_peer_source_address_cmd);
        install_element(PCEP_PCE_NODE, &pcep_cli_peer_pcep_pce_config_ref_cmd);
@@ -2021,6 +2048,7 @@ void pcep_cli_init(void)
        /* PCC related configuration commands */
        install_element(ENABLE_NODE, &pcep_cli_show_srte_pcc_cmd);
        install_element(PCEP_NODE, &pcep_cli_pcc_cmd);
+       install_element(PCEP_NODE, &pcep_cli_no_pcc_cmd);
        install_element(PCEP_PCC_NODE, &pcep_cli_pcc_pcc_peer_cmd);
        install_element(PCEP_PCC_NODE, &pcep_cli_pcc_pcc_msd_cmd);
 
index 01ada92258d70ce28bcf5f9f6b27689f3def6b1d..d17b5a0aab1d1ba823c984ad743f3360b631206d 100644 (file)
@@ -516,16 +516,16 @@ uint32_t path_ted_config_write(struct vty *vty)
 {
 
        if (ted_state_g.enabled) {
-               vty_out(vty, " mpls-te on\n");
+               vty_out(vty, "  mpls-te on\n");
                switch (ted_state_g.import) {
                case IMPORT_ISIS:
-                       vty_out(vty, " mpls-te import isis\n");
+                       vty_out(vty, "  mpls-te import isis\n");
                        break;
                case IMPORT_OSPFv2:
-                       vty_out(vty, " mpls-te import ospfv2\n");
+                       vty_out(vty, "  mpls-te import ospfv2\n");
                        break;
                case IMPORT_OSPFv3:
-                       vty_out(vty, " mpls-te import ospfv3\n");
+                       vty_out(vty, "  mpls-te import ospfv3\n");
                        break;
                default:
                        break;
index f790a0e3c909e908dbb2ba056830e9c811a5e6ac..81d7aa91054adfb9769ed651f4bd84bed400c1de 100644 (file)
@@ -34,6 +34,8 @@
 
 DECLARE_MGROUP(PATHD);
 
+DECLARE_HOOK(pathd_srte_config_write, (struct vty *vty), (vty));
+
 enum srte_protocol_origin {
        SRTE_ORIGIN_UNDEFINED = 0,
        SRTE_ORIGIN_PCEP = 1,
index 693afabb39ac852038d6bbeec76440ee52b8c7d6..f339c792256fa54a38d9ead11733ee5b88f57f0b 100644 (file)
@@ -82,4 +82,4 @@ endif
 
 
 #pathd_pathd_pcep_la_CFLAGS = $(AM_CFLAGS)
-pathd_pathd_pcep_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+pathd_pathd_pcep_la_LDFLAGS = $(MODULE_LDFLAGS)
index 786155903460deb6ea9db6e495863dd6bf4f9c41..c7cbbb4462686f1b0ec5daf50ef0d2fa1a7b8a50 100644 (file)
@@ -153,7 +153,6 @@ int main(int argc, char **argv, char **envp)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index caeadb064413837f35f3e1837edfb2450aa6ec07..694b915f484de2297d469abddcc98a5a68aac09c 100644 (file)
@@ -84,6 +84,17 @@ struct pbr_map_sequence {
         */
        uint32_t ruleno;
 
+       /*
+        * src and dst ports
+        */
+       uint16_t src_prt;
+       uint16_t dst_prt;
+
+       /*
+        * The ip protocol we want to match on
+        */
+       uint8_t ip_proto;
+
        /*
         * Our policy Catchers
         */
index 3d56fc3daa14ee09d89cc853b20b0e700a4becb3..d083b9d2b0f4c282bbb64c268832dbeb13a5dbb5 100644 (file)
@@ -193,6 +193,76 @@ DEFPY(pbr_map_match_dst, pbr_map_match_dst_cmd,
        return CMD_SUCCESS;
 }
 
+DEFPY(pbr_map_match_ip_proto, pbr_map_match_ip_proto_cmd,
+      "[no] match ip-protocol [tcp|udp]$ip_proto",
+      NO_STR
+      "Match the rest of the command\n"
+      "Choose an ip-protocol\n"
+      "Match on tcp flows\n"
+      "Match on udp flows\n")
+{
+       struct pbr_map_sequence *pbrms = VTY_GET_CONTEXT(pbr_map_sequence);
+       struct protoent *p;
+
+       if (!no) {
+               p = getprotobyname(ip_proto);
+               if (!p) {
+                       vty_out(vty, "Unable to convert %s to proto id\n",
+                               ip_proto);
+                       return CMD_WARNING;
+               }
+
+               pbrms->ip_proto = p->p_proto;
+       } else
+               pbrms->ip_proto = 0;
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(pbr_map_match_src_port, pbr_map_match_src_port_cmd,
+      "[no] match src-port (1-65535)$port",
+      NO_STR
+      "Match the rest of the command\n"
+      "Choose the source port to use\n"
+      "The Source Port\n")
+{
+       struct pbr_map_sequence *pbrms = VTY_GET_CONTEXT(pbr_map_sequence);
+
+       if (!no) {
+               if (pbrms->src_prt == port)
+                       return CMD_SUCCESS;
+               else
+                       pbrms->src_prt = port;
+       } else
+               pbrms->src_prt = 0;
+
+       pbr_map_check(pbrms, true);
+
+       return CMD_SUCCESS;
+}
+
+DEFPY(pbr_map_match_dst_port, pbr_map_match_dst_port_cmd,
+      "[no] match dst-port (1-65535)$port",
+      NO_STR
+      "Match the rest of the command\n"
+      "Choose the destination port to use\n"
+      "The Destination Port\n")
+{
+       struct pbr_map_sequence *pbrms = VTY_GET_CONTEXT(pbr_map_sequence);
+
+       if (!no) {
+               if (pbrms->dst_prt == port)
+                       return CMD_SUCCESS;
+               else
+                       pbrms->dst_prt = port;
+       } else
+               pbrms->dst_prt = 0;
+
+       pbr_map_check(pbrms, true);
+
+       return CMD_SUCCESS;
+}
+
 DEFPY(pbr_map_match_dscp, pbr_map_match_dscp_cmd,
       "[no] match dscp DSCP$dscp",
       NO_STR
@@ -674,6 +744,13 @@ static void vty_show_pbrms(struct vty *vty,
                        pbrms->installed ? "yes" : "no",
                        pbrms->reason ? rbuf : "Valid");
 
+       if (pbrms->ip_proto) {
+               struct protoent *p;
+
+               p = getprotobynumber(pbrms->ip_proto);
+               vty_out(vty, "        IP Protocol Match: %s\n", p->p_name);
+       }
+
        if (pbrms->src)
                vty_out(vty, "        SRC Match: %pFX\n", pbrms->src);
        if (pbrms->dst)
@@ -1023,15 +1100,6 @@ DEFUN_NOSH(show_debugging_pbr,
 /* ------------------------------------------------------------------------- */
 
 
-static int pbr_interface_config_write(struct vty *vty);
-static struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = pbr_interface_config_write,
-};
-
 static int pbr_interface_config_write(struct vty *vty)
 {
        struct interface *ifp;
@@ -1050,7 +1118,7 @@ static int pbr_interface_config_write(struct vty *vty)
 
                        pbr_map_write_interfaces(vty, ifp);
 
-                       vty_endframe(vty, "!\n");
+                       vty_endframe(vty, "exit\n!\n");
                }
        }
 
@@ -1079,6 +1147,18 @@ static int pbr_vty_map_config_write_sequence(struct vty *vty,
        if (pbrms->dst)
                vty_out(vty, " match dst-ip %pFX\n", pbrms->dst);
 
+       if (pbrms->src_prt)
+               vty_out(vty, " match src-port %u\n", pbrms->src_prt);
+       if (pbrms->dst_prt)
+               vty_out(vty, " match dst-port %u\n", pbrms->dst_prt);
+
+       if (pbrms->ip_proto) {
+               struct protoent *p;
+
+               p = getprotobynumber(pbrms->ip_proto);
+               vty_out(vty, " match ip-protocol %s\n", p->p_name);
+       }
+
        if (pbrms->dsfield & PBR_DSFIELD_DSCP)
                vty_out(vty, " match dscp %u\n",
                        (pbrms->dsfield & PBR_DSFIELD_DSCP) >> 2);
@@ -1104,6 +1184,7 @@ static int pbr_vty_map_config_write_sequence(struct vty *vty,
                pbrms_nexthop_group_write_individual_nexthop(vty, pbrms);
        }
 
+       vty_out(vty, "exit\n");
        vty_out(vty, "!\n");
        return 1;
 }
@@ -1149,10 +1230,9 @@ void pbr_vty_init(void)
 {
        cmd_variable_handler_register(pbr_map_name);
 
-       vrf_cmd_init(NULL, &pbr_privs);
+       vrf_cmd_init(NULL);
 
-       install_node(&interface_node);
-       if_cmd_init();
+       if_cmd_init(pbr_interface_config_write);
 
        install_node(&pbr_map_node);
 
@@ -1169,6 +1249,9 @@ void pbr_vty_init(void)
        install_element(CONFIG_NODE, &pbr_set_table_range_cmd);
        install_element(CONFIG_NODE, &no_pbr_set_table_range_cmd);
        install_element(INTERFACE_NODE, &pbr_policy_cmd);
+       install_element(PBRMAP_NODE, &pbr_map_match_ip_proto_cmd);
+       install_element(PBRMAP_NODE, &pbr_map_match_src_port_cmd);
+       install_element(PBRMAP_NODE, &pbr_map_match_dst_port_cmd);
        install_element(PBRMAP_NODE, &pbr_map_match_src_cmd);
        install_element(PBRMAP_NODE, &pbr_map_match_dst_cmd);
        install_element(PBRMAP_NODE, &pbr_map_match_dscp_cmd);
index fc5303c9d81ee01bb7f9b62ff752f3ddc9065e06..28def509d5eb518c626bb8aeb829edab8cbbdec7 100644 (file)
@@ -534,10 +534,11 @@ static void pbr_encode_pbr_map_sequence(struct stream *s,
        stream_putl(s, pbrms->seqno);
        stream_putl(s, pbrms->ruleno);
        stream_putl(s, pbrms->unique);
+       stream_putc(s, pbrms->ip_proto); /* The ip_proto */
        pbr_encode_pbr_map_sequence_prefix(s, pbrms->src, family);
-       stream_putw(s, 0);  /* src port */
+       stream_putw(s, pbrms->src_prt);
        pbr_encode_pbr_map_sequence_prefix(s, pbrms->dst, family);
-       stream_putw(s, 0);  /* dst port */
+       stream_putw(s, pbrms->dst_prt);
        stream_putc(s, pbrms->dsfield);
        stream_putl(s, pbrms->mark);
 
index 0181e885fd6df721abc7ea1ae89662fe76138a1b..f2845ee6e12cd8ff99ba702173fc36c9b179a02a 100644 (file)
@@ -419,9 +419,12 @@ static void pim_instate_pend_list(struct bsgrp_node *bsgrp_node)
        active = bsm_rpinfos_first(bsgrp_node->bsrp_list);
 
        /* Remove nodes with hold time 0 & check if list still has a head */
-       frr_each_safe (bsm_rpinfos, bsgrp_node->partial_bsrp_list, pend)
-               if (is_hold_time_zero(pend))
+       frr_each_safe (bsm_rpinfos, bsgrp_node->partial_bsrp_list, pend) {
+               if (is_hold_time_zero(pend)) {
                        bsm_rpinfos_del(bsgrp_node->partial_bsrp_list, pend);
+                       pim_bsm_rpinfo_free(pend);
+               }
+       }
 
        pend = bsm_rpinfos_first(bsgrp_node->partial_bsrp_list);
 
index cc11a3cc172b01d5345cdfa80544625a538ab023..1238e03a5bbc309e98efd9079e18390f0dd224ca 100644 (file)
 #include "pimd/pim_cmd_clippy.c"
 #endif
 
-static struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = pim_interface_config_write,
-};
-
 static struct cmd_node debug_node = {
        .name = "debug",
        .node = DEBUG_NODE,
@@ -497,6 +489,7 @@ static void igmp_show_interfaces(struct pim_instance *pim, struct vty *vty,
        struct interface *ifp;
        time_t now;
        char buf[PREFIX_STRLEN];
+       char quer_buf[PREFIX_STRLEN];
        json_object *json = NULL;
        json_object *json_row = NULL;
 
@@ -506,7 +499,7 @@ static void igmp_show_interfaces(struct pim_instance *pim, struct vty *vty,
                json = json_object_new_object();
        else
                vty_out(vty,
-                       "Interface         State          Address  V  Querier  Query Timer    Uptime\n");
+                       "Interface         State          Address  V  Querier          QuerierIp  Query Timer    Uptime\n");
 
        FOR_ALL_INTERFACES (pim->vrf, ifp) {
                struct pim_interface *pim_ifp;
@@ -544,6 +537,10 @@ static void igmp_show_interfaces(struct pim_instance *pim, struct vty *vty,
                                                               "queryTimer",
                                                               query_hhmmss);
                                }
+                               json_object_string_add(
+                                       json_row, "querierIp",
+                                       inet_ntop(AF_INET, &igmp->querier_addr,
+                                                 quer_buf, sizeof(quer_buf)));
 
                                json_object_object_add(json, ifp->name,
                                                       json_row);
@@ -554,18 +551,19 @@ static void igmp_show_interfaces(struct pim_instance *pim, struct vty *vty,
                                }
                        } else {
                                vty_out(vty,
-                                       "%-16s  %5s  %15s  %d  %7s  %11s  %8s\n",
+                                       "%-16s  %5s  %15s  %d  %7s  %17pI4  %11s  %8s\n",
                                        ifp->name,
                                        if_is_up(ifp)
-                                       ? (igmp->mtrace_only ? "mtrc"
-                                          : "up")
-                                       : "down",
-                                       inet_ntop(AF_INET, &igmp->ifaddr,
-                                                 buf, sizeof(buf)),
+                                               ? (igmp->mtrace_only ? "mtrc"
+                                                                    : "up")
+                                               : "down",
+                                       inet_ntop(AF_INET, &igmp->ifaddr, buf,
+                                                 sizeof(buf)),
                                        pim_ifp->igmp_version,
                                        igmp->t_igmp_query_timer ? "local"
-                                       : "other",
-                                       query_hhmmss, uptime);
+                                                                : "other",
+                                       &igmp->querier_addr, query_hhmmss,
+                                       uptime);
                        }
                }
        }
@@ -586,6 +584,7 @@ static void igmp_show_interfaces_single(struct pim_instance *pim,
        struct listnode *sock_node;
        struct pim_interface *pim_ifp;
        char uptime[10];
+       char quer_buf[PREFIX_STRLEN];
        char query_hhmmss[10];
        char other_hhmmss[10];
        int found_ifname = 0;
@@ -670,6 +669,10 @@ static void igmp_show_interfaces_single(struct pim_instance *pim,
                                                       igmp->t_igmp_query_timer
                                                       ? "local"
                                                       : "other");
+                               json_object_string_add(
+                                       json_row, "querierIp",
+                                       inet_ntop(AF_INET, &igmp->querier_addr,
+                                                 quer_buf, sizeof(quer_buf)));
                                json_object_int_add(json_row, "queryStartCount",
                                                    igmp->startup_query_count);
                                json_object_string_add(json_row,
@@ -739,6 +742,14 @@ static void igmp_show_interfaces_single(struct pim_instance *pim,
                                vty_out(vty, "Querier     : %s\n",
                                        igmp->t_igmp_query_timer ? "local"
                                        : "other");
+                               vty_out(vty, "QuerierIp   : %pI4",
+                                       &igmp->querier_addr);
+                               if (pim_ifp->primary_address.s_addr
+                                   == igmp->querier_addr.s_addr)
+                                       vty_out(vty, " (this router)\n");
+                               else
+                                       vty_out(vty, "\n");
+
                                vty_out(vty, "Start Count : %d\n",
                                        igmp->startup_query_count);
                                vty_out(vty, "Query Timer : %s\n",
@@ -1135,6 +1146,12 @@ static void pim_show_interfaces_single(struct pim_instance *pim,
                        json_object_int_add(
                                json_row, "overrideIntervalHighest",
                                pim_ifp->pim_neighbors_highest_override_interval_msec);
+                       if (pim_ifp->bsm_enable)
+                               json_object_boolean_true_add(json_row,
+                                                            "bsmEnabled");
+                       if (pim_ifp->ucast_bsm_accept)
+                               json_object_boolean_true_add(json_row,
+                                                            "ucastBsmEnabled");
                        json_object_object_add(json, ifp->name, json_row);
 
                } else {
@@ -1289,6 +1306,15 @@ static void pim_show_interfaces_single(struct pim_instance *pim,
                                pim_ifp->pim_neighbors_highest_override_interval_msec);
                        vty_out(vty, "\n");
                        vty_out(vty, "\n");
+
+                       vty_out(vty, "BSM Status\n");
+                       vty_out(vty, "----------\n");
+                       vty_out(vty, "Bsm Enabled          : %s\n",
+                               pim_ifp->bsm_enable ? "yes" : "no");
+                       vty_out(vty, "Unicast Bsm Enabled  : %s\n",
+                               pim_ifp->ucast_bsm_accept ? "yes" : "no");
+                       vty_out(vty, "\n");
+                       vty_out(vty, "\n");
                }
        }
 
@@ -7153,7 +7179,7 @@ DEFPY (pim_register_accept_list,
 
 DEFUN (ip_pim_joinprune_time,
        ip_pim_joinprune_time_cmd,
-       "ip pim join-prune-interval (60-600)",
+       "ip pim join-prune-interval (1-65535)",
        IP_STR
        "pim multicast routing\n"
        "Join Prune Send Interval\n"
@@ -7167,27 +7193,22 @@ DEFUN (ip_pim_joinprune_time,
 
 DEFUN (no_ip_pim_joinprune_time,
        no_ip_pim_joinprune_time_cmd,
-       "no ip pim join-prune-interval (60-600)",
+       "no ip pim join-prune-interval [(1-65535)]",
        NO_STR
        IP_STR
        "pim multicast routing\n"
        "Join Prune Send Interval\n"
-       "Seconds\n")
+       IGNORED_IN_NO_STR)
 {
-       char jp_default_timer[5];
-
-       snprintf(jp_default_timer, sizeof(jp_default_timer), "%d",
-                PIM_DEFAULT_T_PERIODIC);
-
        nb_cli_enqueue_change(vty, "/frr-pim:pim/join-prune-interval",
-                             NB_OP_MODIFY, jp_default_timer);
+                             NB_OP_DESTROY, NULL);
 
        return nb_cli_apply_changes(vty, NULL);
 }
 
 DEFUN (ip_pim_register_suppress,
        ip_pim_register_suppress_cmd,
-       "ip pim register-suppress-time (5-60000)",
+       "ip pim register-suppress-time (1-65535)",
        IP_STR
        "pim multicast routing\n"
        "Register Suppress Timer\n"
@@ -7201,27 +7222,22 @@ DEFUN (ip_pim_register_suppress,
 
 DEFUN (no_ip_pim_register_suppress,
        no_ip_pim_register_suppress_cmd,
-       "no ip pim register-suppress-time (5-60000)",
+       "no ip pim register-suppress-time [(1-65535)]",
        NO_STR
        IP_STR
        "pim multicast routing\n"
        "Register Suppress Timer\n"
-       "Seconds\n")
+       IGNORED_IN_NO_STR)
 {
-       char rs_default_timer[5];
-
-       snprintf(rs_default_timer, sizeof(rs_default_timer), "%d",
-                PIM_REGISTER_SUPPRESSION_TIME_DEFAULT);
-
        nb_cli_enqueue_change(vty, "/frr-pim:pim/register-suppress-time",
-                             NB_OP_MODIFY, rs_default_timer);
+                             NB_OP_DESTROY, NULL);
 
        return nb_cli_apply_changes(vty, NULL);
 }
 
 DEFUN (ip_pim_rp_keep_alive,
        ip_pim_rp_keep_alive_cmd,
-       "ip pim rp keep-alive-timer (31-60000)",
+       "ip pim rp keep-alive-timer (1-65535)",
        IP_STR
        "pim multicast routing\n"
        "Rendevous Point\n"
@@ -7248,20 +7264,26 @@ DEFUN (ip_pim_rp_keep_alive,
 
 DEFUN (no_ip_pim_rp_keep_alive,
        no_ip_pim_rp_keep_alive_cmd,
-       "no ip pim rp keep-alive-timer (31-60000)",
+       "no ip pim rp keep-alive-timer [(1-65535)]",
        NO_STR
        IP_STR
        "pim multicast routing\n"
        "Rendevous Point\n"
        "Keep alive Timer\n"
-       "Seconds\n")
+       IGNORED_IN_NO_STR)
 {
        const char *vrfname;
-       char rp_ka_timer[5];
+       char rp_ka_timer[6];
        char rp_ka_timer_xpath[XPATH_MAXLEN];
+       uint v;
 
-       snprintf(rp_ka_timer, sizeof(rp_ka_timer), "%d",
-                               PIM_RP_KEEPALIVE_PERIOD);
+       /* RFC4601 */
+       v = yang_dnode_get_uint16(vty->candidate_config->dnode,
+                                 "/frr-pim:pim/register-suppress-time");
+       v = 3 * v + PIM_REGISTER_PROBE_TIME_DEFAULT;
+       if (v > UINT16_MAX)
+               v = UINT16_MAX;
+       snprintf(rp_ka_timer, sizeof(rp_ka_timer), "%u", v);
 
        vrfname = pim_cli_get_vrf_name(vty);
        if (vrfname == NULL)
@@ -7280,7 +7302,7 @@ DEFUN (no_ip_pim_rp_keep_alive,
 
 DEFUN (ip_pim_keep_alive,
        ip_pim_keep_alive_cmd,
-       "ip pim keep-alive-timer (31-60000)",
+       "ip pim keep-alive-timer (1-65535)",
        IP_STR
        "pim multicast routing\n"
        "Keep alive Timer\n"
@@ -7305,19 +7327,16 @@ DEFUN (ip_pim_keep_alive,
 
 DEFUN (no_ip_pim_keep_alive,
        no_ip_pim_keep_alive_cmd,
-       "no ip pim keep-alive-timer (31-60000)",
+       "no ip pim keep-alive-timer [(1-65535)]",
        NO_STR
        IP_STR
        "pim multicast routing\n"
        "Keep alive Timer\n"
-       "Seconds\n")
+       IGNORED_IN_NO_STR)
 {
        const char *vrfname;
-       char ka_timer[5];
        char ka_timer_xpath[XPATH_MAXLEN];
 
-       snprintf(ka_timer, sizeof(ka_timer), "%d", PIM_KEEPALIVE_PERIOD);
-
        vrfname = pim_cli_get_vrf_name(vty);
        if (vrfname == NULL)
                return CMD_WARNING_CONFIG_FAILED;
@@ -7326,15 +7345,14 @@ DEFUN (no_ip_pim_keep_alive,
                 "frr-pim:pimd", "pim", vrfname);
        strlcat(ka_timer_xpath, "/keep-alive-timer", sizeof(ka_timer_xpath));
 
-       nb_cli_enqueue_change(vty, ka_timer_xpath, NB_OP_MODIFY,
-                             ka_timer);
+       nb_cli_enqueue_change(vty, ka_timer_xpath, NB_OP_DESTROY, NULL);
 
        return nb_cli_apply_changes(vty, NULL);
 }
 
 DEFUN (ip_pim_packets,
        ip_pim_packets_cmd,
-       "ip pim packets (1-100)",
+       "ip pim packets (1-255)",
        IP_STR
        "pim multicast routing\n"
        "packets to process at one time per fd\n"
@@ -7348,27 +7366,21 @@ DEFUN (ip_pim_packets,
 
 DEFUN (no_ip_pim_packets,
        no_ip_pim_packets_cmd,
-       "no ip pim packets (1-100)",
+       "no ip pim packets [(1-255)]",
        NO_STR
        IP_STR
        "pim multicast routing\n"
        "packets to process at one time per fd\n"
-       "Number of packets\n")
+       IGNORED_IN_NO_STR)
 {
-       char default_packet[3];
-
-       snprintf(default_packet, sizeof(default_packet), "%d",
-                PIM_DEFAULT_PACKET_PROCESS);
-
-       nb_cli_enqueue_change(vty, "/frr-pim:pim/packets", NB_OP_MODIFY,
-                             default_packet);
+       nb_cli_enqueue_change(vty, "/frr-pim:pim/packets", NB_OP_DESTROY, NULL);
 
        return nb_cli_apply_changes(vty, NULL);
 }
 
 DEFPY (igmp_group_watermark,
        igmp_group_watermark_cmd,
-       "ip igmp watermark-warn (10-60000)$limit",
+       "ip igmp watermark-warn (1-65535)$limit",
        IP_STR
        IGMP_STR
        "Configure group limit for watermark warning\n"
@@ -7382,12 +7394,12 @@ DEFPY (igmp_group_watermark,
 
 DEFPY (no_igmp_group_watermark,
        no_igmp_group_watermark_cmd,
-       "no ip igmp watermark-warn [(10-60000)$limit]",
+       "no ip igmp watermark-warn [(1-65535)$limit]",
        NO_STR
        IP_STR
        IGMP_STR
        "Unconfigure group limit for watermark warning\n"
-       "Group count to generate watermark warning\n")
+       IGNORED_IN_NO_STR)
 {
        PIM_DECLVAR_CONTEXT(vrf, pim);
        pim->igmp_watermark_limit = 0;
@@ -8120,7 +8132,7 @@ DEFUN (interface_no_ip_igmp_join,
 
 DEFUN (interface_ip_igmp_query_interval,
        interface_ip_igmp_query_interval_cmd,
-       "ip igmp query-interval (1-1800)",
+       "ip igmp query-interval (1-65535)",
        IP_STR
        IFACE_IGMP_STR
        IFACE_IGMP_QUERY_INTERVAL_STR
@@ -8148,19 +8160,14 @@ DEFUN (interface_ip_igmp_query_interval,
 
 DEFUN (interface_no_ip_igmp_query_interval,
        interface_no_ip_igmp_query_interval_cmd,
-       "no ip igmp query-interval",
+       "no ip igmp query-interval [(1-65535)]",
        NO_STR
        IP_STR
        IFACE_IGMP_STR
-       IFACE_IGMP_QUERY_INTERVAL_STR)
+       IFACE_IGMP_QUERY_INTERVAL_STR
+       IGNORED_IN_NO_STR)
 {
-       char default_query_interval[5];
-
-       snprintf(default_query_interval, sizeof(default_query_interval), "%d",
-                IGMP_GENERAL_QUERY_INTERVAL);
-
-       nb_cli_enqueue_change(vty, "./query-interval", NB_OP_MODIFY,
-                             default_query_interval);
+       nb_cli_enqueue_change(vty, "./query-interval", NB_OP_DESTROY, NULL);
 
        return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
 }
@@ -8196,7 +8203,7 @@ DEFUN (interface_no_ip_igmp_version,
 
 DEFUN (interface_ip_igmp_query_max_response_time,
        interface_ip_igmp_query_max_response_time_cmd,
-       "ip igmp query-max-response-time (10-250)",
+       "ip igmp query-max-response-time (1-65535)",
        IP_STR
        IFACE_IGMP_STR
        IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR
@@ -8225,27 +8232,21 @@ DEFUN (interface_ip_igmp_query_max_response_time,
 
 DEFUN (interface_no_ip_igmp_query_max_response_time,
        interface_no_ip_igmp_query_max_response_time_cmd,
-       "no ip igmp query-max-response-time (10-250)",
+       "no ip igmp query-max-response-time [(1-65535)]",
        NO_STR
        IP_STR
        IFACE_IGMP_STR
        IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_STR
-       "Time for response in deci-seconds\n")
+       IGNORED_IN_NO_STR)
 {
-       char default_query_max_response_time[4];
-
-       snprintf(default_query_max_response_time,
-                sizeof(default_query_max_response_time),
-                "%d", IGMP_QUERY_MAX_RESPONSE_TIME_DSEC);
-
-       nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_MODIFY,
-                             default_query_max_response_time);
+       nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_DESTROY,
+                             NULL);
        return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
 }
 
 DEFUN_HIDDEN (interface_ip_igmp_query_max_response_time_dsec,
              interface_ip_igmp_query_max_response_time_dsec_cmd,
-             "ip igmp query-max-response-time-dsec (10-250)",
+             "ip igmp query-max-response-time-dsec (1-65535)",
              IP_STR
              IFACE_IGMP_STR
              IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR
@@ -8273,27 +8274,22 @@ DEFUN_HIDDEN (interface_ip_igmp_query_max_response_time_dsec,
 
 DEFUN_HIDDEN (interface_no_ip_igmp_query_max_response_time_dsec,
              interface_no_ip_igmp_query_max_response_time_dsec_cmd,
-             "no ip igmp query-max-response-time-dsec",
+             "no ip igmp query-max-response-time-dsec [(1-65535)]",
              NO_STR
              IP_STR
              IFACE_IGMP_STR
-             IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR)
+             IFACE_IGMP_QUERY_MAX_RESPONSE_TIME_DSEC_STR
+             IGNORED_IN_NO_STR)
 {
-       char default_query_max_response_time[4];
-
-       snprintf(default_query_max_response_time,
-                sizeof(default_query_max_response_time),
-                "%d", IGMP_QUERY_MAX_RESPONSE_TIME_DSEC);
-
-       nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_MODIFY,
-                             default_query_max_response_time);
+       nb_cli_enqueue_change(vty, "./query-max-response-time", NB_OP_DESTROY,
+                             NULL);
 
        return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
 }
 
 DEFUN (interface_ip_igmp_last_member_query_count,
        interface_ip_igmp_last_member_query_count_cmd,
-       "ip igmp last-member-query-count (1-7)",
+       "ip igmp last-member-query-count (1-255)",
        IP_STR
        IFACE_IGMP_STR
        IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR
@@ -8321,26 +8317,22 @@ DEFUN (interface_ip_igmp_last_member_query_count,
 
 DEFUN (interface_no_ip_igmp_last_member_query_count,
        interface_no_ip_igmp_last_member_query_count_cmd,
-       "no ip igmp last-member-query-count",
+       "no ip igmp last-member-query-count [(1-255)]",
        NO_STR
        IP_STR
        IFACE_IGMP_STR
-       IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR)
+       IFACE_IGMP_LAST_MEMBER_QUERY_COUNT_STR
+       IGNORED_IN_NO_STR)
 {
-       char default_robustness[2];
-
-       snprintf(default_robustness, sizeof(default_robustness), "%d",
-                IGMP_DEFAULT_ROBUSTNESS_VARIABLE);
-
-       nb_cli_enqueue_change(vty, "./robustness-variable", NB_OP_MODIFY,
-                             default_robustness);
+       nb_cli_enqueue_change(vty, "./robustness-variable", NB_OP_DESTROY,
+                             NULL);
 
        return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
 }
 
 DEFUN (interface_ip_igmp_last_member_query_interval,
        interface_ip_igmp_last_member_query_interval_cmd,
-       "ip igmp last-member-query-interval (1-255)",
+       "ip igmp last-member-query-interval (1-65535)",
        IP_STR
        IFACE_IGMP_STR
        IFACE_IGMP_LAST_MEMBER_QUERY_INTERVAL_STR
@@ -8368,20 +8360,15 @@ DEFUN (interface_ip_igmp_last_member_query_interval,
 
 DEFUN (interface_no_ip_igmp_last_member_query_interval,
        interface_no_ip_igmp_last_member_query_interval_cmd,
-       "no ip igmp last-member-query-interval",
+       "no ip igmp last-member-query-interval [(1-65535)]",
        NO_STR
        IP_STR
        IFACE_IGMP_STR
-       IFACE_IGMP_LAST_MEMBER_QUERY_INTERVAL_STR)
+       IFACE_IGMP_LAST_MEMBER_QUERY_INTERVAL_STR
+       IGNORED_IN_NO_STR)
 {
-       char default_last_member_query_count[4];
-
-       snprintf(default_last_member_query_count,
-                sizeof(default_last_member_query_count),
-                "%d", IGMP_SPECIFIC_QUERY_MAX_RESPONSE_TIME_DSEC);
-
-       nb_cli_enqueue_change(vty, "./last-member-query-interval", NB_OP_MODIFY,
-                             default_last_member_query_count);
+       nb_cli_enqueue_change(vty, "./last-member-query-interval",
+                             NB_OP_DESTROY, NULL);
 
        return nb_cli_apply_changes(vty, "./frr-igmp:igmp");
 }
@@ -8411,13 +8398,7 @@ DEFUN (interface_no_ip_pim_drprio,
        "Revert the Designated Router Priority to default\n"
        "Old Value of the Priority\n")
 {
-       char default_priority[10];
-
-       snprintf(default_priority, sizeof(default_priority), "%d",
-                PIM_DEFAULT_DR_PRIORITY);
-
-       nb_cli_enqueue_change(vty, "./dr-priority", NB_OP_MODIFY,
-                             default_priority);
+       nb_cli_enqueue_change(vty, "./dr-priority", NB_OP_DESTROY, NULL);
 
        return nb_cli_apply_changes(vty, "./frr-pim:pim");
 }
@@ -8752,7 +8733,7 @@ DEFUN (interface_no_ip_mroute,
 
 DEFUN (interface_ip_pim_hello,
        interface_ip_pim_hello_cmd,
-       "ip pim hello (1-180) [(1-180)]",
+       "ip pim hello (1-65535) [(1-65535)]",
        IP_STR
        PIM_STR
        IFACE_PIM_HELLO_STR
@@ -8787,21 +8768,15 @@ DEFUN (interface_ip_pim_hello,
 
 DEFUN (interface_no_ip_pim_hello,
        interface_no_ip_pim_hello_cmd,
-       "no ip pim hello [(1-180) [(1-180)]]",
+       "no ip pim hello [(1-65535) [(1-65535)]]",
        NO_STR
        IP_STR
        PIM_STR
        IFACE_PIM_HELLO_STR
-       IFACE_PIM_HELLO_TIME_STR
-       IFACE_PIM_HELLO_HOLD_STR)
+       IGNORED_IN_NO_STR
+       IGNORED_IN_NO_STR)
 {
-       char hello_default_timer[3];
-
-       snprintf(hello_default_timer, sizeof(hello_default_timer), "%d",
-                PIM_DEFAULT_HELLO_PERIOD);
-
-       nb_cli_enqueue_change(vty, "./hello-interval", NB_OP_MODIFY,
-                             hello_default_timer);
+       nb_cli_enqueue_change(vty, "./hello-interval", NB_OP_DESTROY, NULL);
        nb_cli_enqueue_change(vty, "./hello-holdtime", NB_OP_DESTROY, NULL);
 
        return nb_cli_apply_changes(vty, "./frr-pim:pim");
@@ -9608,10 +9583,10 @@ DEFUN (no_ip_pim_ucast_bsm,
 }
 
 #if HAVE_BFDD > 0
-DEFUN_HIDDEN(
+DEFUN_HIDDEN (
        ip_pim_bfd_param,
        ip_pim_bfd_param_cmd,
-       "ip pim bfd (2-255) (50-60000) (50-60000)",
+       "ip pim bfd (2-255) (1-65535) (1-65535)",
        IP_STR
        PIM_STR
        "Enables BFD support\n"
@@ -9622,7 +9597,7 @@ DEFUN_HIDDEN(
        DEFUN(
                ip_pim_bfd_param,
                ip_pim_bfd_param_cmd,
-               "ip pim bfd (2-255) (50-60000) (50-60000)",
+               "ip pim bfd (2-255) (1-65535) (1-65535)",
                IP_STR
                PIM_STR
                "Enables BFD support\n"
@@ -9661,7 +9636,10 @@ DEFUN_HIDDEN(
 
 #if HAVE_BFDD == 0
 ALIAS(no_ip_pim_bfd, no_ip_pim_bfd_param_cmd,
-      "no ip pim bfd (2-255) (50-60000) (50-60000)", NO_STR IP_STR PIM_STR
+      "no ip pim bfd (2-255) (1-65535) (1-65535)",
+      NO_STR
+      IP_STR
+      PIM_STR
       "Enables BFD support\n"
       "Detect Multiplier\n"
       "Required min receive interval\n"
@@ -9700,7 +9678,7 @@ DEFPY(ip_msdp_peer, ip_msdp_peer_cmd,
 }
 
 DEFPY(ip_msdp_timers, ip_msdp_timers_cmd,
-      "ip msdp timers (2-600)$keepalive (3-600)$holdtime [(1-600)$connretry]",
+      "ip msdp timers (1-65535)$keepalive (1-65535)$holdtime [(1-65535)$connretry]",
       IP_STR
       CFG_MSDP_STR
       "MSDP timers configuration\n"
@@ -9731,6 +9709,35 @@ DEFPY(ip_msdp_timers, ip_msdp_timers_cmd,
        return CMD_SUCCESS;
 }
 
+DEFPY(no_ip_msdp_timers, no_ip_msdp_timers_cmd,
+      "no ip msdp timers [(1-65535) (1-65535) [(1-65535)]]",
+      NO_STR
+      IP_STR
+      CFG_MSDP_STR
+      "MSDP timers configuration\n"
+      IGNORED_IN_NO_STR
+      IGNORED_IN_NO_STR
+      IGNORED_IN_NO_STR)
+{
+       const char *vrfname;
+       char xpath[XPATH_MAXLEN];
+
+       vrfname = pim_cli_get_vrf_name(vty);
+       if (vrfname == NULL)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       snprintf(xpath, sizeof(xpath), FRR_PIM_MSDP_XPATH, "frr-pim:pimd",
+                "pim", vrfname, "frr-routing:ipv4");
+
+       nb_cli_enqueue_change(vty, "./hold-time", NB_OP_DESTROY, NULL);
+       nb_cli_enqueue_change(vty, "./keep-alive", NB_OP_DESTROY, NULL);
+       nb_cli_enqueue_change(vty, "./connection-retry", NB_OP_DESTROY, NULL);
+
+       nb_cli_apply_changes(vty, xpath);
+
+       return CMD_SUCCESS;
+}
+
 DEFUN (no_ip_msdp_peer,
        no_ip_msdp_peer_cmd,
        "no ip msdp peer A.B.C.D",
@@ -11070,8 +11077,7 @@ DEFUN_HIDDEN (ip_pim_mlag,
 
 void pim_cmd_init(void)
 {
-       install_node(&interface_node); /* INTERFACE_NODE */
-       if_cmd_init();
+       if_cmd_init(pim_interface_config_write);
 
        install_node(&debug_node);
 
@@ -11356,6 +11362,8 @@ void pim_cmd_init(void)
 
        install_element(CONFIG_NODE, &ip_msdp_timers_cmd);
        install_element(VRF_NODE, &ip_msdp_timers_cmd);
+       install_element(CONFIG_NODE, &no_ip_msdp_timers_cmd);
+       install_element(VRF_NODE, &no_ip_msdp_timers_cmd);
        install_element(CONFIG_NODE, &ip_msdp_mesh_group_member_cmd);
        install_element(VRF_NODE, &ip_msdp_mesh_group_member_cmd);
        install_element(CONFIG_NODE, &no_ip_msdp_mesh_group_member_cmd);
index 48b019c8c8877a85c13f61292a01e338f10ce7af..0b28a3e84c36e6d2d2a95e0d4fbe6ed1a6867d3b 100644 (file)
@@ -1512,10 +1512,15 @@ struct prefix *pim_if_connected_to_source(struct interface *ifp, struct in_addr
        p.prefixlen = IPV4_MAX_BITLEN;
 
        for (ALL_LIST_ELEMENTS_RO(ifp->connected, cnode, c)) {
-               if ((c->address->family == AF_INET)
-                   && prefix_match(CONNECTED_PREFIX(c), &p)) {
-                       return CONNECTED_PREFIX(c);
-               }
+               if (c->address->family != AF_INET)
+                       continue;
+               if (prefix_match(c->address, &p))
+                       return c->address;
+               if (CONNECTED_PEER(c) && prefix_match(c->destination, &p))
+                       /* this is not a typo, on PtP we need to return the
+                        * *local* address that lines up with src.
+                        */
+                       return c->address;
        }
 
        return NULL;
index 9ee06edfc191cb80d7024e0a6c4276014a4ca10b..3f985e64b4790d9d7e703f23f68a6a22c6ad0a37 100644 (file)
@@ -1232,6 +1232,16 @@ int pim_ifchannel_local_membership_add(struct interface *ifp,
                                           __FILE__, __func__, child->sg_str,
                                           ifp->name, up->sg_str);
 
+                       if (!child->rpf.source_nexthop.interface) {
+                               /* when iif unknown, do not inherit */
+                               if (PIM_DEBUG_EVENTS)
+                                       zlog_debug(
+                                               "Skipped (S,G)=%s(%s) from %s: no iif",
+                                               child->sg_str, ifp->name,
+                                               up->sg_str);
+                               continue;
+                       }
+
                        ch = pim_ifchannel_find(ifp, &child->sg);
                        if (pim_upstream_evaluate_join_desired_interface(
                                    child, ch, starch)) {
index 73dcdbddb4d71bcd634a7af8e141b424a90313e6..71b2d9187ae19815d7491a8143e1e31d0a485d0e 100644 (file)
@@ -167,6 +167,8 @@ static int pim_igmp_other_querier_expire(struct thread *t)
                               sizeof(ifaddr_str));
                zlog_debug("%s: Querier %s resuming", __func__, ifaddr_str);
        }
+       /* Mark the interface address as querier address */
+       igmp->querier_addr = igmp->ifaddr;
 
        /*
          We are the current querier, then
@@ -397,6 +399,8 @@ static int igmp_recv_query(struct igmp_sock *igmp, int query_version,
                                ntohl(igmp->ifaddr.s_addr), from_str,
                                ntohl(from.s_addr));
                }
+               if (ntohl(from.s_addr) < ntohl(igmp->querier_addr.s_addr))
+                       igmp->querier_addr.s_addr = from.s_addr;
 
                pim_igmp_other_querier_timer_on(igmp);
        }
@@ -469,47 +473,83 @@ static int igmp_v1_recv_report(struct igmp_sock *igmp, struct in_addr from,
        return 0;
 }
 
-int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len)
+bool pim_igmp_verify_header(struct ip *ip_hdr, size_t len, size_t *hlen)
 {
-       struct ip *ip_hdr;
-       size_t ip_hlen; /* ip header length in bytes */
        char *igmp_msg;
        int igmp_msg_len;
        int msg_type;
-       char from_str[INET_ADDRSTRLEN];
-       char to_str[INET_ADDRSTRLEN];
+       size_t ip_hlen; /* ip header length in bytes */
 
        if (len < sizeof(*ip_hdr)) {
                zlog_warn("IGMP packet size=%zu shorter than minimum=%zu", len,
                          sizeof(*ip_hdr));
-               return -1;
+               return false;
        }
 
-       ip_hdr = (struct ip *)buf;
-
-       pim_inet4_dump("<src?>", ip_hdr->ip_src, from_str, sizeof(from_str));
-       pim_inet4_dump("<dst?>", ip_hdr->ip_dst, to_str, sizeof(to_str));
-
        ip_hlen = ip_hdr->ip_hl << 2; /* ip_hl gives length in 4-byte words */
+       *hlen = ip_hlen;
 
        if (ip_hlen > len) {
                zlog_warn(
                        "IGMP packet header claims size %zu, but we only have %zu bytes",
                        ip_hlen, len);
-               return -1;
+               return false;
        }
 
-       igmp_msg = buf + ip_hlen;
+       igmp_msg = (char *)ip_hdr + ip_hlen;
        igmp_msg_len = len - ip_hlen;
+       msg_type = *igmp_msg;
 
        if (igmp_msg_len < PIM_IGMP_MIN_LEN) {
                zlog_warn("IGMP message size=%d shorter than minimum=%d",
                          igmp_msg_len, PIM_IGMP_MIN_LEN);
-               return -1;
+               return false;
+       }
+
+       if ((msg_type != PIM_IGMP_MTRACE_RESPONSE)
+           && (msg_type != PIM_IGMP_MTRACE_QUERY_REQUEST)) {
+               if (ip_hdr->ip_ttl != 1) {
+                       zlog_warn(
+                               "Recv IGMP packet with invalid ttl=%u, discarding the packet",
+                               ip_hdr->ip_ttl);
+                       return false;
+               }
        }
 
+       if ((msg_type == PIM_IGMP_V3_MEMBERSHIP_REPORT)
+           || ((msg_type == PIM_IGMP_MEMBERSHIP_QUERY)
+               && (igmp_msg_len >= IGMP_V3_SOURCES_OFFSET))) {
+               /* All IGMPv3 messages must be received with TOS set to 0xC0*/
+               if (ip_hdr->ip_tos != IPTOS_PREC_INTERNETCONTROL) {
+                       zlog_warn("Received IGMP Packet with invalid TOS %u",
+                                 ip_hdr->ip_tos);
+                       return false;
+               }
+       }
+
+       return true;
+}
+
+int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len)
+{
+       struct ip *ip_hdr = (struct ip *)buf;
+       size_t ip_hlen; /* ip header length in bytes */
+       char *igmp_msg;
+       int igmp_msg_len;
+       int msg_type;
+       char from_str[INET_ADDRSTRLEN];
+       char to_str[INET_ADDRSTRLEN];
+
+       if (!pim_igmp_verify_header(ip_hdr, len, &ip_hlen))
+               return -1;
+
+       igmp_msg = buf + ip_hlen;
+       igmp_msg_len = len - ip_hlen;
        msg_type = *igmp_msg;
 
+       pim_inet4_dump("<src?>", ip_hdr->ip_src, from_str, sizeof(from_str));
+       pim_inet4_dump("<dst?>", ip_hdr->ip_dst, to_str, sizeof(to_str));
+
        if (PIM_DEBUG_IGMP_PACKETS) {
                zlog_debug(
                        "Recv IGMP packet from %s to %s on %s: size=%zu ttl=%d msg_type=%d msg_size=%d",
@@ -935,6 +975,7 @@ static struct igmp_sock *igmp_sock_new(int fd, struct in_addr ifaddr,
        igmp->fd = fd;
        igmp->interface = ifp;
        igmp->ifaddr = ifaddr;
+       igmp->querier_addr = ifaddr;
        igmp->t_igmp_read = NULL;
        igmp->t_igmp_query_timer = NULL;
        igmp->t_other_querier_timer = NULL; /* no other querier present */
index a0681128c0c72642c09add1a947fe80c9640047c..abb8af836b49802ba1a5f7ab69de321aaa9c16b6 100644 (file)
@@ -92,8 +92,8 @@ struct igmp_sock {
        struct thread
                *t_igmp_query_timer; /* timer: issue IGMP general queries */
        struct thread *t_other_querier_timer; /* timer: other querier present */
-
-       int querier_query_interval;      /* QQI */
+       struct in_addr querier_addr;      /* IP address of the querier */
+       int querier_query_interval;        /* QQI */
        int querier_robustness_variable; /* QRV */
        int startup_query_count;
 
@@ -116,7 +116,7 @@ void igmp_sock_delete(struct igmp_sock *igmp);
 void igmp_sock_free(struct igmp_sock *igmp);
 void igmp_sock_delete_all(struct interface *ifp);
 int pim_igmp_packet(struct igmp_sock *igmp, char *buf, size_t len);
-
+bool pim_igmp_verify_header(struct ip *ip_hdr, size_t len, size_t *ip_hlen);
 void pim_igmp_general_query_on(struct igmp_sock *igmp);
 void pim_igmp_general_query_off(struct igmp_sock *igmp);
 void pim_igmp_other_querier_timer_on(struct igmp_sock *igmp);
index afa2db5f151d2aee63ba7324efe6787a78c58e3a..bc67a1dd1d96094e300fdde50f2c5bb480738437 100644 (file)
@@ -499,6 +499,35 @@ static void allow(struct igmp_sock *igmp, struct in_addr from,
        struct igmp_group *group;
        int i;
 
+       if (num_sources == 0) {
+               /*
+                 RFC 3376: 3.1. Socket-State
+                 If the requested filter mode is INCLUDE *and* the requested
+                 source list is empty, then the entry corresponding to the
+                 requested interface and multicast address is deleted if
+                 present. If no such entry is present, the request is ignored.
+                 So, deleting the group present.
+               */
+               group = find_group_by_addr(igmp, group_addr);
+               if (!group) {
+                       return;
+               }
+               if (group->group_filtermode_isexcl) {
+                       if (listcount(group->group_source_list) == 1) {
+                               struct in_addr star = {.s_addr = INADDR_ANY};
+
+                               source = igmp_find_source_by_addr(group, star);
+                               if (source)
+                                       igmp_source_reset_gmi(igmp, group,
+                                                             source);
+                       }
+               } else {
+                       igmp_group_delete(group);
+               }
+
+               return;
+       }
+
        /* non-existant group is created as INCLUDE {empty} */
        group = igmp_add_group_by_addr(igmp, group_addr);
        if (!group) {
@@ -529,15 +558,6 @@ static void allow(struct igmp_sock *igmp, struct in_addr from,
                igmp_source_reset_gmi(igmp, group, source);
 
        } /* scan received sources */
-
-       if ((num_sources == 0) && (group->group_filtermode_isexcl)
-           && (listcount(group->group_source_list) == 1)) {
-               struct in_addr star = {.s_addr = INADDR_ANY};
-
-               source = igmp_find_source_by_addr(group, star);
-               if (source)
-                       igmp_source_reset_gmi(igmp, group, source);
-       }
 }
 
 void igmpv3_report_isin(struct igmp_sock *igmp, struct in_addr from,
index 6dda66b79a689efd3791db3ce1cc6cd1ce71a766..5322c48f678b470315d50871cb6fd49912dff8ff 100644 (file)
@@ -220,7 +220,7 @@ static int pim_vrf_config_write(struct vty *vty)
                pim_global_config_write_worker(pim, vty);
 
                if (vrf->vrf_id != VRF_DEFAULT)
-                       vty_endframe(vty, " exit-vrf\n!\n");
+                       vty_endframe(vty, "exit-vrf\n!\n");
        }
 
        return 0;
@@ -231,7 +231,7 @@ void pim_vrf_init(void)
        vrf_init(pim_vrf_new, pim_vrf_enable, pim_vrf_disable,
                 pim_vrf_delete, NULL);
 
-       vrf_cmd_init(pim_vrf_config_write, &pimd_privs);
+       vrf_cmd_init(pim_vrf_config_write);
 }
 
 void pim_vrf_terminate(void)
index 72c726690c915f2fbd51e6b60ce7b4545ea299ae..52ded08ae390e4c02823779456b0d18535605ff1 100644 (file)
@@ -96,9 +96,9 @@ struct pim_router {
        int t_periodic;
        struct pim_assert_metric infinite_assert_metric;
        long rpf_cache_refresh_delay_msec;
-       int32_t register_suppress_time;
+       uint32_t register_suppress_time;
        int packet_process;
-       int32_t register_probe_time;
+       uint32_t register_probe_time;
 
        /*
         * What is the default vrf that we work in
index 96132c44256d214eebc93f65482a78e34f37d9c2..780595ca11fb979fb3e4344a43c2b79bec883855 100644 (file)
@@ -115,7 +115,6 @@ int main(int argc, char **argv, char **envp)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index ab6d8c17dfc5286d0a70439e568d4404f4022b0a..7743bcc51048dcb6ac2f3b28603ffc4d3abde990 100644 (file)
@@ -668,19 +668,15 @@ static int pim_mroute_msg(struct pim_instance *pim, const char *buf,
                case IGMPMSG_WRONGVIF:
                        return pim_mroute_msg_wrongvif(pim->mroute_socket, ifp,
                                                       msg);
-                       break;
                case IGMPMSG_NOCACHE:
                        return pim_mroute_msg_nocache(pim->mroute_socket, ifp,
                                                      msg);
-                       break;
                case IGMPMSG_WHOLEPKT:
                        return pim_mroute_msg_wholepkt(pim->mroute_socket, ifp,
                                                       (const char *)msg);
-                       break;
                case IGMPMSG_WRVIFWHOLE:
                        return pim_mroute_msg_wrvifwhole(
                                pim->mroute_socket, ifp, (const char *)msg);
-                       break;
                default:
                        break;
                }
index 2a8f0c121640f47837b2e2ad812709ef7689dd5b..da8916ddbf734100b86cd9a52ec5d204664a7718 100644 (file)
@@ -1217,6 +1217,7 @@ void pim_msdp_mg_free(struct pim_instance *pim, struct pim_msdp_mg **mgp)
        if ((*mgp)->mbr_list)
                list_delete(&(*mgp)->mbr_list);
 
+       SLIST_REMOVE(&pim->msdp.mglist, (*mgp), pim_msdp_mg, mg_entry);
        XFREE(MTYPE_PIM_MSDP_MG, (*mgp));
 }
 
index dfdbd6dee204e1fea5108d154a74d5673cdd5162..4b4c1ec7db81df1b751c7ba369fcf5eb366f61cd 100644 (file)
@@ -459,6 +459,10 @@ static void change_query_max_response_time(struct pim_interface *pim_ifp,
        struct listnode *sock_node;
        struct igmp_sock *igmp;
 
+       if (pim_ifp->igmp_query_max_response_time_dsec
+           == query_max_response_time_dsec)
+               return;
+
        pim_ifp->igmp_query_max_response_time_dsec =
                query_max_response_time_dsec;
 
@@ -556,8 +560,27 @@ int pim_join_prune_interval_modify(struct nb_cb_modify_args *args)
  */
 int pim_register_suppress_time_modify(struct nb_cb_modify_args *args)
 {
+       uint16_t value;
        switch (args->event) {
        case NB_EV_VALIDATE:
+               value = yang_dnode_get_uint16(args->dnode, NULL);
+               /*
+                * As soon as this is non-constant it needs to be replaced with
+                * a yang_dnode_get to lookup the candidate value, *not* the
+                * operational value. Since the code has a field assigned and
+                * used for this value it should have YANG/CLI to set it too,
+                * otherwise just use the #define!
+                */
+               /* RFC7761: 4.11.  Timer Values */
+               if (value <= router->register_probe_time * 2) {
+                       snprintf(
+                               args->errmsg, args->errmsg_len,
+                               "Register suppress time (%u) must be more than "
+                               "twice the register probe time (%u).",
+                               value, router->register_probe_time);
+                       return NB_ERR_VALIDATION;
+               }
+               break;
        case NB_EV_PREPARE:
        case NB_EV_ABORT:
                break;
@@ -956,21 +979,13 @@ int pim_msdp_hold_time_modify(struct nb_cb_modify_args *args)
 
        switch (args->event) {
        case NB_EV_VALIDATE:
-               if (yang_dnode_get_uint32(args->dnode, NULL)
-                   <= yang_dnode_get_uint32(args->dnode, "../keep-alive")) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Hold time must be greater than keep alive interval");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
        case NB_EV_PREPARE:
        case NB_EV_ABORT:
                break;
        case NB_EV_APPLY:
                vrf = nb_running_get_entry(args->dnode, NULL, true);
                pim = vrf->info;
-               pim->msdp.hold_time = yang_dnode_get_uint32(args->dnode, NULL);
+               pim->msdp.hold_time = yang_dnode_get_uint16(args->dnode, NULL);
                break;
        }
 
@@ -988,21 +1003,13 @@ int pim_msdp_keep_alive_modify(struct nb_cb_modify_args *args)
 
        switch (args->event) {
        case NB_EV_VALIDATE:
-               if (yang_dnode_get_uint32(args->dnode, NULL)
-                   >= yang_dnode_get_uint32(args->dnode, "../hold-time")) {
-                       snprintf(
-                               args->errmsg, args->errmsg_len,
-                               "Keep alive must be less than hold time interval");
-                       return NB_ERR_VALIDATION;
-               }
-               break;
        case NB_EV_PREPARE:
        case NB_EV_ABORT:
                break;
        case NB_EV_APPLY:
                vrf = nb_running_get_entry(args->dnode, NULL, true);
                pim = vrf->info;
-               pim->msdp.keep_alive = yang_dnode_get_uint32(args->dnode, NULL);
+               pim->msdp.keep_alive = yang_dnode_get_uint16(args->dnode, NULL);
                break;
        }
 
@@ -1027,7 +1034,7 @@ int pim_msdp_connection_retry_modify(struct nb_cb_modify_args *args)
                vrf = nb_running_get_entry(args->dnode, NULL, true);
                pim = vrf->info;
                pim->msdp.connection_retry =
-                       yang_dnode_get_uint32(args->dnode, NULL);
+                       yang_dnode_get_uint16(args->dnode, NULL);
                break;
        }
 
@@ -1613,7 +1620,7 @@ int lib_interface_pim_hello_holdtime_modify(struct nb_cb_modify_args *args)
                ifp = nb_running_get_entry(args->dnode, NULL, true);
                pim_ifp = ifp->info;
                pim_ifp->pim_default_holdtime =
-                       yang_dnode_get_uint8(args->dnode, NULL);
+                       yang_dnode_get_uint16(args->dnode, NULL);
                break;
        }
 
@@ -2636,9 +2643,7 @@ int lib_interface_igmp_version_destroy(struct nb_cb_destroy_args *args)
 int lib_interface_igmp_query_interval_modify(struct nb_cb_modify_args *args)
 {
        struct interface *ifp;
-       struct pim_interface *pim_ifp;
        int query_interval;
-       int query_interval_dsec;
 
        switch (args->event) {
        case NB_EV_VALIDATE:
@@ -2647,18 +2652,8 @@ int lib_interface_igmp_query_interval_modify(struct nb_cb_modify_args *args)
                break;
        case NB_EV_APPLY:
                ifp = nb_running_get_entry(args->dnode, NULL, true);
-               pim_ifp = ifp->info;
                query_interval = yang_dnode_get_uint16(args->dnode, NULL);
-               query_interval_dsec = 10 * query_interval;
-               if (query_interval_dsec <=
-                               pim_ifp->igmp_query_max_response_time_dsec) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Can't set general query interval %d dsec <= query max response time %d dsec.",
-                                query_interval_dsec,
-                                pim_ifp->igmp_query_max_response_time_dsec);
-                       return NB_ERR_INCONSISTENCY;
-               }
-               change_query_interval(pim_ifp, query_interval);
+               change_query_interval(ifp->info, query_interval);
        }
 
        return NB_OK;
@@ -2671,9 +2666,7 @@ int lib_interface_igmp_query_max_response_time_modify(
        struct nb_cb_modify_args *args)
 {
        struct interface *ifp;
-       struct pim_interface *pim_ifp;
        int query_max_response_time_dsec;
-       int default_query_interval_dsec;
 
        switch (args->event) {
        case NB_EV_VALIDATE:
@@ -2682,22 +2675,9 @@ int lib_interface_igmp_query_max_response_time_modify(
                break;
        case NB_EV_APPLY:
                ifp = nb_running_get_entry(args->dnode, NULL, true);
-               pim_ifp = ifp->info;
                query_max_response_time_dsec =
-                       yang_dnode_get_uint8(args->dnode, NULL);
-               default_query_interval_dsec =
-                       10 * pim_ifp->igmp_default_query_interval;
-
-               if (query_max_response_time_dsec
-                       >= default_query_interval_dsec) {
-                       snprintf(args->errmsg, args->errmsg_len,
-                                "Can't set query max response time %d sec >= general query interval %d sec",
-                                query_max_response_time_dsec,
-                                pim_ifp->igmp_default_query_interval);
-                       return NB_ERR_INCONSISTENCY;
-               }
-
-               change_query_max_response_time(pim_ifp,
+                       yang_dnode_get_uint16(args->dnode, NULL);
+               change_query_max_response_time(ifp->info,
                                query_max_response_time_dsec);
        }
 
@@ -2722,8 +2702,8 @@ int lib_interface_igmp_last_member_query_interval_modify(
        case NB_EV_APPLY:
                ifp = nb_running_get_entry(args->dnode, NULL, true);
                pim_ifp = ifp->info;
-               last_member_query_interval = yang_dnode_get_uint8(args->dnode,
-                               NULL);
+               last_member_query_interval =
+                       yang_dnode_get_uint16(args->dnode, NULL);
                pim_ifp->igmp_specific_query_max_response_time_dsec =
                        last_member_query_interval;
 
index 48b1a30f2d8c4bb9f6a6d78c69ef9c0a8ad0aaa7..571173c62a2478e5cbddacca7e4b15351aa5d292 100644 (file)
@@ -350,8 +350,8 @@ pim_neighbor_new(struct interface *ifp, struct in_addr source_addr,
                           __func__, src_str, ifp->name);
        }
 
-       zlog_info("PIM NEIGHBOR UP: neighbor %s on interface %s", src_str,
-                 ifp->name);
+       zlog_notice("PIM NEIGHBOR UP: neighbor %s on interface %s", src_str,
+                   ifp->name);
 
        if (neigh->propagation_delay_msec
            > pim_ifp->pim_neighbors_highest_propagation_delay_msec) {
@@ -616,8 +616,8 @@ void pim_neighbor_delete(struct interface *ifp, struct pim_neighbor *neigh,
        assert(pim_ifp);
 
        pim_inet4_dump("<src?>", neigh->source_addr, src_str, sizeof(src_str));
-       zlog_info("PIM NEIGHBOR DOWN: neighbor %s on interface %s: %s", src_str,
-                 ifp->name, delete_message);
+       zlog_notice("PIM NEIGHBOR DOWN: neighbor %s on interface %s: %s",
+                   src_str, ifp->name, delete_message);
 
        THREAD_OFF(neigh->t_expire_timer);
 
index e7ac0d4e5b2f6bc5f6f1cf3c4b12e13884c6cebc..8c38cf6c4c382648edf73cab6c9a4ae9b0aaae80 100644 (file)
@@ -322,7 +322,6 @@ int pim_pim_packet(struct interface *ifp, uint8_t *buf, size_t len)
                }
                return -1;
        }
-       return -1;
 }
 
 static void pim_sock_read_on(struct interface *ifp);
@@ -514,7 +513,7 @@ static int pim_msg_send_frame(int fd, char *buf, size_t len,
 {
        struct ip *ip = (struct ip *)buf;
 
-       while (sendto(fd, buf, len, MSG_DONTWAIT, dst, salen) < 0) {
+       if (sendto(fd, buf, len, MSG_DONTWAIT, dst, salen) < 0) {
                char dst_str[INET_ADDRSTRLEN];
 
                switch (errno) {
index b6521132f70fe0fca585ecf64cef22b1df36b34d..3e3b6dddb5604f01c13a35e2d522cfcfef200b8d 100644 (file)
@@ -139,11 +139,12 @@ void pim_rp_init(struct pim_instance *pim)
 
 void pim_rp_free(struct pim_instance *pim)
 {
-       if (pim->rp_list)
-               list_delete(&pim->rp_list);
        if (pim->rp_table)
                route_table_finish(pim->rp_table);
        pim->rp_table = NULL;
+
+       if (pim->rp_list)
+               list_delete(&pim->rp_list);
 }
 
 /*
@@ -203,6 +204,26 @@ static struct rp_info *pim_rp_find_exact(struct pim_instance *pim,
        return NULL;
 }
 
+/*
+ * XXX: long-term issue:  we don't actually have a good "ip address-list"
+ * implementation.  ("access-list XYZ" is the closest but honestly it's
+ * kinda garbage.)
+ *
+ * So it's using a prefix-list to match an address here, which causes very
+ * unexpected results for the user since prefix-lists by default only match
+ * when the prefix length is an exact match too.  i.e. you'd have to add the
+ * "le 32" and do "ip prefix-list foo permit 10.0.0.0/24 le 32"
+ *
+ * To avoid this pitfall, this code uses "address_mode = true" for the prefix
+ * list match (this is the only user for that.)
+ *
+ * In the long run, we need to add a "ip address-list", but that's a wholly
+ * separate bag of worms, and existing configs using ip prefix-list would
+ * drop into the UX pitfall.
+ */
+
+#include "lib/plist_int.h"
+
 /*
  * Given a group, return the rp_info for that group
  */
@@ -213,7 +234,8 @@ struct rp_info *pim_rp_find_match_group(struct pim_instance *pim,
        struct rp_info *best = NULL;
        struct rp_info *rp_info;
        struct prefix_list *plist;
-       const struct prefix *p, *bp;
+       const struct prefix *bp;
+       const struct prefix_list_entry *entry;
        struct route_node *rn;
 
        bp = NULL;
@@ -221,19 +243,19 @@ struct rp_info *pim_rp_find_match_group(struct pim_instance *pim,
                if (rp_info->plist) {
                        plist = prefix_list_lookup(AFI_IP, rp_info->plist);
 
-                       if (prefix_list_apply_which_prefix(plist, &p, group)
-                           == PREFIX_DENY)
+                       if (prefix_list_apply_ext(plist, &entry, group, true)
+                           == PREFIX_DENY || !entry)
                                continue;
 
                        if (!best) {
                                best = rp_info;
-                               bp = p;
+                               bp = &entry->prefix;
                                continue;
                        }
 
-                       if (bp && bp->prefixlen < p->prefixlen) {
+                       if (bp && bp->prefixlen < entry->prefix.prefixlen) {
                                best = rp_info;
-                               bp = p;
+                               bp = &entry->prefix;
                        }
                }
        }
index 98944e8fed78696b2fe86abfc02cc03dc1d65a96..66c6df65ad43d8dae707439f683f7407a281e700 100644 (file)
@@ -419,8 +419,6 @@ int pim_rpf_addr_is_inaddr_none(struct pim_rpf *rpf)
        default:
                return 0;
        }
-
-       return 0;
 }
 
 int pim_rpf_addr_is_inaddr_any(struct pim_rpf *rpf)
@@ -434,8 +432,6 @@ int pim_rpf_addr_is_inaddr_any(struct pim_rpf *rpf)
        default:
                return 0;
        }
-
-       return 0;
 }
 
 int pim_rpf_is_same(struct pim_rpf *rpf1, struct pim_rpf *rpf2)
index 504519c8a41006bda36cde59f105ea7106d1d001..05b0f92a4b65fce0fc5e353f8043ba87749344b1 100644 (file)
@@ -112,17 +112,15 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, struct interface *ifp,
        }
 
 #ifdef SO_BINDTODEVICE
-       if (protocol == IPPROTO_PIM) {
-               int ret;
+       int ret;
 
-               ret = pim_socket_bind(fd, ifp);
-               if (ret) {
-                       close(fd);
-                       zlog_warn(
-                               "Could not set fd: %d for interface: %s to device",
-                               fd, ifp->name);
-                       return PIM_SOCK_ERR_BIND;
-               }
+       ret = pim_socket_bind(fd, ifp);
+       if (ret) {
+               close(fd);
+               zlog_warn(
+                       "Could not set fd: %d for interface: %s to device",
+                       fd, ifp->name);
+               return PIM_SOCK_ERR_BIND;
        }
 #else
 /* XXX: use IP_PKTINFO / IP_RECVIF to emulate behaviour?  Or change to
index 2b674b4234d7548d8181c9d6d1adf1a2d0145ff5..d21c7b4008a55fe0246e58aef1689f71dc44c57b 100644 (file)
@@ -1800,12 +1800,16 @@ void pim_upstream_start_register_stop_timer(struct pim_upstream *up,
        THREAD_OFF(up->t_rs_timer);
 
        if (!null_register) {
-               uint32_t lower = (0.5 * PIM_REGISTER_SUPPRESSION_PERIOD);
-               uint32_t upper = (1.5 * PIM_REGISTER_SUPPRESSION_PERIOD);
-               time = lower + (frr_weak_random() % (upper - lower + 1))
-                      - PIM_REGISTER_PROBE_PERIOD;
+               uint32_t lower = (0.5 * router->register_suppress_time);
+               uint32_t upper = (1.5 * router->register_suppress_time);
+               time = lower + (frr_weak_random() % (upper - lower + 1));
+               /* Make sure we don't wrap around */
+               if (time >= router->register_probe_time)
+                       time -= router->register_probe_time;
+               else
+                       time = 0;
        } else
-               time = PIM_REGISTER_PROBE_PERIOD;
+               time = router->register_probe_time;
 
        if (PIM_DEBUG_PIM_TRACE) {
                zlog_debug(
index 95882cf58f96e464b4dca7cb2296d84dbae5418c..e4dec9ee8eef311a52be02ff58a92179b55872e8 100644 (file)
@@ -451,7 +451,7 @@ int pim_interface_config_write(struct vty *vty)
                                pim_bfd_write_config(vty, ifp);
                                ++writes;
                        }
-                       vty_endframe(vty, "!\n");
+                       vty_endframe(vty, "exit\n!\n");
                        ++writes;
                }
        }
index 704efc5930f54d986408c5ff4391e28473ef8fc2..e897822ecc1205dcf43a3145038d986b895fc075 100644 (file)
@@ -4,7 +4,7 @@ endif
 
 qpb_libfrr_pb_la_CPPFLAGS = $(AM_CPPFLAGS) $(PROTOBUF_C_CFLAGS)
 qpb_libfrr_pb_la_LIBADD = $(PROTOBUF_C_LIBS)
-qpb_libfrr_pb_la_LDFLAGS = -version-info 0:0:0
+qpb_libfrr_pb_la_LDFLAGS = $(LIB_LDFLAGS) -version-info 0:0:0
 
 qpb_libfrr_pb_la_SOURCES = \
        qpb/qpb.c \
index fbe4c4a1f1a0ab4b02065429c0122172b606fefd..066c45f55c7be40703459bdb6f28f7dd15e8f8e5 100644 (file)
@@ -451,7 +451,7 @@ ln -s %{_sbindir}/frrinit.sh %{buildroot}%{_initddir}/frr
 %endif
 
 install %{zeb_src}/tools/etc/frr/daemons %{buildroot}%{_sysconfdir}/frr
-install %{zeb_src}/tools/etc/frr/frr.conf %{buildroot}%{_sysconfdir}/frr
+install %{zeb_src}/tools/etc/frr/frr.conf %{buildroot}%{_sysconfdir}/frr/frr.conf.template
 install -m644 %{zeb_rh_src}/frr.pam %{buildroot}%{_sysconfdir}/pam.d/frr
 install -m644 %{zeb_rh_src}/frr.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/frr
 install -d -m750 %{buildroot}%{rundir}
@@ -558,24 +558,15 @@ zebra_spec_add_service fabricd    2618/tcp "Fabricd vty"
 
 /sbin/install-info %{_infodir}/frr.info.gz %{_infodir}/dir
 
-# Create dummy files if they don't exist so basic functions can be used.
+# Create dummy config file if they don't exist so basic functions can be used.
 if [ ! -e %{configdir}/zebra.conf ]; then
-    echo "hostname `hostname`" > %{configdir}/zebra.conf
+    # per daemon configs exist
+    mv %{configdir}/frr.conf.template %{configdir}/frr.conf
 %if 0%{?frr_user:1}
-    chown %{frr_user}:%{frr_user} %{configdir}/zebra.conf*
+    chown %{frr_user}:%{frr_user} %{configdir}/frr.conf
 %endif
-    chmod 640 %{configdir}/zebra.conf*
+    chmod 640 %{configdir}/frr.conf
 fi
-for daemon in %{all_daemons} ; do
-    if [ x"${daemon}" != x"" ] ; then
-        if [ ! -e %{configdir}/${daemon}.conf ]; then
-            touch %{configdir}/${daemon}.conf
-            %if 0%{?frr_user:1}
-                chown %{frr_user}:%{frr_user} %{configdir}/${daemon}.conf*
-            %endif
-        fi
-    fi
-done
 %if 0%{?frr_user:1}
     chown %{frr_user}:%{frr_user} %{configdir}/daemons
 %endif
index 7a8e10f30b35c1a817ac245dd88f6ca53b3b6a19..a2c86e3b2280a7222d60de46e31fdb35f13dc3e8 100644 (file)
@@ -1156,15 +1156,6 @@ int rip_show_network_config(struct vty *vty, struct rip *rip)
        return 0;
 }
 
-static int rip_interface_config_write(struct vty *vty);
-static struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = rip_interface_config_write,
-};
-
 void rip_interface_sync(struct interface *ifp)
 {
        struct vrf *vrf;
@@ -1204,8 +1195,7 @@ void rip_if_init(void)
        hook_register_prio(if_del, 0, rip_interface_delete_hook);
 
        /* Install interface node. */
-       install_node(&interface_node);
-       if_cmd_init();
+       if_cmd_init(rip_interface_config_write);
        if_zapi_callbacks(rip_ifp_create, rip_ifp_up,
                          rip_ifp_down, rip_ifp_destroy);
 }
index 2e5eec98448a1452d6d17f37b6a06930e9af3c10..7b9146b13acb84afb552db5530281f4d3e38f906 100644 (file)
@@ -161,7 +161,6 @@ int main(int argc, char **argv)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index d49d360b7ee70713e73eff97b7352d48cb82ab11..824cbd8cf152a789a6b2835e6e01c5e79774122c 100644 (file)
@@ -166,7 +166,7 @@ static uint8_t *rip2Globals(struct variable *v, oid name[], size_t *length,
        if (!rip)
                return NULL;
 
-       /* Retrun global counter. */
+       /* Return global counter. */
        switch (v->magic) {
        case RIP2GLOBALROUTECHANGES:
                return SNMP_INTEGER(rip->counters.route_changes);
index ccd4bf1bacec389af6aaa5e6766389c8fabcd09a..37f4b574310dfdb8288ab4359667f5e7c16ee1c8 100644 (file)
@@ -920,9 +920,11 @@ static int rip_auth_md5(struct rip_packet *packet, struct sockaddr_in *from,
                if (key == NULL || key->string == NULL)
                        return 0;
 
-               strlcpy(auth_str, key->string, sizeof(auth_str));
+               memcpy(auth_str, key->string,
+                      MIN(sizeof(auth_str), strlen(key->string)));
        } else if (ri->auth_str)
-               strlcpy(auth_str, ri->auth_str, sizeof(auth_str));
+               memcpy(auth_str, ri->auth_str,
+                      MIN(sizeof(auth_str), strlen(ri->auth_str)));
 
        if (auth_str[0] == 0)
                return 0;
@@ -965,9 +967,11 @@ static void rip_auth_prepare_str_send(struct rip_interface *ri, struct key *key,
 
        memset(auth_str, 0, len);
        if (key && key->string)
-               strlcpy(auth_str, key->string, len);
+               memcpy(auth_str, key->string,
+                      MIN((size_t)len, strlen(key->string)));
        else if (ri->auth_str)
-               strlcpy(auth_str, ri->auth_str, len);
+               memcpy(auth_str, ri->auth_str,
+                      MIN((size_t)len, strlen(ri->auth_str)));
 
        return;
 }
@@ -3277,6 +3281,8 @@ static int config_write_rip(struct vty *vty)
                /* Interface routemap configuration */
                config_write_if_rmap(vty, rip->if_rmap_ctx);
 
+               vty_out(vty, "exit\n");
+
                write = 1;
        }
 
@@ -3692,7 +3698,7 @@ void rip_vrf_init(void)
        vrf_init(rip_vrf_new, rip_vrf_enable, rip_vrf_disable, rip_vrf_delete,
                 rip_vrf_enable);
 
-       vrf_cmd_init(NULL, &ripd_privs);
+       vrf_cmd_init(NULL);
 }
 
 void rip_vrf_terminate(void)
index 8de0fc4b5a10d2dbb3f03b34f8a8a88456d62237..b43e369ab28fba63fea1d481d61fcedd74f8ac72 100644 (file)
@@ -57,5 +57,5 @@ nodist_ripd_ripd_SOURCES = \
 
 ripd_ripd_snmp_la_SOURCES = ripd/rip_snmp.c
 ripd_ripd_snmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
-ripd_ripd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+ripd_ripd_snmp_la_LDFLAGS = $(MODULE_LDFLAGS)
 ripd_ripd_snmp_la_LIBADD = lib/libfrrsnmp.la
index 682839861727ae40ccb3741ef96e9334ff1e8017..f374fcb839017a8e838b558244c50df9ddbf52e9 100644 (file)
@@ -951,16 +951,6 @@ static int interface_config_write(struct vty *vty)
        return write;
 }
 
-static int interface_config_write(struct vty *vty);
-/* ripngd's interface node. */
-static struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = interface_config_write,
-};
-
 /* Initialization of interface. */
 void ripng_if_init(void)
 {
@@ -969,8 +959,7 @@ void ripng_if_init(void)
        hook_register_prio(if_del, 0, ripng_if_delete_hook);
 
        /* Install interface node. */
-       install_node(&interface_node);
-       if_cmd_init();
+       if_cmd_init(interface_config_write);
        if_zapi_callbacks(ripng_ifp_create, ripng_ifp_up,
                          ripng_ifp_down, ripng_ifp_destroy);
 }
index a5d837aa5566a51f9c328b8a558c8def54b622b2..34cd4ab0a7ff52a7164a5faf2d017a17626c11eb 100644 (file)
@@ -163,7 +163,6 @@ int main(int argc, char **argv)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index cbd2c22893adc4cbcd40ae04a302c97c83a34c79..4f5c8e77609d3c606f4d99fd5da6ec00fa091322 100644 (file)
@@ -2270,6 +2270,8 @@ static int ripng_config_write(struct vty *vty)
                config_write_distribute(vty, ripng->distribute_ctx);
                config_write_if_rmap(vty, ripng->if_rmap_ctx);
 
+               vty_out(vty, "exit\n");
+
                write = 1;
        }
 
@@ -2692,7 +2694,7 @@ void ripng_vrf_init(void)
        vrf_init(ripng_vrf_new, ripng_vrf_enable, ripng_vrf_disable,
                 ripng_vrf_delete, ripng_vrf_enable);
 
-       vrf_cmd_init(NULL, &ripngd_privs);
+       vrf_cmd_init(NULL);
 }
 
 void ripng_vrf_terminate(void)
index 75cf1453858d8ffe9f603c1c460fe57986ccf47e..a646c313e42e73103759ecd0d43ad7c317a92350 100644 (file)
@@ -171,7 +171,6 @@ int main(int argc, char **argv, char **envp)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index e43f63f2d9042253a235d191374b46f5616c5405..f4a38e7f7f0bc84b4f07f18a86cde7a6fe84fd35 100644 (file)
@@ -1,7 +1,6 @@
 Building your own FRRouting Snap
 ========================================
-(Tested on Ubuntu 16.04 with Snap Version 2, does not work on Ubuntu 15.x
-which uses earlier versions of snaps)
+(Tested on Ubuntu 18.04)
 
 1. Install snapcraft:
 
@@ -100,6 +99,7 @@ All the commands are prefixed with frr.
     frr.staticd-debug
     frr.bfdd-debug
     frr.fabricd-debug
+    frr.pathd-debug
 
 vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
 path). If access as `vtysh` instead of `frr.vtysh` is needed, you can enable it
index 6a0864c8c5f2ac15f62bb380aae40ad85477d06d..7abc0f6ded50f51e9a87cf366d17fdc93259f9ab 100644 (file)
@@ -18,7 +18,8 @@ ie for `ospf6d` (OSPFv3):
     systemctl enable snap.frr.ospf6d.service
 
 The daemons are: `ripd`, `ripngd`, `ospfd`, `ospf6d`, `isisd`, `bgpd`, 
-`pimd`, `ldpd`, `eigrpd`, `babeld`, `nhrpd`, `bfdd`, `zebra`
+`pimd`, `ldpd`, `eigrpd`, `babeld`, `nhrpd`, `bfdd`, `vrrpd`, `pbrd`,
+`pathd`, `fabricd`, `staticd`, `zebra`
 
 Commands defined by this snap
 -----------------------------
diff --git a/snapcraft/defaults/pathd.conf.default b/snapcraft/defaults/pathd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
index 0435b3bc52fafcb6379826bd3f5efce0d7cb3ff0..5aedddcf698df41c0d4f75fc92e44d7aec8e6ab7 100644 (file)
@@ -19,6 +19,7 @@ install:
        install -D -m 0755 bfdd-service $(DESTDIR)/bin/
        install -D -m 0755 fabricd-service $(DESTDIR)/bin/
        install -D -m 0755 vrrpd-service $(DESTDIR)/bin/
+       install -D -m 0755 pathd-service $(DESTDIR)/bin/
        install -D -m 0755 set-options $(DESTDIR)/bin/
        install -D -m 0755 show_version $(DESTDIR)/bin/
 
diff --git a/snapcraft/scripts/pathd-service b/snapcraft/scripts/pathd-service
new file mode 100644 (file)
index 0000000..6473c59
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/pathd.conf ]; then
+    cp $SNAP/etc/frr/pathd.conf.default $SNAP_DATA/pathd.conf
+fi
+exec $SNAP/sbin/pathd \
+    -f $SNAP_DATA/pathd.conf \
+    --pid_file $SNAP_DATA/pathd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
index 1836f34979d3581863a3cc5420e622f7a620a224..51252ede0ce026153a3275db14d7e328873aeb40 100644 (file)
@@ -4,11 +4,12 @@ summary: FRRouting BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP/EIGRP/BFD routing da
 description: BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP/EIGRP/BFD routing daemon
  FRRouting (FRR) is free software which manages TCP/IP based routing 
  protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, 
- RIPng, PIM, LDP, Babel, EIGRP, PBR (Policy-based routing), BFD and OpenFabric
- as well as the IPv6 versions of these.
+ RIPng, PIM, LDP, Babel, EIGRP, PBR (Policy-based routing), PATHD (Segment
routing), BFD and OpenFabric as well as the IPv6 versions of these.
  FRRouting (frr) is a fork of Quagga.
 confinement: strict
 grade: devel
+base: core18
 
 apps:
     vtysh:
@@ -141,6 +142,13 @@ apps:
             - network
             - network-bind
             - network-control
+    pathd:
+        command: bin/pathd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
     set:
         command: bin/set-options
     zebra-debug:
@@ -245,6 +253,13 @@ apps:
             - network
             - network-bind
             - network-control
+    pathd-debug:
+        command: sbin/pathd -f $SNAP_DATA/pathd.conf --pid_file $SNAP_DATA/pathd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+
 parts:
     rtrlib:
         build-packages:
@@ -254,6 +269,7 @@ parts:
            - libssh-dev
         stage-packages:
            - libssh-4
+           - zlib1g
         prime:
            - lib/librtr.so*
            - usr/lib/x86_64-linux-gnu/libssh.so*
@@ -268,12 +284,12 @@ parts:
            - cmake
            - make
            - gcc
-           - libpcre3-dev
+           - libpcre2-dev
         stage-packages:
-           - libpcre3
+           - libpcre2-8-0
         source: https://github.com/CESNET/libyang.git
         source-type: git
-        source-tag: v1.0.184
+        source-tag: v2.0.7
         plugin: cmake
         configflags:
            - -DCMAKE_INSTALL_PREFIX:PATH=/usr
@@ -298,7 +314,6 @@ parts:
            - imagemagick
            - ghostscript
            - groff
-           - hardening-wrapper
            - libpcre3-dev
            - chrpath
            - pkg-config
@@ -307,6 +322,7 @@ parts:
            - bison
            - flex
            - python3-dev
+           - libprotobuf-c-dev
            - protobuf-c-compiler
            - python3-sphinx
         stage-packages:
@@ -315,12 +331,20 @@ parts:
            - logrotate
            - libcap2
            - libtinfo5
-           - libreadline6
-           - libjson-c2
+           - libreadline7
+           - libjson-c3
            - libc-ares2
            - libatm1
            - libprotobuf-c1
            - libdb5.3
+           - libacl1
+           - libattr1
+           - libaudit1
+           - libcap-ng0
+           - libpam0g
+           - libpcre3
+           - libselinux1
+           - libxtables12
         plugin: autotools
         source: ../frr-@PACKAGE_VERSION@.tar.gz
         configflags:
@@ -367,6 +391,7 @@ parts:
             bfdd.conf.default: etc/frr/bfdd.conf.default
             fabricd.conf.default: etc/frr/fabricd.conf.default
             vrrpd.conf.default: etc/frr/vrrpd.conf.default
+            pathd.conf.default: etc/frr/pathd.conf.default
             vtysh.conf.default: etc/frr/vtysh.conf.default
             staticd.conf.default: etc/frr/staticd.conf.default
     frr-scripts:
@@ -376,6 +401,8 @@ parts:
         stage-packages:
            - telnet
            - traceroute
+           - libgcc1
+           - libstdc++6
         plugin: make
         source: helpers
         prime:
@@ -390,8 +417,3 @@ parts:
             README.snap_build.md: doc/README.snap_build.md
             extra_version_info.txt: doc/extra_version_info.txt
 
-passthrough:
-    layout:
-         /usr/lib/x86_64-linux-gnu/libyang1:
-             bind: $SNAP/usr/lib/x86_64-linux-gnu/libyang1
-
index 1561b91efb7d839220439d6826c95db5f88524dc..f7a15462a0428f574f51861783a927bb5c5d0dfc 100644 (file)
@@ -149,7 +149,6 @@ int main(int argc, char **argv, char **envp)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index cd151bface88306090233d32f19866d4e6fc4b75..deeca97b0e48369e9309d2a84477c7034c3cdb04 100644 (file)
@@ -77,32 +77,41 @@ static int static_path_list_create(struct nb_cb_create_args *args)
        return NB_OK;
 }
 
-static void static_path_list_destroy(struct nb_cb_destroy_args *args,
-                                    const struct lyd_node *rn_dnode,
-                                    struct stable_info *info)
+static int static_path_list_destroy(struct nb_cb_destroy_args *args)
 {
-       struct route_node *rn;
        struct static_path *pn;
 
-       pn = nb_running_unset_entry(args->dnode);
-       rn = nb_running_get_entry(rn_dnode, NULL, true);
-       static_del_path(rn, pn, info->safi, info->svrf);
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_PREPARE:
+       case NB_EV_ABORT:
+               break;
+       case NB_EV_APPLY:
+               pn = nb_running_unset_entry(args->dnode);
+               static_del_path(pn);
+               break;
+       }
+
+       return NB_OK;
 }
 
-static void static_path_list_tag_modify(struct nb_cb_modify_args *args,
-                                       const struct lyd_node *rn_dnode,
-                                       struct stable_info *info)
+static int static_path_list_tag_modify(struct nb_cb_modify_args *args)
 {
        struct static_path *pn;
-       struct route_node *rn;
-       route_tag_t tag;
 
-       tag = yang_dnode_get_uint32(args->dnode, NULL);
-       pn = nb_running_get_entry(args->dnode, NULL, true);
-       pn->tag = tag;
-       rn = nb_running_get_entry(rn_dnode, NULL, true);
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_ABORT:
+       case NB_EV_PREPARE:
+               break;
+       case NB_EV_APPLY:
+               pn = nb_running_get_entry(args->dnode, NULL, true);
+               pn->tag = yang_dnode_get_uint32(args->dnode, NULL);
+               static_install_path(pn);
+               break;
+       }
 
-       static_install_path(rn, pn, info->safi, info->svrf);
+       return NB_OK;
 }
 
 struct nexthop_iter {
@@ -125,13 +134,10 @@ static int nexthop_iter_cb(const struct lyd_node *dnode, void *arg)
        return YANG_ITER_CONTINUE;
 }
 
-static bool static_nexthop_create(struct nb_cb_create_args *args,
-                                 const struct lyd_node *rn_dnode,
-                                 struct stable_info *info)
+static bool static_nexthop_create(struct nb_cb_create_args *args)
 {
        const struct lyd_node *pn_dnode;
        struct nexthop_iter iter;
-       struct route_node *rn;
        struct static_path *pn;
        struct ipaddr ipaddr;
        struct static_nexthop *nh;
@@ -176,7 +182,6 @@ static bool static_nexthop_create(struct nb_cb_create_args *args,
                ifname = yang_dnode_get_string(args->dnode, "./interface");
                nh_vrf = yang_dnode_get_string(args->dnode, "./vrf");
                pn = nb_running_get_entry(args->dnode, NULL, true);
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
 
                if (!static_add_nexthop_validate(nh_vrf, nh_type, &ipaddr))
                        flog_warn(
@@ -184,8 +189,8 @@ static bool static_nexthop_create(struct nb_cb_create_args *args,
                                "Warning!! Local connected address is configured as Gateway IP((%s))",
                                yang_dnode_get_string(args->dnode,
                                                      "./gateway"));
-               nh = static_add_nexthop(rn, pn, info->safi, info->svrf, nh_type,
-                                       &ipaddr, ifname, nh_vrf, 0);
+               nh = static_add_nexthop(pn, nh_type, &ipaddr, ifname, nh_vrf,
+                                       0);
                nb_running_set_entry(args->dnode, nh);
                break;
        }
@@ -193,33 +198,19 @@ static bool static_nexthop_create(struct nb_cb_create_args *args,
        return NB_OK;
 }
 
-static bool static_nexthop_destroy(struct nb_cb_destroy_args *args,
-                                  const struct lyd_node *rn_dnode,
-                                  struct stable_info *info)
+static bool static_nexthop_destroy(struct nb_cb_destroy_args *args)
 {
-       struct route_node *rn;
-       struct static_path *pn;
-       const struct lyd_node *pn_dnode;
        struct static_nexthop *nh;
-       int ret;
-
-       nh = nb_running_unset_entry(args->dnode);
-       pn_dnode = yang_dnode_get_parent(args->dnode, "path-list");
-       pn = nb_running_get_entry(pn_dnode, NULL, true);
-       rn = nb_running_get_entry(rn_dnode, NULL, true);
 
-       ret = static_delete_nexthop(rn, pn, info->safi, info->svrf, nh);
-       if (!ret) {
-               char buf[SRCDEST2STR_BUFFER];
-
-               flog_warn(EC_LIB_NB_CB_CONFIG_APPLY,
-                         "%s : nh [%d:%s:%s:%s] nexthop destroy failed",
-                         srcdest_rnode2str(rn, buf, sizeof(buf)),
-                         yang_dnode_get_enum(args->dnode, "./nh-type"),
-                         yang_dnode_get_string(args->dnode, "./interface"),
-                         yang_dnode_get_string(args->dnode, "./gateway"),
-                         yang_dnode_get_string(args->dnode, "./vrf"));
-               return NB_ERR;
+       switch (args->event) {
+       case NB_EV_VALIDATE:
+       case NB_EV_PREPARE:
+       case NB_EV_ABORT:
+               break;
+       case NB_EV_APPLY:
+               nh = nb_running_unset_entry(args->dnode);
+               static_delete_nexthop(nh);
+               break;
        }
 
        return NB_OK;
@@ -384,72 +375,26 @@ static int static_nexthop_bh_type_modify(struct nb_cb_modify_args *args)
        return NB_OK;
 }
 
-
 void routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_apply_finish(
        struct nb_cb_apply_finish_args *args)
 {
        struct static_nexthop *nh;
-       struct static_path *pn;
-       struct route_node *rn;
-       const struct lyd_node *pn_dnode;
-       const struct lyd_node *rn_dnode;
-       const char *ifname;
-       const char *nh_vrf;
-       struct stable_info *info;
-       int nh_type;
-
-       nh_type = yang_dnode_get_enum(args->dnode, "./nh-type");
-       ifname = yang_dnode_get_string(args->dnode, "./interface");
-       nh_vrf = yang_dnode_get_string(args->dnode, "./vrf");
 
        nh = nb_running_get_entry(args->dnode, NULL, true);
 
-       pn_dnode = yang_dnode_get_parent(args->dnode, "path-list");
-       pn = nb_running_get_entry(pn_dnode, NULL, true);
-
-       rn_dnode = yang_dnode_get_parent(pn_dnode, "route-list");
-       rn = nb_running_get_entry(rn_dnode, NULL, true);
-       info = route_table_get_info(rn->table);
-
-       static_install_nexthop(rn, pn, nh, info->safi, info->svrf, ifname,
-                              nh_type, nh_vrf);
+       static_install_nexthop(nh);
 }
 
-
 void routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_apply_finish(
        struct nb_cb_apply_finish_args *args)
 {
        struct static_nexthop *nh;
-       struct static_path *pn;
-       struct route_node *rn;
-       struct route_node *src_rn;
-       const struct lyd_node *pn_dnode;
-       const struct lyd_node *rn_dnode;
-       const struct lyd_node *src_dnode;
-       const char *ifname;
-       const char *nh_vrf;
-       struct stable_info *info;
-       int nh_type;
-
-       nh_type = yang_dnode_get_enum(args->dnode, "./nh-type");
-       ifname = yang_dnode_get_string(args->dnode, "./interface");
-       nh_vrf = yang_dnode_get_string(args->dnode, "./vrf");
 
        nh = nb_running_get_entry(args->dnode, NULL, true);
 
-       pn_dnode = yang_dnode_get_parent(args->dnode, "path-list");
-       pn = nb_running_get_entry(pn_dnode, NULL, true);
-
-       src_dnode = yang_dnode_get_parent(pn_dnode, "src-list");
-       src_rn = nb_running_get_entry(src_dnode, NULL, true);
-
-       rn_dnode = yang_dnode_get_parent(src_dnode, "route-list");
-       rn = nb_running_get_entry(rn_dnode, NULL, true);
-       info = route_table_get_info(rn->table);
-
-       static_install_nexthop(src_rn, pn, nh, info->safi, info->svrf, ifname,
-                              nh_type, nh_vrf);
+       static_install_nexthop(nh);
 }
+
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_pre_validate(
        struct nb_cb_pre_validate_args *args)
 {
@@ -526,13 +471,6 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_cr
                yang_afi_safi_identity2value(afi_safi, &afi, &safi);
 
                rn = static_add_route(afi, safi, &prefix, NULL, s_vrf);
-               if (!rn) {
-                       flog_warn(
-                               EC_LIB_NB_CB_CONFIG_APPLY,
-                               "route node %s creation failed",
-                               yang_dnode_get_string(args->dnode, "./prefix"));
-                       return NB_ERR;
-               }
                if (vrf->vrf_id == VRF_UNKNOWN)
                        snprintf(
                                args->errmsg, args->errmsg_len,
@@ -548,7 +486,6 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_de
        struct nb_cb_destroy_args *args)
 {
        struct route_node *rn;
-       struct stable_info *info;
 
        switch (args->event) {
        case NB_EV_VALIDATE:
@@ -557,8 +494,7 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_de
                break;
        case NB_EV_APPLY:
                rn = nb_running_unset_entry(args->dnode);
-               info = route_table_get_info(rn->table);
-               static_del_route(rn, info->safi, info->svrf);
+               static_del_route(rn);
                break;
        }
        return NB_OK;
@@ -577,23 +513,7 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_pa
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_destroy(
        struct nb_cb_destroy_args *args)
 {
-       const struct lyd_node *rn_dnode;
-       struct route_node *rn;
-       struct stable_info *info;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               rn_dnode = yang_dnode_get_parent(args->dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-               static_path_list_destroy(args, rn_dnode, info);
-               break;
-       }
-       return NB_OK;
+       return static_path_list_destroy(args);
 }
 
 /*
@@ -603,24 +523,7 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_pa
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_tag_modify(
        struct nb_cb_modify_args *args)
 {
-       struct stable_info *info;
-       struct route_node *rn;
-       const struct lyd_node *rn_dnode;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_ABORT:
-       case NB_EV_PREPARE:
-               break;
-       case NB_EV_APPLY:
-               rn_dnode = yang_dnode_get_parent(args->dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-               static_path_list_tag_modify(args, rn_dnode, info);
-               break;
-       }
-
-       return NB_OK;
+       return static_path_list_tag_modify(args);
 }
 
 /*
@@ -630,53 +533,13 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_pa
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_create(
        struct nb_cb_create_args *args)
 {
-       struct route_node *rn;
-       const struct lyd_node *rn_dnode;
-       struct stable_info *info;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               rn_dnode = yang_dnode_get_parent(args->dnode, "route-list");
-               if (static_nexthop_create(args, rn_dnode, NULL) != NB_OK)
-                       return NB_ERR_VALIDATION;
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               rn_dnode = yang_dnode_get_parent(args->dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-
-               if (static_nexthop_create(args, rn_dnode, info) != NB_OK)
-                       return NB_ERR_INCONSISTENCY;
-               break;
-       }
-       return NB_OK;
+       return static_nexthop_create(args);
 }
 
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_path_list_frr_nexthops_nexthop_destroy(
        struct nb_cb_destroy_args *args)
 {
-       struct route_node *rn;
-       const struct lyd_node *rn_dnode;
-       struct stable_info *info;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               rn_dnode = yang_dnode_get_parent(args->dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-
-               if (static_nexthop_destroy(args, rn_dnode, info) != NB_OK)
-                       return NB_ERR;
-               break;
-       }
-       return NB_OK;
+       return static_nexthop_destroy(args);
 }
 
 /*
@@ -882,13 +745,6 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_sr
                afi = family2afi(src_prefix.family);
                src_rn =
                        static_add_route(afi, safi, &rn->p, &src_prefix, s_vrf);
-               if (!src_rn) {
-                       flog_warn(EC_LIB_NB_CB_CONFIG_APPLY,
-                                 "src rn %s creation failed",
-                                 yang_dnode_get_string(args->dnode,
-                                                       "./src-prefix"));
-                       return NB_ERR;
-               }
                nb_running_set_entry(args->dnode, src_rn);
                break;
        }
@@ -899,9 +755,6 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_sr
        struct nb_cb_destroy_args *args)
 {
        struct route_node *src_rn;
-       struct route_node *rn;
-       struct stable_info *info;
-       const struct lyd_node *rn_dnode;
 
        switch (args->event) {
        case NB_EV_VALIDATE:
@@ -910,10 +763,7 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_sr
                break;
        case NB_EV_APPLY:
                src_rn = nb_running_unset_entry(args->dnode);
-               rn_dnode = yang_dnode_get_parent(args->dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-               static_del_route(src_rn, info->safi, info->svrf);
+               static_del_route(src_rn);
                break;
        }
 
@@ -933,25 +783,7 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_sr
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_destroy(
        struct nb_cb_destroy_args *args)
 {
-       struct route_node *rn;
-       const struct lyd_node *rn_dnode;
-       const struct lyd_node *srn_dnode;
-       struct stable_info *info;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               srn_dnode = yang_dnode_get_parent(args->dnode, "src-list");
-               rn_dnode = yang_dnode_get_parent(srn_dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-               static_path_list_destroy(args, srn_dnode, info);
-               break;
-       }
-       return NB_OK;
+       return static_path_list_destroy(args);
 }
 
 /*
@@ -961,25 +793,7 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_sr
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_tag_modify(
        struct nb_cb_modify_args *args)
 {
-       struct stable_info *info;
-       struct route_node *rn;
-       const struct lyd_node *srn_dnode;
-       const struct lyd_node *rn_dnode;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_ABORT:
-       case NB_EV_PREPARE:
-               break;
-       case NB_EV_APPLY:
-               srn_dnode = yang_dnode_get_parent(args->dnode, "src-list");
-               rn_dnode = yang_dnode_get_parent(srn_dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-               static_path_list_tag_modify(args, srn_dnode, info);
-               break;
-       }
-       return NB_OK;
+       return static_path_list_tag_modify(args);
 }
 
 /*
@@ -989,58 +803,13 @@ int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_sr
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_create(
        struct nb_cb_create_args *args)
 {
-       struct route_node *rn;
-       const struct lyd_node *rn_dnode;
-       const struct lyd_node *src_dnode;
-       struct stable_info *info;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-               rn_dnode = yang_dnode_get_parent(args->dnode, "route-list");
-               if (static_nexthop_create(args, rn_dnode, NULL) != NB_OK)
-                       return NB_ERR_VALIDATION;
-               break;
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               src_dnode = yang_dnode_get_parent(args->dnode, "src-list");
-               rn_dnode = yang_dnode_get_parent(src_dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-
-               if (static_nexthop_create(args, src_dnode, info) != NB_OK)
-                       return NB_ERR_VALIDATION;
-
-               break;
-       }
-       return NB_OK;
+       return static_nexthop_create(args);
 }
 
 int routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_list_path_list_frr_nexthops_nexthop_destroy(
        struct nb_cb_destroy_args *args)
 {
-       struct route_node *rn;
-       const struct lyd_node *rn_dnode;
-       const struct lyd_node *src_dnode;
-       struct stable_info *info;
-
-       switch (args->event) {
-       case NB_EV_VALIDATE:
-       case NB_EV_PREPARE:
-       case NB_EV_ABORT:
-               break;
-       case NB_EV_APPLY:
-               src_dnode = yang_dnode_get_parent(args->dnode, "src-list");
-               rn_dnode = yang_dnode_get_parent(src_dnode, "route-list");
-               rn = nb_running_get_entry(rn_dnode, NULL, true);
-               info = route_table_get_info(rn->table);
-
-               if (static_nexthop_destroy(args, rn_dnode, info) != NB_OK)
-                       return NB_ERR;
-               break;
-       }
-       return NB_OK;
+       return static_nexthop_destroy(args);
 }
 
 /*
index d42c5c2777fa76006e1eeb836a252c145dd300c9..e1d6ba15d16c645a80bbaa5b00d63e3f83b2c37a 100644 (file)
 #include "static_zebra.h"
 #include "static_nht.h"
 
-static void static_nht_update_path(struct route_node *rn,
-                                  struct static_path *pn, struct prefix *nhp,
+static void static_nht_update_path(struct static_path *pn, struct prefix *nhp,
                                   uint32_t nh_num, vrf_id_t nh_vrf_id,
-                                  struct vrf *vrf, safi_t safi)
+                                  struct vrf *vrf)
 {
        struct static_nexthop *nh;
 
@@ -57,7 +56,7 @@ static void static_nht_update_path(struct route_node *rn,
                        nh->nh_valid = !!nh_num;
 
                if (nh->state == STATIC_START)
-                       static_zebra_route_add(rn, pn, safi, true);
+                       static_zebra_route_add(pn, true);
        }
 }
 
@@ -84,8 +83,8 @@ static void static_nht_update_safi(struct prefix *sp, struct prefix *nhp,
                if (rn && rn->info) {
                        si = static_route_info_from_rnode(rn);
                        frr_each(static_path_list, &si->path_list, pn) {
-                               static_nht_update_path(rn, pn, nhp, nh_num,
-                                                      nh_vrf_id, vrf, safi);
+                               static_nht_update_path(pn, nhp, nh_num,
+                                                      nh_vrf_id, vrf);
                        }
                        route_unlock_node(rn);
                }
@@ -97,8 +96,7 @@ static void static_nht_update_safi(struct prefix *sp, struct prefix *nhp,
                if (!si)
                        continue;
                frr_each(static_path_list, &si->path_list, pn) {
-                       static_nht_update_path(rn, pn, nhp, nh_num, nh_vrf_id,
-                                              vrf, safi);
+                       static_nht_update_path(pn, nhp, nh_num, nh_vrf_id, vrf);
                }
        }
 }
index 58a29ad25b6f379685ae86aee8da40457b3e0569..77a10092f8ad78afe3fbdfc1dd4fc7c26f788c7f 100644 (file)
@@ -98,26 +98,24 @@ void zebra_stable_node_cleanup(struct route_table *table,
 }
 
 /* Install static path into rib. */
-void static_install_path(struct route_node *rn, struct static_path *pn,
-                        safi_t safi, struct static_vrf *svrf)
+void static_install_path(struct static_path *pn)
 {
        struct static_nexthop *nh;
 
        frr_each(static_nexthop_list, &pn->nexthop_list, nh)
-               static_zebra_nht_register(rn, nh, true);
+               static_zebra_nht_register(nh, true);
 
-       if (static_nexthop_list_count(&pn->nexthop_list) && svrf && svrf->vrf)
-               static_zebra_route_add(rn, pn, safi, true);
+       if (static_nexthop_list_count(&pn->nexthop_list))
+               static_zebra_route_add(pn, true);
 }
 
 /* Uninstall static path from RIB. */
-static void static_uninstall_path(struct route_node *rn, struct static_path *pn,
-                                 safi_t safi, struct static_vrf *svrf)
+static void static_uninstall_path(struct static_path *pn)
 {
        if (static_nexthop_list_count(&pn->nexthop_list))
-               static_zebra_route_add(rn, pn, safi, true);
+               static_zebra_route_add(pn, true);
        else
-               static_zebra_route_add(rn, pn, safi, false);
+               static_zebra_route_add(pn, false);
 }
 
 struct route_node *static_add_route(afi_t afi, safi_t safi, struct prefix *p,
@@ -128,14 +126,16 @@ struct route_node *static_add_route(afi_t afi, safi_t safi, struct prefix *p,
        struct static_route_info *si;
        struct route_table *stable = svrf->stable[afi][safi];
 
-       if (!stable)
-               return NULL;
+       assert(stable);
 
        /* Lookup static route prefix. */
        rn = srcdest_rnode_get(stable, p, src_p);
 
        si = XCALLOC(MTYPE_STATIC_ROUTE, sizeof(struct static_route_info));
-       static_route_info_init(si);
+
+       si->svrf = svrf;
+       si->safi = safi;
+       static_path_list_init(&(si->path_list));
 
        rn->info = si;
 
@@ -143,8 +143,7 @@ struct route_node *static_add_route(afi_t afi, safi_t safi, struct prefix *p,
 }
 
 /* To delete the srcnodes */
-static void static_del_src_route(struct route_node *rn, safi_t safi,
-                                struct static_vrf *svrf)
+static void static_del_src_route(struct route_node *rn)
 {
        struct static_path *pn;
        struct static_route_info *si;
@@ -152,15 +151,14 @@ static void static_del_src_route(struct route_node *rn, safi_t safi,
        si = rn->info;
 
        frr_each_safe(static_path_list, &si->path_list, pn) {
-               static_del_path(rn, pn, safi, svrf);
+               static_del_path(pn);
        }
 
        XFREE(MTYPE_STATIC_ROUTE, rn->info);
        route_unlock_node(rn);
 }
 
-void static_del_route(struct route_node *rn, safi_t safi,
-                     struct static_vrf *svrf)
+void static_del_route(struct route_node *rn)
 {
        struct static_path *pn;
        struct static_route_info *si;
@@ -170,7 +168,7 @@ void static_del_route(struct route_node *rn, safi_t safi,
        si = rn->info;
 
        frr_each_safe(static_path_list, &si->path_list, pn) {
-               static_del_path(rn, pn, safi, svrf);
+               static_del_path(pn);
        }
 
        /* clean up for dst table */
@@ -181,7 +179,7 @@ void static_del_route(struct route_node *rn, safi_t safi,
                 */
                for (src_node = route_top(src_table); src_node;
                     src_node = route_next(src_node)) {
-                       static_del_src_route(src_node, safi, svrf);
+                       static_del_src_route(src_node);
                }
        }
        XFREE(MTYPE_STATIC_ROUTE, rn->info);
@@ -228,6 +226,7 @@ struct static_path *static_add_path(struct route_node *rn, uint32_t table_id,
        /* Make new static route structure. */
        pn = XCALLOC(MTYPE_STATIC_PATH, sizeof(struct static_path));
 
+       pn->rn = rn;
        pn->distance = distance;
        pn->table_id = table_id;
        static_nexthop_list_init(&(pn->nexthop_list));
@@ -238,9 +237,9 @@ struct static_path *static_add_path(struct route_node *rn, uint32_t table_id,
        return pn;
 }
 
-void static_del_path(struct route_node *rn, struct static_path *pn, safi_t safi,
-                    struct static_vrf *svrf)
+void static_del_path(struct static_path *pn)
 {
+       struct route_node *rn = pn->rn;
        struct static_route_info *si;
        struct static_nexthop *nh;
 
@@ -249,7 +248,7 @@ void static_del_path(struct route_node *rn, struct static_path *pn, safi_t safi,
        static_path_list_del(&si->path_list, pn);
 
        frr_each_safe(static_nexthop_list, &pn->nexthop_list, nh) {
-               static_delete_nexthop(rn, pn, safi, svrf, nh);
+               static_delete_nexthop(nh);
        }
 
        route_unlock_node(rn);
@@ -257,12 +256,13 @@ void static_del_path(struct route_node *rn, struct static_path *pn, safi_t safi,
        XFREE(MTYPE_STATIC_PATH, pn);
 }
 
-struct static_nexthop *
-static_add_nexthop(struct route_node *rn, struct static_path *pn, safi_t safi,
-                  struct static_vrf *svrf, static_types type,
-                  struct ipaddr *ipaddr, const char *ifname,
-                  const char *nh_vrf, uint32_t color)
+struct static_nexthop *static_add_nexthop(struct static_path *pn,
+                                         static_types type,
+                                         struct ipaddr *ipaddr,
+                                         const char *ifname,
+                                         const char *nh_vrf, uint32_t color)
 {
+       struct route_node *rn = pn->rn;
        struct static_nexthop *nh;
        struct static_vrf *nh_svrf;
        struct interface *ifp;
@@ -275,6 +275,8 @@ static_add_nexthop(struct route_node *rn, struct static_path *pn, safi_t safi,
        /* Make new static route structure. */
        nh = XCALLOC(MTYPE_STATIC_NEXTHOP, sizeof(struct static_nexthop));
 
+       nh->pn = pn;
+
        nh->type = type;
        nh->color = color;
 
@@ -355,11 +357,10 @@ static_add_nexthop(struct route_node *rn, struct static_path *pn, safi_t safi,
        return nh;
 }
 
-void static_install_nexthop(struct route_node *rn, struct static_path *pn,
-                           struct static_nexthop *nh, safi_t safi,
-                           struct static_vrf *svrf, const char *ifname,
-                           static_types type, const char *nh_vrf)
+void static_install_nexthop(struct static_nexthop *nh)
 {
+       struct static_path *pn = nh->pn;
+       struct route_node *rn = pn->rn;
        struct interface *ifp;
 
        if (nh->nh_vrf_id == VRF_UNKNOWN) {
@@ -376,48 +377,47 @@ void static_install_nexthop(struct route_node *rn, struct static_path *pn,
        switch (nh->type) {
        case STATIC_IPV4_GATEWAY:
        case STATIC_IPV6_GATEWAY:
-               if (!static_zebra_nh_update(rn, nh))
-                       static_zebra_nht_register(rn, nh, true);
+               if (!static_zebra_nh_update(nh))
+                       static_zebra_nht_register(nh, true);
                break;
        case STATIC_IPV4_GATEWAY_IFNAME:
        case STATIC_IPV6_GATEWAY_IFNAME:
-               if (!static_zebra_nh_update(rn, nh))
-                       static_zebra_nht_register(rn, nh, true);
+               if (!static_zebra_nh_update(nh))
+                       static_zebra_nht_register(nh, true);
                break;
        case STATIC_BLACKHOLE:
-               static_install_path(rn, pn, safi, svrf);
+               static_install_path(pn);
                break;
        case STATIC_IFNAME:
-               ifp = if_lookup_by_name(ifname, nh->nh_vrf_id);
+               ifp = if_lookup_by_name(nh->ifname, nh->nh_vrf_id);
                if (ifp && ifp->ifindex != IFINDEX_INTERNAL)
-                       static_install_path(rn, pn, safi, svrf);
+                       static_install_path(pn);
 
                break;
        }
 }
 
-int static_delete_nexthop(struct route_node *rn, struct static_path *pn,
-                         safi_t safi, struct static_vrf *svrf,
-                         struct static_nexthop *nh)
+void static_delete_nexthop(struct static_nexthop *nh)
 {
+       struct static_path *pn = nh->pn;
+       struct route_node *rn = pn->rn;
+
        static_nexthop_list_del(&(pn->nexthop_list), nh);
 
        if (nh->nh_vrf_id == VRF_UNKNOWN)
                goto EXIT;
 
-       static_zebra_nht_register(rn, nh, false);
+       static_zebra_nht_register(nh, false);
        /*
         * If we have other si nodes then route replace
         * else delete the route
         */
-       static_uninstall_path(rn, pn, safi, svrf);
+       static_uninstall_path(pn);
 
 EXIT:
        route_unlock_node(rn);
        /* Free static route configuration. */
        XFREE(MTYPE_STATIC_NEXTHOP, nh);
-
-       return 1;
 }
 
 static void static_ifindex_update_nh(struct interface *ifp, bool up,
@@ -442,7 +442,7 @@ static void static_ifindex_update_nh(struct interface *ifp, bool up,
                nh->ifindex = IFINDEX_INTERNAL;
        }
 
-       static_install_path(rn, pn, safi, svrf);
+       static_install_path(pn);
 }
 
 static void static_ifindex_update_af(struct interface *ifp, bool up, afi_t afi,
@@ -521,7 +521,7 @@ static void static_fixup_vrf(struct static_vrf *svrf,
                                                continue;
                                }
 
-                               static_install_path(rn, pn, safi, svrf);
+                               static_install_path(pn);
                        }
                }
        }
@@ -562,7 +562,7 @@ static void static_enable_vrf(struct static_vrf *svrf,
                                }
                                if (nh->nh_vrf_id == VRF_UNKNOWN)
                                        continue;
-                               static_install_path(rn, pn, safi, svrf);
+                               static_install_path(pn);
                        }
                }
        }
@@ -629,7 +629,7 @@ static void static_cleanup_vrf(struct static_vrf *svrf,
                                    != 0)
                                        continue;
 
-                               static_uninstall_path(rn, pn, safi, svrf);
+                               static_uninstall_path(pn);
                        }
                }
        }
@@ -649,18 +649,15 @@ static void static_disable_vrf(struct route_table *stable,
        struct route_node *rn;
        struct static_nexthop *nh;
        struct static_path *pn;
-       struct stable_info *info;
        struct static_route_info *si;
 
-       info = route_table_get_info(stable);
-
        for (rn = route_top(stable); rn; rn = route_next(rn)) {
                si = static_route_info_from_rnode(rn);
                if (!si)
                        continue;
                frr_each(static_path_list, &si->path_list, pn) {
                        frr_each(static_nexthop_list, &pn->nexthop_list, nh) {
-                               static_uninstall_path(rn, pn, safi, info->svrf);
+                               static_uninstall_path(pn);
                        }
                }
        }
@@ -715,13 +712,10 @@ static void static_fixup_intf_nh(struct route_table *stable,
                                 afi_t afi, safi_t safi)
 {
        struct route_node *rn;
-       struct stable_info *info;
        struct static_nexthop *nh;
        struct static_path *pn;
        struct static_route_info *si;
 
-       info = route_table_get_info(stable);
-
        for (rn = route_top(stable); rn; rn = route_next(rn)) {
                si = static_route_info_from_rnode(rn);
                if (!si)
@@ -734,7 +728,7 @@ static void static_fixup_intf_nh(struct route_table *stable,
                                if (nh->ifindex != ifp->ifindex)
                                        continue;
 
-                               static_install_path(rn, pn, safi, info->svrf);
+                               static_install_path(pn);
                        }
                }
        }
@@ -810,12 +804,6 @@ struct stable_info *static_get_stable_info(struct route_node *rn)
        return table->info;
 }
 
-void static_route_info_init(struct static_route_info *si)
-{
-       static_path_list_init(&(si->path_list));
-}
-
-
 void static_get_nh_str(struct static_nexthop *nh, char *nexthop, size_t size)
 {
        switch (nh->type) {
index 1269621cc9dbf05bb4a93217223d5684e9b11812..2211384916a35866f2b6ac94e48c954b54814410 100644 (file)
@@ -81,12 +81,16 @@ PREDECL_DLIST(static_nexthop_list);
 
 /* Static route information */
 struct static_route_info {
+       struct static_vrf *svrf;
+       safi_t safi;
        /* path list */
        struct static_path_list_head path_list;
 };
 
 /* Static path information */
 struct static_path {
+       /* Route node back pointer. */
+       struct route_node *rn;
        /* Linkage for static path lists */
        struct static_path_list_item list;
        /* Administrative distance. */
@@ -103,6 +107,8 @@ DECLARE_DLIST(static_path_list, struct static_path, list);
 
 /* Static route information. */
 struct static_nexthop {
+       /* Path back pointer. */
+       struct static_path *pn;
        /* For linked list. */
        struct static_nexthop_list_item list;
 
@@ -163,19 +169,12 @@ extern struct zebra_privs_t static_privs;
 void static_fixup_vrf_ids(struct static_vrf *svrf);
 
 extern struct static_nexthop *
-static_add_nexthop(struct route_node *rn, struct static_path *pn, safi_t safi,
-                  struct static_vrf *svrf, static_types type,
+static_add_nexthop(struct static_path *pn, static_types type,
                   struct ipaddr *ipaddr, const char *ifname,
                   const char *nh_vrf, uint32_t color);
-extern void static_install_nexthop(struct route_node *rn,
-                                  struct static_path *pn,
-                                  struct static_nexthop *nh, safi_t safi,
-                                  struct static_vrf *svrf, const char *ifname,
-                                  static_types type, const char *nh_vrf);
+extern void static_install_nexthop(struct static_nexthop *nh);
 
-extern int static_delete_nexthop(struct route_node *rn, struct static_path *pn,
-                                safi_t safi, struct static_vrf *svrf,
-                                struct static_nexthop *nh);
+extern void static_delete_nexthop(struct static_nexthop *nh);
 
 extern void static_cleanup_vrf_ids(struct static_vrf *disable_svrf);
 
@@ -183,27 +182,23 @@ extern void static_install_intf_nh(struct interface *ifp);
 
 extern void static_ifindex_update(struct interface *ifp, bool up);
 
-extern void static_install_path(struct route_node *rn, struct static_path *pn,
-                               safi_t safi, struct static_vrf *svrf);
+extern void static_install_path(struct static_path *pn);
 
 extern struct route_node *static_add_route(afi_t afi, safi_t safi,
                                           struct prefix *p,
                                           struct prefix_ipv6 *src_p,
                                           struct static_vrf *svrf);
-extern void static_del_route(struct route_node *rn, safi_t safi,
-                            struct static_vrf *svrf);
+extern void static_del_route(struct route_node *rn);
 
 extern struct static_path *static_add_path(struct route_node *rn,
                                           uint32_t table_id, uint8_t distance);
-extern void static_del_path(struct route_node *rn, struct static_path *pn,
-                           safi_t safi, struct static_vrf *svrf);
+extern void static_del_path(struct static_path *pn);
 
 extern void static_get_nh_type(static_types stype, char *type, size_t size);
 extern bool static_add_nexthop_validate(const char *nh_vrf_name,
                                        static_types type,
                                        struct ipaddr *ipaddr);
 extern struct stable_info *static_get_stable_info(struct route_node *rn);
-extern void static_route_info_init(struct static_route_info *si);
 
 extern void zebra_stable_node_cleanup(struct route_table *table,
                                      struct route_node *node);
index 96e5d37d68d91221c4e4e904c337fa50b4bb43b3..740d90469089d0801c19b503992394567f637920 100644 (file)
@@ -164,7 +164,7 @@ static int static_vrf_config_write(struct vty *vty)
                              SAFI_UNICAST, "ipv6 route");
 
                if (vrf->vrf_id != VRF_DEFAULT)
-                       vty_endframe(vty, " exit-vrf\n!\n");
+                       vty_endframe(vty, "exit-vrf\n!\n");
        }
 
        return 0;
@@ -175,7 +175,7 @@ void static_vrf_init(void)
        vrf_init(static_vrf_new, static_vrf_enable,
                 static_vrf_disable, static_vrf_delete, NULL);
 
-       vrf_cmd_init(static_vrf_config_write, &static_privs);
+       vrf_cmd_init(static_vrf_config_write);
 }
 
 void static_vrf_terminate(void)
index ea09054a2347408aed04dd139e4926175b286073..f16b40a23f0ce07ce05c979d22c1d8575274a29e 100644 (file)
@@ -325,7 +325,8 @@ static int static_route_leak(struct vty *vty, const char *svrf,
 
                dnode = yang_dnode_get(vty->candidate_config->dnode, ab_xpath);
                if (!dnode) {
-                       /* Silently return */
+                       vty_out(vty,
+                               "%% Refusing to remove a non-existent route\n");
                        return CMD_SUCCESS;
                }
 
index 40275908f7fb0f0537d61e08d48e9a9e3d3b55ff..452b5c42a4c6e49fb6009b7e8c83dfdc8b118103 100644 (file)
@@ -261,9 +261,10 @@ static void static_nht_hash_free(void *data)
        XFREE(MTYPE_TMP, nhtd);
 }
 
-void static_zebra_nht_register(struct route_node *rn, struct static_nexthop *nh,
-                              bool reg)
+void static_zebra_nht_register(struct static_nexthop *nh, bool reg)
 {
+       struct static_path *pn = nh->pn;
+       struct route_node *rn = pn->rn;
        struct static_nht_data *nhtd, lookup;
        uint32_t cmd;
        struct prefix p;
@@ -339,8 +340,10 @@ void static_zebra_nht_register(struct route_node *rn, struct static_nexthop *nh,
  * When nexthop gets updated via configuration then use the
  * already registered NH and resend the route to zebra
  */
-int static_zebra_nh_update(struct route_node *rn, struct static_nexthop *nh)
+int static_zebra_nh_update(struct static_nexthop *nh)
 {
+       struct static_path *pn = nh->pn;
+       struct route_node *rn = pn->rn;
        struct static_nht_data *nhtd, lookup = {};
        struct prefix p = {};
        afi_t afi = AFI_IP;
@@ -381,25 +384,23 @@ int static_zebra_nh_update(struct route_node *rn, struct static_nexthop *nh)
        return 0;
 }
 
-extern void static_zebra_route_add(struct route_node *rn,
-                                  struct static_path *pn, safi_t safi,
-                                  bool install)
+extern void static_zebra_route_add(struct static_path *pn, bool install)
 {
+       struct route_node *rn = pn->rn;
+       struct static_route_info *si = rn->info;
        struct static_nexthop *nh;
        const struct prefix *p, *src_pp;
        struct zapi_nexthop *api_nh;
        struct zapi_route api;
        uint32_t nh_num = 0;
-       struct stable_info *info;
 
        p = src_pp = NULL;
        srcdest_rnode_prefixes(rn, &p, &src_pp);
 
        memset(&api, 0, sizeof(api));
-       info = static_get_stable_info(rn);
-       api.vrf_id = GET_STABLE_VRF_ID(info);
+       api.vrf_id = si->svrf->vrf->vrf_id;
        api.type = ZEBRA_ROUTE_STATIC;
-       api.safi = safi;
+       api.safi = si->safi;
        memcpy(&api.prefix, p, sizeof(api.prefix));
 
        if (src_pp) {
index ca6308559e2e88b34b6de7893059f3d78092a571..e30fa3fd57164fff1b9cdb7650de9575973b2819 100644 (file)
@@ -25,19 +25,15 @@ extern "C" {
 
 extern struct thread_master *master;
 
-extern void static_zebra_nht_register(struct route_node *rn,
-                                     struct static_nexthop *nh, bool reg);
+extern void static_zebra_nht_register(struct static_nexthop *nh, bool reg);
 
-extern void static_zebra_route_add(struct route_node *rn,
-                                  struct static_path *pn, safi_t safi,
-                                  bool install);
+extern void static_zebra_route_add(struct static_path *pn, bool install);
 extern void static_zebra_init(void);
 /* static_zebra_stop used by tests/lib/test_grpc.cpp */
 extern void static_zebra_stop(void);
 extern void static_zebra_vrf_register(struct vrf *vrf);
 extern void static_zebra_vrf_unregister(struct vrf *vrf);
-extern int static_zebra_nh_update(struct route_node *rn,
-                                 struct static_nexthop *nh);
+extern int static_zebra_nh_update(struct static_nexthop *nh);
 
 #ifdef __cplusplus
 }
index 3fad1b081320e3f96e87394a7d87a4783496c6b3..498d7dd0b7810a1b7185c82d0e03504b74dbd866 100644 (file)
@@ -36,6 +36,7 @@
 /lib/test_nexthop
 /lib/test_nexthop_iter
 /lib/test_ntop
+/lib/test_plist
 /lib/test_prefix2str
 /lib/test_printfrr
 /lib/test_privs
index dc6d8268b167edcb7aa456bb9db93159e8e9fc14..317bfff8ab55782828714d5f66283f74356c27d3 100644 (file)
@@ -121,7 +121,7 @@ static void parse_test(struct test_segment *t)
 
        printf("%s: %s\n", t->name, t->desc);
 
-       ecom = ecommunity_parse((uint8_t *)t->data, t->len);
+       ecom = ecommunity_parse((uint8_t *)t->data, t->len, 0);
 
        printf("ecom: %s\nvalidating...:\n", ecommunity_str(ecom));
 
index 45e9912a31d48641badacbdf3b66edb0d26d48f0..b168be21c39375260e711b2668e5c949fa1a626f 100644 (file)
@@ -30,9 +30,6 @@
 #include "bgpd/bgp_vty.h"
 #include "bgpd/bgp_zebra.h"
 #include "bgpd/bgp_network.h"
-#include "lib/routing_nb.h"
-#include "lib/northbound_cli.h"
-#include "bgpd/bgp_nb.h"
 
 #ifdef ENABLE_BGP_VNC
 #include "bgpd/rfapi/rfapi_backend.h"
@@ -777,10 +774,6 @@ static void test_execute(struct test *test, const char *fmt, ...)
 
        /* Execute command (non-strict). */
        ret = cmd_execute_command(vline, test->vty, NULL, 0);
-       if (ret == CMD_SUCCESS) {
-               /* Commit any pending changes, irnore error */
-               ret = nb_cli_pending_commit_check(test->vty);
-       }
        if (ret != CMD_SUCCESS) {
                test->state = TEST_COMMAND_ERROR;
                test->error = str_printf(
@@ -939,7 +932,7 @@ static struct test *test_new(const char *desc, bool use_ibgp,
 
        test->vty = vty_new();
        test->vty->type = VTY_TERM;
-       vty_config_enter(test->vty, true, false);
+       test->vty->node = CONFIG_NODE;
 
        test_initialize(test);
 
@@ -1385,15 +1378,6 @@ static void test_peer_attr(struct test *test, struct test_peer_attr *pa)
        test_process(test, pa, p, g->conf, true, false);
 }
 
-static const struct frr_yang_module_info *const bgpd_yang_modules[] = {
-       &frr_bgp_info,
-       &frr_filter_info,
-       &frr_interface_info,
-       &frr_route_map_info,
-       &frr_routing_info,
-       &frr_vrf_info,
-};
-
 static void bgp_startup(void)
 {
        cmd_init(1);
@@ -1402,7 +1386,7 @@ static void bgp_startup(void)
        zprivs_init(&bgpd_privs);
 
        master = thread_master_create(NULL);
-       nb_init(master, bgpd_yang_modules, array_size(bgpd_yang_modules), false);
+       nb_init(master, NULL, 0, false);
        bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE, list_new());
        bgp_option_set(BGP_OPT_NO_LISTEN);
        vrf_init(NULL, NULL, NULL, NULL, NULL);
index 244922ea4ed8793928d5a3b590ef98ac41cff365..cc95c4a132e60be2f119c8988937a0273e603992 100644 (file)
@@ -23,15 +23,15 @@ static void test_lsp_build_list_nonzero_ht(void)
        struct lspdb_head _lspdb, *lspdb = &_lspdb;
        lsp_db_init(&_lspdb);
 
-       struct isis_lsp *lsp1 = lsp_new(area, lsp_id1, 6000, 0, 0, 0, NULL,
-                                       ISIS_LEVEL2);
+       struct isis_lsp *lsp1 =
+               lsp_new(area, lsp_id1, 6000, 1, 0, 0, NULL, ISIS_LEVEL2);
 
-       lsp_insert(lspdb, lsp1);
+       lspdb_add(lspdb, lsp1);
 
-       struct isis_lsp *lsp2 = lsp_new(area, lsp_id2, 6000, 0, 0, 0, NULL,
-                                       ISIS_LEVEL2);
+       struct isis_lsp *lsp2 =
+               lsp_new(area, lsp_id2, 6000, 1, 0, 0, NULL, ISIS_LEVEL2);
 
-       lsp_insert(lspdb, lsp2);
+       lspdb_add(lspdb, lsp2);
 
        struct list *list = list_new();
 
index 49bc0f4fb23abbf72bfff23167428d3731683b86..8be81cc4cb1ece3d326f85c17548cabda1019829 100644 (file)
@@ -59,10 +59,13 @@ static void vty_do_exit(int isexit)
                exit(0);
 }
 
+const struct frr_yang_module_info *const *test_yang_modules = NULL;
+
 /* main routine. */
 int main(int argc, char **argv)
 {
        struct thread thread;
+       size_t yangcount;
 
        /* Set umask before anything for security */
        umask(0027);
@@ -79,7 +82,11 @@ int main(int argc, char **argv)
 
        vty_init(master, false);
        lib_cmd_init();
-       nb_init(master, NULL, 0, false);
+
+       for (yangcount = 0; test_yang_modules && test_yang_modules[yangcount];
+            yangcount++)
+               ;
+       nb_init(master, test_yang_modules, yangcount, false);
 
        test_init(argc, argv);
 
index 15abe3b855905c745fd9ef492f0f095e6d8132aa..3042ff5b12696320f1415434ad22bf25ffa6aa7c 100644 (file)
@@ -25,6 +25,9 @@
 #include "zebra.h"
 #include "vty.h"
 #include "command.h"
+#include "northbound.h"
+
+extern const struct frr_yang_module_info *const *test_yang_modules;
 
 /* function to be implemented by test */
 extern void test_init(int argc, char **argv);
index 8f9959cc47ded6ded34e46cc1c8dc62d42a11370..1f38e08b209ee19e2a9c54f2f2c0e4262fa25c83 100644 (file)
@@ -315,7 +315,6 @@ domainname test.domain
 !\r
 !\r
 !\r
-line vty\r
 !\r
 end\r
 test# conf t\r
@@ -332,7 +331,6 @@ domainname test.domain
 !\r
 !\r
 !\r
-line vty\r
 !\r
 end\r
 foohost(config)# 
index e9ebc29bd9f16c1ce608bb45b6ffbef454b86a60..6361c960a771a0f13bc66c7013702b19fbc2bcab 100644 (file)
@@ -1 +1,54 @@
-a = a + b
+
+-- Positive testing
+
+function foo(a, b)
+  a = a + 1
+  b = b + 1
+  return {
+    a = a,
+    b = b,
+  }
+end
+
+function bar(a, b)
+  a = a + 1
+  b = b + 1
+  c = 303
+  return {
+    b = b,
+    c = c,
+  }
+end
+
+function fact(n)
+  -- outer function must return a table
+  -- inner functions can be used to recurse or as helpers
+  function helper(m)
+    if m == 0 then
+      return 1
+    else
+      return m * helper(m - 1)
+    end
+  end
+  return {
+    ans = helper(n)
+  }
+end
+
+-- Negative testing
+
+function bad_return1()
+end
+
+function bad_return2()
+  return 123
+end
+
+function bad_return3()
+  return {}
+end
+
+function bad_return4()
+  error("Something bad!")
+end
+
index bd75cc5552ec6c55e5c5693ef3b146f9aa1b62e0..4c5d8d29289e6df47720ae1f4284e0d1df63fe4f 100644 (file)
 #include <zebra.h>
 
 #include "lib/frrscript.h"
+#include "lib/frrlua.h"
 
 int main(int argc, char **argv)
 {
        frrscript_init("./lib");
+       struct frrscript *fs = frrscript_new("script1");
+       int result;
+
+       /* Positive testing */
 
-       struct frrscript *fs = frrscript_load("script1", NULL);
        long long a = 100, b = 200;
-       int result = frrscript_call(fs, ("a", &a), ("b", &b));
 
+       result = frrscript_load(fs, "foo", NULL);
+       assert(result == 0);
+       result = frrscript_call(fs, "foo", ("a", &a), ("b", &b));
+       assert(result == 0);
+       assert(a == 101);
+       assert(b == 201);
+
+       a = 100, b = 200;
+
+       result = frrscript_load(fs, "bar", NULL);
+       assert(result == 0);
+       result = frrscript_call(fs, "bar", ("a", &a), ("b", &b));
+       assert(result == 0);
+       long long *cptr = frrscript_get_result(fs, "bar", "c", lua_tointegerp);
+
+       /* a should not occur in the returned table in script */
+       assert(a == 100);
+       assert(b == 201);
+       assert(*cptr == 303);
+       XFREE(MTYPE_SCRIPT_RES, cptr);
+
+       long long n = 5;
+
+       result = frrscript_load(fs, "fact", NULL);
+       assert(result == 0);
+       result = frrscript_call(fs, "fact", ("n", &n));
        assert(result == 0);
-       assert(a == 300);
-       assert(b == 200);
+       long long *ansptr =
+               frrscript_get_result(fs, "fact", "ans", lua_tointegerp);
+       assert(*ansptr == 120);
+
+       /* check consecutive call + get_result without re-loading */
+       n = 4;
+       result = frrscript_call(fs, "fact", ("n", &n));
+       assert(result == 0);
+       ansptr = frrscript_get_result(fs, "fact", "ans", lua_tointegerp);
+       assert(*ansptr == 24);
+
+       XFREE(MTYPE_SCRIPT_RES, ansptr);
+
+       /* Negative testing */
+
+       /* Function does not exist in script file*/
+       result = frrscript_load(fs, "does_not_exist", NULL);
+       assert(result == 1);
+
+       /* Function was not (successfully) loaded */
+       result = frrscript_call(fs, "does_not_exist", ("a", &a), ("b", &b));
+       assert(result == 1);
+
+       /* Get result from a function that was not loaded */
+       long long *llptr =
+               frrscript_get_result(fs, "does_not_exist", "c", lua_tointegerp);
+       assert(llptr == NULL);
+
+       /* Function returns void */
+       result = frrscript_call(fs, "bad_return1");
+       assert(result == 1);
+
+       /* Function returns number */
+       result = frrscript_call(fs, "bad_return2");
+       assert(result == 1);
+
+       /* Get non-existent result from a function */
+       result = frrscript_call(fs, "bad_return3");
+       assert(result == 1);
+       long long *cllptr =
+               frrscript_get_result(fs, "bad_return3", "c", lua_tointegerp);
+       assert(cllptr == NULL);
+
+       /* Function throws exception */
+       result = frrscript_call(fs, "bad_return4");
+       assert(result == 1);
+
+       frrscript_delete(fs);
 
        return 0;
 }
diff --git a/tests/lib/test_plist.c b/tests/lib/test_plist.c
new file mode 100644 (file)
index 0000000..ee7a9eb
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Simple prefix list querying tool
+ *
+ * Copyright (C) 2021 by David Lamparter,
+ *                   for Open Source Routing / NetDEF, Inc.
+ *
+ * Quagga is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2, or (at your option) any
+ * later version.
+ *
+ * Quagga is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <zebra.h>
+
+#include "lib/plist.h"
+#include "lib/filter.h"
+#include "tests/lib/cli/common_cli.h"
+
+static const struct frr_yang_module_info *const my_yang_modules[] = {
+       &frr_filter_info,
+       NULL,
+};
+
+__attribute__((_CONSTRUCTOR(2000)))
+static void test_yang_modules_set(void)
+{
+       test_yang_modules = my_yang_modules;
+}
+
+void test_init(int argc, char **argv)
+{
+       prefix_list_init();
+       filter_cli_init();
+
+       /* nothing else to do here, giving stand-alone access to the prefix
+        * list code's "debug prefix-list ..." command is the only purpose of
+        * this "test".
+        */
+}
index c2153140f5403e2c3db29518599de7f0066ba64c..b0be63c69545f88876a59cf79377e5e7476a9b4c 100644 (file)
@@ -35,8 +35,10 @@ if OSPFD
 TESTS_OSPFD = \
        tests/ospfd/test_ospf_spf \
        # end
+IGNORE_OSPFD =
 else
 TESTS_OSPFD =
+IGNORE_OSPFD = --ignore=ospfd/
 endif
 
 if OSPF6D
@@ -87,6 +89,7 @@ check_PROGRAMS = \
        tests/lib/test_nexthop_iter \
        tests/lib/test_nexthop \
        tests/lib/test_ntop \
+       tests/lib/test_plist \
        tests/lib/test_prefix2str \
        tests/lib/test_printfrr \
        tests/lib/test_privs \
@@ -221,19 +224,6 @@ tests_bgpd_test_peer_attr_CFLAGS = $(TESTS_CFLAGS)
 tests_bgpd_test_peer_attr_CPPFLAGS = $(TESTS_CPPFLAGS)
 tests_bgpd_test_peer_attr_LDADD = $(BGP_TEST_LDADD)
 tests_bgpd_test_peer_attr_SOURCES = tests/bgpd/test_peer_attr.c
-nodist_tests_bgpd_test_peer_attr_SOURCES = \
-    yang/frr-bgp-types.yang.c \
-    yang/frr-bgp.yang.c \
-    yang/frr-bgp-common-structure.yang.c \
-    yang/frr-bgp-common.yang.c \
-    yang/frr-bgp-common-multiprotocol.yang.c \
-    yang/frr-bgp-neighbor.yang.c \
-    yang/frr-bgp-peer-group.yang.c \
-    yang/frr-bgp-bmp.yang.c \
-    yang/frr-bgp-rpki.yang.c \
-    yang/frr-deviations-bgp-datacenter.yang.c \
-    # end
-
 
 tests_isisd_test_fuzz_isis_tlv_CFLAGS = $(TESTS_CFLAGS) -I$(top_builddir)/tests/isisd
 tests_isisd_test_fuzz_isis_tlv_CPPFLAGS = $(TESTS_CPPFLAGS) -I$(top_builddir)/tests/isisd
@@ -344,6 +334,10 @@ tests_lib_test_ntop_CFLAGS = $(TESTS_CFLAGS)
 tests_lib_test_ntop_CPPFLAGS = $(CPPFLAGS_BASE) # no assert override
 tests_lib_test_ntop_LDADD = # none
 tests_lib_test_ntop_SOURCES = tests/lib/test_ntop.c tests/helpers/c/prng.c
+tests_lib_test_plist_CFLAGS = $(TESTS_CFLAGS)
+tests_lib_test_plist_CPPFLAGS = $(TESTS_CPPFLAGS)
+tests_lib_test_plist_LDADD = $(ALL_TESTS_LDADD)
+tests_lib_test_plist_SOURCES = tests/lib/test_plist.c tests/lib/cli/common_cli.c
 tests_lib_test_prefix2str_CFLAGS = $(TESTS_CFLAGS)
 tests_lib_test_prefix2str_CPPFLAGS = $(TESTS_CPPFLAGS)
 tests_lib_test_prefix2str_LDADD = $(ALL_TESTS_LDADD)
@@ -494,7 +488,7 @@ endif
 
 .PHONY: tests/tests.xml
 tests/tests.xml: $(check_PROGRAMS)
-       ( cd tests; $(PYTHON) ../$(srcdir)/tests/runtests.py --junitxml=tests.xml -v ../$(srcdir)/tests $(IGNORE_BGPD) $(IGNORE_ISISD) $(IGNORE_OSPF6D); )
+       ( cd tests; $(PYTHON) ../$(srcdir)/tests/runtests.py --junitxml=tests.xml -v ../$(srcdir)/tests $(IGNORE_BGPD) $(IGNORE_ISISD) $(IGNORE_OSPFD) $(IGNORE_OSPF6D); )
 check: tests/tests.xml
 
 clean-local: clean-tests
index 48a729ce19444b6c9f9f7584f8b6f1dde120ac3d..524e2c94304937a5375b62156413444f1659a521 100644 (file)
@@ -1,4 +1,5 @@
 interface r2-eth2
+ ipv6 ospf6 area 0.0.0.1
  ipv6 ospf6 bfd
  ipv6 ospf6 hello-interval 2
  ipv6 ospf6 dead-interval 10
@@ -7,5 +8,4 @@ router ospf6
  ospf6 router-id 10.254.254.2
  redistribute connected
  redistribute bgp
- interface r2-eth2 area 0.0.0.1
 !
index 57f7f6c079b56da74f5ce4b89198131d76e9e366..2f38c51c3582852d85405b3d27beb5cca87e19a1 100644 (file)
@@ -1,4 +1,5 @@
 interface r4-eth0
+ ipv6 ospf6 area 0.0.0.1
  ipv6 ospf6 bfd
  ipv6 ospf6 hello-interval 2
  ipv6 ospf6 dead-interval 10
@@ -6,5 +7,4 @@ interface r4-eth0
 router ospf6
  ospf6 router-id 10.254.254.4
  redistribute connected
- interface r4-eth0 area 0.0.0.1
 !
index e85b2644ddb4062ef43c2c32582011792171b540..2cc12bc7b07b3a54330f2444e09d96be50301d4b 100644 (file)
@@ -80,33 +80,28 @@ def setup_module(mod):
 
     router_list = tgen.routers()
     for rname, router in router_list.items():
-        router.load_config(
-            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
-        )
-        router.load_config(
-            TopoRouter.RD_BFD, os.path.join(CWD, "{}/bfdd.conf".format(rname))
-        )
-        router.load_config(
-            TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname))
-        )
-        router.load_config(
-            TopoRouter.RD_OSPF, os.path.join(CWD, "{}/ospfd.conf".format(rname))
-        )
-        router.load_config(
-            TopoRouter.RD_OSPF6, os.path.join(CWD, "{}/ospf6d.conf".format(rname))
-        )
+        daemon_file = "{}/{}/zebra.conf".format(CWD, rname)
+        router.load_config(TopoRouter.RD_ZEBRA, daemon_file)
+
+        daemon_file = "{}/{}/bfdd.conf".format(CWD, rname)
+        if os.path.isfile(daemon_file):
+            router.load_config(TopoRouter.RD_BFD, daemon_file)
+
+        daemon_file = "{}/{}/bgpd.conf".format(CWD, rname)
+        if os.path.isfile(daemon_file):
+            router.load_config(TopoRouter.RD_BGP, daemon_file)
+
+        daemon_file = "{}/{}/ospfd.conf".format(CWD, rname)
+        if os.path.isfile(daemon_file):
+            router.load_config(TopoRouter.RD_OSPF, daemon_file)
+
+        daemon_file = "{}/{}/ospf6d.conf".format(CWD, rname)
+        if os.path.isfile(daemon_file):
+            router.load_config(TopoRouter.RD_OSPF6, daemon_file)
 
     # Initialize all routers.
     tgen.start_router()
 
-    # Verify that we are using the proper version and that the BFD
-    # daemon exists.
-    for router in router_list.values():
-        # Check for Version
-        if router.has_version("<", "5.1"):
-            tgen.set_error("Unsupported FRR version")
-            break
-
 
 def teardown_module(_mod):
     "Teardown the pytest environment"
@@ -135,7 +130,7 @@ def test_protocols_convergence():
         test_func = partial(
             topotest.router_json_cmp, router, "show ip route json", expected
         )
-        _, result = topotest.run_and_expect(test_func, None, count=160, wait=0.5)
+        _, result = topotest.run_and_expect(test_func, None, count=40, wait=2)
         assertmsg = '"{}" JSON output mismatches'.format(router.name)
         assert result is None, assertmsg
 
@@ -151,7 +146,7 @@ def test_protocols_convergence():
         test_func = partial(
             topotest.router_json_cmp, router, "show ipv6 route json", expected
         )
-        _, result = topotest.run_and_expect(test_func, None, count=160, wait=0.5)
+        _, result = topotest.run_and_expect(test_func, None, count=40, wait=2)
         assertmsg = '"{}" JSON output mismatches'.format(router.name)
         assert result is None, assertmsg
 
index 5e736a7fcc26244391e81c07be2b87627b076d8a..fd57b2c4d53a6cc9b12693f59386e7cd57e51a91 100644 (file)
@@ -4,7 +4,7 @@ debug bfd peer
 debug bfd zebra
 !
 bfd
- peer 192.168.0.2 vrf r1-cust1
+ peer 192.168.0.2 vrf r1-bfd-cust1
   echo-mode
   no shutdown
  !
index 5bb45b9863cb749d9689c46de362fe60a8ad8ae3..cf72f30d661fa639183772ca5246a9296debdde1 100644 (file)
@@ -1,4 +1,4 @@
-router bgp 101 vrf r1-cust1
+router bgp 101 vrf r1-bfd-cust1
  no bgp ebgp-requires-policy
  no bgp network import-check
  neighbor 192.168.0.2 remote-as 102
index fcd1e7db17762a02cb24f67bd8dbe4377be2a9b6..62ed36fdb8b5549f78ebdd4f17d10e5137c5240b 100644 (file)
@@ -1,3 +1,3 @@
-interface r1-eth0 vrf r1-cust1
+interface r1-eth0 vrf r1-bfd-cust1
  ip address 192.168.0.1/24
 !
index 94f502c7d9ddb61f5dc9851d910ad2ffbed14d19..e5539f14e5c7e2fa6b6e7c723d2f9e6f7c50e66e 100644 (file)
@@ -4,13 +4,13 @@ debug bfd peer
 debug bfd zebra
 !
 bfd
- peer 192.168.0.1 vrf r2-cust1
+ peer 192.168.0.1 vrf r2-bfd-cust1
   receive-interval 1000
   transmit-interval 500
   echo-mode
   no shutdown
  !
- peer 192.168.1.1 vrf r2-cust1
+ peer 192.168.1.1 vrf r2-bfd-cust1
   echo-mode
   no shutdown
  !
index b2aac74685d4612407cc333ac2c52a78788c27e1..132011cf869ab6214ed00ec4262007bf45c04b05 100644 (file)
@@ -1,4 +1,4 @@
-router bgp 102 vrf r2-cust1
+router bgp 102 vrf r2-bfd-cust1
  no bgp ebgp-requires-policy
  no bgp network import-check
  neighbor 192.168.0.1 remote-as 101
index daffd1912e82cc757c7c1ad0bb3ab9a37662d449..1e817b19f6c8b70c972b7fa54e88e7180189dc4c 100644 (file)
@@ -1,9 +1,9 @@
-interface r2-eth0 vrf r2-cust1
+interface r2-eth0 vrf r2-bfd-cust1
  ip address 192.168.0.2/24
 !
-interface r2-eth1 vrf r2-cust1
+interface r2-eth1 vrf r2-bfd-cust1
  ip address 192.168.1.2/24
 !
-interface r2-eth2 vrf r2-cust1
+interface r2-eth2 vrf r2-bfd-cust1
  ip address 192.168.2.2/24
 !
index 76910ac927782a53d6954302b80d7f78637919df..e1f53e1abc66bd64532879c0c83725b56004a3da 100644 (file)
@@ -4,7 +4,7 @@ debug bfd peer
 debug bfd zebra
 !
 bfd
- peer 192.168.1.2 vrf r3-cust1
+ peer 192.168.1.2 vrf r3-bfd-cust1
   echo-interval 100
   echo-mode
   no shutdown
index 1d7c7303952a4a5aca356efd48e7d76814d51873..f7646479205bebaf679c2a0fcd430e1852ee2cf5 100644 (file)
@@ -1,4 +1,4 @@
-router bgp 103 vrf r3-cust1
+router bgp 103 vrf r3-bfd-cust1
  no bgp ebgp-requires-policy
  no bgp network import-check
  neighbor 192.168.1.2 remote-as 102
index f727c2d633c11b57e11e60a0e4ece6ea3bc15966..e67345948eeb465aaee818a3ab248475a1dd377d 100644 (file)
@@ -1,3 +1,3 @@
-interface r3-eth0 vrf r3-cust1
+interface r3-eth0 vrf r3-bfd-cust1
  ip address 192.168.1.1/24
 !
index 63d0da7805fdeb664d2db0a323aa087b2e71ac09..9ef2023b21e79154614f4f92bfc4c8af29af9256 100644 (file)
@@ -4,7 +4,7 @@ debug bfd peer
 debug bfd zebra
 !
 bfd
- peer 192.168.2.2 vrf r4-cust1
+ peer 192.168.2.2 vrf r4-bfd-cust1
   transmit-interval 2000
   receive-interval 2000
   no shutdown
index f34035d460fa13348692add6203e879f27b38744..03353e45e31bdd558dd1f1519be93fbf312911e0 100644 (file)
@@ -1,4 +1,4 @@
-router bgp 104 vrf r4-cust1
+router bgp 104 vrf r4-bfd-cust1
  no bgp ebgp-requires-policy
  no bgp network import-check
  neighbor 192.168.2.2 remote-as 102
index 69770dd2bf79f5c9237473d0066fe9ab3f9077a5..15d3ec1d9064c20165cbae07bdc558253f29aba9 100644 (file)
@@ -1,3 +1,3 @@
-interface r4-eth0 vrf r4-cust1
+interface r4-eth0 vrf r4-bfd-cust1
  ip address 192.168.2.1/24
 !
index 8a1ffe085d9cd5038c635866ba45d98e946e2be3..a342997912b9bfb3dd9312b548aebb190f46c950 100644 (file)
@@ -95,20 +95,18 @@ def setup_module(mod):
     logger.info("Testing with VRF Namespace support")
 
     cmds = [
-        "if [ -e /var/run/netns/{0}-cust1 ] ; then ip netns del {0}-cust1 ; fi",
-        "ip netns add {0}-cust1",
-        "ip link set dev {0}-eth0 netns {0}-cust1",
-        "ip netns exec {0}-cust1 ifconfig {0}-eth0 up",
+        "if [ -e /var/run/netns/{0}-bfd-cust1 ] ; then ip netns del {0}-bfd-cust1 ; fi",
+        "ip netns add {0}-bfd-cust1",
+        "ip link set dev {0}-eth0 netns {0}-bfd-cust1 up",
     ]
     cmds2 = [
-        "ip link set dev {0}-eth1 netns {0}-cust1",
-        "ip netns exec {0}-cust1 ifconfig {0}-eth1 up",
-        "ip link set dev {0}-eth2 netns {0}-cust1",
-        "ip netns exec {0}-cust1 ifconfig {0}-eth2 up",
+        "ip link set dev {0}-eth1 netns {0}-bfd-cust1",
+        "ip netns exec {0}-bfd-cust1 ip link set {0}-eth1 up",
+        "ip link set dev {0}-eth2 netns {0}-bfd-cust1 up",
     ]
 
     for rname, router in router_list.items():
-        # create VRF rx-cust1 and link rx-eth0 to rx-cust1
+        # create VRF rx-bfd-cust1 and link rx-eth0 to rx-bfd-cust1
         for cmd in cmds:
             output = tgen.net[rname].cmd(cmd.format(rname))
         if rname == "r2":
@@ -138,11 +136,11 @@ def teardown_module(_mod):
     # move back rx-eth0 to default VRF
     # delete rx-vrf
     cmds = [
-        "ip netns exec {0}-cust1 ip link set {0}-eth0 netns 1",
-        "ip netns delete {0}-cust1",
+        "ip netns exec {0}-bfd-cust1 ip link set {0}-eth0 netns 1",
+        "ip netns delete {0}-bfd-cust1",
     ]
     cmds2 = [
-        "ip netns exec {0}-cust1 ip link set {0}-eth1 netns 1",
+        "ip netns exec {0}-bfd-cust1 ip link set {0}-eth1 netns 1",
         "ip netns exec {0}-cust2 ip link set {0}-eth1 netns 1",
     ]
 
@@ -189,7 +187,7 @@ def test_bgp_convergence():
         test_func = partial(
             topotest.router_json_cmp,
             router,
-            "show ip bgp vrf {}-cust1 summary json".format(router.name),
+            "show ip bgp vrf {}-bfd-cust1 summary json".format(router.name),
             expected,
         )
         _, res = topotest.run_and_expect(test_func, None, count=125, wait=1.0)
@@ -211,7 +209,7 @@ def test_bgp_fast_convergence():
         test_func = partial(
             topotest.router_json_cmp,
             router,
-            "show ip bgp vrf {}-cust1 json".format(router.name),
+            "show ip bgp vrf {}-bfd-cust1 json".format(router.name),
             expected,
         )
         _, res = topotest.run_and_expect(test_func, None, count=40, wait=1)
@@ -231,7 +229,7 @@ def test_bfd_fast_convergence():
     # Disable r2-eth0 link
     router2 = tgen.gears["r2"]
     topotest.interface_set_status(
-        router2, "r2-eth0", ifaceaction=False, vrf_name="r2-cust1"
+        router2, "r2-eth0", ifaceaction=False, vrf_name="r2-bfd-cust1"
     )
 
     # Wait the minimum time we can before checking that BGP/BFD
@@ -286,7 +284,7 @@ def test_bgp_fast_reconvergence():
         test_func = partial(
             topotest.router_json_cmp,
             router,
-            "show ip bgp vrf {}-cust1 json".format(router.name),
+            "show ip bgp vrf {}-bfd-cust1 json".format(router.name),
             expected,
         )
         _, res = topotest.run_and_expect(test_func, None, count=16, wait=1)
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_base.json
deleted file mode 100644 (file)
index 2eeebad..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-{
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:101:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "ipLen":32,
-          "ip":"50.0.1.11",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:101:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "ipLen":128,
-          "ip":"50:0:1::11",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:101:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:62",
-          "weight":0,
-          "peerId":"10.0.1.2",
-          "path":"102",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:102:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.1]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.1]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.1",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:101:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.2]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.2",
-          "weight":0,
-          "peerId":"10.0.1.2",
-          "path":"102",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:102:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  }
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_no_rt2.json
deleted file mode 100644 (file)
index 419bcc3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]": null,
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]": null,
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]": null,
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]": null,
-  "[3]:[0]:[32]:[10.100.0.1]": null,
-  "[3]:[0]:[32]:[10.100.0.2]": null
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vni_routes_no_rt5.json
deleted file mode 100644 (file)
index 2eeebad..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-{
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:101:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "ipLen":32,
-          "ip":"50.0.1.11",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:101:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "ipLen":128,
-          "ip":"50:0:1::11",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:101:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:62",
-          "weight":0,
-          "peerId":"10.0.1.2",
-          "path":"102",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:102:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.1]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.1]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.1",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:101:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.2]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.2",
-          "weight":0,
-          "peerId":"10.0.1.2",
-          "path":"102",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:102:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  }
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_base.json
deleted file mode 100644 (file)
index 833f986..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.1",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100.0.0.21/32": [
-  {
-    "valid":true,
-    "bestpath":true,
-    "pathFrom":"external",
-    "prefix":"100.0.0.21",
-    "prefixLen":32,
-    "network":"100.0.0.21\/32",
-    "metric":0,
-    "weight":0,
-    "peerId":"50.0.1.11",
-    "path":"111",
-    "origin":"IGP",
-    "nexthops":[
-      {
-        "ip":"50.0.1.11",
-        "afi":"ipv4",
-        "used":true
-      }
-    ]
-  }
-] }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_no_rt2.json
deleted file mode 100644 (file)
index 833f986..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.1",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100.0.0.21/32": [
-  {
-    "valid":true,
-    "bestpath":true,
-    "pathFrom":"external",
-    "prefix":"100.0.0.21",
-    "prefixLen":32,
-    "network":"100.0.0.21\/32",
-    "metric":0,
-    "weight":0,
-    "peerId":"50.0.1.11",
-    "path":"111",
-    "origin":"IGP",
-    "nexthops":[
-      {
-        "ip":"50.0.1.11",
-        "afi":"ipv4",
-        "used":true
-      }
-    ]
-  }
-] }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv4_no_rt5.json
deleted file mode 100644 (file)
index 4a292bd..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.1",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100.0.0.21/32": null }  }
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_base.json
deleted file mode 100644 (file)
index 3dc3fcf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.1",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100::21/128": [
-  {
-    "valid":true,
-    "bestpath":true,
-    "pathFrom":"external",
-    "prefix":"100::21",
-    "prefixLen":128,
-    "network":"100::21\/128",
-    "metric":0,
-    "weight":0,
-    "peerId":"50:0:1::11",
-    "path":"111",
-    "origin":"IGP",
-    "nexthops":[
-      {
-        "ip":"50:0:1::11",
-        "afi":"ipv6",
-        "scope":"global"
-      }
-    ]
-  }
-] }  }
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_no_rt2.json
deleted file mode 100644 (file)
index 3dc3fcf..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.1",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100::21/128": [
-  {
-    "valid":true,
-    "bestpath":true,
-    "pathFrom":"external",
-    "prefix":"100::21",
-    "prefixLen":128,
-    "network":"100::21\/128",
-    "metric":0,
-    "weight":0,
-    "peerId":"50:0:1::11",
-    "path":"111",
-    "origin":"IGP",
-    "nexthops":[
-      {
-        "ip":"50:0:1::11",
-        "afi":"ipv6",
-        "scope":"global"
-      }
-    ]
-  }
-] }  }
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgp_vrf_ipv6_no_rt5.json
deleted file mode 100644 (file)
index 6c11d89..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.1",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100::21/128": null }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgpd.conf b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/bgpd.conf
deleted file mode 100644 (file)
index 63aa99a..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-router bgp 101
- bgp router-id 10.100.0.1
- no bgp ebgp-requires-policy
- no bgp network import-check
- neighbor 10.0.1.2 remote-as 102
- !
- address-family l2vpn evpn
-  neighbor 10.0.1.2 activate
-  advertise-all-vni
- exit-address-family
-!
-router bgp 101 vrf vrf-blue
- bgp router-id 10.100.0.1
- no bgp ebgp-requires-policy
- no bgp network import-check
- neighbor 50.0.1.11 remote-as 111
- neighbor 50:0:1::11 remote-as 111
- !
- address-family ipv4 unicast
-  no neighbor 50:0:1::11 activate
- exit-address-family
- !
- address-family ipv6 unicast
-  neighbor 50:0:1::11 activate
- exit-address-family
- !
- address-family l2vpn evpn
-  advertise ipv4 unicast gateway-ip
-  advertise ipv6 unicast gateway-ip
- exit-address-family
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra.conf b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra.conf
deleted file mode 100644 (file)
index 99a2e89..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-!
-log file zebra.log
-!
-ip route 10.100.0.2/32 10.0.1.2
-!
-vrf vrf-blue
- vni 1000 prefix-routes-only
- exit-vrf
-!
-interface lo
- ip address 10.100.0.1/32
-interface PE1-eth0
- ip address 10.0.1.1/24
-!
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_base.json
deleted file mode 100644 (file)
index 2dcf35d..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "50.0.1.0\/24":[
-    {
-      "prefix":"50.0.1.0\/24",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100.0.0.21\/32":[
-    {
-      "prefix":"100.0.0.21\/32",
-      "protocol":"bgp",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":20,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "ip":"50.0.1.11",
-          "afi":"ipv4",
-          "interfaceName":"br100",
-          "active":true,
-          "weight":1
-        }
-      ]
-    }
-  ]
-}
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_no_rt2.json
deleted file mode 100644 (file)
index 2dcf35d..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "50.0.1.0\/24":[
-    {
-      "prefix":"50.0.1.0\/24",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100.0.0.21\/32":[
-    {
-      "prefix":"100.0.0.21\/32",
-      "protocol":"bgp",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":20,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "ip":"50.0.1.11",
-          "afi":"ipv4",
-          "interfaceName":"br100",
-          "active":true,
-          "weight":1
-        }
-      ]
-    }
-  ]
-}
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv4_no_rt5.json
deleted file mode 100644 (file)
index 9c3091d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "50.0.1.0\/24":[
-    {
-      "prefix":"50.0.1.0\/24",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100.0.0.21\/32": null
-}
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_base.json
deleted file mode 100644 (file)
index 229c927..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-{
-  "50:0:1::\/48":[
-    {
-      "prefix":"50:0:1::\/48",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100::21\/128":[
-    {
-      "prefix":"100::21\/128",
-      "protocol":"bgp",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":20,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "afi":"ipv6",
-          "interfaceName":"br100",
-          "active":true,
-          "weight":1
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_no_rt2.json
deleted file mode 100644 (file)
index 229c927..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-{
-  "50:0:1::\/48":[
-    {
-      "prefix":"50:0:1::\/48",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100::21\/128":[
-    {
-      "prefix":"100::21\/128",
-      "protocol":"bgp",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":20,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "afi":"ipv6",
-          "interfaceName":"br100",
-          "active":true,
-          "weight":1
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE1/zebra_vrf_ipv6_no_rt5.json
deleted file mode 100644 (file)
index 94f82e6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "50:0:1::\/48":[
-    {
-      "prefix":"50:0:1::\/48",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100::21\/128": null
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_base.json
deleted file mode 100644 (file)
index 7b8d38e..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-{
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "weight":0,
-          "peerId":"10.0.1.1",
-          "path":"101",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:101:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "ipLen":32,
-          "ip":"50.0.1.11",
-          "weight":0,
-          "peerId":"10.0.1.1",
-          "path":"101",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:101:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "ipLen":128,
-          "ip":"50:0:1::11",
-          "weight":0,
-          "peerId":"10.0.1.1",
-          "path":"101",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:101:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:62",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:102:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.1]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.1]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.1",
-          "weight":0,
-          "peerId":"10.0.1.1",
-          "path":"101",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:101:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.2]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.2",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:102:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  }
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_no_rt2.json
deleted file mode 100644 (file)
index 6273b3e..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-{
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]": null,
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]": null,
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]": null,
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:62",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:102:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.1]": null,
-  "[3]:[0]:[32]:[10.100.0.2]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.2",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:102:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  }
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vni_routes_no_rt5.json
deleted file mode 100644 (file)
index 7b8d38e..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-{
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "weight":0,
-          "peerId":"10.0.1.1",
-          "path":"101",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:101:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "ipLen":32,
-          "ip":"50.0.1.11",
-          "weight":0,
-          "peerId":"10.0.1.1",
-          "path":"101",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:101:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:61",
-          "ipLen":128,
-          "ip":"50:0:1::11",
-          "weight":0,
-          "peerId":"10.0.1.1",
-          "path":"101",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:101:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
-    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":2,
-          "ethTag":0,
-          "macLen":48,
-          "mac":"1a:2b:3c:4d:5e:62",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:102:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.1]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.1]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.1",
-          "weight":0,
-          "peerId":"10.0.1.1",
-          "path":"101",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"RT:101:100 ET:8"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.1",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  },
-  "[3]:[0]:[32]:[10.100.0.2]":{
-    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
-    "prefixLen":320,
-    "paths":[
-      [
-        {
-          "valid":true,
-          "bestpath":true,
-          "pathFrom":"external",
-          "routeType":3,
-          "ethTag":0,
-          "ipLen":32,
-          "ip":"10.100.0.2",
-          "weight":32768,
-          "peerId":"(unspec)",
-          "path":"",
-          "origin":"IGP",
-          "extendedCommunity":{
-            "string":"ET:8 RT:102:100"
-          },
-          "nexthops":[
-            {
-              "ip":"10.100.0.2",
-              "afi":"ipv4",
-              "used":true
-            }
-          ]
-        }
-      ]
-    ]
-  }
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_base.json
deleted file mode 100644 (file)
index c03d701..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.2",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100.0.0.21/32": [
-  {
-    "valid":true,
-    "bestpath":true,
-    "pathFrom":"external",
-    "prefix":"100.0.0.21",
-    "prefixLen":32,
-    "network":"100.0.0.21\/32",
-    "metric":0,
-    "weight":0,
-    "peerId":"10.0.1.1",
-    "path":"101 111",
-    "origin":"IGP",
-    "nexthops":[
-      {
-        "ip":"50.0.1.11",
-        "afi":"ipv4",
-        "used":true
-      }
-    ]
-  }
-] }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_no_rt2.json
deleted file mode 100644 (file)
index 7f1b8d2..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.2",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100.0.0.21/32": [
-  {
-    "valid":null,
-    "bestpath":null,
-    "pathFrom":"external",
-    "prefix":"100.0.0.21",
-    "prefixLen":32,
-    "network":"100.0.0.21\/32",
-    "metric":0,
-    "weight":0,
-    "peerId":"10.0.1.1",
-    "path":"101 111",
-    "origin":"IGP",
-    "nexthops":[
-      {
-        "ip":"50.0.1.11",
-        "afi":"ipv4",
-        "used":true
-      }
-    ]
-  }
-] }  }
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv4_no_rt5.json
deleted file mode 100644 (file)
index 52e4311..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.2",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100.0.0.21/32": null }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_base.json
deleted file mode 100644 (file)
index 1d90c9c..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.2",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100::21/128": [
-  {
-    "valid":true,
-    "bestpath":true,
-    "pathFrom":"external",
-    "prefix":"100::21",
-    "prefixLen":128,
-    "network":"100::21\/128",
-    "metric":0,
-    "weight":0,
-    "peerId":"10.0.1.1",
-    "path":"101 111",
-    "origin":"IGP",
-    "nexthops":[
-      {
-        "ip":"50:0:1::11",
-        "afi":"ipv6",
-        "scope":"global",
-        "used":true
-      }
-    ]
-  }
-] }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_no_rt2.json
deleted file mode 100644 (file)
index a0e63c6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.2",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100::21/128": [
-  {
-    "valid":null,
-    "bestpath":null,
-    "pathFrom":"external",
-    "prefix":"100::21",
-    "prefixLen":128,
-    "network":"100::21\/128",
-    "metric":0,
-    "weight":0,
-    "peerId":"10.0.1.1",
-    "path":"101 111",
-    "origin":"IGP",
-    "nexthops":[
-      {
-        "ip":"50:0:1::11",
-        "afi":"ipv6",
-        "scope":"global",
-        "used":true
-      }
-    ]
-  }
-] }  }
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgp_vrf_ipv6_no_rt5.json
deleted file mode 100644 (file)
index 789fe69..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "vrfName": "vrf-blue",
- "routerId": "10.100.0.2",
- "defaultLocPrf": 100,
- "localAS": 101,
- "routes": { "100::21/128": null }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgpd.conf b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/bgpd.conf
deleted file mode 100644 (file)
index 59fee15..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-router bgp 102
- bgp router-id 10.100.0.2
- no bgp ebgp-requires-policy
- no bgp network import-check
- neighbor 10.0.1.1 remote-as 101
- !
- address-family l2vpn evpn
-  neighbor 10.0.1.1 activate
-  advertise-all-vni
-  enable-resolve-overlay-index
- exit-address-family
-!
-router bgp 101 vrf vrf-blue
- bgp router-id 10.100.0.2
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra.conf b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra.conf
deleted file mode 100644 (file)
index b78cdcc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-!
-log file zebra.log
-!
-ip route 10.100.0.1/32 10.0.1.1
-!
-vrf vrf-blue
- vni 1000 prefix-routes-only
- exit-vrf
-!
-interface lo
- ip address 10.100.0.2/32
-interface  PE2-eth0
- ip address 10.0.1.2/24
-!
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_base.json
deleted file mode 100644 (file)
index b3a3640..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "50.0.1.0\/24":[
-    {
-      "prefix":"50.0.1.0\/24",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100.0.0.21\/32":[
-    {
-      "prefix":"100.0.0.21\/32",
-      "protocol":"bgp",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":20,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":40,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "ip":"50.0.1.11",
-          "afi":"ipv4",
-          "interfaceName":"br100",
-          "active":true,
-          "weight":1
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_no_rt2.json
deleted file mode 100644 (file)
index 996fe52..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "50.0.1.0\/24":[
-    {
-      "prefix":"50.0.1.0\/24",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-   "100.0.0.21\/32": null
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv4_no_rt5.json
deleted file mode 100644 (file)
index 996fe52..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "50.0.1.0\/24":[
-    {
-      "prefix":"50.0.1.0\/24",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-   "100.0.0.21\/32": null
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_base.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_base.json
deleted file mode 100644 (file)
index d5be22a..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-{
-  "50:0:1::\/48":[
-    {
-      "prefix":"50:0:1::\/48",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100::21\/128":[
-    {
-      "prefix":"100::21\/128",
-      "protocol":"bgp",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":20,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":40,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "ip":"50:0:1::11",
-          "afi":"ipv6",
-          "interfaceName":"br100",
-          "active":true,
-          "weight":1
-        }
-      ]
-    }
-  ]
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_no_rt2.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_no_rt2.json
deleted file mode 100644 (file)
index 94f82e6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "50:0:1::\/48":[
-    {
-      "prefix":"50:0:1::\/48",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100::21\/128": null
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_no_rt5.json b/tests/topotests/bgp-evpn-overlay-index-gateway/PE2/zebra_vrf_ipv6_no_rt5.json
deleted file mode 100644 (file)
index 94f82e6..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-  "50:0:1::\/48":[
-    {
-      "prefix":"50:0:1::\/48",
-      "protocol":"connected",
-      "vrfName":"vrf-blue",
-      "selected":true,
-      "destSelected":true,
-      "distance":0,
-      "metric":0,
-      "installed":true,
-      "table":10,
-      "internalStatus":16,
-      "internalFlags":8,
-      "internalNextHopNum":1,
-      "internalNextHopActiveNum":1,
-      "nexthops":[
-        {
-          "flags":3,
-          "fib":true,
-          "directlyConnected":true,
-          "interfaceName":"br100",
-          "active":true
-        }
-      ]
-    }
-  ],
-  "100::21\/128": null
-}
\ No newline at end of file
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/__init__.py b/tests/topotests/bgp-evpn-overlay-index-gateway/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/host1/bgpd.conf b/tests/topotests/bgp-evpn-overlay-index-gateway/host1/bgpd.conf
deleted file mode 100644 (file)
index 7608ec9..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-router bgp 111
- bgp router-id 10.100.0.11
- no bgp ebgp-requires-policy
- no bgp network import-check
- neighbor 50.0.1.1 remote-as 101
- neighbor 50:0:1::1 remote-as 101
- !
- address-family ipv4 unicast
-  network 100.0.0.21/32
-  no neighbor 50:0:1::1 activate
- exit-address-family
- !
- address-family ipv6 unicast
-  network 100::21/128
-  neighbor 50:0:1::1 activate
- exit-address-family
-
-
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/host1/zebra.conf b/tests/topotests/bgp-evpn-overlay-index-gateway/host1/zebra.conf
deleted file mode 100644 (file)
index c8c832e..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-!
-int host1-eth0
- ip address 50.0.1.11/24
- ipv6 address 50:0:1::11/48
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/host2/bgpd.conf b/tests/topotests/bgp-evpn-overlay-index-gateway/host2/bgpd.conf
deleted file mode 100644 (file)
index cdf4cb4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-!
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/host2/zebra.conf b/tests/topotests/bgp-evpn-overlay-index-gateway/host2/zebra.conf
deleted file mode 100644 (file)
index 9135545..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-!
-int host1-eth0
- ip address 50.0.1.21/24
- ipv6 address 50:0:1::21/48
diff --git a/tests/topotests/bgp-evpn-overlay-index-gateway/test_bgp_evpn_overlay_index_gateway.py b/tests/topotests/bgp-evpn-overlay-index-gateway/test_bgp_evpn_overlay_index_gateway.py
deleted file mode 100755 (executable)
index fbce280..0000000
+++ /dev/null
@@ -1,385 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2020 by VMware, Inc. ("VMware")
-# Used Copyright (c) 2018 by Network Device Education Foundation, Inc. ("NetDEF")
-# in this file.
-#
-# Permission to use, copy, modify, and/or distribute this software
-# for any purpose with or without fee is hereby granted, provided
-# that the above copyright notice and this permission notice appear
-# in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
-# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-#
-
-"""
-test_bgp_evpn_overlay_index_gateway.py: Test EVPN gateway IP overlay index functionality
-Following functionality is covered:
-
-         +--------+ BGP     +--------+ BGP  +--------+      +--------+
-    SN1  |        | IPv4/v6 |        | EVPN |        |      |        |
-   ======+ Host1  +---------+   PE1  +------+   PE2  +------+  Host2 +
-         |        |         |        |      |        |      |        |
-         +--------+         +--------+      +--------+      +--------+
-
-    Host1 is connected to PE1 and host2 is connected to PE2
-    Host1 and PE1 have IPv4/v6 BGP sessions.
-    PE1 and PE2 gave EVPN session.
-    Host1 advertises IPv4/v6 prefixes to PE1.
-    PE1 advertises these prefixes to PE2 as EVPN type-5 routes.
-    Gateway IP for these EVPN type-5 routes is host1 IP.
-    Host1 MAC/IP is advertised by PE1 as EVPN type-2 route
-
-Following testcases are covered:
-TC_1:
-Check BGP and zebra states for above topology at PE1 and PE2.
-
-TC_2:
-Stop advertising prefixes from host1. It should withdraw type-5 routes. Check states at PE1 and PE2
-Advertise the prefixes again. Check states.
-
-TC_3:
-Shut down VxLAN interface at PE1. This should withdraw type-2 routes. Check states at PE1 and PE2.
-Enable VxLAN interface again. Check states.
-"""
-
-import os
-import sys
-import json
-from functools import partial
-import pytest
-import time
-import platform
-
-#Current Working Directory
-CWD = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(CWD, "../"))
-
-# pylint: disable=C0413
-# Import topogen and topotest helpers
-from lib import topotest
-from lib.topogen import Topogen, TopoRouter, get_topogen
-from lib.topolog import logger
-from lib.common_config import (
-    step,
-    write_test_header,
-    write_test_footer,
-    generate_support_bundle,
-)
-
-# Required to instantiate the topology builder class.
-from mininet.topo import Topo
-
-#Global variables
-PES = ['PE1', 'PE2']
-HOSTS = ['host1', 'host2']
-PE_SUFFIX = {'PE1': '1', 'PE2': '2'}
-HOST_SUFFIX = {'host1': '1', 'host2': '2'}
-TRIGGERS = ["base", "no_rt5", "no_rt2"]
-
-
-class TemplateTopo(Topo):
-    """Test topology builder"""
-
-    def build(self, *_args, **_opts):
-        """Build function"""
-        tgen = get_topogen(self)
-
-        # This function only purpose is to define allocation and relationship
-        # between routers and add links.
-
-        # Create routers
-        for pe in PES:
-            tgen.add_router(pe)
-        for host in HOSTS:
-            tgen.add_router(host)
-
-        krel = platform.release()
-        logger.info('Kernel version ' + krel)
-
-        #Add links
-        tgen.add_link(tgen.gears['PE1'], tgen.gears['PE2'], 'PE1-eth0', 'PE2-eth0')
-        tgen.add_link(tgen.gears['PE1'], tgen.gears['host1'], 'PE1-eth1', 'host1-eth0')
-        tgen.add_link(tgen.gears['PE2'], tgen.gears['host2'], 'PE2-eth1', 'host2-eth0')
-
-
-def setup_module(mod):
-    "Sets up the pytest environment"
-
-    testsuite_run_time = time.asctime(time.localtime(time.time()))
-    logger.info("Testsuite start time: {}".format(testsuite_run_time))
-    logger.info("=" * 40)
-
-    logger.info("Running setup_module to create topology")
-
-    # This function initiates the topology build with Topogen...
-    tgen = Topogen(TemplateTopo, mod.__name__)
-    # ... and here it calls Mininet initialization functions.
-
-    kernelv = platform.release()
-    if topotest.version_cmp(kernelv, "4.15") < 0:
-        logger.info("For EVPN, kernel version should be minimum 4.15. Kernel present {}".format(kernelv))
-        return
-
-    if topotest.version_cmp(kernelv, '4.15') == 0:
-        l3mdev_accept = 1
-        logger.info('setting net.ipv4.tcp_l3mdev_accept={}'.format(l3mdev_accept))
-    else:
-        l3mdev_accept = 0
-
-    # Starting topology, create tmp files which are loaded to routers
-    #  to start deamons and then start routers
-    tgen.start_topology()
-
-    # Configure MAC address for hosts as these MACs are advertised with EVPN type-2 routes
-    for (name, host) in tgen.gears.items():
-        if name not in HOSTS:
-            continue
-
-        host_mac = "1a:2b:3c:4d:5e:6{}".format(HOST_SUFFIX[name])
-        host.run("ip link set dev {}-eth0 down").format(name)
-        host.run("ip link set dev {0}-eth0 address {1}".format(name, host_mac))
-        host.run("ip link set dev {}-eth0 up").format(name)
-
-    # Configure PE VxLAN and Bridge interfaces
-    for (name, pe) in tgen.gears.items():
-        if name not in PES:
-            continue
-        vtep_ip = "10.100.0.{}".format(PE_SUFFIX[name])
-        bridge_ip = "50.0.1.{}/24".format(PE_SUFFIX[name])
-        bridge_ipv6 = "50:0:1::{}/48".format(PE_SUFFIX[name])
-
-        pe.run("ip link add vrf-blue type vrf table 10")
-        pe.run("ip link set dev vrf-blue up")
-        pe.run("ip link add vxlan100 type vxlan id 100 dstport 4789 local {}".format(vtep_ip))
-        pe.run("ip link add name br100 type bridge stp_state 0")
-        pe.run("ip link set dev vxlan100 master br100")
-        pe.run("ip link set dev {}-eth1 master br100".format(name))
-        pe.run("ip addr add {} dev br100".format(bridge_ip))
-        pe.run("ip link set up dev br100")
-        pe.run("ip link set up dev vxlan100")
-        pe.run("ip link set up dev {}-eth1".format(name))
-        pe.run("ip link set dev br100 master vrf-blue")
-        pe.run("ip -6 addr add {} dev br100".format(bridge_ipv6))
-
-        pe.run("ip link add vxlan1000 type vxlan id 1000 dstport 4789 local {}".format(vtep_ip))
-        pe.run("ip link add name br1000 type bridge stp_state 0")
-        pe.run("ip link set dev vxlan1000 master br100")
-        pe.run("ip link set up dev br1000")
-        pe.run("ip link set up dev vxlan1000")
-        pe.run("ip link set dev br1000 master vrf-blue")
-
-        pe.run("sysctl -w net.ipv4.ip_forward=1")
-        pe.run("sysctl -w net.ipv6.conf.all.forwarding=1")
-        pe.run("sysctl -w net.ipv4.udp_l3mdev_accept={}".format(l3mdev_accept))
-        pe.run("sysctl -w net.ipv4.tcp_l3mdev_accept={}".format(l3mdev_accept))
-
-    # For all registred routers, load the zebra configuration file
-    for (name, router) in tgen.routers().items():
-        router.load_config(
-            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(name))
-        )
-        router.load_config(
-            TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(name))
-        )
-
-    # After loading the configurations, this function loads configured daemons.
-    tgen.start_router()
-
-    logger.info("Running setup_module() done")
-    topotest.sleep(200)
-
-
-def teardown_module(mod):
-    """Teardown the pytest environment"""
-
-    logger.info("Running teardown_module to delete topology")
-
-    tgen = get_topogen()
-
-    # Stop toplogy and Remove tmp files
-    tgen.stop_topology()
-
-    logger.info(
-        "Testsuite end time: {}".format(time.asctime(time.localtime(time.time())))
-    )
-    logger.info("=" * 40)
-
-
-def evpn_gateway_ip_show_op_check(trigger=" "):
-    """
-    This function checks CLI O/P for commands mentioned in show_commands for a given trigger
-    :param trigger: Should be a trigger present in TRIGGERS
-    :return: Returns a tuple (result: None for success, retmsg: Log message to be printed on failure)
-    """
-    tgen = get_topogen()
-
-    if trigger not in TRIGGERS:
-        return "Unexpected trigger", "Unexpected trigger {}".format(trigger)
-
-    show_commands = {'bgp_vni_routes': 'show bgp l2vpn evpn route vni 100 json',
-                     'bgp_vrf_ipv4'  : 'show bgp vrf vrf-blue ipv4 json',
-                     'bgp_vrf_ipv6'  : 'show bgp vrf vrf-blue ipv6 json',
-                     'zebra_vrf_ipv4': 'show ip route vrf vrf-blue json',
-                     'zebra_vrf_ipv6': 'show ipv6 route vrf vrf-blue json'}
-
-    for (name, pe) in tgen.gears.items():
-        if name not in PES:
-            continue
-
-        for (cmd_key, command) in show_commands.items():
-            expected_op_file = "{0}/{1}/{2}_{3}.json".format(CWD, name, cmd_key, trigger)
-            expected_op = json.loads(open(expected_op_file).read())
-
-            test_func = partial(topotest.router_json_cmp, pe, command, expected_op)
-            ret, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
-            assertmsg = '"{0}" JSON output mismatch for {1}'.format(name, command)
-            if result is not None:
-                return result, assertmsg
-
-    return None, "Pass"
-
-
-def test_evpn_gateway_ip_basic_topo(request):
-    """
-    Tets EVPN overlay index gateway IP functionality. VErify show O/Ps on PE1 and PE2
-    """
-
-    tgen = get_topogen()
-    tc_name = request.node.name
-    write_test_header(tc_name)
-
-    kernelv = platform.release()
-    if topotest.version_cmp(kernelv, "4.15") < 0:
-        logger.info("For EVPN, kernel version should be minimum 4.15")
-        write_test_footer(tc_name)
-        return
-
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    step("Check O/Ps for EVPN gateway IP overlay Index functionality at PE1 and PE2")
-
-    result, assertmsg = evpn_gateway_ip_show_op_check("base")
-
-    if result is not None:
-        generate_support_bundle()
-    assert result is None, assertmsg
-
-    write_test_footer(tc_name)
-
-
-def test_evpn_gateway_ip_flap_rt5(request):
-    """
-    Withdraw EVPN type-5 routes and check O/Ps at PE1 and PE2
-    """
-    tgen = get_topogen()
-    tc_name = request.node.name
-    write_test_header(tc_name)
-
-    kernelv = platform.release()
-    if topotest.version_cmp(kernelv, "4.15") < 0:
-        logger.info("For EVPN, kernel version should be minimum 4.15")
-        write_test_footer(tc_name)
-        return
-
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    h1 = tgen.gears['host1']
-
-    step("Withdraw type-5 routes")
-
-    h1.run('vtysh  -c "config t" \
-                   -c "router bgp 111" \
-                   -c "address-family ipv4" \
-                   -c "no network 100.0.0.21/32"')
-    h1.run('vtysh  -c "config t" \
-                   -c "router bgp 111" \
-                   -c "address-family ipv6" \
-                   -c "no network 100::21/128"')
-
-    result, assertmsg = evpn_gateway_ip_show_op_check("no_rt5")
-    if result is not None:
-        generate_support_bundle()
-    assert result is None, assertmsg
-
-    step("Advertise type-5 routes again")
-
-    h1.run('vtysh  -c "config t" \
-                   -c "router bgp 111" \
-                   -c "address-family ipv4" \
-                   -c "network 100.0.0.21/32"')
-    h1.run('vtysh  -c "config t" \
-                   -c "router bgp 111" \
-                   -c "address-family ipv6" \
-                   -c "network 100::21/128"')
-
-    result, assertmsg = evpn_gateway_ip_show_op_check("base")
-    if result is not None:
-        generate_support_bundle()
-
-    assert result is None, assertmsg
-
-    write_test_footer(tc_name)
-
-
-def test_evpn_gateway_ip_flap_rt2(request):
-    """
-     Withdraw EVPN type-2 routes and check O/Ps at PE1 and PE2
-     """
-    tgen = get_topogen()
-    tc_name = request.node.name
-    write_test_header(tc_name)
-
-    kernelv = platform.release()
-    if topotest.version_cmp(kernelv, "4.15") < 0:
-        logger.info("For EVPN, kernel version should be minimum 4.15")
-        write_test_footer(tc_name)
-        return
-
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-
-    step("Shut down VxLAN interface at PE1 which results in withdraw of type-2 routes")
-
-    pe1 = tgen.gears['PE1']
-
-    pe1.run('ip link set dev vxlan100 down')
-
-    result, assertmsg = evpn_gateway_ip_show_op_check("no_rt2")
-    if result is not None:
-        generate_support_bundle()
-    assert result is None, assertmsg
-
-    step("Bring up VxLAN interface at PE1 and advertise type-2 routes again")
-
-    pe1.run('ip link set dev vxlan100 up')
-
-    result, assertmsg = evpn_gateway_ip_show_op_check("base")
-    if result is not None:
-        generate_support_bundle()
-    assert result is None, assertmsg
-
-    write_test_footer(tc_name)
-
-
-def test_memory_leak():
-    """Run the memory leak test and report results"""
-    tgen = get_topogen()
-    if not tgen.is_memleak_enabled():
-        pytest.skip("Memory leak test/report is disabled")
-
-    tgen.report_memory_leaks()
-
-if __name__ == "__main__":
-    args = ["-s"] + sys.argv[1:]
-    sys.exit(pytest.main(args))
index 089b1acb1c888e1fe5b175e6589396365db40d97..9f269782594ef7bcead61b4ba971a349c2190033 100644 (file)
@@ -42,6 +42,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class BgpAggregateAddressTopo1(Topo):
     def build(self, *_args, **_opts):
index 374cce21f61bc463f347dc1512482e579fbc89bd..3623e89dcbb5ca66f3660da8da6527d1834cc03f 100644 (file)
@@ -208,6 +208,9 @@ def test_modify_and_delete_router_id(request):
     tc_name = request.node.name
     write_test_header(tc_name)
 
+    # Creating configuration from JSON
+    reset_config_on_routers(tgen)
+
     # Modify router id
     input_dict = {
         "r1": {"bgp": {"router_id": "12.12.12.12"}},
@@ -252,6 +255,9 @@ def test_bgp_config_with_4byte_as_number(request):
     tc_name = request.node.name
     write_test_header(tc_name)
 
+    # Creating configuration from JSON
+    reset_config_on_routers(tgen)
+
     input_dict = {
         "r1": {"bgp": {"local_as": 131079}},
         "r2": {"bgp": {"local_as": 131079}},
@@ -283,6 +289,9 @@ def test_BGP_config_with_invalid_ASN_p2(request):
     tc_name = request.node.name
     write_test_header(tc_name)
 
+    # Creating configuration from JSON
+    reset_config_on_routers(tgen)
+
     # Api call to modify AS number
     input_dict = {
         "r1": {
@@ -307,11 +316,18 @@ def test_BGP_config_with_invalid_ASN_p2(request):
         },
     }
     result = modify_as_number(tgen, topo, input_dict)
-    try:
-        assert result is True
-    except AssertionError:
-        logger.info("Expected behaviour: {}".format(result))
-        logger.info("BGP config is not created because of invalid ASNs")
+    assert result is not True, (
+        "Expected BGP config is not created because of invalid ASNs: {}".format(
+            result
+        )
+    )
+
+    # Creating configuration from JSON
+    reset_config_on_routers(tgen)
+
+    result = verify_bgp_convergence(tgen, topo)
+    if result != True:
+        assert False, "Testcase " + tc_name + " :Failed \n Error: {}".format(result)
 
     write_test_footer(tc_name)
 
@@ -331,6 +347,13 @@ def test_BGP_config_with_2byteAS_and_4byteAS_number_p1(request):
     tc_name = request.node.name
     write_test_header(tc_name)
 
+    # Creating configuration from JSON
+    reset_config_on_routers(tgen)
+
+    result = verify_bgp_convergence(tgen, topo)
+    if result != True:
+        assert False, "Testcase " + tc_name + " :Failed \n Error: {}".format(result)
+
     # Api call to modify AS number
     input_dict = {
         "r1": {"bgp": {"local_as": 131079}},
@@ -586,7 +609,8 @@ def test_BGP_attributes_with_vrf_default_keyword_p0(request):
     if tgen.routers_have_failure():
         pytest.skip(tgen.errors)
 
-    # reset_config_on_routers(tgen)
+    # Creating configuration from JSON
+    reset_config_on_routers(tgen)
 
     step("Configure static routes and redistribute in BGP on R3")
     for addr_type in ADDR_TYPES:
@@ -774,9 +798,9 @@ def test_BGP_attributes_with_vrf_default_keyword_p0(request):
         }
 
         result = verify_bgp_rib(tgen, addr_type, dut, input_dict)
-        assert result is True, "Testcase  : Failed \n Error: {}".format(tc_name, result)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
         result = verify_rib(tgen, addr_type, dut, input_dict)
-        assert result is True, "Testcase  : Failed \n Error: {}".format(tc_name, result)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
 
     for addr_type in ADDR_TYPES:
         dut = "r4"
@@ -793,9 +817,9 @@ def test_BGP_attributes_with_vrf_default_keyword_p0(request):
         }
 
         result = verify_bgp_rib(tgen, addr_type, dut, input_dict)
-        assert result is True, "Testcase  : Failed \n Error: {}".format(tc_name, result)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
         result = verify_rib(tgen, addr_type, dut, input_dict)
-        assert result is True, "Testcase  : Failed \n Error: {}".format(tc_name, result)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
 
         input_dict_4 = {"largeCommunity": "500:500:500", "community": "500:500"}
 
@@ -1134,12 +1158,7 @@ def test_bgp_with_loopback_with_same_subnet_p1(request):
     dut = "r1"
     protocol = "bgp"
     for addr_type in ADDR_TYPES:
-        result = verify_rib(tgen, addr_type, dut, input_dict_r1, protocol=protocol)
-        assert result is True, "Testcase {} :Failed \n Error: {}".format(
-            tc_name, result
-        )
-
-        result = verify_fib_routes(tgen, addr_type, dut, input_dict_r1, expected=False)
+        result = verify_fib_routes(tgen, addr_type, dut, input_dict_r1)
         assert result is not True, "Testcase {} : Failed \n"
         "Expected behavior: routes should not present in fib \n"
         "Error: {}".format(tc_name, result)
@@ -1156,14 +1175,7 @@ def test_bgp_with_loopback_with_same_subnet_p1(request):
     dut = "r3"
     protocol = "bgp"
     for addr_type in ADDR_TYPES:
-        result = verify_rib(
-            tgen, addr_type, dut, input_dict_r3, protocol=protocol, fib=None
-        )
-        assert result is True, "Testcase {} :Failed \n Error: {}".format(
-            tc_name, result
-        )
-
-        result = verify_fib_routes(tgen, addr_type, dut, input_dict_r1, expected=False)
+        result = verify_fib_routes(tgen, addr_type, dut, input_dict_r1)
         assert result is not True, "Testcase {} : Failed \n"
         "Expected behavior: routes should not present in fib \n"
         "Error: {}".format(tc_name, result)
index 06113bdd2a34486713291158a174f30d785f9085..13b57ad243795ba7031dd49667ab2c1b57ff0bb7 100644 (file)
@@ -3,7 +3,22 @@ bgp community alias 65001:1 community-r2-1
 bgp community alias 65002:2 community-r2-2
 bgp community alias 65001:1:1 large-community-r2-1
 !
+bgp large-community-list expanded r2 seq 5 permit _65001:1:1_
+!
 router bgp 65001
  no bgp ebgp-requires-policy
  neighbor 192.168.1.2 remote-as external
+ address-family ipv4 unicast
+  redistribute connected
+  neighbor 192.168.1.2 route-map r2 in
+ exit-address-family
+!
+route-map r2 permit 10
+ match alias community-r2-1
+ set tag 10
+route-map r2 permit 20
+ match alias community-r2-2
+ set tag 20
+route-map r2 permit 30
+ set tag 100
 !
index fc67ff2ad2262a86b051ba6b4094118debe8f373..9276fe592dda9341bcdca0924fe56d7d5d9a24e4 100644 (file)
@@ -8,6 +8,7 @@ router bgp 65002
 !
 ip prefix-list p1 permit 172.16.16.1/32
 ip prefix-list p2 permit 172.16.16.2/32
+ip prefix-list p3 permit 172.16.16.3/32
 !
 route-map r1 permit 10
  match ip address prefix-list p1
@@ -16,4 +17,6 @@ route-map r1 permit 10
 route-map r1 permit 20
  match ip address prefix-list p2
  set community 65002:1 65002:2
+route-map r1 permit 30
+ match ip address prefix-list p3
 !
index a806628a8e5f91f0f82a037f0edd95c2f49f46c1..b8cb9baf3c3a21c3e33efa4d7ef110929c810b12 100644 (file)
@@ -2,6 +2,7 @@
 int lo
  ip address 172.16.16.1/32
  ip address 172.16.16.2/32
+ ip address 172.16.16.3/32
 !
 int r2-eth0
  ip address 192.168.1.2/24
index 90eeaaa7318f4331134366770a0006bbd330a5e0..26933a799269cc08fdb65b0a765a0e47e9e11088 100644 (file)
@@ -40,6 +40,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
@@ -84,39 +86,68 @@ def test_bgp_community_alias():
     router = tgen.gears["r1"]
 
     def _bgp_converge(router):
-        output = json.loads(
-            router.vtysh_cmd("show bgp ipv4 unicast 172.16.16.1/32 json")
-        )
+        output = json.loads(router.vtysh_cmd("show ip route json"))
         expected = {
-            "paths": [
+            "172.16.16.1/32": [
+                {
+                    "tag": 10,
+                    "communities": "community-r2-1 65001:2",
+                    "largeCommunities": "large-community-r2-1 65001:1:2",
+                }
+            ],
+            "172.16.16.2/32": [
+                {
+                    "tag": 20,
+                    "communities": "65002:1 community-r2-2",
+                    "largeCommunities": "",
+                }
+            ],
+            "172.16.16.3/32": [
                 {
-                    "community": {"string": "community-r2-1 65001:2"},
-                    "largeCommunity": {"string": "large-community-r2-1 65001:1:2"},
+                    "tag": 100,
+                    "communities": "",
+                    "largeCommunities": "",
                 }
-            ]
+            ],
         }
         return topotest.json_cmp(output, expected)
 
     test_func = functools.partial(_bgp_converge, router)
     success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
-    assert result is None, 'Cannot see BGP community aliases "{}"'.format(router)
+    assert result is None, "Cannot see BGP community aliases at r1"
 
     def _bgp_show_prefixes_by_alias(router):
         output = json.loads(
-            router.vtysh_cmd("show bgp ipv4 unicast alias community-r2-2 json detail")
+            router.vtysh_cmd(
+                "show bgp ipv4 unicast alias large-community-r2-1 json detail"
+            )
         )
         expected = {
             "routes": {
-                "172.16.16.2/32": [{"community": {"string": "65002:1 community-r2-2"}}]
+                "172.16.16.1/32": [
+                    {
+                        "community": {"string": "community-r2-1 65001:2"},
+                        "largeCommunity": {"string": "large-community-r2-1 65001:1:2"},
+                    }
+                ]
             }
         }
         return topotest.json_cmp(output, expected)
 
     test_func = functools.partial(_bgp_show_prefixes_by_alias, router)
     success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
-    assert result is None, 'Cannot see BGP prefixes by community alias "{}"'.format(
-        router
-    )
+    assert result is None, "Cannot see BGP prefixes by community alias at r1"
+
+    def _bgp_show_prefixes_by_large_community_list(router):
+        output = json.loads(
+            router.vtysh_cmd("show bgp ipv4 unicast large-community-list r2 json")
+        )
+        expected = {"routes": {"172.16.16.1/32": [{"valid": True}]}}
+        return topotest.json_cmp(output, expected)
+
+    test_func = functools.partial(_bgp_show_prefixes_by_large_community_list, router)
+    success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+    assert result is None, "Cannot see BGP prefixes by large community list at r1"
 
 
 if __name__ == "__main__":
index 95e63c617e7d11dce73adc20aeb5e078ef2ed705..9f449d79790388888cb6860dbd232076a7f3414c 100644 (file)
@@ -59,7 +59,7 @@ from mininet.topo import Topo
 from lib.common_config import step
 from time import sleep
 
-pytestmark = [pytest.mark.bgpd, pytest.mark.bgpd]
+pytestmark = [pytest.mark.bgpd]
 
 
 class TemplateTopo(Topo):
index 0e31ab19952d0960519fdfada1e9a99de6e45ffd..44f54c7b515d11f0f718cbac0b49229e1abc3c82 100644 (file)
@@ -139,6 +139,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class BgpConditionalAdvertisementTopo(Topo):
     def build(self, *_args, **_opts):
index 28117b7fe4eea51f9db6f504a427fbcc104c44dc..6ed7023044ab7c0fd34362fa9aabcca2d25b1bde 100644 (file)
@@ -47,6 +47,8 @@ from lib.topolog import logger
 from mininet.topo import Topo
 from lib.common_config import step
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 19632162b4922d0df9e167351bbc6efe87edd374..6fbdfbe78a539baaaf875e6cb76a684ff39755bb 100644 (file)
@@ -38,6 +38,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 089c9a964e6540638c9d5bc656149accce7610c1..e7e3512b17131dd80da22a8f8455210e7af5fecd 100644 (file)
@@ -38,6 +38,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 42a6b6edf6a4d440dd871793478f835579b107cb..5852ac268b5284ecda286a508f4d889b2d0ef16c 100644 (file)
@@ -41,6 +41,8 @@ from lib.topolog import logger
 from mininet.topo import Topo
 from lib.common_config import step
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 12d1d01bfb6ea26b7c8516b63b5496ff2d8e9288..e2fa89fccb79f73f828c517ffa80ed4f7d14dad9 100644 (file)
@@ -40,6 +40,9 @@ from lib.topolog import logger
 from mininet.topo import Topo
 
 
+pytestmark = [pytest.mark.bgpd]
+
+
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
         tgen = get_topogen(self)
index 2622c33f5bf9cd4605cd2d37f89a3c73d8c08059..be87dc61cf3ebe40ffcd172e92ae9f4a929456f3 100644 (file)
@@ -38,6 +38,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index f338d52e70f109baadb75b018daf395507e5a499..bf267140870bbf36bd8d950edd588853560f28a6 100644 (file)
@@ -49,6 +49,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
diff --git a/tests/topotests/bgp_dont_capability_negogiate/__init__.py b/tests/topotests/bgp_dont_capability_negogiate/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/bgp_dont_capability_negogiate/r1/bgpd.conf b/tests/topotests/bgp_dont_capability_negogiate/r1/bgpd.conf
new file mode 100644 (file)
index 0000000..b429efe
--- /dev/null
@@ -0,0 +1,6 @@
+!
+router bgp 65001
+ no bgp ebgp-requires-policy
+ neighbor 192.168.1.2 remote-as external
+ neighbor 192.168.1.2 dont-capability-negotiate
+!
diff --git a/tests/topotests/bgp_dont_capability_negogiate/r1/zebra.conf b/tests/topotests/bgp_dont_capability_negogiate/r1/zebra.conf
new file mode 100644 (file)
index 0000000..b29940f
--- /dev/null
@@ -0,0 +1,4 @@
+!
+int r1-eth0
+ ip address 192.168.1.1/24
+!
diff --git a/tests/topotests/bgp_dont_capability_negogiate/r2/bgpd.conf b/tests/topotests/bgp_dont_capability_negogiate/r2/bgpd.conf
new file mode 100644 (file)
index 0000000..4af2cd6
--- /dev/null
@@ -0,0 +1,7 @@
+router bgp 65002
+ no bgp ebgp-requires-policy
+ neighbor 192.168.1.1 remote-as external
+ address-family ipv4 unicast
+  redistribute connected
+ exit-address-family
+!
diff --git a/tests/topotests/bgp_dont_capability_negogiate/r2/zebra.conf b/tests/topotests/bgp_dont_capability_negogiate/r2/zebra.conf
new file mode 100644 (file)
index 0000000..dc15cf7
--- /dev/null
@@ -0,0 +1,7 @@
+!
+int lo
+ ip address 172.16.16.1/32
+!
+int r2-eth0
+ ip address 192.168.1.2/24
+!
diff --git a/tests/topotests/bgp_dont_capability_negogiate/test_bgp_dont_capability_negotiate.py b/tests/topotests/bgp_dont_capability_negogiate/test_bgp_dont_capability_negotiate.py
new file mode 100644 (file)
index 0000000..398fa57
--- /dev/null
@@ -0,0 +1,110 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2021 by
+# Donatas Abraitis <donatas.abraitis@gmail.com>
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+"""
+Test if BGP connection is established if at least one peer
+sets `dont-capability-negotiate`.
+"""
+
+import os
+import sys
+import json
+import time
+import pytest
+import functools
+
+pytestmark = pytest.mark.bgpd
+
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+from lib import topotest
+from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.topolog import logger
+from mininet.topo import Topo
+
+pytestmark = [pytest.mark.bgpd]
+
+
+class TemplateTopo(Topo):
+    def build(self, *_args, **_opts):
+        tgen = get_topogen(self)
+
+        for routern in range(1, 3):
+            tgen.add_router("r{}".format(routern))
+
+        switch = tgen.add_switch("s1")
+        switch.add_link(tgen.gears["r1"])
+        switch.add_link(tgen.gears["r2"])
+
+
+def setup_module(mod):
+    tgen = Topogen(TemplateTopo, mod.__name__)
+    tgen.start_topology()
+
+    router_list = tgen.routers()
+
+    for i, (rname, router) in enumerate(router_list.items(), 1):
+        router.load_config(
+            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
+        )
+        router.load_config(
+            TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname))
+        )
+
+    tgen.start_router()
+
+
+def teardown_module(mod):
+    tgen = get_topogen()
+    tgen.stop_topology()
+
+
+def test_bgp_dont_capability_negotiate():
+    tgen = get_topogen()
+
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    router = tgen.gears["r1"]
+
+    def _bgp_converge(router):
+        output = json.loads(router.vtysh_cmd("show bgp ipv4 unicast summary json"))
+        expected = {
+            "peers": {
+                "192.168.1.2": {
+                    "pfxRcd": 2,
+                    "pfxSnt": 2,
+                    "state": "Established",
+                    "peerState": "OK",
+                }
+            }
+        }
+        return topotest.json_cmp(output, expected)
+
+    test_func = functools.partial(_bgp_converge, router)
+    success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+    assert result is None, "Can't converge with dont-capability-negotiate"
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index 3b99065fe078e55f506490801b5c8e35c3ff38c4..6db2697e754afeadf70699bb139b57c6690334b6 100644 (file)
@@ -51,6 +51,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index fa155dd5fe43201c837ddb95975511f0c9e42f53..2731d37fb04148f755dcebbc8e7d0d34e9cb7b9c 100644 (file)
@@ -57,6 +57,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
diff --git a/tests/topotests/bgp_ecmp_topo3/ibgp_ecmp_topo3.json b/tests/topotests/bgp_ecmp_topo3/ibgp_ecmp_topo3.json
new file mode 100644 (file)
index 0000000..b01f902
--- /dev/null
@@ -0,0 +1,232 @@
+{
+    "address_types": [
+        "ipv4",
+        "ipv6"
+    ],
+    "ipv4base": "10.0.0.0",
+    "ipv4mask": 24,
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {
+        "ipv4": "10.0.0.0",
+        "v4mask": 24,
+        "ipv6": "fd00::",
+        "v6mask": 64
+    },
+    "lo_prefix": {
+        "ipv4": "1.0.",
+        "v4mask": 32,
+        "ipv6": "2001:DB8:F::",
+        "v6mask": 128
+    },
+    "routers": {
+        "r1": {
+            "links": {
+                "lo": {
+                    "ipv4": "auto",
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r2-link1": {
+                    "ipv4": "auto",
+                    "ipv6": "auto"
+                }
+            },
+            "bgp": {
+                "local_as": "100",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link1": {}
+                                    }
+                                }
+                            }
+                        }
+                    },
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link1": {}
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        },
+        "r2": {
+            "links": {
+                "lo": {
+                    "ipv4": "auto",
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r1-link1": {
+                    "ipv4": "auto",
+                    "ipv6": "auto"
+                },
+                "r3-link1": {
+                    "ipv4": "auto",
+                    "ipv6": "auto"
+                },
+                "r3-link2": {
+                    "ipv4": "auto",
+                    "ipv6": "auto"
+                }
+            },
+            "bgp": {
+                "local_as": "100",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link1": {}
+                                    }
+                                },
+                                "r3": {
+                                    "dest_link": {
+                                        "r2-link1": {
+                                            "keepalivetimer": 60,
+                                            "holddowntimer": 180,
+                                            "next_hop_self": true
+                                        },
+                                        "r2-link2": {
+                                            "keepalivetimer": 60,
+                                            "holddowntimer": 180,
+                                            "next_hop_self": true
+                                        }
+                                    }
+                                }
+                            },
+                            "redistribute": [
+                                {
+                                    "redist_type": "static"
+                                }
+                            ]
+                        }
+                    },
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link1": {}
+                                    }
+                                },
+                                "r3": {
+                                    "dest_link": {
+                                        "r2-link1": {
+                                            "keepalivetimer": 60,
+                                            "holddowntimer": 180,
+                                            "next_hop_self": true
+                                        },
+                                        "r2-link2": {
+                                            "keepalivetimer": 60,
+                                            "holddowntimer": 180,
+                                            "next_hop_self": true
+                                        }
+                                    }
+                                }
+                            },
+                            "redistribute": [
+                                {
+                                    "redist_type": "static"
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        },
+        "r3": {
+            "links": {
+                "lo": {
+                    "ipv4": "auto",
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r2-link1": {
+                    "ipv4": "auto",
+                    "ipv6": "auto"
+                },
+                "r2-link2": {
+                    "ipv4": "auto",
+                    "ipv6": "auto"
+                }
+            },
+            "route_maps": {
+                "rmap_global": [{
+                    "action": "permit",
+                    "set": {
+                        "ipv6": {
+                            "nexthop": "prefer-global"
+                        }
+                    }
+                }]
+            },
+            "bgp": {
+                "local_as": "100",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "maximum_paths": {
+                                "ibgp": 2
+                            },
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r3-link1": {
+                                            "keepalivetimer": 60,
+                                            "holddowntimer": 180
+                                        },
+                                        "r3-link2": {
+                                            "keepalivetimer": 60,
+                                            "holddowntimer": 180
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    },
+                    "ipv6": {
+                        "unicast": {
+                            "maximum_paths": {
+                                "ibgp": 2
+                            },
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r3-link1": {
+                                            "keepalivetimer": 60,
+                                            "holddowntimer": 180,
+                                            "route_maps": [{
+                                                "name": "rmap_global",
+                                                "direction": "in"
+                                            }]
+                                        },
+                                        "r3-link2": {
+                                            "keepalivetimer": 60,
+                                            "holddowntimer": 180,
+                                            "route_maps": [{
+                                                "name": "rmap_global",
+                                                "direction": "in"
+                                            }]
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/tests/topotests/bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py b/tests/topotests/bgp_ecmp_topo3/test_ibgp_ecmp_topo3.py
new file mode 100644 (file)
index 0000000..5f3ac4e
--- /dev/null
@@ -0,0 +1,310 @@
+#!/usr/bin/env python
+
+#
+# Copyright (c) 2019 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""
+Following tests are covered to test ecmp functionality on iBGP.
+1. Verify bgp fast-convergence functionality
+"""
+import os
+import sys
+import time
+import json
+import pytest
+from time import sleep
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib.topogen import Topogen, get_topogen
+from mininet.topo import Topo
+
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    write_test_footer,
+    verify_rib,
+    create_static_routes,
+    check_address_types,
+    interface_status,
+    reset_config_on_routers,
+    required_linux_kernel_version,
+    shutdown_bringup_interface,
+    apply_raw_config,
+)
+from lib.topolog import logger
+from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
+# Reading the data from JSON File for topology and configuration creation
+jsonFile = "{}/ibgp_ecmp_topo3.json".format(CWD)
+
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+# Global variables
+NEXT_HOPS = {"ipv4": [], "ipv6": []}
+NETWORK = {"ipv4": "192.168.1.10/32", "ipv6": "fd00:0:0:1::10/128"}
+NEXT_HOP_IP = {"ipv4": "10.0.0.1", "ipv6": "fd00::1"}
+BGP_CONVERGENCE = False
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """
+    Sets up the pytest environment.
+
+    * `mod`: module name
+    """
+    global NEXT_HOPS, INTF_LIST_R3, INTF_LIST_R2, TEST_STATIC
+    global ADDR_TYPES
+
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    # Api call verify whether BGP is converged
+    ADDR_TYPES = check_address_types()
+
+    BGP_CONVERGENCE = verify_bgp_convergence(tgen, topo)
+    assert BGP_CONVERGENCE is True, "setup_module :Failed \n Error:" " {}".format(
+        BGP_CONVERGENCE
+    )
+
+    # STATIC_ROUTE = True
+    logger.info("Running setup_module() done")
+
+
+def teardown_module():
+    """
+    Teardown the pytest environment.
+
+    * `mod`: module name
+    """
+
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+
+def static_or_nw(tgen, topo, tc_name, test_type, dut):
+
+    if test_type == "redist_static":
+        input_dict_static = {
+            dut: {
+                "static_routes": [
+                    {"network": NETWORK["ipv4"], "next_hop": NEXT_HOP_IP["ipv4"]},
+                    {"network": NETWORK["ipv6"], "next_hop": NEXT_HOP_IP["ipv6"]},
+                ]
+            }
+        }
+        logger.info("Configuring static route on router %s", dut)
+        result = create_static_routes(tgen, input_dict_static)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+        input_dict_2 = {
+            dut: {
+                "bgp": {
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                        "ipv6": {
+                            "unicast": {"redistribute": [{"redist_type": "static"}]}
+                        },
+                    }
+                }
+            }
+        }
+
+        logger.info("Configuring redistribute static route on router %s", dut)
+        result = create_router_bgp(tgen, topo, input_dict_2)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    elif test_type == "advertise_nw":
+        input_dict_nw = {
+            dut: {
+                "bgp": {
+                    "address_family": {
+                        "ipv4": {
+                            "unicast": {
+                                "advertise_networks": [{"network": NETWORK["ipv4"]}]
+                            }
+                        },
+                        "ipv6": {
+                            "unicast": {
+                                "advertise_networks": [{"network": NETWORK["ipv6"]}]
+                            }
+                        },
+                    }
+                }
+            }
+        }
+
+        logger.info(
+            "Advertising networks %s %s from router %s",
+            NETWORK["ipv4"],
+            NETWORK["ipv6"],
+            dut,
+        )
+        result = create_router_bgp(tgen, topo, input_dict_nw)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+
+@pytest.mark.parametrize("test_type", ["redist_static"])
+def test_ecmp_fast_convergence(request, test_type):
+    """This test is to verify bgp fast-convergence cli functionality"""
+
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Verifying RIB routes
+    dut = "r3"
+    protocol = "bgp"
+
+    reset_config_on_routers(tgen)
+    static_or_nw(tgen, topo, tc_name, test_type, "r2")
+
+    for addr_type in ADDR_TYPES:
+        input_dict = {"r3": {"static_routes": [{"network": NETWORK[addr_type]}]}}
+
+        logger.info("Verifying %s routes on r3", addr_type)
+        result = verify_rib(
+            tgen,
+            addr_type,
+            dut,
+            input_dict,
+            protocol=protocol,
+        )
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    intf1 = topo["routers"]["r2"]["links"]["r3-link1"]["interface"]
+    intf2 = topo["routers"]["r2"]["links"]["r3-link2"]["interface"]
+
+    logger.info("Shutdown one of the link b/w r2 and r3")
+    shutdown_bringup_interface(tgen, "r2", intf1, False)
+
+    logger.info("Verify bgp neighbors are still up")
+    result = verify_bgp_convergence(tgen, topo)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    logger.info("Shutdown another link b/w r2 and r3")
+    shutdown_bringup_interface(tgen, "r2", intf2, False)
+
+    logger.info("Wait for 10 sec and make sure bgp neighbors are still up")
+    sleep(10)
+    result = verify_bgp_convergence(tgen, topo)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    logger.info("No shut links b/w r2 and r3")
+    shutdown_bringup_interface(tgen, "r2", intf1, True)
+    shutdown_bringup_interface(tgen, "r2", intf2, True)
+
+    logger.info("Enable bgp fast-convergence cli")
+    raw_config = {
+       "r2": {
+          "raw_config": [
+            "router bgp {}".format(topo["routers"]["r2"]["bgp"]["local_as"]),
+            "bgp fast-convergence",
+          ]
+       }
+    }
+    result = apply_raw_config(tgen, raw_config)
+    assert result is True, "Testcase {} : Failed Error: {}".format(tc_name, result)
+
+    logger.info("Shutdown one link b/w r2 and r3")
+    shutdown_bringup_interface(tgen, "r2", intf1, False)
+
+    logger.info("Verify bgp neighbors goes down immediately")
+    result = verify_bgp_convergence(tgen, topo, dut="r2", expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    logger.info("Shutdown second link b/w r2 and r3")
+    shutdown_bringup_interface(tgen, "r2", intf2, False)
+
+    logger.info("Verify bgp neighbors goes down immediately")
+    result = verify_bgp_convergence(tgen, topo, dut="r2", expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index f389632b1e86b7596c5db92398d76560b9ba54ff..2dcf70f14a391ab44b6c2bdcc4421779dd979e19 100644 (file)
@@ -50,6 +50,9 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.pimd]
+
+
 #####################################################
 ##
 ##   Network Topology Definition
@@ -594,14 +597,23 @@ def test_evpn_ead_update():
 
 
 def ping_anycast_gw(tgen):
-    local_host = tgen.gears["hostd11"]
-    remote_host = tgen.gears["hostd21"]
-
     # ping the anycast gw from the local and remote hosts to populate
     # the mac address on the PEs
-    cmd_str = "arping -I torbond -c 1 45.0.0.1"
-    local_host.run(cmd_str)
-    remote_host.run(cmd_str)
+    script_path = os.path.abspath(os.path.join(CWD, "../lib/scapy_sendpkt.py"))
+    intf = "torbond"
+    ipaddr = "45.0.0.1"
+    ping_cmd = [
+        script_path,
+        "--imports=Ether,ARP",
+        "--interface=" + intf,
+        "'Ether(dst=\"ff:ff:ff:ff:ff:ff\")/ARP(pdst=\"{}\")'".format(ipaddr)
+    ]
+    for name in ("hostd11", "hostd21"):
+        host = tgen.net[name]
+        stdout = host.cmd(ping_cmd)
+        stdout = stdout.strip()
+        if stdout:
+            host.logger.debug("%s: arping on %s for %s returned: %s", name, intf, ipaddr, stdout)
 
 
 def check_mac(dut, vni, mac, m_type, esi, intf, ping_gw=False, tgen=None):
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_base.json
new file mode 100644 (file)
index 0000000..2eeebad
--- /dev/null
@@ -0,0 +1,192 @@
+{
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:101:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "ipLen":32,
+          "ip":"50.0.1.11",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:101:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "ipLen":128,
+          "ip":"50:0:1::11",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:101:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:62",
+          "weight":0,
+          "peerId":"10.0.1.2",
+          "path":"102",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:102:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.1]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.1]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.1",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:101:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.2]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.2",
+          "weight":0,
+          "peerId":"10.0.1.2",
+          "path":"102",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:102:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_no_rt2.json
new file mode 100644 (file)
index 0000000..419bcc3
--- /dev/null
@@ -0,0 +1,8 @@
+{
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]": null,
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]": null,
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]": null,
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]": null,
+  "[3]:[0]:[32]:[10.100.0.1]": null,
+  "[3]:[0]:[32]:[10.100.0.2]": null
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vni_routes_no_rt5.json
new file mode 100644 (file)
index 0000000..2eeebad
--- /dev/null
@@ -0,0 +1,192 @@
+{
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:101:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "ipLen":32,
+          "ip":"50.0.1.11",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:101:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "ipLen":128,
+          "ip":"50:0:1::11",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:101:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:62",
+          "weight":0,
+          "peerId":"10.0.1.2",
+          "path":"102",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:102:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.1]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.1]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.1",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:101:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.2]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.2",
+          "weight":0,
+          "peerId":"10.0.1.2",
+          "path":"102",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:102:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_base.json
new file mode 100644 (file)
index 0000000..833f986
--- /dev/null
@@ -0,0 +1,27 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.1",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100.0.0.21/32": [
+  {
+    "valid":true,
+    "bestpath":true,
+    "pathFrom":"external",
+    "prefix":"100.0.0.21",
+    "prefixLen":32,
+    "network":"100.0.0.21\/32",
+    "metric":0,
+    "weight":0,
+    "peerId":"50.0.1.11",
+    "path":"111",
+    "origin":"IGP",
+    "nexthops":[
+      {
+        "ip":"50.0.1.11",
+        "afi":"ipv4",
+        "used":true
+      }
+    ]
+  }
+] }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_no_rt2.json
new file mode 100644 (file)
index 0000000..833f986
--- /dev/null
@@ -0,0 +1,27 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.1",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100.0.0.21/32": [
+  {
+    "valid":true,
+    "bestpath":true,
+    "pathFrom":"external",
+    "prefix":"100.0.0.21",
+    "prefixLen":32,
+    "network":"100.0.0.21\/32",
+    "metric":0,
+    "weight":0,
+    "peerId":"50.0.1.11",
+    "path":"111",
+    "origin":"IGP",
+    "nexthops":[
+      {
+        "ip":"50.0.1.11",
+        "afi":"ipv4",
+        "used":true
+      }
+    ]
+  }
+] }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv4_no_rt5.json
new file mode 100644 (file)
index 0000000..4a292bd
--- /dev/null
@@ -0,0 +1,6 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.1",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100.0.0.21/32": null }  }
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_base.json
new file mode 100644 (file)
index 0000000..3dc3fcf
--- /dev/null
@@ -0,0 +1,27 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.1",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100::21/128": [
+  {
+    "valid":true,
+    "bestpath":true,
+    "pathFrom":"external",
+    "prefix":"100::21",
+    "prefixLen":128,
+    "network":"100::21\/128",
+    "metric":0,
+    "weight":0,
+    "peerId":"50:0:1::11",
+    "path":"111",
+    "origin":"IGP",
+    "nexthops":[
+      {
+        "ip":"50:0:1::11",
+        "afi":"ipv6",
+        "scope":"global"
+      }
+    ]
+  }
+] }  }
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_no_rt2.json
new file mode 100644 (file)
index 0000000..3dc3fcf
--- /dev/null
@@ -0,0 +1,27 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.1",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100::21/128": [
+  {
+    "valid":true,
+    "bestpath":true,
+    "pathFrom":"external",
+    "prefix":"100::21",
+    "prefixLen":128,
+    "network":"100::21\/128",
+    "metric":0,
+    "weight":0,
+    "peerId":"50:0:1::11",
+    "path":"111",
+    "origin":"IGP",
+    "nexthops":[
+      {
+        "ip":"50:0:1::11",
+        "afi":"ipv6",
+        "scope":"global"
+      }
+    ]
+  }
+] }  }
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgp_vrf_ipv6_no_rt5.json
new file mode 100644 (file)
index 0000000..6c11d89
--- /dev/null
@@ -0,0 +1,6 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.1",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100::21/128": null }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgpd.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/bgpd.conf
new file mode 100644 (file)
index 0000000..63aa99a
--- /dev/null
@@ -0,0 +1,30 @@
+router bgp 101
+ bgp router-id 10.100.0.1
+ no bgp ebgp-requires-policy
+ no bgp network import-check
+ neighbor 10.0.1.2 remote-as 102
+ !
+ address-family l2vpn evpn
+  neighbor 10.0.1.2 activate
+  advertise-all-vni
+ exit-address-family
+!
+router bgp 101 vrf vrf-blue
+ bgp router-id 10.100.0.1
+ no bgp ebgp-requires-policy
+ no bgp network import-check
+ neighbor 50.0.1.11 remote-as 111
+ neighbor 50:0:1::11 remote-as 111
+ !
+ address-family ipv4 unicast
+  no neighbor 50:0:1::11 activate
+ exit-address-family
+ !
+ address-family ipv6 unicast
+  neighbor 50:0:1::11 activate
+ exit-address-family
+ !
+ address-family l2vpn evpn
+  advertise ipv4 unicast gateway-ip
+  advertise ipv6 unicast gateway-ip
+ exit-address-family
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra.conf
new file mode 100644 (file)
index 0000000..99a2e89
--- /dev/null
@@ -0,0 +1,14 @@
+!
+log file zebra.log
+!
+ip route 10.100.0.2/32 10.0.1.2
+!
+vrf vrf-blue
+ vni 1000 prefix-routes-only
+ exit-vrf
+!
+interface lo
+ ip address 10.100.0.1/32
+interface PE1-eth0
+ ip address 10.0.1.1/24
+!
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_base.json
new file mode 100644 (file)
index 0000000..2dcf35d
--- /dev/null
@@ -0,0 +1,56 @@
+{
+  "50.0.1.0\/24":[
+    {
+      "prefix":"50.0.1.0\/24",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100.0.0.21\/32":[
+    {
+      "prefix":"100.0.0.21\/32",
+      "protocol":"bgp",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":20,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "ip":"50.0.1.11",
+          "afi":"ipv4",
+          "interfaceName":"br100",
+          "active":true,
+          "weight":1
+        }
+      ]
+    }
+  ]
+}
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_no_rt2.json
new file mode 100644 (file)
index 0000000..2dcf35d
--- /dev/null
@@ -0,0 +1,56 @@
+{
+  "50.0.1.0\/24":[
+    {
+      "prefix":"50.0.1.0\/24",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100.0.0.21\/32":[
+    {
+      "prefix":"100.0.0.21\/32",
+      "protocol":"bgp",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":20,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "ip":"50.0.1.11",
+          "afi":"ipv4",
+          "interfaceName":"br100",
+          "active":true,
+          "weight":1
+        }
+      ]
+    }
+  ]
+}
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv4_no_rt5.json
new file mode 100644 (file)
index 0000000..9c3091d
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  "50.0.1.0\/24":[
+    {
+      "prefix":"50.0.1.0\/24",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100.0.0.21\/32": null
+}
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_base.json
new file mode 100644 (file)
index 0000000..229c927
--- /dev/null
@@ -0,0 +1,55 @@
+{
+  "50:0:1::\/48":[
+    {
+      "prefix":"50:0:1::\/48",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100::21\/128":[
+    {
+      "prefix":"100::21\/128",
+      "protocol":"bgp",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":20,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "afi":"ipv6",
+          "interfaceName":"br100",
+          "active":true,
+          "weight":1
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_no_rt2.json
new file mode 100644 (file)
index 0000000..229c927
--- /dev/null
@@ -0,0 +1,55 @@
+{
+  "50:0:1::\/48":[
+    {
+      "prefix":"50:0:1::\/48",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100::21\/128":[
+    {
+      "prefix":"100::21\/128",
+      "protocol":"bgp",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":20,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "afi":"ipv6",
+          "interfaceName":"br100",
+          "active":true,
+          "weight":1
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra_vrf_ipv6_no_rt5.json
new file mode 100644 (file)
index 0000000..94f82e6
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  "50:0:1::\/48":[
+    {
+      "prefix":"50:0:1::\/48",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100::21\/128": null
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_base.json
new file mode 100644 (file)
index 0000000..7b8d38e
--- /dev/null
@@ -0,0 +1,192 @@
+{
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "weight":0,
+          "peerId":"10.0.1.1",
+          "path":"101",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:101:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "ipLen":32,
+          "ip":"50.0.1.11",
+          "weight":0,
+          "peerId":"10.0.1.1",
+          "path":"101",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:101:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "ipLen":128,
+          "ip":"50:0:1::11",
+          "weight":0,
+          "peerId":"10.0.1.1",
+          "path":"101",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:101:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:62",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:102:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.1]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.1]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.1",
+          "weight":0,
+          "peerId":"10.0.1.1",
+          "path":"101",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:101:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.2]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.2",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:102:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_no_rt2.json
new file mode 100644 (file)
index 0000000..6273b3e
--- /dev/null
@@ -0,0 +1,68 @@
+{
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]": null,
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]": null,
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]": null,
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:62",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:102:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.1]": null,
+  "[3]:[0]:[32]:[10.100.0.2]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.2",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:102:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vni_routes_no_rt5.json
new file mode 100644 (file)
index 0000000..7b8d38e
--- /dev/null
@@ -0,0 +1,192 @@
+{
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "weight":0,
+          "peerId":"10.0.1.1",
+          "path":"101",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:101:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[32]:[50.0.1.11]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "ipLen":32,
+          "ip":"50.0.1.11",
+          "weight":0,
+          "peerId":"10.0.1.1",
+          "path":"101",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:101:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:61]:[128]:[50:0:1::11]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:61",
+          "ipLen":128,
+          "ip":"50:0:1::11",
+          "weight":0,
+          "peerId":"10.0.1.1",
+          "path":"101",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:101:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]":{
+    "prefix":"[2]:[0]:[48]:[1a:2b:3c:4d:5e:62]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":2,
+          "ethTag":0,
+          "macLen":48,
+          "mac":"1a:2b:3c:4d:5e:62",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:102:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.1]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.1]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.1",
+          "weight":0,
+          "peerId":"10.0.1.1",
+          "path":"101",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"RT:101:100 ET:8"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.1",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  },
+  "[3]:[0]:[32]:[10.100.0.2]":{
+    "prefix":"[3]:[0]:[32]:[10.100.0.2]",
+    "prefixLen":320,
+    "paths":[
+      [
+        {
+          "valid":true,
+          "bestpath":true,
+          "pathFrom":"external",
+          "routeType":3,
+          "ethTag":0,
+          "ipLen":32,
+          "ip":"10.100.0.2",
+          "weight":32768,
+          "peerId":"(unspec)",
+          "path":"",
+          "origin":"IGP",
+          "extendedCommunity":{
+            "string":"ET:8 RT:102:100"
+          },
+          "nexthops":[
+            {
+              "ip":"10.100.0.2",
+              "afi":"ipv4",
+              "used":true
+            }
+          ]
+        }
+      ]
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_base.json
new file mode 100644 (file)
index 0000000..c03d701
--- /dev/null
@@ -0,0 +1,27 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.2",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100.0.0.21/32": [
+  {
+    "valid":true,
+    "bestpath":true,
+    "pathFrom":"external",
+    "prefix":"100.0.0.21",
+    "prefixLen":32,
+    "network":"100.0.0.21\/32",
+    "metric":0,
+    "weight":0,
+    "peerId":"10.0.1.1",
+    "path":"101 111",
+    "origin":"IGP",
+    "nexthops":[
+      {
+        "ip":"50.0.1.11",
+        "afi":"ipv4",
+        "used":true
+      }
+    ]
+  }
+] }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_no_rt2.json
new file mode 100644 (file)
index 0000000..7f1b8d2
--- /dev/null
@@ -0,0 +1,27 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.2",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100.0.0.21/32": [
+  {
+    "valid":null,
+    "bestpath":null,
+    "pathFrom":"external",
+    "prefix":"100.0.0.21",
+    "prefixLen":32,
+    "network":"100.0.0.21\/32",
+    "metric":0,
+    "weight":0,
+    "peerId":"10.0.1.1",
+    "path":"101 111",
+    "origin":"IGP",
+    "nexthops":[
+      {
+        "ip":"50.0.1.11",
+        "afi":"ipv4",
+        "used":true
+      }
+    ]
+  }
+] }  }
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv4_no_rt5.json
new file mode 100644 (file)
index 0000000..52e4311
--- /dev/null
@@ -0,0 +1,6 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.2",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100.0.0.21/32": null }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_base.json
new file mode 100644 (file)
index 0000000..1d90c9c
--- /dev/null
@@ -0,0 +1,28 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.2",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100::21/128": [
+  {
+    "valid":true,
+    "bestpath":true,
+    "pathFrom":"external",
+    "prefix":"100::21",
+    "prefixLen":128,
+    "network":"100::21\/128",
+    "metric":0,
+    "weight":0,
+    "peerId":"10.0.1.1",
+    "path":"101 111",
+    "origin":"IGP",
+    "nexthops":[
+      {
+        "ip":"50:0:1::11",
+        "afi":"ipv6",
+        "scope":"global",
+        "used":true
+      }
+    ]
+  }
+] }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_no_rt2.json
new file mode 100644 (file)
index 0000000..a0e63c6
--- /dev/null
@@ -0,0 +1,28 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.2",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100::21/128": [
+  {
+    "valid":null,
+    "bestpath":null,
+    "pathFrom":"external",
+    "prefix":"100::21",
+    "prefixLen":128,
+    "network":"100::21\/128",
+    "metric":0,
+    "weight":0,
+    "peerId":"10.0.1.1",
+    "path":"101 111",
+    "origin":"IGP",
+    "nexthops":[
+      {
+        "ip":"50:0:1::11",
+        "afi":"ipv6",
+        "scope":"global",
+        "used":true
+      }
+    ]
+  }
+] }  }
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgp_vrf_ipv6_no_rt5.json
new file mode 100644 (file)
index 0000000..789fe69
--- /dev/null
@@ -0,0 +1,6 @@
+{
+ "vrfName": "vrf-blue",
+ "routerId": "10.100.0.2",
+ "defaultLocPrf": 100,
+ "localAS": 101,
+ "routes": { "100::21/128": null }  }
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgpd.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/bgpd.conf
new file mode 100644 (file)
index 0000000..59fee15
--- /dev/null
@@ -0,0 +1,14 @@
+router bgp 102
+ bgp router-id 10.100.0.2
+ no bgp ebgp-requires-policy
+ no bgp network import-check
+ neighbor 10.0.1.1 remote-as 101
+ !
+ address-family l2vpn evpn
+  neighbor 10.0.1.1 activate
+  advertise-all-vni
+  enable-resolve-overlay-index
+ exit-address-family
+!
+router bgp 101 vrf vrf-blue
+ bgp router-id 10.100.0.2
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra.conf
new file mode 100644 (file)
index 0000000..b78cdcc
--- /dev/null
@@ -0,0 +1,14 @@
+!
+log file zebra.log
+!
+ip route 10.100.0.1/32 10.0.1.1
+!
+vrf vrf-blue
+ vni 1000 prefix-routes-only
+ exit-vrf
+!
+interface lo
+ ip address 10.100.0.2/32
+interface  PE2-eth0
+ ip address 10.0.1.2/24
+!
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_base.json
new file mode 100644 (file)
index 0000000..b3a3640
--- /dev/null
@@ -0,0 +1,56 @@
+{
+  "50.0.1.0\/24":[
+    {
+      "prefix":"50.0.1.0\/24",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100.0.0.21\/32":[
+    {
+      "prefix":"100.0.0.21\/32",
+      "protocol":"bgp",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":20,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":40,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "ip":"50.0.1.11",
+          "afi":"ipv4",
+          "interfaceName":"br100",
+          "active":true,
+          "weight":1
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_no_rt2.json
new file mode 100644 (file)
index 0000000..996fe52
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  "50.0.1.0\/24":[
+    {
+      "prefix":"50.0.1.0\/24",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+   "100.0.0.21\/32": null
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv4_no_rt5.json
new file mode 100644 (file)
index 0000000..996fe52
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  "50.0.1.0\/24":[
+    {
+      "prefix":"50.0.1.0\/24",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+   "100.0.0.21\/32": null
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_base.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_base.json
new file mode 100644 (file)
index 0000000..d5be22a
--- /dev/null
@@ -0,0 +1,56 @@
+{
+  "50:0:1::\/48":[
+    {
+      "prefix":"50:0:1::\/48",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100::21\/128":[
+    {
+      "prefix":"100::21\/128",
+      "protocol":"bgp",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":20,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":40,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "ip":"50:0:1::11",
+          "afi":"ipv6",
+          "interfaceName":"br100",
+          "active":true,
+          "weight":1
+        }
+      ]
+    }
+  ]
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_no_rt2.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_no_rt2.json
new file mode 100644 (file)
index 0000000..94f82e6
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  "50:0:1::\/48":[
+    {
+      "prefix":"50:0:1::\/48",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100::21\/128": null
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_no_rt5.json b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra_vrf_ipv6_no_rt5.json
new file mode 100644 (file)
index 0000000..94f82e6
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  "50:0:1::\/48":[
+    {
+      "prefix":"50:0:1::\/48",
+      "protocol":"connected",
+      "vrfName":"vrf-blue",
+      "selected":true,
+      "destSelected":true,
+      "distance":0,
+      "metric":0,
+      "installed":true,
+      "table":10,
+      "internalStatus":16,
+      "internalFlags":8,
+      "internalNextHopNum":1,
+      "internalNextHopActiveNum":1,
+      "nexthops":[
+        {
+          "flags":3,
+          "fib":true,
+          "directlyConnected":true,
+          "interfaceName":"br100",
+          "active":true
+        }
+      ]
+    }
+  ],
+  "100::21\/128": null
+}
\ No newline at end of file
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/__init__.py b/tests/topotests/bgp_evpn_overlay_index_gateway/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/host1/bgpd.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/host1/bgpd.conf
new file mode 100644 (file)
index 0000000..7608ec9
--- /dev/null
@@ -0,0 +1,18 @@
+router bgp 111
+ bgp router-id 10.100.0.11
+ no bgp ebgp-requires-policy
+ no bgp network import-check
+ neighbor 50.0.1.1 remote-as 101
+ neighbor 50:0:1::1 remote-as 101
+ !
+ address-family ipv4 unicast
+  network 100.0.0.21/32
+  no neighbor 50:0:1::1 activate
+ exit-address-family
+ !
+ address-family ipv6 unicast
+  network 100::21/128
+  neighbor 50:0:1::1 activate
+ exit-address-family
+
+
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/host1/zebra.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/host1/zebra.conf
new file mode 100644 (file)
index 0000000..c8c832e
--- /dev/null
@@ -0,0 +1,4 @@
+!
+int host1-eth0
+ ip address 50.0.1.11/24
+ ipv6 address 50:0:1::11/48
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/host2/bgpd.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/host2/bgpd.conf
new file mode 100644 (file)
index 0000000..cdf4cb4
--- /dev/null
@@ -0,0 +1 @@
+!
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/host2/zebra.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/host2/zebra.conf
new file mode 100644 (file)
index 0000000..9135545
--- /dev/null
@@ -0,0 +1,4 @@
+!
+int host1-eth0
+ ip address 50.0.1.21/24
+ ipv6 address 50:0:1::21/48
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py b/tests/topotests/bgp_evpn_overlay_index_gateway/test_bgp_evpn_overlay_index_gateway.py
new file mode 100755 (executable)
index 0000000..a411f13
--- /dev/null
@@ -0,0 +1,387 @@
+#!/usr/bin/env python
+#
+# Copyright (c) 2020 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc. ("NetDEF")
+# in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+"""
+test_bgp_evpn_overlay_index_gateway.py: Test EVPN gateway IP overlay index functionality
+Following functionality is covered:
+
+         +--------+ BGP     +--------+ BGP  +--------+      +--------+
+    SN1  |        | IPv4/v6 |        | EVPN |        |      |        |
+   ======+ Host1  +---------+   PE1  +------+   PE2  +------+  Host2 +
+         |        |         |        |      |        |      |        |
+         +--------+         +--------+      +--------+      +--------+
+
+    Host1 is connected to PE1 and host2 is connected to PE2
+    Host1 and PE1 have IPv4/v6 BGP sessions.
+    PE1 and PE2 gave EVPN session.
+    Host1 advertises IPv4/v6 prefixes to PE1.
+    PE1 advertises these prefixes to PE2 as EVPN type-5 routes.
+    Gateway IP for these EVPN type-5 routes is host1 IP.
+    Host1 MAC/IP is advertised by PE1 as EVPN type-2 route
+
+Following testcases are covered:
+TC_1:
+Check BGP and zebra states for above topology at PE1 and PE2.
+
+TC_2:
+Stop advertising prefixes from host1. It should withdraw type-5 routes. Check states at PE1 and PE2
+Advertise the prefixes again. Check states.
+
+TC_3:
+Shut down VxLAN interface at PE1. This should withdraw type-2 routes. Check states at PE1 and PE2.
+Enable VxLAN interface again. Check states.
+"""
+
+import os
+import sys
+import json
+from functools import partial
+import pytest
+import time
+import platform
+
+#Current Working Directory
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib import topotest
+from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.topolog import logger
+from lib.common_config import (
+    step,
+    write_test_header,
+    write_test_footer,
+    generate_support_bundle,
+)
+
+# Required to instantiate the topology builder class.
+from mininet.topo import Topo
+
+pytestmark = [pytest.mark.bgpd]
+
+
+#Global variables
+PES = ['PE1', 'PE2']
+HOSTS = ['host1', 'host2']
+PE_SUFFIX = {'PE1': '1', 'PE2': '2'}
+HOST_SUFFIX = {'host1': '1', 'host2': '2'}
+TRIGGERS = ["base", "no_rt5", "no_rt2"]
+
+
+class TemplateTopo(Topo):
+    """Test topology builder"""
+
+    def build(self, *_args, **_opts):
+        """Build function"""
+        tgen = get_topogen(self)
+
+        # This function only purpose is to define allocation and relationship
+        # between routers and add links.
+
+        # Create routers
+        for pe in PES:
+            tgen.add_router(pe)
+        for host in HOSTS:
+            tgen.add_router(host)
+
+        krel = platform.release()
+        logger.info('Kernel version ' + krel)
+
+        #Add links
+        tgen.add_link(tgen.gears['PE1'], tgen.gears['PE2'], 'PE1-eth0', 'PE2-eth0')
+        tgen.add_link(tgen.gears['PE1'], tgen.gears['host1'], 'PE1-eth1', 'host1-eth0')
+        tgen.add_link(tgen.gears['PE2'], tgen.gears['host2'], 'PE2-eth1', 'host2-eth0')
+
+
+def setup_module(mod):
+    "Sets up the pytest environment"
+
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(TemplateTopo, mod.__name__)
+    # ... and here it calls Mininet initialization functions.
+
+    kernelv = platform.release()
+    if topotest.version_cmp(kernelv, "4.15") < 0:
+        logger.info("For EVPN, kernel version should be minimum 4.15. Kernel present {}".format(kernelv))
+        return
+
+    if topotest.version_cmp(kernelv, '4.15') == 0:
+        l3mdev_accept = 1
+        logger.info('setting net.ipv4.tcp_l3mdev_accept={}'.format(l3mdev_accept))
+    else:
+        l3mdev_accept = 0
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    tgen.start_topology()
+
+    # Configure MAC address for hosts as these MACs are advertised with EVPN type-2 routes
+    for (name, host) in tgen.gears.items():
+        if name not in HOSTS:
+            continue
+
+        host_mac = "1a:2b:3c:4d:5e:6{}".format(HOST_SUFFIX[name])
+        host.run("ip link set dev {}-eth0 down").format(name)
+        host.run("ip link set dev {0}-eth0 address {1}".format(name, host_mac))
+        host.run("ip link set dev {}-eth0 up").format(name)
+
+    # Configure PE VxLAN and Bridge interfaces
+    for (name, pe) in tgen.gears.items():
+        if name not in PES:
+            continue
+        vtep_ip = "10.100.0.{}".format(PE_SUFFIX[name])
+        bridge_ip = "50.0.1.{}/24".format(PE_SUFFIX[name])
+        bridge_ipv6 = "50:0:1::{}/48".format(PE_SUFFIX[name])
+
+        pe.run("ip link add vrf-blue type vrf table 10")
+        pe.run("ip link set dev vrf-blue up")
+        pe.run("ip link add vxlan100 type vxlan id 100 dstport 4789 local {}".format(vtep_ip))
+        pe.run("ip link add name br100 type bridge stp_state 0")
+        pe.run("ip link set dev vxlan100 master br100")
+        pe.run("ip link set dev {}-eth1 master br100".format(name))
+        pe.run("ip addr add {} dev br100".format(bridge_ip))
+        pe.run("ip link set up dev br100")
+        pe.run("ip link set up dev vxlan100")
+        pe.run("ip link set up dev {}-eth1".format(name))
+        pe.run("ip link set dev br100 master vrf-blue")
+        pe.run("ip -6 addr add {} dev br100".format(bridge_ipv6))
+
+        pe.run("ip link add vxlan1000 type vxlan id 1000 dstport 4789 local {}".format(vtep_ip))
+        pe.run("ip link add name br1000 type bridge stp_state 0")
+        pe.run("ip link set dev vxlan1000 master br100")
+        pe.run("ip link set up dev br1000")
+        pe.run("ip link set up dev vxlan1000")
+        pe.run("ip link set dev br1000 master vrf-blue")
+
+        pe.run("sysctl -w net.ipv4.ip_forward=1")
+        pe.run("sysctl -w net.ipv6.conf.all.forwarding=1")
+        pe.run("sysctl -w net.ipv4.udp_l3mdev_accept={}".format(l3mdev_accept))
+        pe.run("sysctl -w net.ipv4.tcp_l3mdev_accept={}".format(l3mdev_accept))
+
+    # For all registred routers, load the zebra configuration file
+    for (name, router) in tgen.routers().items():
+        router.load_config(
+            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(name))
+        )
+        router.load_config(
+            TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(name))
+        )
+
+    # After loading the configurations, this function loads configured daemons.
+    tgen.start_router()
+
+    logger.info("Running setup_module() done")
+
+
+def teardown_module(mod):
+    """Teardown the pytest environment"""
+
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+    logger.info(
+        "Testsuite end time: {}".format(time.asctime(time.localtime(time.time())))
+    )
+    logger.info("=" * 40)
+
+
+def evpn_gateway_ip_show_op_check(trigger=" "):
+    """
+    This function checks CLI O/P for commands mentioned in show_commands for a given trigger
+    :param trigger: Should be a trigger present in TRIGGERS
+    :return: Returns a tuple (result: None for success, retmsg: Log message to be printed on failure)
+    """
+    tgen = get_topogen()
+
+    if trigger not in TRIGGERS:
+        return "Unexpected trigger", "Unexpected trigger {}".format(trigger)
+
+    show_commands = {'bgp_vni_routes': 'show bgp l2vpn evpn route vni 100 json',
+                     'bgp_vrf_ipv4'  : 'show bgp vrf vrf-blue ipv4 json',
+                     'bgp_vrf_ipv6'  : 'show bgp vrf vrf-blue ipv6 json',
+                     'zebra_vrf_ipv4': 'show ip route vrf vrf-blue json',
+                     'zebra_vrf_ipv6': 'show ipv6 route vrf vrf-blue json'}
+
+    for (name, pe) in tgen.gears.items():
+        if name not in PES:
+            continue
+
+        for (cmd_key, command) in show_commands.items():
+            expected_op_file = "{0}/{1}/{2}_{3}.json".format(CWD, name, cmd_key, trigger)
+            expected_op = json.loads(open(expected_op_file).read())
+
+            test_func = partial(topotest.router_json_cmp, pe, command, expected_op)
+            ret, result = topotest.run_and_expect(test_func, None, count=30, wait=1)
+            assertmsg = '"{0}" JSON output mismatch for {1}'.format(name, command)
+            if result is not None:
+                return result, assertmsg
+
+    return None, "Pass"
+
+
+def test_evpn_gateway_ip_basic_topo(request):
+    """
+    Tets EVPN overlay index gateway IP functionality. VErify show O/Ps on PE1 and PE2
+    """
+
+    tgen = get_topogen()
+    tc_name = request.node.name
+    write_test_header(tc_name)
+
+    kernelv = platform.release()
+    if topotest.version_cmp(kernelv, "4.15") < 0:
+        logger.info("For EVPN, kernel version should be minimum 4.15")
+        write_test_footer(tc_name)
+        return
+
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    step("Check O/Ps for EVPN gateway IP overlay Index functionality at PE1 and PE2")
+
+    result, assertmsg = evpn_gateway_ip_show_op_check("base")
+
+    if result is not None:
+        generate_support_bundle()
+    assert result is None, assertmsg
+
+    write_test_footer(tc_name)
+
+
+def test_evpn_gateway_ip_flap_rt5(request):
+    """
+    Withdraw EVPN type-5 routes and check O/Ps at PE1 and PE2
+    """
+    tgen = get_topogen()
+    tc_name = request.node.name
+    write_test_header(tc_name)
+
+    kernelv = platform.release()
+    if topotest.version_cmp(kernelv, "4.15") < 0:
+        logger.info("For EVPN, kernel version should be minimum 4.15")
+        write_test_footer(tc_name)
+        return
+
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    h1 = tgen.gears['host1']
+
+    step("Withdraw type-5 routes")
+
+    h1.run('vtysh  -c "config t" \
+                   -c "router bgp 111" \
+                   -c "address-family ipv4" \
+                   -c "no network 100.0.0.21/32"')
+    h1.run('vtysh  -c "config t" \
+                   -c "router bgp 111" \
+                   -c "address-family ipv6" \
+                   -c "no network 100::21/128"')
+
+    result, assertmsg = evpn_gateway_ip_show_op_check("no_rt5")
+    if result is not None:
+        generate_support_bundle()
+    assert result is None, assertmsg
+
+    step("Advertise type-5 routes again")
+
+    h1.run('vtysh  -c "config t" \
+                   -c "router bgp 111" \
+                   -c "address-family ipv4" \
+                   -c "network 100.0.0.21/32"')
+    h1.run('vtysh  -c "config t" \
+                   -c "router bgp 111" \
+                   -c "address-family ipv6" \
+                   -c "network 100::21/128"')
+
+    result, assertmsg = evpn_gateway_ip_show_op_check("base")
+    if result is not None:
+        generate_support_bundle()
+
+    assert result is None, assertmsg
+
+    write_test_footer(tc_name)
+
+
+def test_evpn_gateway_ip_flap_rt2(request):
+    """
+     Withdraw EVPN type-2 routes and check O/Ps at PE1 and PE2
+     """
+    tgen = get_topogen()
+    tc_name = request.node.name
+    write_test_header(tc_name)
+
+    kernelv = platform.release()
+    if topotest.version_cmp(kernelv, "4.15") < 0:
+        logger.info("For EVPN, kernel version should be minimum 4.15")
+        write_test_footer(tc_name)
+        return
+
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+
+    step("Shut down VxLAN interface at PE1 which results in withdraw of type-2 routes")
+
+    pe1 = tgen.gears['PE1']
+
+    pe1.run('ip link set dev vxlan100 down')
+
+    result, assertmsg = evpn_gateway_ip_show_op_check("no_rt2")
+    if result is not None:
+        generate_support_bundle()
+    assert result is None, assertmsg
+
+    step("Bring up VxLAN interface at PE1 and advertise type-2 routes again")
+
+    pe1.run('ip link set dev vxlan100 up')
+
+    result, assertmsg = evpn_gateway_ip_show_op_check("base")
+    if result is not None:
+        generate_support_bundle()
+    assert result is None, assertmsg
+
+    write_test_footer(tc_name)
+
+
+def test_memory_leak():
+    """Run the memory leak test and report results"""
+    tgen = get_topogen()
+    if not tgen.is_memleak_enabled():
+        pytest.skip("Memory leak test/report is disabled")
+
+    tgen.report_memory_leaks()
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index 36605d44f07ef7ca57d303a7733abe2e2966a7cc..59024f7b71c15265896ec0e7b0cd03e2c271000a 100644 (file)
@@ -46,6 +46,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
 
 class BGPEVPNTopo(Topo):
     "Test topology builder"
index 086bad6481f5f6352336832f52fd0d303d34338d..fd5bb38b988530135e260363eabf016d6d7a2593 100755 (executable)
@@ -365,6 +365,10 @@ def test_ip_pe1_learn():
     "run the IP learn test for PE1"
 
     tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
     host1 = tgen.gears["host1"]
     pe1 = tgen.gears["PE1"]
     pe2 = tgen.gears["PE2"]
@@ -380,6 +384,10 @@ def test_ip_pe2_learn():
     "run the IP learn test for PE2"
 
     tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
     host2 = tgen.gears["host2"]
     pe1 = tgen.gears["PE1"]
     pe2 = tgen.gears["PE2"]
diff --git a/tests/topotests/bgp_features/exabgp.env b/tests/topotests/bgp_features/exabgp.env
deleted file mode 100644 (file)
index 6c554f5..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-
-[exabgp.api]
-encoder = text
-highres = false
-respawn = false
-socket = ''
-
-[exabgp.bgp]
-openwait = 60
-
-[exabgp.cache]
-attributes = true
-nexthops = true
-
-[exabgp.daemon]
-daemonize = true
-pid = '/var/run/exabgp/exabgp.pid'
-user = 'exabgp'
-
-[exabgp.log]
-all = false
-configuration = true
-daemon = true
-destination = '/var/log/exabgp.log'
-enable = true
-level = INFO
-message = false
-network = true
-packets = false
-parser = false
-processes = true
-reactor = true
-rib = false
-routes = false
-short = false
-timers = false
-
-[exabgp.pdb]
-enable = false
-
-[exabgp.profile]
-enable = false
-file = ''
-
-[exabgp.reactor]
-speed = 1.0
-
-[exabgp.tcp]
-acl = false
-bind = ''
-delay = 0
-once = false
-port = 179
diff --git a/tests/topotests/bgp_features/peer1/exa_readpipe.py b/tests/topotests/bgp_features/peer1/exa_readpipe.py
deleted file mode 100644 (file)
index 9e689a2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-"Helper script to read api commands from a pipe and feed them to ExaBGP"
-
-import sys
-
-if len(sys.argv) != 2:
-    sys.exit(1)
-fifo = sys.argv[1]
-
-while True:
-    pipe = open(fifo, "r")
-    with pipe:
-        line = pipe.readline().strip()
-        if line != "":
-            sys.stdout.write("{}\n".format(line))
-            sys.stdout.flush()
-        pipe.close()
-
-sys.exit(0)
diff --git a/tests/topotests/bgp_features/peer1/exabgp.cfg b/tests/topotests/bgp_features/peer1/exabgp.cfg
deleted file mode 100644 (file)
index 2e95252..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-group exabgp {
-        process announce-routes {
-                run "/etc/exabgp/exa_readpipe.py /var/run/exabgp_peer1.in";
-                encoder text;
-        }
-        neighbor 192.168.101.1 {
-                router-id 192.168.101.3;
-                local-address 192.168.101.3;
-                local-as 65403;
-                peer-as 65000;
-        }
-}
diff --git a/tests/topotests/bgp_features/peer2/exa_readpipe.py b/tests/topotests/bgp_features/peer2/exa_readpipe.py
deleted file mode 100644 (file)
index 9e689a2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-"Helper script to read api commands from a pipe and feed them to ExaBGP"
-
-import sys
-
-if len(sys.argv) != 2:
-    sys.exit(1)
-fifo = sys.argv[1]
-
-while True:
-    pipe = open(fifo, "r")
-    with pipe:
-        line = pipe.readline().strip()
-        if line != "":
-            sys.stdout.write("{}\n".format(line))
-            sys.stdout.flush()
-        pipe.close()
-
-sys.exit(0)
diff --git a/tests/topotests/bgp_features/peer2/exabgp.cfg b/tests/topotests/bgp_features/peer2/exabgp.cfg
deleted file mode 100644 (file)
index 1f65547..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-group exabgp {
-        process announce-routes {
-                run "/etc/exabgp/exa_readpipe.py /var/run/exabgp_peer2.in";
-                encoder text;
-        }
-        neighbor 192.168.101.1 {
-                router-id 192.168.101.4;
-                local-address 192.168.101.4;
-                local-as 65404;
-                peer-as 65000;
-        }
-}
diff --git a/tests/topotests/bgp_features/peer3/exa_readpipe.py b/tests/topotests/bgp_features/peer3/exa_readpipe.py
deleted file mode 100644 (file)
index 9e689a2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-"Helper script to read api commands from a pipe and feed them to ExaBGP"
-
-import sys
-
-if len(sys.argv) != 2:
-    sys.exit(1)
-fifo = sys.argv[1]
-
-while True:
-    pipe = open(fifo, "r")
-    with pipe:
-        line = pipe.readline().strip()
-        if line != "":
-            sys.stdout.write("{}\n".format(line))
-            sys.stdout.flush()
-        pipe.close()
-
-sys.exit(0)
diff --git a/tests/topotests/bgp_features/peer3/exabgp.cfg b/tests/topotests/bgp_features/peer3/exabgp.cfg
deleted file mode 100644 (file)
index 8632cc8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-group exabgp {
-        process announce-routes {
-                run "/etc/exabgp/exa_readpipe.py /var/run/exabgp_peer3.in";
-                encoder text;
-        }
-        neighbor 192.168.101.1 {
-                router-id 192.168.101.5;
-                local-address 192.168.101.5;
-                local-as 65405;
-                peer-as 65000;
-        }
-}
diff --git a/tests/topotests/bgp_features/peer4/exa_readpipe.py b/tests/topotests/bgp_features/peer4/exa_readpipe.py
deleted file mode 100644 (file)
index 9e689a2..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-"Helper script to read api commands from a pipe and feed them to ExaBGP"
-
-import sys
-
-if len(sys.argv) != 2:
-    sys.exit(1)
-fifo = sys.argv[1]
-
-while True:
-    pipe = open(fifo, "r")
-    with pipe:
-        line = pipe.readline().strip()
-        if line != "":
-            sys.stdout.write("{}\n".format(line))
-            sys.stdout.flush()
-        pipe.close()
-
-sys.exit(0)
diff --git a/tests/topotests/bgp_features/peer4/exabgp.cfg b/tests/topotests/bgp_features/peer4/exabgp.cfg
deleted file mode 100644 (file)
index 06bc0d6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-group exabgp {
-        process announce-routes {
-                run "/etc/exabgp/exa_readpipe.py /var/run/exabgp_peer4.in";
-                encoder text;
-        }
-        neighbor 192.168.101.1 {
-                router-id 192.168.101.6;
-                local-address 192.168.101.6;
-                local-as 65406;
-                peer-as 65000;
-        }
-}
diff --git a/tests/topotests/bgp_features/r1/bgp_damp_announced.json b/tests/topotests/bgp_features/r1/bgp_damp_announced.json
deleted file mode 100644 (file)
index cb4a2c9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "localAS":65000,
-  "routes":{
-    "192.168.31.0/24": [ { "valid":true, "network":"192.168.31.0\/24", "peerId":"192.168.101.3" } ],
-    "192.168.32.0/24": [ { "valid":true, "network":"192.168.32.0\/24", "peerId":"192.168.101.3" } ],
-    "192.168.33.0/24": [ { "valid":true, "network":"192.168.33.0\/24", "peerId":"192.168.101.3" } ],
-    "192.168.34.0/24": [ { "valid":true, "network":"192.168.34.0\/24", "peerId":"192.168.101.3" } ],
-    "192.168.41.0/24": [ { "valid":true, "network":"192.168.41.0\/24", "peerId":"192.168.101.4" } ],
-    "192.168.42.0/24": [ { "valid":true, "network":"192.168.42.0\/24", "peerId":"192.168.101.4" } ],
-    "192.168.43.0/24": [ { "valid":true, "network":"192.168.43.0\/24", "peerId":"192.168.101.4" } ],
-    "192.168.44.0/24": [ { "valid":true, "network":"192.168.44.0\/24", "peerId":"192.168.101.4" } ],
-    "192.168.51.0/24": [ { "valid":true, "network":"192.168.51.0\/24", "peerId":"192.168.101.5" } ],
-    "192.168.52.0/24": [ { "valid":true, "network":"192.168.52.0\/24", "peerId":"192.168.101.5" } ],
-    "192.168.53.0/24": [ { "valid":true, "network":"192.168.53.0\/24", "peerId":"192.168.101.5" } ],
-    "192.168.54.0/24": [ { "valid":true, "network":"192.168.54.0\/24", "peerId":"192.168.101.5" } ],
-    "192.168.61.0/24": [ { "valid":true, "network":"192.168.61.0\/24", "peerId":"192.168.101.6" } ],
-    "192.168.62.0/24": [ { "valid":true, "network":"192.168.62.0\/24", "peerId":"192.168.101.6" } ],
-    "192.168.63.0/24": [ { "valid":true, "network":"192.168.63.0\/24", "peerId":"192.168.101.6" } ],
-    "192.168.64.0/24": [ { "valid":true, "network":"192.168.64.0\/24", "peerId":"192.168.101.6" } ]
-  }
-}
diff --git a/tests/topotests/bgp_features/r1/bgp_damp_setup.json b/tests/topotests/bgp_features/r1/bgp_damp_setup.json
deleted file mode 100644 (file)
index f9f89db..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-{
-  "ipv4Unicast":{
-    "peers":{
-      "192.168.101.3":{"remoteAs":65403, "state":"Established"},
-      "192.168.101.4":{"remoteAs":65404, "state":"Established"},
-      "192.168.101.5":{"remoteAs":65405, "state":"Established"},
-      "192.168.101.6":{"remoteAs":65406, "state":"Established"}
-    }
-  }
-}
diff --git a/tests/topotests/bgp_features/r2/bgp_damp_announced.json b/tests/topotests/bgp_features/r2/bgp_damp_announced.json
deleted file mode 100644 (file)
index 9394358..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "localAS":65000,
-  "routes":{
-    "192.168.31.0/24": [ { "network":"192.168.31.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.32.0/24": [ { "network":"192.168.32.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.33.0/24": [ { "network":"192.168.33.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.34.0/24": [ { "network":"192.168.34.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.41.0/24": [ { "network":"192.168.41.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.42.0/24": [ { "network":"192.168.42.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.43.0/24": [ { "network":"192.168.43.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.44.0/24": [ { "network":"192.168.44.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.51.0/24": [ { "network":"192.168.51.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.52.0/24": [ { "network":"192.168.52.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.53.0/24": [ { "network":"192.168.53.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.54.0/24": [ { "network":"192.168.54.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.61.0/24": [ { "network":"192.168.61.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.62.0/24": [ { "network":"192.168.62.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.63.0/24": [ { "network":"192.168.63.0\/24", "peerId":"192.168.0.1" } ],
-    "192.168.64.0/24": [ { "network":"192.168.64.0\/24", "peerId":"192.168.0.1" } ]
-  }
-}
diff --git a/tests/topotests/bgp_features/r2/bgp_damp_withdrawn.json b/tests/topotests/bgp_features/r2/bgp_damp_withdrawn.json
deleted file mode 100644 (file)
index f3c54a7..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  "192.168.31.0/24": null,
-  "192.168.32.0/24": null,
-  "192.168.33.0/24": null,
-  "192.168.34.0/24": null,
-  "192.168.41.0/24": null,
-  "192.168.42.0/24": null,
-  "192.168.43.0/24": null,
-  "192.168.44.0/24": null,
-  "192.168.51.0/24": null,
-  "192.168.52.0/24": null,
-  "192.168.53.0/24": null,
-  "192.168.54.0/24": null,
-  "192.168.61.0/24": null,
-  "192.168.62.0/24": null,
-  "192.168.63.0/24": null,
-  "192.168.64.0/24": null
-}
index a68508c4aec8fd9c4c9a5ef453d4b702ba3c9d0f..d19b7722d05cab16a675e46c2f208e7a0ca83657 100644 (file)
@@ -33,7 +33,6 @@ import sys
 import pytest
 import re
 import time
-from time import sleep
 
 # Save the Current Working Directory to find configuration files.
 CWD = os.path.dirname(os.path.realpath(__file__))
@@ -67,14 +66,6 @@ class BGPFeaturesTopo1(Topo):
         for rtrNum in range(1, 6):
             tgen.add_router("r{}".format(rtrNum))
 
-        # create ExaBGP peers
-        for peer_num in range(1, 5):
-            tgen.add_exabgp_peer(
-                "peer{}".format(peer_num),
-                ip="192.168.101.{}".format(peer_num + 2),
-                defaultRoute="via 192.168.101.1",
-            )
-
         # Setup Switches and connections
         for swNum in range(1, 11):
             tgen.add_switch("sw{}".format(swNum))
@@ -100,12 +91,6 @@ class BGPFeaturesTopo1(Topo):
         tgen.gears["r2"].add_link(tgen.gears["sw5"])
         tgen.gears["r5"].add_link(tgen.gears["sw5"])
 
-        # Add ExaBGP peers to sw4
-        tgen.gears["peer1"].add_link(tgen.gears["sw4"])
-        tgen.gears["peer2"].add_link(tgen.gears["sw4"])
-        tgen.gears["peer3"].add_link(tgen.gears["sw4"])
-        tgen.gears["peer4"].add_link(tgen.gears["sw4"])
-
 
 #####################################################
 #
@@ -1110,662 +1095,6 @@ def test_bgp_delayopen_dual():
     # end test_bgp_delayopen_dual
 
 
-def test_bgp_dampening_setup():
-    "BGP route-flap dampening test setup"
-
-    # This test starts four ExaBGP peers, adds them as neighbors to the
-    # configuration of router r1 and checks if connections get established.
-
-    tgen = get_topogen()
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info("Starting BGP route-flap dampening test setup")
-
-    # Start ExaBGP peers connected to r1 via switch 4
-    logger.info("Starting ExaBGP peers")
-    for peer_num in range(1, 5):
-        logger.info("Creating named pipe for ExaBGP peer peer{}".format(peer_num))
-        fifo_in = "/var/run/exabgp_peer{}.in".format(peer_num)
-        if os.path.exists(fifo_in):
-            os.remove(fifo_in)
-        os.mkfifo(fifo_in, 0o777)
-        logger.info("Starting ExaBGP on peer peer{}".format(peer_num))
-        peer = tgen.gears["peer{}".format(peer_num)]
-        peer_dir = os.path.join(CWD, "peer{}".format(peer_num))
-        env_file = os.path.join(CWD, "exabgp.env")
-        peer.start(peer_dir, env_file)
-
-    # Add ExaBGP peers to configuration of router r2
-    logger.info("Adding ExaBGP peers as neighbors to configuration of router r2")
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "neighbor 192.168.101.3 remote-as 65403"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.3 route-map testmap-in"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.3 route-map testmap-out"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "neighbor 192.168.101.4 remote-as 65404"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.4 route-map testmap-in"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.4 route-map testmap-out"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "neighbor 192.168.101.5 remote-as 65405"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.5 route-map testmap-in"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.5 route-map testmap-out"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "neighbor 192.168.101.6 remote-as 65406"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.6 route-map testmap-in"'
-    )
-    tgen.net["r1"].cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.6 route-map testmap-out"'
-    )
-
-    # Check if exabgp peers are up and running
-    logger.info("Checking for established connections to ExaBGP peers on router r1")
-    router = tgen.gears["r1"]
-    reffile = os.path.join(CWD, "r1/bgp_damp_setup.json")
-    expected = json.loads(open(reffile).read())
-    test_func = functools.partial(
-        topotest.router_json_cmp, router, "show ip bgp summary json", expected
-    )
-    _, res = topotest.run_and_expect(test_func, None, count=10, wait=1)
-    assertmsg = (
-        "BGP session on r1 did not establish connections with one ore more ExaBGP peers"
-    )
-    assert res is None, assertmsg
-
-    # end test_bgp_dampening_setup
-
-
-def test_bgp_dampening_route_announce():
-    "Test of BGP route-flap dampening route announcement"
-
-    # This test checks if the four ExaBGP peers can announce routes to router
-    # r1 and if these routes get forwarded to router r2.
-
-    tgen = get_topogen()
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info("Starting test of BGP route-flap dampening route announcement")
-
-    # Announce routes on exabgp peers to r2
-    logger.info("Announcing routes on ExaBGP peers to r1")
-    for prefix_iter in range(1, 5):
-        for peer_num in range(1, 5):
-            pipe = open("/run/exabgp_peer{}.in".format(peer_num), "w")
-            with pipe:
-                pipe.write(
-                    "announce route 192.168.{}{}.0/24 next-hop 192.168.101.{}\n".format(
-                        (peer_num + 2), prefix_iter, (peer_num + 2)
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-
-    # Check if routes announced by ExaBGP peers are present in RIB of router r1
-    logger.info(
-        "Checking if routes announced by ExaBGP peers are present in RIB of router r1"
-    )
-    router = tgen.gears["r1"]
-    reffile = os.path.join(CWD, "r1/bgp_damp_announced.json")
-    expected = json.loads(open(reffile).read())
-    test_func = functools.partial(
-        topotest.router_json_cmp, router, "show ip bgp json", expected
-    )
-    _, res = topotest.run_and_expect(test_func, None, count=10, wait=1)
-    assertmsg = (
-        "BGP session on router r1 did not receive routes announced by ExaBGP peers"
-    )
-    assert res is None, assertmsg
-
-    # Check if routes announced by ExaBGP peers to router r1 have been forwarded
-    # and are now present in RIB of router r2
-    logger.info(
-        "Checking if forwarded routes announced by ExaBGP peers are present in RIB of router r2"
-    )
-    router = tgen.gears["r2"]
-    reffile = os.path.join(CWD, "r2/bgp_damp_announced.json")
-    expected = json.loads(open(reffile).read())
-    test_func = functools.partial(
-        topotest.router_json_cmp, router, "show ip bgp json", expected
-    )
-    _, res = topotest.run_and_expect(test_func, None, count=10, wait=1)
-    assertmsg = "BGP session on router r2 did not receive routes announced by ExaBGP peers forwarded by router r1"
-    assert res is None, assertmsg
-
-    # end test_bgp_dampening_route_announce
-
-
-def test_bgp_dampening_disabled():
-    "Test of BGP route-flapping with dampening disabled"
-
-    # This test verifies that flapped routes do not get withdrawn from the RIB
-    # of router r1 if dampening is disabled.
-
-    tgen = get_topogen()
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info("Starting test of BGP route-flapping with dampening disabled")
-
-    # Flapping routes on ExaBGP peer peer1
-    logger.info(
-        "Flapping routes on ExaBGP peer peer1 with route-flap dampening disabled"
-    )
-    for _ in range(1, 5):
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer1.in", "w")
-            with pipe:
-                pipe.write(
-                    "withdraw route 192.168.3{}.0/24 next-hop 192.168.101.3\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-        sleep(1)  # Give the BGP session on router r1 time to process routes
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer1.in", "w")
-            with pipe:
-                pipe.write(
-                    "announce route 192.168.3{}.0/24 next-hop 192.168.101.3\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-
-    # Verify flapped routes are still present in RIB of router r1
-    logger.info(
-        "Verifying that the flapped routes are still present in RIB of router r1"
-    )
-    router = tgen.gears["r1"]
-    reffile = os.path.join(CWD, "r1/bgp_damp_announced.json")
-    expected = json.loads(open(reffile).read())
-    test_func = functools.partial(
-        topotest.router_json_cmp, router, "show ip bgp json", expected
-    )
-    _, res = topotest.run_and_expect(test_func, None, count=10, wait=1)
-    assertmsg = "BGP session on router r1 removed flapped routes despite route-flap dampening being disabled"
-    assert res is None, assertmsg
-
-    # end test_bgp_dampening_disabled
-
-
-def test_bgp_dampening_config():
-    "Test of BGP route-flap dampening configuration"
-
-    # This test adds peer-group group1 with peers peer1 and peer2 to the
-    # configuration of router r1, sets up dampening configurations with
-    # different profiles and verifies the configured dampening parameters.
-
-    tgen = get_topogen()
-    r_1 = tgen.net["r1"]
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info("Starting test of BGP route-flap dampening configuration")
-
-    # Add peer-group group1 with peers peer1 and peer2
-    logger.info(
-        "Creating peer-group group1 and adding ExaBGP peers peer1 and peer2 to it"
-    )
-    r_1.cmd('vtysh -c "conf t" -c "router bgp 65000" -c "neighbor group1 peer-group"')
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "neighbor 192.168.101.3 peer-group group1"'
-    )  # peer1
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "neighbor 192.168.101.4 peer-group group1"'
-    )  # peer2
-
-    # Enable different dampening profiles for peer1, peer3, group1 and global
-    # configuration
-    logger.info(
-        "Enabling different dampening profiles for peer1, peer3, group1 and global configuration"
-    )
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "bgp dampening 30 300 900 90"'
-    )
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor group1 dampening 20 200 600 60"'
-    )
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.3 dampening 10 100 300 30"'
-    )  # peer1
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "neighbor 192.168.101.5 dampening 10 100 300 30"'
-    )  # peer3
-
-    # Verify route-flap dampening configuration
-    logger.info("Verifying route-flap dampening configuration on router r1")
-    vtyout = r_1.cmd('vtysh -c "show running-config"')
-    assertmsg = "BGP Session on r1 does not show enabled global route-flap dampening in running configuration"
-    assert re.search("bgp dampening 30 300 900 90", vtyout), assertmsg
-    assertmsg = "BGP Session on r1 does not show route-flap dampening enabled for peer-group group1 in running configuration"
-    assert re.search("neighbor group1 dampening 20 200 600 60", vtyout), assertmsg
-    assertmsg = "BGP Session on r1 does not show route-flap dampening enabled for peer peer1 in running configuration"
-    assert re.search(
-        "neighbor 192.168.101.3 dampening 10 100 300 30", vtyout
-    ), assertmsg
-    assertmsg = "BGP Session on r1 does not show route-flap dampening enabled for peer peer3 in running configuration"
-    assert re.search(
-        "neighbor 192.168.101.5 dampening 10 100 300 30", vtyout
-    ), assertmsg
-
-    # end test_bgp_dampening_config
-
-
-def test_bgp_dampening_profile_peer_over_group():
-    "Test of BGP route-flap dampening profile preferences: peer over group"
-
-    # This test verifies that the dampening profile of a peer takes precedence
-    # over the dampening profile of its peer-group by flapping the peers routes
-    # until dampened and comparing the reuse times to the one specified in the
-    # dampening configuration.
-
-    tgen = get_topogen()
-    r_1 = tgen.net["r1"]
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info(
-        "Starting test of BGP route-flap dampening profile preferences: peer over group"
-    )
-
-    # Flapping routes on ExaBGP peer peer1
-    logger.info(
-        "Flapping routes on ExaBGP peer peer1 with route-flap dampening enabled"
-    )
-    for _ in range(1, 5):
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer1.in", "w")
-            with pipe:
-                pipe.write(
-                    "withdraw route 192.168.3{}.0/24 next-hop 192.168.101.3\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-        sleep(1)  # Give the BGP session on router r1 time to process routes
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer1.in", "w")
-            with pipe:
-                pipe.write(
-                    "announce route 192.168.3{}.0/24 next-hop 192.168.101.3\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-
-    # Check damped paths on r1 for routes of peer1 witn peer profile
-    logger.info(
-        "Checking if router r1 used the correct dampening profile on routes flapped by ExaBGP peer peer1"
-    )
-    sleep(5)  # Wait 5 seconds for paths to show up in dampened-paths list
-    vtyout = r_1.cmd('vtysh -c "show ip bgp dampening dampened-paths"')
-    routes = re.findall(r"\*d 192\.168\.3\d\.0\/24.*", vtyout)
-    assertmsg = (
-        "BGP session on router r1 did not dampen routes flapped by ExaBGP peer peer1"
-    )
-    assert len(routes) == 4, assertmsg
-    assertmsg = "BGP session on router r1 used wrong dampening profile for a route flapped by ExaBGP peer peer1"
-    for route in routes:
-        assert (int(route.split()[3].split(":")[0]) == 0) and (  # hours of reuse time
-            35 > int(route.split()[3].split(":")[1]) > 25
-        ), assertmsg  # minutes of reuse time
-
-    # end test_bgp_dampening_profile_peer_over_group
-
-
-def test_bgp_dampening_profile_group_over_global():
-    "Test of BGP route-flap dampening profile preferences: group over global"
-
-    # This test verifies that the dampening profile of a peer-group takes
-    # precedence over the global dampening profile by flapping the routes of a
-    # peer-group member until dampened and comparing the reuse times to the one
-    # specified in the dampening configuration.
-
-    tgen = get_topogen()
-    r_1 = tgen.net["r1"]
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info(
-        "Starting test of BGP route-flap dampening profile preferences: group over global"
-    )
-
-    # Flapping routes on ExaBGP peer peer2
-    logger.info(
-        "Flapping routes on ExaBGP peer peer2 with route-flap dampening enabled"
-    )
-    for _ in range(1, 5):
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer2.in", "w")
-            with pipe:
-                pipe.write(
-                    "withdraw route 192.168.4{}.0/24 next-hop 192.168.101.4\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-        sleep(1)  # Give the BGP session on router r1 time to process routes
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer2.in", "w")
-            with pipe:
-                pipe.write(
-                    "announce route 192.168.4{}.0/24 next-hop 192.168.101.4\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-
-    # Check damped paths on r1 for routes of peer2 witn group profile
-    logger.info(
-        "Checking if router r1 used the correct dampening profile on routes flapped by ExaBGP peer peer2"
-    )
-    sleep(5)  # wait 5 seconds for paths to shop up in damp list
-    vtyout = r_1.cmd('vtysh -c "show ip bgp dampening dampened-paths"')
-    routes = re.findall(r"\*d 192\.168\.4\d\.0\/24.*", vtyout)
-    assertmsg = (
-        "BGP session on router r1 did not dampen routes flapped by ExaBGP peer peer2"
-    )
-    assert len(routes) == 4, assertmsg
-    assertmsg = "BGP session on router r1 used wrong dampening profile for a route flapped by ExaBGP peer peer2"
-    for route in routes:
-        assert (int(route.split()[3].split(":")[0]) == 0) and (  # hours of reuse time
-            65 > int(route.split()[3].split(":")[1]) > 55
-        ), assertmsg  # minutes of reuse time
-
-    # end test_bgp_dampening_profile_group_over_global
-
-
-def test_bgp_dampening_profile_peer_over_global():
-    "Test of BGP route-flap dampening profile preferences: peer over global"
-
-    # This test verifies that the dampening profile of a peer takes precedence
-    # over the global dampening profile by flapping the routes of the peer until
-    # dampened and comparing the reuse times to the one specified in the
-    # dampening configuration.
-
-    tgen = get_topogen()
-    r_1 = tgen.net["r1"]
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info(
-        "Starting test of BGP route-flap dampening profile preferences: peer over global"
-    )
-
-    # Flapping routes on ExaBGP peer peer3
-    logger.info(
-        "Flapping routes on ExaBGP peer peer3 with route-flap dampening enabled"
-    )
-    for _ in range(1, 5):
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer3.in", "w")
-            with pipe:
-                pipe.write(
-                    "withdraw route 192.168.5{}.0/24 next-hop 192.168.101.5\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-        sleep(1)  # Give the BGP session on router r1 time to process routes
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer3.in", "w")
-            with pipe:
-                pipe.write(
-                    "announce route 192.168.5{}.0/24 next-hop 192.168.101.5\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-
-    # Check damped paths on r1 for routes of peer3 witn peer profile
-    logger.info(
-        "Checking if router r1 used the correct dampening profile on routes flapped by ExaBGP peer peer3"
-    )
-    sleep(5)  # wait 5 seconds for paths to shop up in damp list
-    vtyout = r_1.cmd('vtysh -c "show ip bgp dampening dampened-paths"')
-    routes = re.findall(r"\*d 192\.168\.5\d\.0\/24.*", vtyout)
-    assertmsg = (
-        "BGP session on router r1 did not dampen routes flapped by ExaBGP peer peer3"
-    )
-    assert len(routes) == 4, assertmsg
-    assertmsg = "BGP session on router r1 used wrong dampening profile for a route flapped by ExaBGP peer peer3"
-    for route in routes:
-        assert (int(route.split()[3].split(":")[0]) == 0) and (  # hours of reuse time
-            35 > int(route.split()[3].split(":")[1]) > 25
-        ), assertmsg  # minutes of reuse time
-
-    # end test_bgp_dampening_profile_peer_over_global
-
-
-def test_bgp_dampening_profile_global():
-    "Test of BGP route-flap dampening global profile"
-
-    # This test verifies the application of the global dampening profile by
-    # flapping the routes of a peer until dampened and comparing the reuse times
-    # to the one specified in the dampening configuration.
-
-    tgen = get_topogen()
-    r_1 = tgen.net["r1"]
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info("Starting test of BGP route-flap dampening global profile")
-
-    # Flapping routes on ExaBGP peer peer4
-    logger.info(
-        "Flapping routes on ExaBGP peer peer4 with route-flap dampening enabled"
-    )
-    for _ in range(1, 5):
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer4.in", "w")
-            with pipe:
-                pipe.write(
-                    "withdraw route 192.168.6{}.0/24 next-hop 192.168.101.6\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-        sleep(1)  # Give the BGP session on router r1 time to process routes
-        for prefix_iter in range(1, 5):
-            pipe = open("/run/exabgp_peer4.in", "w")
-            with pipe:
-                pipe.write(
-                    "announce route 192.168.6{}.0/24 next-hop 192.168.101.6\n".format(
-                        prefix_iter
-                    )
-                )
-                pipe.close()
-                sleep(0.1)  # ExaBGP API command processing delay
-
-    # Check damped paths on r1 for routes of peer4 witn global profile
-    logger.info(
-        "Checking if router r1 used the global dampening profile on routes flapped by ExaBGP peer peer4"
-    )
-    sleep(5)  # wait 5 seconds for paths to shop up in damp list
-    vtyout = r_1.cmd('vtysh -c "show ip bgp dampening dampened-paths"')
-    routes = re.findall(r"\*d 192\.168\.6\d\.0\/24.*", vtyout)
-    assertmsg = (
-        "BGP session on router r1 did not dampen routes flapped by ExaBGP peer peer4"
-    )
-    assert len(routes) == 4, assertmsg
-    assertmsg = "BGP session on router r1 did not use the global dampening profile for a route flapped by ExaBGP peer peer4"
-    for route in routes:
-        assert (int(route.split()[3].split(":")[0]) == 1) and (  # hours of reuse time
-            35 > int(route.split()[3].split(":")[1]) > 25
-        ), assertmsg  # minutes of reuse time
-
-    # end test_bgp_dampening_profile_global
-
-
-def test_bgp_dampening_withdaw():
-    "Test BGP route-flap dampening route withdraw"
-
-    # This test verifies that the withrawl of dampened routes from the RIB of
-    # router r1 was propagated to router r2.
-
-    tgen = get_topogen()
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info("Starting test of BGP route-flap dampening route withdraw")
-
-    # Check if routes dampened on router r1 have been withdrawn from the RIB on
-    # router r2
-    logger.info(
-        "Checking if routes dampened on router r1 have been withdrawn of RIB on router r2"
-    )
-    reffile = os.path.join(CWD, "r2/bgp_damp_withdrawn.json")
-    expected = json.loads(open(reffile).read())
-    test_func = functools.partial(
-        topotest.router_json_cmp, tgen.gears["r2"], "show ip bgp json", expected
-    )
-    _, res = topotest.run_and_expect(test_func, None, count=5, wait=1)
-    assertmsg = "BGP session on router r2 did not receive withdraw of routes dampened on router r1"
-    assert res is None, assertmsg
-
-    # end test_bgp_dampening_withdaw
-
-
-def test_bgp_dampening_cleanup():
-    "BGP route-flap dampening test cleanup"
-
-    # This test cleans up after other tests associated with route-flap dampening
-    # by disabling all dampening configurations, removing added peers and
-    # peer-groups from the configuration on router r1, and shutting down ExaBGP
-    # peers peer1, peer2 and peer3.
-
-    tgen = get_topogen()
-    r_1 = tgen.net["r1"]
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    logger.info("Starting BGP route-flap dampening test cleanup")
-
-    # Disable all dampening configurations
-    logger.info("Disabling all dampening configurations")
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "no bgp dampening"'
-    )
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "no neighbor group1 dampening"'
-    )
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "no neighbor 192.168.101.3 dampening"'
-    )
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "address-family ipv4 unicast" -c "no neighbor 192.168.101.5 dampening"'
-    )
-
-    # Remove ExaBGP peers from configuration of router r1
-    logger.info("Removing ExaBGP peers from configuration of router r1")
-    for router_num in range(3, 7):
-        r_1.cmd(
-            'vtysh -c "conf t" -c "router bgp 65000" -c "no neighbor 192.168.101.{}"'.format(
-                router_num
-            )
-        )
-
-    # Remove peer-group group1 from configuration of router r1
-    logger.info("Removing peer-group group1 peers from configuration of router r1")
-    r_1.cmd(
-        'vtysh -c "conf t" -c "router bgp 65000" -c "no neighbor group1 peer-group"'
-    )
-
-    # Stop ExaBGP peers and remove associated named pipes
-    logger.info("Stopping ExaBGP peers and removing associated named pipes")
-    for peer_num in range(1, 5):
-        logger.info("Terminating ExaBGP on peer peer{}".format(peer_num))
-        peer = tgen.gears["peer{}".format(peer_num)]
-        logger.info("Removing named pipe of ExaBGP peer peer{}".format(peer_num))
-        fifo_in = "/var/run/exabgp_peer{}.in".format(peer_num)
-        peer.stop()
-        if os.path.exists(fifo_in):
-            os.remove(fifo_in)
-
-    # end test_bgp_dampening_cleanup
-
-
-def test_bgp_dampening_aftermath():
-    "BGP route-flap dampening aftermath test"
-
-    # This test verifies routers r1 and r2 not being affected by the route-flap
-    # dampening test series.
-
-    tgen = get_topogen()
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    # Check BGP Summary on routers r1 and r2
-    for rtr_num in [1, 2]:
-        logger.info(
-            "Checking if BGP router on r{} remains unaffected by route-flap dampening tests".format(
-                rtr_num
-            )
-        )
-        router = tgen.gears["r{}".format(rtr_num)]
-        reffile = os.path.join(CWD, "r{}/show_bgp.json".format(rtr_num))
-        expected = json.loads(open(reffile).read())
-        test_func = functools.partial(
-            topotest.router_json_cmp, router, "show ip bgp json", expected
-        )
-        _, res = topotest.run_and_expect(test_func, None, count=10, wait=2)
-        assertmsg = "BGP routes on router r{} are wrong after route-flap dampening tests".format(
-            rtr_num
-        )
-        assert res is None, assertmsg
-
-    # end test_bgp_dampening_aftermath
-
-
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]
     sys.exit(pytest.main(args))
index ee57b9c4796e633fe1e05a9624fde17c2646c6df..330ae5e437607b915ed98b881f6504b4ab28af8c 100644 (file)
@@ -139,6 +139,9 @@ from lib.common_config import (
     required_linux_kernel_version,
 )
 
+pytestmark = [pytest.mark.bgpd]
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/bgp_gr_topojson_topo1.json".format(CWD)
 try:
index b6f8bf4cd9246404d5cb8b3bebb6006315fa65ee..83bf4fcc1832d2db0adfa20b74237467a185331c 100644 (file)
@@ -138,6 +138,9 @@ from lib.common_config import (
     required_linux_kernel_version,
 )
 
+pytestmark = [pytest.mark.bgpd]
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/bgp_gr_topojson_topo2.json".format(CWD)
 try:
@@ -246,6 +249,8 @@ def configure_gr_followed_by_clear(tgen, topo, input_dict, tc_name, dut, peer):
     This function groups the repetitive function calls into one function.
     """
 
+    logger.info("configure_gr_followed_by_clear: dut %s peer %s", dut, peer)
+
     result = create_router_bgp(tgen, topo, input_dict)
     assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
 
@@ -763,9 +768,7 @@ def test_BGP_GR_10_p2(request):
     # Creating configuration from JSON
     reset_config_on_routers(tgen)
 
-    logger.info(
-        "[Step 1] : Test Setup " "[Helper Mode]R3-----R1[Restart Mode] initialized"
-    )
+    step("Test Setup: [Helper Mode]R3-----R1[Restart Mode] initialized")
 
     # Configure graceful-restart
     input_dict = {
@@ -844,6 +847,8 @@ def test_BGP_GR_10_p2(request):
     configure_gr_followed_by_clear(tgen, topo, input_dict, tc_name, dut="r1", peer="r3")
 
     for addr_type in ADDR_TYPES:
+        step("Verifying GR config and operational state for addr_type {}".format(addr_type))
+
         result = verify_graceful_restart(
             tgen, topo, addr_type, input_dict, dut="r1", peer="r3"
         )
@@ -867,7 +872,7 @@ def test_BGP_GR_10_p2(request):
 
         # verify multi address family
         result = verify_gr_address_family(
-            tgen, topo, addr_type, "ipv4Unicast", dut="r1"
+            tgen, topo, addr_type, "ipv4Unicast", dut="r1", peer="r3",
         )
         assert result is True, "Testcase {} : Failed \n Error {}".format(
             tc_name, result
@@ -875,7 +880,7 @@ def test_BGP_GR_10_p2(request):
 
         # verify multi address family
         result = verify_gr_address_family(
-            tgen, topo, addr_type, "ipv6Unicast", dut="r1"
+            tgen, topo, addr_type, "ipv6Unicast", dut="r1", peer="r3",
         )
         assert result is True, "Testcase {} : Failed \n Error {}".format(
             tc_name, result
@@ -883,7 +888,7 @@ def test_BGP_GR_10_p2(request):
 
         # verify multi address family
         result = verify_gr_address_family(
-            tgen, topo, addr_type, "ipv4Unicast", dut="r3"
+            tgen, topo, addr_type, "ipv4Unicast", dut="r3", peer="r1",
         )
         assert result is True, "Testcase {} : Failed \n Error {}".format(
             tc_name, result
@@ -891,12 +896,14 @@ def test_BGP_GR_10_p2(request):
 
         # verify multi address family
         result = verify_gr_address_family(
-            tgen, topo, addr_type, "ipv6Unicast", dut="r3"
+            tgen, topo, addr_type, "ipv6Unicast", dut="r3", peer="r1",
         )
         assert result is True, "Testcase {} : Failed \n Error {}".format(
             tc_name, result
         )
 
+    step("Killing bgpd on r1")
+
     # Kill BGPd daemon on R1
     kill_router_daemons(tgen, "r1", ["bgpd"])
 
@@ -914,6 +921,8 @@ def test_BGP_GR_10_p2(request):
             tc_name, result
         )
 
+    step("Starting bgpd on r1")
+
     # Start BGPd daemon on R1
     start_router_daemons(tgen, "r1", ["bgpd"])
 
@@ -1668,7 +1677,7 @@ def test_BGP_GR_26_p2(request):
 
         # verify multi address family
         result = verify_gr_address_family(
-            tgen, topo, addr_type, "ipv4Unicast", dut="r1"
+            tgen, topo, addr_type, "ipv4Unicast", dut="r1", peer="r3",
         )
         assert result is True, "Testcase {} : Failed \n Error {}".format(
             tc_name, result
@@ -1676,7 +1685,7 @@ def test_BGP_GR_26_p2(request):
 
         # verify multi address family
         result = verify_gr_address_family(
-            tgen, topo, addr_type, "ipv6Unicast", dut="r1"
+            tgen, topo, addr_type, "ipv6Unicast", dut="r1", peer="r3",
         )
         assert result is True, "Testcase {} : Failed \n Error {}".format(
             tc_name, result
@@ -1684,7 +1693,7 @@ def test_BGP_GR_26_p2(request):
 
         # verify multi address family
         result = verify_gr_address_family(
-            tgen, topo, addr_type, "ipv4Unicast", dut="r3"
+            tgen, topo, addr_type, "ipv4Unicast", dut="r3", peer="r1",
         )
         assert result is True, "Testcase {} : Failed \n Error {}".format(
             tc_name, result
@@ -1692,7 +1701,7 @@ def test_BGP_GR_26_p2(request):
 
         # verify multi address family
         result = verify_gr_address_family(
-            tgen, topo, addr_type, "ipv6Unicast", dut="r3"
+            tgen, topo, addr_type, "ipv6Unicast", dut="r3", peer="r1",
         )
         assert result is True, "Testcase {} : Failed \n Error {}".format(
             tc_name, result
index fe945a4565b76f0c8750537146e7b7926381fc87..77f86a0bb801bc072774195b32fbe3b87529e78d 100644 (file)
@@ -75,6 +75,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 868aec9f3e46aa77ec8a7ff4c8b022c39ad1ac77..fcfeaab6132cd450eab516bda6020683475c388c 100644 (file)
@@ -75,6 +75,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/ebgp_gshut_topo1.json".format(CWD)
 try:
index 69f491637453cef20b5f532f2da931335893c905..d83e9e25a1e046aacd4a1721af7889c6f7f3dd79 100644 (file)
@@ -75,6 +75,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/ibgp_gshut_topo1.json".format(CWD)
 try:
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_ibgp_nbr.json b/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_ibgp_nbr.json
new file mode 100644 (file)
index 0000000..7f928b9
--- /dev/null
@@ -0,0 +1,85 @@
+{
+    "ipv4base": "10.0.0.0",
+    "ipv4mask": 24,
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {"ipv4": "10.0.0.0", "v4mask": 24, "ipv6": "fd00::", "v6mask": 64},
+    "lo_prefix": {"ipv4": "1.0.", "v4mask": 32, "ipv6": "2001:DB8:F::", "v6mask": 128},
+    "routers": {
+        "r0": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link1": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link2": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link3": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link4": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link5": {"ipv4": "auto", "ipv6": "auto"}}
+        },
+        "r1": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r0-link1": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link2": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link3": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link4": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link5": {"ipv4": "auto", "ipv6": "auto"},
+                "r2-link0": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link0": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop"
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }}},
+        "r2": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link0": {"ipv4": "auto", "ipv6": "auto"},
+                "r3": {"ipv4": "auto", "ipv6": "auto"},
+                "r4": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "200",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link0": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop"
+                                        }
+                                    }
+                                },
+                                "r3": {"dest_link": {"r2": {}}}}
+                        }
+                    }
+                }}},
+        "r3": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "200",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {"unicast": {"neighbor": {"r2": {"dest_link": {"r3": {}}}}}}
+                }}},
+        "r4": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}}
+        }}}
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_nbr.json b/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_nbr.json
new file mode 100644 (file)
index 0000000..8e0f448
--- /dev/null
@@ -0,0 +1,95 @@
+{
+    "ipv4base": "10.0.0.0",
+    "ipv4mask": 24,
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {"ipv4": "10.0.0.0", "v4mask": 24, "ipv6": "fd00::", "v6mask": 64},
+    "lo_prefix": {"ipv4": "1.0.", "v4mask": 32, "ipv6": "2001:DB8:F::", "v6mask": 128},
+    "routers": {
+        "r0": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link1": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link2": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link3": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link4": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link5": {"ipv4": "auto", "ipv6": "auto"}}
+        },
+        "r1": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r0-link1": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link2": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link3": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link4": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link5": {"ipv4": "auto", "ipv6": "auto"},
+                "r2-link0": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link0": {
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4"
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }}},
+        "r2": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link0": {"ipv4": "auto", "ipv6": "auto"},
+                "r3": {"ipv4": "auto", "ipv6": "auto"},
+                "r4": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "200",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "neighbor": {
+                                "r4": {"dest_link": {"r2": {"activate": "ipv4"}}}
+                            }
+                        }
+                    },
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link0": {
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4"
+                                        }
+                                    }
+                                },
+                                "r3": {"dest_link": {"r2": {}}}}
+                        }
+                    }}}},
+        "r3": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "300",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {"unicast": {"neighbor": {"r2": {"dest_link": {"r3": {}}}}}}
+                }}},
+        "r4": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "400",
+                "address_family": {
+                    "ipv4": {"unicast": {"neighbor": {"r2": {"dest_link": {"r4": {}}}}}}
+                }}}}}
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_unnumbered_nbr.json b/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ebgp_unnumbered_nbr.json
new file mode 100644 (file)
index 0000000..72d3a93
--- /dev/null
@@ -0,0 +1,97 @@
+{
+    "ipv4base": "10.0.0.0",
+    "ipv4mask": 24,
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {"ipv4": "10.0.0.0", "v4mask": 24, "ipv6": "fd00::", "v6mask": 64},
+    "lo_prefix": {"ipv4": "1.0.", "v4mask": 32, "ipv6": "2001:DB8:F::", "v6mask": 128},
+    "routers": {
+        "r0": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link1": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link2": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link3": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link4": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link5": {"ipv4": "auto", "ipv6": "auto"}}
+        },
+        "r1": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r0-link1": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link2": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link3": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link4": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link5": {"ipv4": "auto", "ipv6": "auto"},
+                "r2-link0": {"ipv4": "auto"}},
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link0": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop",
+                                            "neighbor_type": "unnumbered"
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }}},
+        "r2": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link0": {"ipv4": "auto"},
+                "r3": {"ipv4": "auto", "ipv6": "auto"},
+                "r4": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "200",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "neighbor": {
+                                "r4": {"dest_link": {"r2": {"activate": "ipv4"}}}
+                            }
+                        }
+                    },
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link0": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop",
+                                            "neighbor_type": "unnumbered"
+                                        }
+                                    }
+                                },
+                                "r3": {"dest_link": {"r2": {}}}}
+                        }
+                    }}}},
+        "r3": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "300",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {"unicast": {"neighbor": {"r2": {"dest_link": {"r3": {}}}}}}
+                }}},
+        "r4": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "400",
+                "address_family": {
+                    "ipv4": {"unicast": {"neighbor": {"r2": {"dest_link": {"r4": {}}}}}}
+                }}}}}
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ibgp_nbr.json b/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ibgp_nbr.json
new file mode 100644 (file)
index 0000000..a7ea0c8
--- /dev/null
@@ -0,0 +1,95 @@
+{
+    "ipv4base": "10.0.0.0",
+    "ipv4mask": 24,
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {"ipv4": "10.0.0.0", "v4mask": 24, "ipv6": "fd00::", "v6mask": 64},
+    "lo_prefix": {"ipv4": "1.0.", "v4mask": 32, "ipv6": "2001:DB8:F::", "v6mask": 128},
+    "routers": {
+        "r0": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link1": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link2": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link3": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link4": {"ipv4": "auto", "ipv6": "auto"},
+                "r1-link5": {"ipv4": "auto", "ipv6": "auto"}}
+        },
+        "r1": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r0-link1": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link2": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link3": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link4": {"ipv4": "auto", "ipv6": "auto"},
+                "r0-link5": {"ipv4": "auto", "ipv6": "auto"},
+                "r2-link0": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link0": {
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4"
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }}},
+        "r2": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link0": {"ipv4": "auto", "ipv6": "auto"},
+                "r3": {"ipv4": "auto", "ipv6": "auto"},
+                "r4": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "neighbor": {
+                                "r4": {"dest_link": {"r2": {"activate": "ipv4"}}}
+                            }
+                        }
+                    },
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link0": {
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4"
+                                        }
+                                    }
+                                },
+                                "r3": {"dest_link": {"r2": {}}}}
+                        }
+                    }}}},
+        "r3": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "300",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {"unicast": {"neighbor": {"r2": {"dest_link": {"r3": {}}}}}}
+                }}},
+        "r4": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "400",
+                "address_family": {
+                    "ipv4": {"unicast": {"neighbor": {"r2": {"dest_link": {"r4": {}}}}}}
+                }}}}}
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ibgp_unnumbered_nbr.json b/tests/topotests/bgp_ipv4_over_ipv6/rfc5549_ibgp_unnumbered_nbr.json
new file mode 100644 (file)
index 0000000..5e90d6b
--- /dev/null
@@ -0,0 +1,97 @@
+{
+    "ipv4base": "10.0.0.0",
+    "ipv4mask": 24,
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {"ipv4": "10.0.0.0", "v4mask": 24, "ipv6": "fd00::", "v6mask": 64},
+    "lo_prefix": {"ipv4": "1.0.", "v4mask": 32, "ipv6": "2001:DB8:F::", "v6mask": 128},
+    "routers": {
+        "r0": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link1": {"ipv4": "auto"},
+                "r1-link2": {"ipv4": "auto"},
+                "r1-link3": {"ipv4": "auto"},
+                "r1-link4": {"ipv4": "auto"},
+                "r1-link5": {"ipv4": "auto"}}
+        },
+        "r1": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r0-link1": {"ipv4": "auto"},
+                "r0-link2": {"ipv4": "auto"},
+                "r0-link3": {"ipv4": "auto"},
+                "r0-link4": {"ipv4": "auto"},
+                "r0-link5": {"ipv4": "auto"},
+                "r2-link0": {"ipv4": "auto"}},
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link0": {
+                                            "neighbor_type": "unnumbered",
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4"
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }}},
+        "r2": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r1-link0": {"ipv4": "auto"},
+                "r3": {"ipv4": "auto", "ipv6": "auto"},
+                "r4": {"ipv4": "auto"}},
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "neighbor": {
+                                "r4": {"dest_link": {"r2": {"activate": "ipv4"}}}
+                            }
+                        }
+                    },
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link0": {
+                                            "neighbor_type": "unnumbered",
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4"
+                                        }
+                                    }
+                                },
+                                "r3": {"dest_link": {"r2": {}}}}
+                        }
+                    }}}},
+        "r3": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto", "ipv6": "auto"}},
+            "bgp": {
+                "local_as": "300",
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {"unicast": {"neighbor": {"r2": {"dest_link": {"r3": {}}}}}}
+                }}},
+        "r4": {
+            "links": {
+                "lo": {"ipv4": "auto", "ipv6": "auto", "type": "loopback"},
+                "r2": {"ipv4": "auto"}},
+            "bgp": {
+                "local_as": "400",
+                "address_family": {
+                    "ipv4": {"unicast": {"neighbor": {"r2": {"dest_link": {"r4": {}}}}}}
+                }}}}}
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_ibgp_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_ibgp_nbr.py
new file mode 100644 (file)
index 0000000..4f72cbb
--- /dev/null
@@ -0,0 +1,987 @@
+#!/usr/bin/env python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""RFC5549 Automation."""
+import os
+import sys
+import time
+import json
+import pytest
+from copy import deepcopy
+import ipaddr
+from re import search as re_search
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib.topogen import Topogen, get_topogen
+from mininet.topo import Topo
+
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    get_frr_ipv6_linklocal,
+    write_test_footer,
+    create_prefix_lists,
+    verify_rib,
+    create_static_routes,
+    check_address_types,
+    reset_config_on_routers,
+    step,
+    create_route_maps,
+    create_interfaces_cfg,
+)
+from lib.topolog import logger
+from lib.bgp import (
+    clear_bgp_and_verify,
+    verify_bgp_convergence,
+    create_router_bgp,
+    verify_bgp_rib,
+)
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+# Global variables
+topo = None
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/rfc5549_ebgp_ibgp_nbr.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+# Global variables
+NETWORK = {
+    "ipv4": [
+        "11.0.20.1/32",
+        "11.0.20.2/32",
+        "11.0.20.3/32",
+        "11.0.20.4/32",
+        "11.0.20.5/32",
+    ],
+    "ipv6": ["1::1/128", "1::2/128", "1::3/128", "1::4/128", "1::5/128"],
+}
+MASK = {"ipv4": "32", "ipv6": "128"}
+NEXT_HOP = {
+    "ipv4": ["10.0.0.1", "10.0.1.1", "10.0.2.1", "10.0.3.1", "10.0.4.1"],
+    "ipv6": ["Null0", "Null0", "Null0", "Null0", "Null0"],
+}
+NO_OF_RTES = 2
+NETWORK_CMD_IP = "1.0.1.17/32"
+ADDR_TYPES = check_address_types()
+TOPOOLOGY = """
+      Please view in a fixed-width font such as Courier.
+
+                                      +----+
+                                      | R4 |
+                                      |    |
+                                      +--+-+
+                                         | ipv4 nbr
+          no bgp           ebgp/ibgp     |
+                                         |     ebgp/ibgp
+    +----+ 5links   +----+  8links    +--+-+             +----+
+    |R0  +----------+ R1 +------------+ R2 |    ipv6 nbr |R3  |
+    |    +----------+    +------------+    +-------------+    |
+    +----+          +----+   ipv6 nbr +----+             +----+
+"""
+
+TESTCASES = """
+1. Verify Ipv4 route next hop is changed when advertised using
+next hop -self command
+2. Verify IPv4 route advertised to peer when IPv6 BGP session established
+ using peer-group
+3. Verify IPv4 routes received with IPv6 nexthop are getting advertised
+ to another IBGP peer without changing the nexthop
+4. Verify IPv4 routes advertised with correct nexthop when nexthop
+unchange is configure on EBGP peers
+ """
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """Set up the pytest environment."""
+
+    global topo
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    BGP_CONVERGENCE = verify_bgp_convergence(tgen, topo)
+    assert BGP_CONVERGENCE is True, "setup_module :Failed \n Error:" " {}".format(
+        BGP_CONVERGENCE
+    )
+    logger.info("Running setup_module() done")
+
+
+def teardown_module():
+    """
+    Teardown the pytest environment.
+
+    * `mod`: module name
+    """
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+
+def get_llip(onrouter, intf):
+    """
+    API to get the link local ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `fromnode`: Source node
+    * `tonode` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_llip('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) link local ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    tgen = get_topogen()
+    intf = topo["routers"][onrouter]["links"][intf]["interface"]
+    llip = get_frr_ipv6_linklocal(tgen, onrouter, intf)
+    if llip:
+        logger.info("llip ipv6 address to be set as NH is %s", llip)
+        return llip
+    return None
+
+
+def get_glipv6(onrouter, intf):
+    """
+    API to get the global ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `onrouter`: Source node
+    * `intf` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_glipv6('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) global ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    glipv6 = (topo["routers"][onrouter]["links"][intf]["ipv6"]).split("/")[0]
+    if glipv6:
+        logger.info("Global ipv6 address to be set as NH is %s", glipv6)
+        return glipv6
+    return None
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+def test_ibgp_to_ibgp_p1(request):
+    """
+
+    Test Capability extended nexthop.
+
+    Verify IPv4 routes received with IPv6 nexthop are getting advertised to
+    another IBGP peer without changing the nexthop
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    reset_config_on_routers(tgen)
+    global topo
+    topo23 = deepcopy(topo)
+    build_config_from_json(tgen, topo23, save_bkup=False)
+
+    step("Configure IPv6 EBGP session between R1 and R2 with " "global IPv6 address")
+    step("Configure IPv6 IBGP session betn R2 & R3 using IPv6 global address")
+    step("Enable capability extended-nexthop on both the IPv6 BGP peers")
+    step("Activate same IPv6 nbr from IPv4 unicast family")
+    step("Enable cap ext nh on r1 and r2 and activate in ipv4 addr family")
+    step("Verify bgp convergence as ipv6 nbr is enabled on ipv4 addr family.")
+
+    # verify bgp convergence as ipv6 nbr is enabled on ipv4 addr family.
+    bgp_convergence = verify_bgp_convergence(tgen, topo23)
+    assert bgp_convergence is True, "Testcase  :Failed \n Error:" " {}".format(
+        bgp_convergence
+    )
+
+    step(" Configure 5 IPv4 static" " routes on R1, Nexthop as different links of R0")
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 "
+        "unicast family respectively from R1 using red static cmd "
+        "Advertise loopback from IPv4 unicast family using network command "
+        "from R1"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo23, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step(
+        "IPv4 routes advertised using static and network command are "
+        " received on R2 BGP and routing table , "
+        "verify using show ip bgp, show ip route for IPv4 routes ."
+    )
+
+    gllip = get_llip("r1", "r2-link0")
+    assert gllip is not None, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    # verify the routes with nh as ext_nh
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": gllip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r2 = {
+        "r2": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r3": {
+                                    "dest_link": {
+                                        "r2": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop",
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r3 = {
+        "r3": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r3": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop",
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r3)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "IPv4 routes installed on R3 with global address without "
+        "changing the nexthop ( nexthop should IPv6 link local which is"
+        " received from R1)"
+    )
+    gipv6 = get_glipv6("r1", "r2-link0")
+    dut = "r3"
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": gipv6,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gipv6
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    write_test_footer(tc_name)
+
+
+def test_ext_nh_cap_red_static_network_ibgp_peer_p1(request):
+    """
+
+    Test Extended capability next hop, with ibgp peer.
+
+    Verify IPv4 routes advertise using "redistribute static" and
+    "network command" are received on EBGP peer with IPv6 nexthop
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    reset_config_on_routers(tgen)
+    step(
+        " Configure IPv6 EBGP session between R1 & R2 with global IPv6 address"
+        " Enable capability extended-nexthop on the nbr from both the routers"
+        " Activate same IPv6 nbr from IPv4 unicast family"
+    )
+    configure_bgp_on_r2 = {
+        "r2": {
+            "bgp": {
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r3": {
+                                    "dest_link": {
+                                        "r2": {
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4",
+                                            "next_hop_self": True,
+                                            "activate": "ipv4",
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                },
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r3 = {
+        "r3": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r3": {
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4",
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r3)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "default_ipv4_unicast": "False",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    }
+                },
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    gllip = get_llip("r1", "r2-link0")
+    assert gllip is not None, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": gllip,
+                }
+            ]
+        }
+    }
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    verify_nh_for_nw_cmd_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK_CMD_IP,
+                    "no_of_ip": 1,
+                    "next_hop": gllip,
+                }
+            ]
+        }
+    }
+
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    gllip = get_glipv6("r2", "r3")
+    assert gllip is not None, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    dut = "r3"
+    protocol = "bgp"
+    # verify the routes with nh as ext_nh
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": gllip,
+                }
+            ]
+        }
+    }
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    verify_nh_for_nw_cmd_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK_CMD_IP,
+                    "no_of_ip": 1,
+                    "next_hop": gllip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=gllip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_bgp_peer_group_p1(request):
+    """
+    Test extended capability next hop with peer groups.
+
+    Verify IPv4 routes received with IPv6 nexthop are getting advertised to
+    another IBGP peer without changing the nexthop
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    reset_config_on_routers(tgen)
+    global topo
+    topo1 = deepcopy(topo)
+    step("Configure IPv6 EBGP session between R1 and R2 with " "global IPv6 address")
+    step("Configure IPv6 IBGP session betn R2 & R3 using IPv6 global address")
+    step("Enable capability extended-nexthop on both the IPv6 BGP peers")
+    step("Activate same IPv6 nbr from IPv4 unicast family")
+    step("Enable cap ext nh on r1 and r2 and activate in ipv4 addr family")
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "default_ipv4_unicast": "False",
+                "peer-group": {
+                    "rfc5549": {"capability": "extended-nexthop", "remote-as": "200"}
+                },
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link0": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop",
+                                            "peer-group": "rfc5549",
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    configure_bgp_on_r2 = {
+        "r2": {
+            "bgp": {
+                "default_ipv4_unicast": "False",
+                "peer-group": {
+                    "rfc5549": {"capability": "extended-nexthop", "remote-as": "100"}
+                },
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    configure_bgp_on_r2 = {
+        "r2": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link0": {
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4",
+                                            "peer-group": "rfc5549",
+                                        }
+                                    }
+                                },
+                                "r3": {"dest_link": {"r2": {}}},
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r3 = {
+        "r3": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {"unicast": {"neighbor": {"r2": {"dest_link": {"r3": {}}}}}}
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r3)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify bgp convergence as ipv6 nbr is enabled on ipv4 addr family.")
+    bgp_convergence = verify_bgp_convergence(tgen, topo)
+    assert bgp_convergence is True, "Testcase  :Failed \n Error:" " {}".format(
+        bgp_convergence
+    )
+
+    step(" Configure 2 IPv4 static" " routes on R1, Nexthop as different links of R0")
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 "
+        "unicast family respectively from R1 using red static cmd "
+        "Advertise loopback from IPv4 unicast family using network command "
+        "from R1"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step(
+        "IPv4 routes advertised using static and network command are "
+        " received on R2 BGP and routing table , "
+        "verify using show ip bgp, show ip route for IPv4 routes ."
+    )
+
+    gllip = get_llip("r1", "r2-link0")
+    assert gllip is not None, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": gllip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Enable cap ext nh on r1 and r2 and activate in ipv4 addr family")
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "default_ipv4_unicast": "False",
+                "peer-group": {
+                    "rfc5549": {"capability": "extended-nexthop", "remote-as": "200"}
+                },
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "r1-link0": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop",
+                                            "peer-group": "rfc5549",
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    configure_bgp_on_r2 = {
+        "r2": {
+            "bgp": {
+                "default_ipv4_unicast": "False",
+                "peer-group": {
+                    "rfc5549": {"capability": "extended-nexthop", "remote-as": "100"}
+                },
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    configure_bgp_on_r2 = {
+        "r2": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "r2-link0": {
+                                            "capability": "extended-nexthop",
+                                            "activate": "ipv4",
+                                            "peer-group": "rfc5549",
+                                        }
+                                    }
+                                },
+                                "r3": {"dest_link": {"r2": {}}},
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r3 = {
+        "r3": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {"unicast": {"neighbor": {"r2": {"dest_link": {"r3": {}}}}}}
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r3)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify bgp convergence as ipv6 nbr is enabled on ipv4 addr family.")
+    bgp_convergence = verify_bgp_convergence(tgen, topo)
+    assert bgp_convergence is True, "Testcase  :Failed \n Error:" " {}".format(
+        bgp_convergence
+    )
+
+    step(" Configure 2 IPv4 static" " routes on R1, Nexthop as different links of R0")
+    for rte in range(0, NO_OF_RTES):
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 "
+        "unicast family respectively from R1 using red static cmd "
+        "Advertise loopback from IPv4 unicast family using network command "
+        "from R1"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step(
+        "IPv4 routes advertised using static and network command are "
+        " received on R2 BGP and routing table , "
+        "verify using show ip bgp, show ip route for IPv4 routes ."
+    )
+
+    gllip = get_llip("r1", "r2-link0")
+    assert gllip is not None, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": gllip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_nbr.py
new file mode 100644 (file)
index 0000000..12237fe
--- /dev/null
@@ -0,0 +1,661 @@
+#!/usr/bin/env python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""RFC5549 Automation."""
+import os
+import sys
+import time
+import json
+import pytest
+import datetime
+from copy import deepcopy
+import ipaddr
+from re import search as re_search
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib.topogen import Topogen, get_topogen
+from mininet.topo import Topo
+
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    write_test_footer,
+    create_prefix_lists,
+    get_frr_ipv6_linklocal,
+    verify_rib,
+    create_static_routes,
+    check_address_types,
+    reset_config_on_routers,
+    step,
+    create_route_maps,
+    addKernelRoute,
+    kill_router_daemons,
+    start_router_daemons,
+    create_interfaces_cfg,
+)
+from lib.topolog import logger
+from lib.bgp import (
+    clear_bgp_and_verify,
+    clear_bgp,
+    verify_bgp_convergence,
+    create_router_bgp,
+    verify_bgp_rib,
+)
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+# Global variables
+topo = None
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/rfc5549_ebgp_nbr.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+# Global variables
+NETWORK = {
+    "ipv4": [
+        "11.0.20.1/32",
+        "11.0.20.2/32",
+        "11.0.20.3/32",
+        "11.0.20.4/32",
+        "11.0.20.5/32",
+    ],
+    "ipv6": ["1::1/128", "1::2/128", "1::3/128", "1::4/128", "1::5/128"],
+}
+MASK = {"ipv4": "32", "ipv6": "128"}
+NEXT_HOP = {
+    "ipv4": ["10.0.0.1", "10.0.1.1", "10.0.2.1", "10.0.3.1", "10.0.4.1"],
+    "ipv6": ["Null0", "Null0", "Null0", "Null0", "Null0"],
+}
+NO_OF_RTES = 2
+NETWORK_CMD_IP = "1.0.1.17/32"
+ADDR_TYPES = check_address_types()
+BGP_CONVERGENCE_TIMEOUT = 10
+TOPOOLOGY = """
+      Please view in a fixed-width font such as Courier.
+                                      +----+
+                                      | R4 |
+                                      |    |
+                                      +--+-+
+                                         | ipv4 nbr
+          no bgp           ebgp          |
+                                         |     ebgp/ibgp
+    +----+ 5links   +----+            +--+-+             +----+
+    |R0  +----------+ R1 |            | R2 |    ipv6 nbr |R3  |
+    |    +----------+    +------------+    +-------------+    |
+    +----+          +----+   ipv6 nbr +----+             +----+
+"""
+
+TESTCASES = """
+TC6. Verify BGP speaker advertise IPv4 route to peer only if "extended
+ nexthop capability" is negotiated
+TC7. Verify ipv4 route nexthop updated dynamically when in route-map is
+ applied on receiving BGP peer
+TC8. Verify IPv4 routes advertise using "redistribute static" and "network
+ command" are received on EBGP peer with IPv6 nexthop
+TC10. Verify IPv4 routes are deleted after un-configuring of "network
+command" and "redistribute static knob"
+TC18. Verify IPv4 routes installed with correct nexthop after deactivate
+ and activate neighbor from address family
+TC19. Verify IPv4 route ping is working fine and nexhop installed in kernel
+ as IPv4 link-local address
+TC24. Verify IPv4 prefix-list routes advertised to peer when prefix -list
+ applied in out direction
+TC27. Verify IPv4 routes are intact after BGPd process restart
+TC30. Verify Ipv4 route installed with correct next hop when same route
+ is advertised via IPV4 and IPv6 BGP peers
+TC32. Verify IPv4 route received with IPv6 nexthop can be advertised to
+ another IPv4 BGP peers
+ """
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """Set up the pytest environment."""
+    global topo, ADDR_TYPES
+
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    BGP_CONVERGENCE = verify_bgp_convergence(tgen, topo)
+    assert BGP_CONVERGENCE is True, "setup_module :Failed \n Error:" " {}".format(
+        BGP_CONVERGENCE
+    )
+    logger.info("Running setup_module() done")
+
+
+def teardown_module():
+    """Teardown the pytest environment."""
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+
+def get_llip(onrouter, intf):
+    """
+    API to get the link local ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `fromnode`: Source node
+    * `tonode` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_llip('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) link local ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    tgen = get_topogen()
+    intf = topo["routers"][onrouter]["links"][intf]["interface"]
+    llip = get_frr_ipv6_linklocal(tgen, onrouter, intf)
+    if llip:
+        logger.info("llip ipv6 address to be set as NH is %s", llip)
+        return llip
+    return None
+
+
+def get_glipv6(onrouter, intf):
+    """
+    API to get the global ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `onrouter`: Source node
+    * `intf` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_glipv6('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) global ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    glipv6 = (topo["routers"][onrouter]["links"][intf]["ipv6"]).split("/")[0]
+    if glipv6:
+        logger.info("Global ipv6 address to be set as NH is %s", glipv6)
+        return glipv6
+    return None
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+
+
+def test_ext_nh_cap_red_static_network_ebgp_peer_tc8_p0(request):
+    """
+
+    Test exted capability nexthop with route map in.
+
+    Verify IPv4 routes advertise using "redistribute static" and
+    "network command" are received on EBGP peer with IPv6 nexthop
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    step("Configure IPv6 EBGP session between R1 and R2 with global" " IPv6 address")
+    reset_config_on_routers(tgen)
+
+    step(
+        "Enable capability extended-nexthop on the nbr from both the  "
+        " routers Activate same IPv6 nbr from IPv4 unicast family"
+    )
+    step(
+        " Configure 2 IPv4 static  "
+        "routes on R1 (nexthop for static route exists on different  "
+        "link of R0"
+    )
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv6"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv6"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 "
+        "unicast family respectively from R1 using red static cmd "
+        "Advertise loopback from IPv4 unicast family using network command "
+        "from R1"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "True",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    },
+                    "ipv6": {"unicast": {"redistribute": [{"redist_type": "static"}]}},
+                },
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    glip = get_llip("r1", "r2-link0")
+    assert glip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "IPv4 and IPv6 routes advertised using static and network command "
+        "are received on R2 BGP & routing table , verify using show ip bgp "
+        "show ip route for IPv4 routes and show bgp ipv6,show ipv6 routes "
+        "for IPv6 routes ."
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    for addr_type in ADDR_TYPES:
+        # verify the routes with nh as ext_nh
+        verify_nh_for_static_rtes = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK[addr_type][0],
+                        "no_of_ip": 2,
+                        "next_hop": glip,
+                    }
+                ]
+            }
+        }
+        bgp_rib = verify_bgp_rib(
+            tgen, addr_type, dut, verify_nh_for_static_rtes, next_hop=glip
+        )
+        assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, bgp_rib
+        )
+        result = verify_rib(
+            tgen,
+            addr_type,
+            dut,
+            verify_nh_for_static_rtes,
+            next_hop=glip,
+            protocol=protocol,
+        )
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Verify IPv4 routes are installed with IPv6 global nexthop of R1"
+        " R1 to R2 connected link"
+    )
+
+    verify_nh_for_nw_cmd_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK_CMD_IP,
+                    "no_of_ip": 1,
+                    "next_hop": glip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=glip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=glip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+
+def test_ext_nh_cap_remove_red_static_network_ebgp_peer_tc10_p1(request):
+    """
+
+    Test exted capability nexthop with route map in.
+
+    Verify IPv4 routes are deleted after un-configuring of
+    network command and redistribute static knob
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    step(
+        "Configure IPv6 EBGP session between R1 and R2 with global IPv6"
+        " address Enable capability extended-nexthop on the nbr from both"
+        " the routers , Activate same IPv6 nbr from IPv4 unicast family"
+    )
+    step(
+        " Configure 2 IPv4 static routes "
+        " on R1 nexthop for static route exists on different link of R0"
+    )
+    reset_config_on_routers(tgen)
+
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 unicast"
+        " family respectively from R1. Configure loopback on R1 with IPv4 "
+        "address Advertise loobak from IPv4 unicast family using network "
+        "command from R1"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "local_as": "100",
+                "default_ipv4_unicast": "True",
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    }
+                },
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "IPv4 and IPv6 routes advertised using static and network command are"
+        " received on R2 BGP and routing table , verify using show ip bgp"
+        " show ip route for IPv4 routes and show bgp, show ipv6 routes"
+        " for IPv6 routes ."
+    )
+
+    glipv6 = get_llip("r1", "r2-link0")
+    assert glipv6 is not None, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "advertise_networks": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": get_glipv6,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=get_glipv6
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen,
+        "ipv4",
+        dut,
+        verify_nh_for_static_rtes,
+        next_hop=get_glipv6,
+        protocol=protocol,
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "Verify IPv4 routes are installed with IPv6 global nexthop of R1 "
+        " R1 to R2 connected link"
+    )
+    verify_nh_for_nw_cmd_rtes = {
+        "r1": {
+            "advertise_networks": [
+                {
+                    "network": NETWORK_CMD_IP,
+                    "no_of_ip": 1,
+                    "next_hop": glipv6,
+                }
+            ]
+        }
+    }
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=glipv6, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static", "delete": True}]
+                        }
+                    },
+                    "ipv6": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static", "delete": True}]
+                        }
+                    },
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # verify the routes with nh as ext_nh
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": glipv6,
+                }
+            ]
+        }
+    }
+
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=glipv6, expected=False
+    )
+    assert (
+        bgp_rib is not True
+    ), "Testcase {} : Failed \n Error: Routes still" " present in BGP rib".format(
+        tc_name
+    )
+    result = verify_rib(
+        tgen,
+        "ipv4",
+        dut,
+        verify_nh_for_static_rtes,
+        next_hop=glipv6,
+        protocol=protocol,
+        expected=False,
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Error: Routes " "still present in RIB".format(tc_name)
+
+    step(
+        "After removing IPv4 routes from redistribute static those routes"
+        " are removed from R2, after re-advertising routes which are "
+        " advertised using network are still present in the on R2 with "
+        " IPv6 global nexthop, verify using show ip bgp and show ip routes"
+    )
+
+    verify_nh_for_nw_cmd_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK_CMD_IP,
+                    "no_of_ip": 1,
+                    "next_hop": glipv6,
+                }
+            ]
+        }
+    }
+
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=glipv6, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "advertise_networks": [
+                                {
+                                    "network": NETWORK_CMD_IP,
+                                    "no_of_network": 1,
+                                    "delete": True,
+                                }
+                            ]
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    result = verify_rib(
+        tgen,
+        "ipv4",
+        dut,
+        verify_nh_for_nw_cmd_rtes,
+        next_hop=glipv6,
+        protocol=protocol,
+        expected=False,
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n " "Error: Routes still present in BGP rib".format(
+        tc_name
+    )
+
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_unnumbered_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ebgp_unnumbered_nbr.py
new file mode 100644 (file)
index 0000000..2675f3a
--- /dev/null
@@ -0,0 +1,613 @@
+#!/usr/bin/env python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""RFC5549 Automation."""
+import os
+import sys
+import time
+import json
+import pytest
+import ipaddr
+from copy import deepcopy
+from re import search as re_search
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../../"))
+
+from lib.topogen import Topogen, get_topogen
+from mininet.topo import Topo
+
+from lib.common_config import (
+    write_test_header,
+    start_topology,
+    create_route_maps,
+    write_test_footer,
+    start_router,
+    stop_router,
+    verify_rib,
+    create_static_routes,
+    check_address_types,
+    reset_config_on_routers,
+    step,
+    shutdown_bringup_interface,
+    create_interfaces_cfg,
+    get_frr_ipv6_linklocal,
+)
+from lib.topolog import logger
+from lib.bgp import clear_bgp, verify_bgp_convergence, create_router_bgp, verify_bgp_rib
+
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+# Global variables
+topo = None
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/rfc5549_ebgp_unnumbered_nbr.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+# Global variables
+NO_OF_RTES = 2
+NETWORK_CMD_IP = "1.0.1.17/32"
+NETWORK = {
+    "ipv4": [
+        "11.0.20.1/32",
+        "11.0.20.2/32",
+        "11.0.20.3/32",
+        "11.0.20.4/32",
+        "11.0.20.5/32",
+    ],
+    "ipv6": ["1::1/128", "1::2/128", "1::3/128", "1::4/128", "1::5/128"],
+}
+MASK = {"ipv4": "32", "ipv6": "128"}
+NEXT_HOP = {
+    "ipv4": ["10.0.0.1", "10.0.1.1", "10.0.2.1", "10.0.3.1", "10.0.4.1"],
+    "ipv6": ["Null0", "Null0", "Null0", "Null0", "Null0"],
+}
+INTF_LIST = [
+    "r2-link0",
+    "r2-link1",
+    "r2-link2",
+    "r2-link3",
+    "r2-link4",
+    "r2-link5",
+    "r2-link6",
+    "r2-link7",
+]
+ADDR_TYPES = check_address_types()
+TOPOOLOGY = """
+      Please view in a fixed-width font such as Courier.
+
+                                      +----+
+                                      | R4 |
+                                      |    |
+                                      +--+-+
+                                         | ipv4 nbr
+          no bgp           ebgp/ibgp     |
+                                         |     ebgp/ibgp
+    +----+ 5links   +----+  8links    +--+-+             +----+
+    |R0  +----------+ R1 +------------+ R2 |    ipv6 nbr |R3  |
+    |    +----------+    +------------+    +-------------+    |
+    +----+          +----+   ipv6 nbr +----+             +----+
+"""
+
+TESTCASES = """
+1. Verify IPv4 routes are advertised when IPv6 EBGP loopback session
+ established using Unnumbered interface
+2. Verify IPv4 routes are installed with correct nexthop after
+shut / no shut of nexthop and BGP peer interfaces
+3. Verify IPv4 routes are intact after stop and start the FRR services
+ """
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """Set up the pytest environment."""
+    global topo, ADDR_TYPES
+
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    BGP_CONVERGENCE = verify_bgp_convergence(tgen, topo)
+    assert BGP_CONVERGENCE is True, "setup_module :Failed \n Error:" " {}".format(
+        BGP_CONVERGENCE
+    )
+    logger.info("Running setup_module() done")
+
+
+def teardown_module():
+    """Teardown the pytest environment."""
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+
+def get_llip(onrouter, intf):
+    """
+    API to get the link local ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `fromnode`: Source node
+    * `tonode` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_llip('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) link local ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    tgen = get_topogen()
+    intf = topo["routers"][onrouter]["links"][intf]["interface"]
+    llip = get_frr_ipv6_linklocal(tgen, onrouter, intf)
+    if llip:
+        logger.info("llip ipv6 address to be set as NH is %s", llip)
+        return llip
+    return None
+
+
+def get_glipv6(onrouter, intf):
+    """
+    API to get the global ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `onrouter`: Source node
+    * `intf` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_glipv6('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) global ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    glipv6 = (topo["routers"][onrouter]["links"][intf]["ipv6"]).split("/")[0]
+    if glipv6:
+        logger.info("Global ipv6 address to be set as NH is %s", glipv6)
+        return glipv6
+    return None
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+
+
+def test_unnumbered_loopback_ebgp_nbr_p0(request):
+    """
+
+    Test extended capability nexthop with un numbered ebgp.
+
+    Verify IPv4 routes are advertised when IPv6 EBGP loopback
+    session established using Unnumbered interface
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    reset_config_on_routers(tgen)
+
+    step("Configure IPv6 EBGP Unnumbered session between R1 and R2")
+    step("Enable capability extended-nexthop on both the IPv6 BGP peers")
+    step("Activate same IPv6 nbr from IPv4 unicast family")
+    step("Enable cap ext nh on r1 and r2 and activate in ipv4 addr family")
+    step("Verify bgp convergence as ipv6 nbr is enabled on ipv4 addr family.")
+
+    bgp_convergence = verify_bgp_convergence(tgen, topo)
+    assert bgp_convergence is True, "Testcase {} :Failed \n Error: {}".format(
+        tc_name, bgp_convergence
+    )
+
+    step(" Configure 5 IPv4 static" " routes on R1, Nexthop as different links of R0")
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 "
+        "unicast family respectively from R1 using red static cmd "
+        "Advertise loopback from IPv4 unicast family using network command "
+        "from R1"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    },
+                    "ipv6": {"unicast": {"redistribute": [{"redist_type": "static"}]}},
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step(
+        "IPv4 routes advertised using static and network command are "
+        " received on R2 BGP and routing table , "
+        "verify using show ip bgp, show ip route for IPv4 routes ."
+    )
+
+    llip = get_llip("r1", "r2-link0")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, llip)
+
+    dut = "r2"
+    protocol = "bgp"
+    for rte in range(0, NO_OF_RTES):
+        # verify the routes with nh as ext_nh
+        verify_nh_for_static_rtes = {
+            "r1": {
+                "static_routes": [
+                    {"network": NETWORK["ipv4"][rte], "no_of_ip": 1, "next_hop": llip}
+                ]
+            }
+        }
+        """         interface_list = ['r1-link0','r1-link1']
+        nh_list =[]
+        for i in range(NO_OF_RTES):
+            nh_list.append(topo['routers']['r2']['links'][i][
+                'interface']) """
+        bgp_rib = verify_rib(
+            tgen,
+            "ipv4",
+            dut,
+            # verify_nh_for_static_rtes, next_hop='r2-r1-eth0')
+            verify_nh_for_static_rtes,
+            next_hop=llip,
+        )
+        assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, bgp_rib
+        )
+        result = verify_rib(
+            tgen,
+            "ipv4",
+            dut,
+            verify_nh_for_static_rtes,
+            next_hop=llip,
+            protocol=protocol,
+        )
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    # verify the routes with nh as ext_nh
+    verify_nh_for_nw_rtes = {
+        "r1": {
+            "static_routes": [
+                {"network": NETWORK_CMD_IP, "no_of_ip": 1, "next_hop": llip}
+            ]
+        }
+    }
+
+    bgp_rib = verify_rib(
+        tgen,
+        "ipv4",
+        dut,
+        # verify_nh_for_nw_rtes, next_hop='r2-r1-eth0')
+        verify_nh_for_nw_rtes,
+        next_hop=llip,
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    # stop/start -> restart FRR router and verify
+    stop_router(tgen, "r1")
+    stop_router(tgen, "r2")
+    start_router(tgen, "r1")
+    start_router(tgen, "r2")
+    step(
+        "After stop/start of FRR services , verify session up and routes "
+        "came up fine ,nh is proper using show bgp & show ipv6 route on R2 "
+    )
+    bgp_convergence = verify_bgp_convergence(tgen, topo)
+    assert bgp_convergence is True, "Testcase {} :Failed \n Error: {}".format(
+        tc_name, bgp_convergence
+    )
+
+    llip = get_llip("r1", "r2-link0")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # verify the routes with nh as ext_nh
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": llip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen,
+        "ipv4",
+        dut,
+        # verify_nh_for_static_rtes, next_hop='r2-r1-eth0')
+        verify_nh_for_static_rtes,
+        next_hop=llip,
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    verify_nh_for_nw_rtes = {
+        "r1": {
+            "static_routes": [
+                {"network": NETWORK_CMD_IP, "no_of_ip": 1, "next_hop": llip}
+            ]
+        }
+    }
+    bgp_rib = verify_rib(
+        tgen,
+        "ipv4",
+        dut,
+        # verify_nh_for_nw_rtes, next_hop='r2-r1-eth0')
+        verify_nh_for_nw_rtes,
+        next_hop=llip,
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    write_test_footer(tc_name)
+
+
+def test_restart_frr_p2(request):
+    """
+
+    Test extended capability nexthop , restart frr.
+
+    Verify IPv4 routes are intact after stop and start the FRR services
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    reset_config_on_routers(tgen)
+    step("Configure IPv6 EBGP Unnumbered session between R1 and R2")
+    step("Enable capability extended-nexthop on both the IPv6 BGP peers")
+    step("Activate same IPv6 nbr from IPv4 unicast family")
+    step("Enable cap ext nh on r1 and r2 and activate in ipv4 addr family")
+    step("Verify bgp convergence as ipv6 nbr is enabled on ipv4 addr family.")
+    reset_config_on_routers(tgen)
+    bgp_convergence = verify_bgp_convergence(tgen, topo)
+    assert bgp_convergence is True, "Testcase {} :Failed \n Error: {}".format(
+        tc_name, bgp_convergence
+    )
+
+    step(" Configure 5 IPv4 static" " routes on R1, Nexthop as different links of R0")
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 "
+        "unicast family respectively from R1 using red static cmd "
+        "Advertise loopback from IPv4 unicast family using network command "
+        "from R1"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    },
+                    "ipv6": {"unicast": {"redistribute": [{"redist_type": "static"}]}},
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step(
+        "IPv4 routes advertised using static and network command are "
+        " received on R2 BGP and routing table , "
+        "verify using show ip bgp, show ip route for IPv4 routes ."
+    )
+
+    llip = get_llip("r1", "r2-link0")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r2"
+    protocol = "bgp"
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": llip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_rib(tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=llip)
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    verify_nh_for_nw_rtes = {
+        "r1": {
+            "static_routes": [
+                {"network": NETWORK_CMD_IP, "no_of_ip": 1, "next_hop": llip}
+            ]
+        }
+    }
+
+    bgp_rib = verify_rib(tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=llip)
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # stop/start -> restart FRR router and verify
+    stop_router(tgen, "r1")
+    stop_router(tgen, "r2")
+    start_router(tgen, "r1")
+    start_router(tgen, "r2")
+
+    step(
+        "After stop/start of FRR services , verify session up and routes "
+        "came up fine ,nh is proper using show bgp & show ipv6 route on R2 "
+    )
+    bgp_convergence = verify_bgp_convergence(tgen, topo)
+    assert bgp_convergence is True, "Testcase {} :Failed \n Error: {}".format(
+        tc_name, bgp_convergence
+    )
+
+    llip = get_llip("r1", "r2-link0")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # verify the routes with nh as ext_nh
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {"network": NETWORK["ipv4"][0], "no_of_ip": 1, "next_hop": llip}
+            ]
+        }
+    }
+    bgp_rib = verify_rib(tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=llip)
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # verify the routes with nh as ext_nh
+    verify_nh_for_nw_rtes = {
+        "r1": {
+            "static_routes": [
+                {"network": NETWORK_CMD_IP, "no_of_ip": 1, "next_hop": llip}
+            ]
+        }
+    }
+    bgp_rib = verify_rib(tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=llip)
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_nbr.py
new file mode 100644 (file)
index 0000000..871f6b1
--- /dev/null
@@ -0,0 +1,1013 @@
+#!/usr/bin/env python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""RFC5549 Automation."""
+import os
+import sys
+import time
+import json
+import pytest
+from copy import deepcopy
+import ipaddr
+from re import search as re_search
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib.topogen import Topogen, get_topogen
+from mininet.topo import Topo
+
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    addKernelRoute,
+    write_test_footer,
+    create_prefix_lists,
+    verify_rib,
+    create_static_routes,
+    check_address_types,
+    reset_config_on_routers,
+    step,
+    create_route_maps,
+    create_interfaces_cfg,
+    get_frr_ipv6_linklocal,
+)
+from lib.topolog import logger
+from lib.bgp import (
+    clear_bgp_and_verify,
+    verify_bgp_convergence,
+    create_router_bgp,
+    verify_bgp_rib,
+)
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+# Global variables
+topo = None
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/rfc5549_ibgp_nbr.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+# Global variables
+NETWORK = {
+    "ipv4": [
+        "11.0.20.1/32",
+        "11.0.20.2/32",
+        "11.0.20.3/32",
+        "11.0.20.4/32",
+        "11.0.20.5/32",
+    ],
+    "ipv6": ["1::1/128", "1::2/128", "1::3/128", "1::4/128", "1::5/128"],
+}
+MASK = {"ipv4": "32", "ipv6": "128"}
+NEXT_HOP = {
+    "ipv4": ["10.0.0.1", "10.0.1.1", "10.0.2.1", "10.0.3.1", "10.0.4.1"],
+    "ipv6": ["Null0", "Null0", "Null0", "Null0", "Null0"],
+}
+NETWORK_CMD_IP = "1.0.1.17/32"
+NO_OF_RTES = 2
+TOPOOLOGY = """
+      Please view in a fixed-width font such as Courier.
+
+                                      +----+
+                                      | R4 |
+                                      |    |
+                                      +--+-+
+                                         | ipv4 nbr
+          no bgp           ebgp/ibgp     |
+                                         |     ebgp/ibgp
+    +----+ 5links   +----+            +--+-+             +----+
+    |R0  +----------+ R1 |            | R2 |    ipv6 nbr |R3  |
+    |    +----------+    +------------+    +-------------+    |
+    +----+          +----+   ipv6 nbr +----+             +----+
+"""
+
+TESTCASES = """
+1. Verify IPv4 and IPv6 routes advertise using "redistribute static"
+ and "network command" are received on IBGP peer with IPv6 nexthop
+2. Verify IPv4 routes are advertised and withdrawn when IPv6 IBGP session
+ established using loopback interface
+3. Verify IPv4 routes are advertised to peer when static routes are
+ configured with ADMIN distance and tag option
+4. Verify IPv4 routes advertised to peer when BGP session established
+ using link-local address
+ """
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """Set up the pytest environment."""
+
+    global topo
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    BGP_CONVERGENCE = verify_bgp_convergence(tgen, topo)
+    assert BGP_CONVERGENCE is True, "setup_module :Failed \n Error:" " {}".format(
+        BGP_CONVERGENCE
+    )
+    logger.info("Running setup_module() done")
+
+
+def teardown_module():
+    """Teardown the pytest environment."""
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+
+def get_llip(onrouter, intf):
+    """
+    API to get the link local ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `fromnode`: Source node
+    * `tonode` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_llip('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) link local ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    tgen = get_topogen()
+    intf = topo["routers"][onrouter]["links"][intf]["interface"]
+    llip = get_frr_ipv6_linklocal(tgen, onrouter, intf)
+
+    if llip:
+        logger.info("llip ipv6 address to be set as NH is %s", llip)
+        return llip
+    return None
+
+
+def get_glipv6(onrouter, intf):
+    """
+    API to get the global ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `onrouter`: Source node
+    * `intf` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_glipv6('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) global ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    glipv6 = (topo["routers"][onrouter]["links"][intf]["ipv6"]).split("/")[0]
+    if glipv6:
+        logger.info("Global ipv6 address to be set as NH is %s", glipv6)
+        return glipv6
+    return None
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+
+
+def test_ext_nh_cap_red_static_network_ibgp_peer_p1(request):
+    """
+
+    Test extended capability nexthop with ibgp peer.
+
+    Verify IPv4 and IPv6 routes advertise using "redistribute static"
+    and "network command" are received on IBGP peer with IPv6 nexthop
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    reset_config_on_routers(tgen)
+    step(
+        "Configure IPv6 EBGP session between R1 and R2 with global IPv6"
+        " address Enable capability extended-nexthop on the nbr from both"
+        " the routers"
+    )
+    step(
+        "Change ebgp to ibgp nbrs between r1 and r2 , Activate same IPv6"
+        " nbr from IPv4 unicast family "
+    )
+
+    step(
+        " Configure 5 IPv4 static routes"
+        " on R1 nexthop for static route exists on different link of R0"
+    )
+
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 unicast"
+        " family respectively from R1.Configure loopback on R1 with IPv4 addr"
+        " & Advertise loopback from IPv4 unicast family using network cmd "
+        " from R1"
+    )
+    # this test case needs ipv6 routes to be configured
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    },
+                    "ipv6": {"unicast": {"redistribute": [{"redist_type": "static"}]}},
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    glip = get_llip("r1", "r2-link0")
+    assert glip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "IPv4 and IPv6 routes advertised using static & network command are"
+        "received on R2 BGP and routing table , verify using show ip bgp"
+        "show ip route  for IPv4 routes and show bgp, show ipv6 routes"
+        "for IPv6 routes ."
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    # verify the routes with nh as ext_nh
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": glip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=glip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=glip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "Verify IPv4 routes are installed with IPv6 global nexthop of R1"
+        "R1 to R2 connected link"
+    )
+    verify_nh_for_nw_cmd_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK_CMD_IP,
+                    "no_of_ip": 1,
+                    "next_hop": glip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=glip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=glip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_ext_nh_cap_admin_dist_tag_ibgp_peer_p1(request):
+    """
+
+    Test extended capability nexthop with admin distance and route tag.
+
+    Verify IPv4 routes are advertised to peer when static routes
+    are configured with ADMIN distance and tag option
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    reset_config_on_routers(tgen)
+    step(
+        "Configure IPv6 EBGP session between R1 and R2 with global IPv6"
+        " address Enable capability extended-nexthop on the nbr from both"
+        " the routers"
+    )
+    step(
+        "Change ebgp to ibgp nbrs between r1 and r2 , Activate same IPv6"
+        " nbr from IPv4 unicast family "
+    )
+    step(
+        " Configure 5 IPv4 static routes"
+        " on R1 nexthop for static route exists on different link of R0"
+    )
+    count = 0
+    for rte in range(0, NO_OF_RTES):
+        count += 1
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                        "admin_distance": 100 + count,
+                        "tag": 4001 + count,
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+    step(
+        "Advertise static routes from IPv4 unicast family & IPv6 unicast"
+        " family respectively from R1.Configure loopback on R1 with IPv4 "
+        "address & Advertise loopback from IPv4 unicast family "
+        "using network cmd from R1"
+    )
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {"unicast": {"redistribute": [{"redist_type": "static"}]}}
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    glip = get_llip("r1", "r2-link0")
+    assert glip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "IPv4 and IPv6 routes advertised using static & network cmd are"
+        "received on R2 BGP and routing table , verify using show ip bgp"
+        "show ip route  for IPv4 routes and show bgp, show ipv6 routes"
+        "for IPv6 routes ."
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    count = 0
+    # verify the routes with nh as ext_nh
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": glip,
+                    "admin_distance": 100 + count,
+                    "tag": 4001 + count,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=glip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=glip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    count = 0
+    for rte in range(0, NO_OF_RTES):
+        count += 10
+        input_dict_2 = {
+            "r3": {
+                "prefix_lists": {
+                    "ipv4": {
+                        "pf_list_1_ipv4": [
+                            {
+                                "seqid": 0 + count,
+                                "action": "permit",
+                                "network": NETWORK["ipv4"][rte],
+                            }
+                        ]
+                    }
+                }
+            }
+        }
+        result = create_prefix_lists(tgen, input_dict_2)
+        assert result is True, "Testcase {} : Failed \n " "Error: {}".format(
+            tc_name, result
+        )
+
+        # Create route map
+        input_dict_6 = {
+            "r3": {
+                "route_maps": {
+                    "rmap_match_tag_1_{}".format("ipv4"): [
+                        {
+                            "action": "deny",
+                            "match": {
+                                "ipv4": {"prefix_lists": "pf_list_1_{}".format("ipv4")}
+                            },
+                        }
+                    ]
+                }
+            }
+        }
+        result = create_route_maps(tgen, input_dict_6)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+        # Configure neighbor for route map
+        input_dict_7 = {
+            "r1": {
+                "bgp": {
+                    "address_family": {
+                        "ipv6": {
+                            "unicast": {
+                                "neighbor": {
+                                    "r2": {
+                                        "dest_link": {
+                                            "r1-link0": {
+                                                "route_maps": [
+                                                    {
+                                                        "name": "rmap_match_tag_1_ipv4",
+                                                        "direction": "out",
+                                                    }
+                                                ]
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        result = create_router_bgp(tgen, topo, input_dict_7)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    write_test_footer(tc_name)
+
+
+def test_ibgp_loopback_nbr_p1(request):
+    """
+    Verify Extended capability nexthop with loopback interface.
+
+    Verify IPv4 routes are advertised and withdrawn when IPv6 IBGP
+    session established using loopback interface
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    global topo
+    topo1 = deepcopy(topo)
+    reset_config_on_routers(tgen)
+    step("Configure IPv6 global address between R1 and R2")
+    step(
+        "Configure loopback on R1 and R2 and establish EBGP session "
+        "between R1 and R2 over loopback global ip"
+    )
+    step("Configure static route on R1 and R2 for loopback reachability")
+    step("Enable cap ext nh on r1 and r2 and activate in ipv4 addr family")
+
+    for routerN in ["r1", "r2"]:
+        for addr_type in ["ipv6"]:
+            for bgp_neighbor in topo1["routers"][routerN]["bgp"]["address_family"][
+                addr_type
+            ]["unicast"]["neighbor"].keys():
+                # Adding ['source_link'] = 'lo' key:value pair
+                if bgp_neighbor == "r1" or bgp_neighbor == "r2":
+                    topo1["routers"][routerN]["bgp"]["address_family"][addr_type][
+                        "unicast"
+                    ]["neighbor"][bgp_neighbor]["dest_link"] = {
+                        "lo": {
+                            "source_link": "lo",
+                            "ebgp_multihop": 2,
+                            "capability": "extended-nexthop",
+                            "activate": "ipv4",
+                        }
+                    }
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo1, save_bkup=False)
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {"r1-link0": {"deactivate": "ipv6"}}
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r2 = {
+        "r2": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {"r2-link0": {"deactivate": "ipv6"}}
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {"r1-link0": {"deactivate": "ipv4"}}
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r2 = {
+        "r2": {
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {"r2-link0": {"deactivate": "ipv4"}}
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    r2_lo_v4 = topo["routers"]["r2"]["links"]["lo"]["ipv4"]
+    r2_lo_v6 = topo["routers"]["r2"]["links"]["lo"]["ipv6"]
+    r1_lo_v4 = topo["routers"]["r1"]["links"]["lo"]["ipv4"]
+    r1_lo_v6 = topo["routers"]["r1"]["links"]["lo"]["ipv6"]
+    r1_r2_intf = topo["routers"]["r1"]["links"]["r2-link0"]["interface"]
+    r2_r1_intf = topo["routers"]["r2"]["links"]["r1-link0"]["interface"]
+
+    r1_r2_v6_nh = topo["routers"]["r1"]["links"]["r2-link0"]["ipv6"].split("/")[0]
+    r2_r1_v6_nh = topo["routers"]["r2"]["links"]["r1-link0"]["ipv6"].split("/")[0]
+
+    ipv4_list = [("r1", r1_r2_intf, [r2_lo_v4]), ("r2", r2_r1_intf, [r1_lo_v4])]
+
+    ipv6_list = [
+        ("r1", r1_r2_intf, [r2_lo_v6], r2_r1_v6_nh),
+        ("r2", r2_r1_intf, [r1_lo_v6], r1_r2_v6_nh),
+    ]
+
+    for dut, intf, loop_addr in ipv4_list:
+        result = addKernelRoute(tgen, dut, intf, loop_addr)
+        # assert result is True, "Testcase {}:Failed \n Error: {}". \
+        #    format(tc_name, result)
+
+    for dut, intf, loop_addr, next_hop in ipv6_list:
+        result = addKernelRoute(tgen, dut, intf, loop_addr, next_hop)
+        # assert result is True, "Testcase {}:Failed \n Error: {}". \
+        #    format(tc_name, result)
+
+    r2_lo_v4 = topo["routers"]["r2"]["links"]["lo"]["ipv4"]
+    r2_lo_v6 = topo["routers"]["r2"]["links"]["lo"]["ipv6"]
+    r1_lo_v4 = topo["routers"]["r1"]["links"]["lo"]["ipv4"]
+    r1_lo_v6 = topo["routers"]["r1"]["links"]["lo"]["ipv6"]
+    r1_r2_intf = topo["routers"]["r1"]["links"]["r2-link0"]["interface"]
+    r2_r1_intf = topo["routers"]["r2"]["links"]["r1-link0"]["interface"]
+
+    r1_r2_v6_nh = topo["routers"]["r1"]["links"]["r2-link0"]["ipv6"].split("/")[0]
+    r2_r1_v6_nh = topo["routers"]["r2"]["links"]["r1-link0"]["ipv6"].split("/")[0]
+
+    r1_r2_v4_nh = topo["routers"]["r1"]["links"]["r2-link0"]["ipv4"].split("/")[0]
+    r2_r1_v4_nh = topo["routers"]["r2"]["links"]["r1-link0"]["ipv4"].split("/")[0]
+
+    input_dict = {
+        "r1": {
+            "static_routes": [
+                {"network": r2_lo_v4, "next_hop": r2_r1_v4_nh},
+                {"network": r2_lo_v6, "next_hop": r2_r1_v6_nh},
+            ]
+        },
+        "r2": {
+            "static_routes": [
+                {"network": r1_lo_v4, "next_hop": r1_r2_v4_nh},
+                {"network": r1_lo_v6, "next_hop": r1_r2_v6_nh},
+            ]
+        },
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    # Api call verify whether BGP is converged
+    result = verify_bgp_convergence(tgen, topo1)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Enable cap ext nh on r1 and r2 and activate in ipv4 addr family")
+    configure_bgp_on_r1 = {
+        "r1": {
+            "default_ipv4_unicast": False,
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r2": {
+                                    "dest_link": {
+                                        "lo": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop",
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            },
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r2 = {
+        "r2": {
+            "default_ipv4_unicast": False,
+            "bgp": {
+                "address_family": {
+                    "ipv6": {
+                        "unicast": {
+                            "neighbor": {
+                                "r1": {
+                                    "dest_link": {
+                                        "lo": {
+                                            "activate": "ipv4",
+                                            "capability": "extended-nexthop",
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            },
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify bgp convergence.")
+    bgp_convergence = verify_bgp_convergence(tgen, topo1)
+    assert bgp_convergence is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, bgp_convergence
+    )
+
+    step("Configure 2 IPv4 static" " routes on R1, Nexthop as different links of R0")
+
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 "
+        "unicast family respectively from R1 using red static cmd "
+        "Advertise loopback from IPv4 unicast family using network command "
+        "from R1"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "IPv4 routes advertised using static and network command are "
+        " received on R2 BGP and routing table , "
+        "verify using show ip bgp, show ip route for IPv4 routes ."
+    )
+
+    gllip = (topo1["routers"]["r1"]["links"]["lo"]["ipv6"].split("/")[0]).lower()
+    assert gllip is not None, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": gllip,
+                }
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip
+    )
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    verify_nh_for_nw_rtes = {
+        "r1": {
+            "static_routes": [
+                {"network": NETWORK_CMD_IP, "no_of_ip": 1, "next_hop": gllip}
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=gllip)
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "Remove IPv4 routes advertised using network command"
+        " from R1 and advertise again"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {
+                                    "network": NETWORK_CMD_IP,
+                                    "no_of_network": 1,
+                                    "delete": True,
+                                }
+                            ],
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {
+                                    "network": NETWORK_CMD_IP,
+                                    "no_of_network": 1,
+                                }
+                            ],
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step(
+        "After removing IPv4 routes from network command , routes which are "
+        "advertised using redistribute static are still present in the on "
+        "R2 , verify using show ip bgp and show ip route"
+    )
+
+    verify_nh_for_nw_rtes = {
+        "r1": {
+            "static_routes": [
+                {"network": NETWORK_CMD_IP, "no_of_ip": 1, "next_hop": gllip}
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=gllip)
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "Remove IPv4 routes advertised using redistribute static"
+        " command from R1 and advertise again"
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static", "delete": True}]
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {"unicast": {"redistribute": [{"redist_type": "static"}]}}
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo1, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step(
+        "After removing IPv4 routes from redistribute static , routes which"
+        " are advertised using network are still present in the on R2 , "
+        "verify using show ip bgp and show ip route"
+    )
+
+    verify_nh_for_nw_rtes = {
+        "r1": {
+            "static_routes": [
+                {"network": NETWORK_CMD_IP, "no_of_ip": 1, "next_hop": gllip}
+            ]
+        }
+    }
+    bgp_rib = verify_bgp_rib(tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=gllip)
+    assert bgp_rib is True, "Testcase {} : Failed \n Error: {}".format(tc_name, bgp_rib)
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_rtes, next_hop=gllip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
diff --git a/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_unnumbered_nbr.py b/tests/topotests/bgp_ipv4_over_ipv6/test_rfc5549_ibgp_unnumbered_nbr.py
new file mode 100644 (file)
index 0000000..5f4292b
--- /dev/null
@@ -0,0 +1,347 @@
+#!/usr/bin/env python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""RFC5549 Automation."""
+import os
+import sys
+import time
+import json
+import pytest
+import ipaddr
+from re import search as re_search
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib.topogen import Topogen, get_topogen
+from mininet.topo import Topo
+
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    write_test_footer,
+    create_interfaces_cfg,
+    verify_rib,
+    create_static_routes,
+    check_address_types,
+    step,
+    reset_config_on_routers,
+    get_frr_ipv6_linklocal,
+)
+from lib.topolog import logger
+from lib.bgp import clear_bgp, verify_bgp_convergence, create_router_bgp
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+# Global variables
+topo = None
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/rfc5549_ibgp_unnumbered_nbr.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+
+# Global variables
+NETWORK_CMD_IP = "1.0.1.17/32"
+NETWORK = {
+    "ipv4": [
+        "11.0.20.1/32",
+        "11.0.20.2/32",
+        "11.0.20.3/32",
+        "11.0.20.4/32",
+        "11.0.20.5/32",
+    ],
+    "ipv6": ["1::1/128", "1::2/128", "1::3/128", "1::4/128", "1::5/128"],
+}
+MASK = {"ipv4": "32", "ipv6": "128"}
+NEXT_HOP = {
+    "ipv4": ["10.0.0.1", "10.0.1.1", "10.0.2.1", "10.0.3.1", "10.0.4.1"],
+    "ipv6": ["Null0", "Null0", "Null0", "Null0", "Null0"],
+}
+ADDR_TYPES = check_address_types()
+NO_OF_RTES = 2
+TOPOOLOGY = """
+      Please view in a fixed-width font such as Courier.
+                                      +----+
+                                      | R4 |
+                                      |    |
+                                      +--+-+
+                                         | ipv4 nbr
+          no bgp           ebgp/ibgp     |
+                                         |     ebgp/ibgp
+    +----+ 2links   +----+  8links    +--+-+             +----+
+    |R0  +----------+ R1 +            + R2 |    ipv6 nbr |R3  |
+    |    +----------+    +------------+    +-------------+    |
+    +----+          +----+   ipv6 nbr +----+             +----+
+"""
+
+TESTCASES = """
+1. Verify IPv4 routes are deleted after un-configuring "network command
+" and "redistribute static knob" with Unnumbered IPv6 IBGP session
+ """
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """Set up the pytest environment."""
+
+    global topo
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    BGP_CONVERGENCE = verify_bgp_convergence(tgen, topo)
+    assert BGP_CONVERGENCE is True, "setup_module :Failed \n Error:" " {}".format(
+        BGP_CONVERGENCE
+    )
+
+    logger.info("Running setup_module() done")
+
+
+def teardown_module():
+    """Teardown the pytest environment."""
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+
+def get_llip(onrouter, intf):
+    """
+    API to get the link local ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `fromnode`: Source node
+    * `tonode` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_llip('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) link local ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    tgen = get_topogen()
+    intf = topo["routers"][onrouter]["links"][intf]["interface"]
+    llip = get_frr_ipv6_linklocal(tgen, onrouter, intf)
+
+    if llip:
+        logger.info("llip ipv6 address to be set as NH is %s", llip)
+        return llip
+    return None
+
+
+def get_glipv6(onrouter, intf):
+    """
+    API to get the global ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `onrouter`: Source node
+    * `intf` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_glipv6('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) global ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    glipv6 = (topo["routers"][onrouter]["links"][intf]["ipv6"]).split("/")[0]
+    if glipv6:
+        logger.info("Global ipv6 address to be set as NH is %s", glipv6)
+        return glipv6
+    return None
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+
+
+def test_ext_nh_cap_red_static_network_ebgp_peer_unnumbered_nbr_p1(request):
+    """
+
+    Test extended capability nexthop.
+
+    Verify IPv4 routes advertise using "redistribute static" and
+    "network command" are received on EBGP peer with IPv6 nexthop
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    reset_config_on_routers(tgen)
+    step(
+        "Configure IPv6 IBGP Unnumbered session between R1 and R2 and enable "
+        "ipv6 nd ra-interval 10 in the interface"
+    )
+
+    step(
+        "Enable capability extended-nexthop"
+        "on the neighbor from both the routers and "
+        "ipv6 nd ra-interval 10 on link connected between R1 and R2"
+    )
+
+    bgp_convergence = verify_bgp_convergence(tgen, topo)
+    assert bgp_convergence is True, "Testcase :Failed \n Error:" " {}".format(
+        bgp_convergence
+    )
+
+    for rte in range(0, NO_OF_RTES):
+        # Create Static routes
+        input_dict = {
+            "r1": {
+                "static_routes": [
+                    {
+                        "network": NETWORK["ipv4"][rte],
+                        "no_of_ip": 1,
+                        "next_hop": NEXT_HOP["ipv4"][rte],
+                    }
+                ]
+            }
+        }
+        result = create_static_routes(tgen, input_dict)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result
+        )
+    step(
+        "Advertise static routes from IPv4 unicast family and IPv6 unicast "
+        "family respectively from R1 "
+        "Configure loopback on R1 with IPv4 address Advertise loopback "
+        "from IPv4 unicast family using network cmd from R1 "
+    )
+
+    configure_bgp_on_r1 = {
+        "r1": {
+            "bgp": {
+                "address_family": {
+                    "ipv4": {
+                        "unicast": {
+                            "redistribute": [{"redist_type": "static"}],
+                            "advertise_networks": [
+                                {"network": NETWORK_CMD_IP, "no_of_network": 1}
+                            ],
+                        }
+                    }
+                }
+            }
+        }
+    }
+    result = create_router_bgp(tgen, topo, configure_bgp_on_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    llip = get_llip("r1", "r2-link0")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step(
+        " IPv4 and IPv6 routes advertised using static and network command are"
+        " received on R2 BGP and routing table , verify using show ip bgp"
+        " show ip route for IPv4 routes and show bgp show ipv6 routes"
+        " for IPv6 routes ."
+    )
+
+    dut = "r2"
+    protocol = "bgp"
+    verify_nh_for_static_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv4"][0],
+                    "no_of_ip": NO_OF_RTES,
+                    "next_hop": llip,
+                }
+            ]
+        }
+    }
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_static_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    verify_nh_for_nw_cmd_rtes = {
+        "r1": {
+            "static_routes": [
+                {
+                    "network": NETWORK_CMD_IP,
+                    "no_of_ip": 1,
+                    "next_hop": llip,
+                }
+            ]
+        }
+    }
+
+    result = verify_rib(
+        tgen, "ipv4", dut, verify_nh_for_nw_cmd_rtes, next_hop=llip, protocol=protocol
+    )
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index 31fbdcd4b5a02b4c4fd0556e63825d966dd64f59..69eba23e0fe47f925f053680504ca1cc8368c902 100644 (file)
@@ -73,6 +73,9 @@ from lib.topolog import logger
 from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp_and_verify
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd]
+
+
 # Save the Current Working Directory to find configuration files.
 CWD = os_path.dirname(os_path.realpath(__file__))
 sys.path.append(os_path.join(CWD, "../"))
index 84d9c48f354c4506181142e09e423396ed0d0932..b033c7e5cdb902754035e0219e19c1ce93792cdb 100644 (file)
@@ -97,6 +97,9 @@ from lib.topolog import logger
 from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp_and_verify
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd]
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/bgp_large_community_topo_2.json".format(CWD)
 
index 0e466871009543549e0a65d9c91f8df288de03ae..b1ec70d60b3d1652303c8c1bda3d93969197fbac 100644 (file)
@@ -8,4 +8,5 @@ router bgp 65101
  neighbor 11.1.1.2 timers 3 10
  neighbor 11.1.1.6 remote-as external
  neighbor 11.1.1.6 timers 3 10
+ neighbor 11.1.1.6 disable-link-bw-encoding-ieee
 !
diff --git a/tests/topotests/bgp_link_bw_ip/r3/bgp-route-1.json b/tests/topotests/bgp_link_bw_ip/r3/bgp-route-1.json
new file mode 100644 (file)
index 0000000..cddf127
--- /dev/null
@@ -0,0 +1,29 @@
+{
+  "prefix":"198.10.1.1/32",
+  "paths":[
+    {
+      "aspath":{
+        "string":"65303 65354",
+        "segments":[
+          {
+            "type":"as-sequence",
+            "list":[
+              65303,
+              65354
+            ]
+          }
+        ],
+        "length":2
+      },
+      "valid":true,
+      "extendedCommunity":{
+        "string":"LB:65303:125000 (1.000 Mbps)"
+      },
+      "nexthops":[
+        {
+          "ip":"11.1.3.2"
+        }
+      ]
+    }
+  ]
+}
index 3f20eb10a30ccb07a47a9709f18b020224afb3d6..cfd394936c570eb24bbb6b7f86af72d8040a3166 100644 (file)
@@ -8,4 +8,5 @@ router bgp 65202
  neighbor 11.1.1.5 timers 3 10
  neighbor 11.1.3.2 remote-as external
  neighbor 11.1.3.2 timers 3 10
+ neighbor 11.1.3.2 disable-link-bw-encoding-ieee
 !
index 18e7eb92850f04c58c9ba77a51b2f825a36a560d..89de8eeeb5c4006153cf9f46a92189696109946e 100644 (file)
@@ -14,6 +14,7 @@ router bgp 65303
  no bgp ebgp-requires-policy
  neighbor 11.1.3.1 remote-as external
  neighbor 11.1.3.1 timers 3 10
+ neighbor 11.1.3.1 disable-link-bw-encoding-ieee
  neighbor 11.1.6.2 remote-as external
  neighbor 11.1.6.2 timers 3 10
  !
index f09ff206516d07619bd976dd66d3a1c4ad3e42ac..a9b4b6b03165487e39f432ebbb0af81d09acb12b 100644 (file)
@@ -46,6 +46,9 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
+
 """
 This topology is for validating one of the primary use cases for
 weighted ECMP (a.k.a. Unequal cost multipath) using BGP link-bandwidth:
@@ -267,6 +270,7 @@ def test_weighted_ecmp():
 
     r1 = tgen.gears["r1"]
     r2 = tgen.gears["r2"]
+    r3 = tgen.gears["r3"]
 
     # Configure anycast IP on additional server r9
     logger.info("Configure anycast IP on server r9")
@@ -301,6 +305,19 @@ def test_weighted_ecmp():
 
     tgen.net["r10"].cmd("ip addr add 198.10.1.1/32 dev r10-eth1")
 
+    # Check if bandwidth is properly encoded with non IEEE floatig-point (uint32) format on r3
+    logger.info(
+        "Check if bandwidth is properly encoded with non IEEE floatig-point (uint32) format on r3"
+    )
+    json_file = "{}/r3/bgp-route-1.json".format(CWD)
+    expected = json.loads(open(json_file).read())
+    test_func = partial(
+        topotest.router_json_cmp, r3, "show bgp ipv4 uni 198.10.1.1/32 json", expected
+    )
+    _, result = topotest.run_and_expect(test_func, None, count=200, wait=0.5)
+    assertmsg = "JSON output mismatch on r3"
+    assert result is None, assertmsg
+
     # Check multipath on super-spine router r1
     logger.info("Check multipath on super-spine router r1")
     json_file = "{}/r1/bgp-route-2.json".format(CWD)
index a3ca1408e2c2ed920734e0a6cdc236bd9588f5f2..a7959fe61beaf72c5dd47bb6d570b96b8db04bd3 100755 (executable)
@@ -50,11 +50,14 @@ sys.path.append(os.path.join(CWD, "../"))
 
 from lib.topogen import Topogen, get_topogen
 from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.topojson import linux_intf_config_from_json
 from lib.common_config import start_topology
 from lib.topotest import router_json_cmp, run_and_expect
 from mininet.topo import Topo
 from functools import partial
 
+pytestmark = [pytest.mark.bgpd]
+
 
 LISTEN_ADDRESSES = {
     "r1": ["10.0.0.1"],
@@ -94,6 +97,9 @@ def setup_module(mod):
         )
 
     start_topology(tgen)
+
+    linux_intf_config_from_json(tgen, topo)
+
     build_config_from_json(tgen, topo)
 
 
index 32e7a4df61a021fdc0419c771330ebc7089c11fd..7c5ed87dd0771a4d72c540c249dcbb5146a5e66f 100644 (file)
@@ -43,6 +43,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 8494653dfe1fa89f9b0b3884d9cf3a06ca2b9f41..0fde32a68bec14b789f406d5d99aada9452840c3 100644 (file)
@@ -47,6 +47,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index b99664e7008863b61b775c00a067eacb5cc096d7..5c939107886a4770330c72122c116e1b7d65e0cc 100644 (file)
@@ -43,6 +43,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
diff --git a/tests/topotests/bgp_minimum_holdtime/__init__.py b/tests/topotests/bgp_minimum_holdtime/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/bgp_minimum_holdtime/r1/bgpd.conf b/tests/topotests/bgp_minimum_holdtime/r1/bgpd.conf
new file mode 100644 (file)
index 0000000..847a2d4
--- /dev/null
@@ -0,0 +1,6 @@
+router bgp 65000
+  bgp minimum-holdtime 20
+  neighbor 192.168.255.2 remote-as 65001
+  neighbor 192.168.255.2 timers 3 10
+  neighbor 192.168.255.2 timers connect 10
+!
diff --git a/tests/topotests/bgp_minimum_holdtime/r1/zebra.conf b/tests/topotests/bgp_minimum_holdtime/r1/zebra.conf
new file mode 100644 (file)
index 0000000..e2c399e
--- /dev/null
@@ -0,0 +1,6 @@
+!
+interface r1-eth0
+ ip address 192.168.255.1/24
+!
+ip forwarding
+!
diff --git a/tests/topotests/bgp_minimum_holdtime/r2/bgpd.conf b/tests/topotests/bgp_minimum_holdtime/r2/bgpd.conf
new file mode 100644 (file)
index 0000000..6d1080c
--- /dev/null
@@ -0,0 +1,5 @@
+router bgp 65001
+  no bgp ebgp-requires-policy
+  neighbor 192.168.255.1 remote-as 65000
+  neighbor 192.168.255.1 timers 3 10
+!
diff --git a/tests/topotests/bgp_minimum_holdtime/r2/zebra.conf b/tests/topotests/bgp_minimum_holdtime/r2/zebra.conf
new file mode 100644 (file)
index 0000000..606c17b
--- /dev/null
@@ -0,0 +1,6 @@
+!
+interface r2-eth0
+ ip address 192.168.255.2/24
+!
+ip forwarding
+!
diff --git a/tests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py b/tests/topotests/bgp_minimum_holdtime/test_bgp_minimum_holdtime.py
new file mode 100755 (executable)
index 0000000..c5afcdf
--- /dev/null
@@ -0,0 +1,104 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2021 by
+# Takemasa Imada <takemasa.imada@gmail.com>
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+"""
+Test if minimum-holdtime works.
+"""
+
+import os
+import sys
+import json
+import time
+import pytest
+import functools
+
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+from lib import topotest
+from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.topolog import logger
+from mininet.topo import Topo
+
+pytestmark = [pytest.mark.bgpd]
+
+
+class TemplateTopo(Topo):
+    def build(self, *_args, **_opts):
+        tgen = get_topogen(self)
+
+        for routern in range(1, 3):
+            tgen.add_router("r{}".format(routern))
+
+        switch = tgen.add_switch("s1")
+        switch.add_link(tgen.gears["r1"])
+        switch.add_link(tgen.gears["r2"])
+
+
+def setup_module(mod):
+    tgen = Topogen(TemplateTopo, mod.__name__)
+    tgen.start_topology()
+
+    router_list = tgen.routers()
+
+    for i, (rname, router) in enumerate(router_list.items(), 1):
+        router.load_config(
+            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
+        )
+        router.load_config(
+            TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname))
+        )
+
+    tgen.start_router()
+
+
+def teardown_module(mod):
+    tgen = get_topogen()
+    tgen.stop_topology()
+
+
+def test_bgp_minimum_holdtime():
+    tgen = get_topogen()
+
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    def _bgp_neighbor_check_if_notification_sent():
+        output = json.loads(
+            tgen.gears["r1"].vtysh_cmd("show ip bgp neighbor 192.168.255.2 json")
+        )
+        expected = {
+            "192.168.255.2": {
+                "connectionsEstablished": 0,
+                "lastNotificationReason": "OPEN Message Error/Unacceptable Hold Time",
+                "lastResetDueTo": "BGP Notification send",
+            }
+        }
+        return topotest.json_cmp(output, expected)
+
+    test_func = functools.partial(_bgp_neighbor_check_if_notification_sent)
+    success, result = topotest.run_and_expect(test_func, None, count=40, wait=0.5)
+    assert result is None, "Failed to send notification message\n"
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index 7ea5a24fd73f5663ee7b7a54990982859d0a63a6..84e10af5b3845e7ff65b1076613afd2bb85a23f7 100644 (file)
@@ -145,6 +145,7 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/bgp_multi_vrf_topo1.json".format(CWD)
 
@@ -177,14 +178,10 @@ NEXT_HOP_IP = {"ipv4": "Null0", "ipv6": "Null0"}
 LOOPBACK_1 = {
     "ipv4": "10.10.10.10/32",
     "ipv6": "10::10:10/128",
-    "ipv4_mask": "255.255.255.255",
-    "ipv6_mask": None,
 }
 LOOPBACK_2 = {
     "ipv4": "20.20.20.20/32",
     "ipv6": "20::20:20/128",
-    "ipv4_mask": "255.255.255.255",
-    "ipv6_mask": None,
 }
 
 
@@ -1910,7 +1907,6 @@ def test_static_routes_for_inter_vrf_route_leaking_p0(request):
             "loopback1",
             LOOPBACK_1[addr_type],
             "RED_A",
-            LOOPBACK_1["{}_mask".format(addr_type)],
         )
         create_interface_in_kernel(
             tgen,
@@ -1918,7 +1914,6 @@ def test_static_routes_for_inter_vrf_route_leaking_p0(request):
             "loopback2",
             LOOPBACK_2[addr_type],
             "RED_B",
-            LOOPBACK_2["{}_mask".format(addr_type)],
         )
 
     step(
@@ -2046,7 +2041,6 @@ def test_inter_vrf_and_intra_vrf_communication_iBGP_p0(request):
             "loopback1",
             LOOPBACK_1[addr_type],
             "RED_A",
-            LOOPBACK_1["{}_mask".format(addr_type)],
         )
 
         create_interface_in_kernel(
@@ -2055,7 +2049,6 @@ def test_inter_vrf_and_intra_vrf_communication_iBGP_p0(request):
             "loopback2",
             LOOPBACK_2[addr_type],
             "BLUE_A",
-            LOOPBACK_2["{}_mask".format(addr_type)],
         )
 
     step(
@@ -2215,7 +2208,6 @@ def test_inter_vrf_and_intra_vrf_communication_eBGP_p0(request):
             "loopback1",
             LOOPBACK_1[addr_type],
             "RED_A",
-            LOOPBACK_1["{}_mask".format(addr_type)],
         )
         create_interface_in_kernel(
             tgen,
@@ -2223,7 +2215,6 @@ def test_inter_vrf_and_intra_vrf_communication_eBGP_p0(request):
             "loopback2",
             LOOPBACK_2[addr_type],
             "BLUE_A",
-            LOOPBACK_2["{}_mask".format(addr_type)],
         )
 
     step(
index 37da53fc31fddf247e2d5f206ddf0792214e2f53..31569e69b4b507bb1f75ca4a578f7473c038f73b 100644 (file)
@@ -131,8 +131,6 @@ NEXT_HOP_IP = {"ipv4": "Null0", "ipv6": "Null0"}
 LOOPBACK_2 = {
     "ipv4": "20.20.20.20/32",
     "ipv6": "20::20:20/128",
-    "ipv4_mask": "255.255.255.255",
-    "ipv6_mask": None,
 }
 
 MAX_PATHS = 2
@@ -1928,7 +1926,6 @@ def test_vrf_route_leaking_next_hop_interface_flapping_p1(request):
             "loopback2",
             LOOPBACK_2[addr_type],
             "RED_B",
-            LOOPBACK_2["{}_mask".format(addr_type)],
         )
 
     intf_red1_r11 = topo["routers"]["red1"]["links"]["r1-link2"]["interface"]
index 505b08d6aa1f01effa1e3103cb954cffbf653388..fbb73f5b6a6197bbdbfc4c552b3ae57e4405fcf8 100755 (executable)
@@ -23,7 +23,7 @@ for i in range(0, numRoutes):
     stdout.flush()
 
 # Announce 1 overlapping route per peer
-stdout.write("announce route 10.0.1.0/24 next-hop 172.16.1.%i\n" % peer)
+stdout.write("announce route 10.0.1.0/24 med %i next-hop 172.16.1.%i\n" % (peer, peer))
 stdout.flush()
 
 # Loop endlessly to allow ExaBGP to continue running
index 505b08d6aa1f01effa1e3103cb954cffbf653388..fbb73f5b6a6197bbdbfc4c552b3ae57e4405fcf8 100755 (executable)
@@ -23,7 +23,7 @@ for i in range(0, numRoutes):
     stdout.flush()
 
 # Announce 1 overlapping route per peer
-stdout.write("announce route 10.0.1.0/24 next-hop 172.16.1.%i\n" % peer)
+stdout.write("announce route 10.0.1.0/24 med %i next-hop 172.16.1.%i\n" % (peer, peer))
 stdout.flush()
 
 # Loop endlessly to allow ExaBGP to continue running
index 505b08d6aa1f01effa1e3103cb954cffbf653388..fbb73f5b6a6197bbdbfc4c552b3ae57e4405fcf8 100755 (executable)
@@ -23,7 +23,7 @@ for i in range(0, numRoutes):
     stdout.flush()
 
 # Announce 1 overlapping route per peer
-stdout.write("announce route 10.0.1.0/24 next-hop 172.16.1.%i\n" % peer)
+stdout.write("announce route 10.0.1.0/24 med %i next-hop 172.16.1.%i\n" % (peer, peer))
 stdout.flush()
 
 # Loop endlessly to allow ExaBGP to continue running
index 505b08d6aa1f01effa1e3103cb954cffbf653388..fbb73f5b6a6197bbdbfc4c552b3ae57e4405fcf8 100755 (executable)
@@ -23,7 +23,7 @@ for i in range(0, numRoutes):
     stdout.flush()
 
 # Announce 1 overlapping route per peer
-stdout.write("announce route 10.0.1.0/24 next-hop 172.16.1.%i\n" % peer)
+stdout.write("announce route 10.0.1.0/24 med %i next-hop 172.16.1.%i\n" % (peer, peer))
 stdout.flush()
 
 # Loop endlessly to allow ExaBGP to continue running
index 505b08d6aa1f01effa1e3103cb954cffbf653388..fbb73f5b6a6197bbdbfc4c552b3ae57e4405fcf8 100755 (executable)
@@ -23,7 +23,7 @@ for i in range(0, numRoutes):
     stdout.flush()
 
 # Announce 1 overlapping route per peer
-stdout.write("announce route 10.0.1.0/24 next-hop 172.16.1.%i\n" % peer)
+stdout.write("announce route 10.0.1.0/24 med %i next-hop 172.16.1.%i\n" % (peer, peer))
 stdout.flush()
 
 # Loop endlessly to allow ExaBGP to continue running
index 505b08d6aa1f01effa1e3103cb954cffbf653388..fbb73f5b6a6197bbdbfc4c552b3ae57e4405fcf8 100755 (executable)
@@ -23,7 +23,7 @@ for i in range(0, numRoutes):
     stdout.flush()
 
 # Announce 1 overlapping route per peer
-stdout.write("announce route 10.0.1.0/24 next-hop 172.16.1.%i\n" % peer)
+stdout.write("announce route 10.0.1.0/24 med %i next-hop 172.16.1.%i\n" % (peer, peer))
 stdout.flush()
 
 # Loop endlessly to allow ExaBGP to continue running
index 505b08d6aa1f01effa1e3103cb954cffbf653388..fbb73f5b6a6197bbdbfc4c552b3ae57e4405fcf8 100755 (executable)
@@ -23,7 +23,7 @@ for i in range(0, numRoutes):
     stdout.flush()
 
 # Announce 1 overlapping route per peer
-stdout.write("announce route 10.0.1.0/24 next-hop 172.16.1.%i\n" % peer)
+stdout.write("announce route 10.0.1.0/24 med %i next-hop 172.16.1.%i\n" % (peer, peer))
 stdout.flush()
 
 # Loop endlessly to allow ExaBGP to continue running
index 505b08d6aa1f01effa1e3103cb954cffbf653388..fbb73f5b6a6197bbdbfc4c552b3ae57e4405fcf8 100755 (executable)
@@ -23,7 +23,7 @@ for i in range(0, numRoutes):
     stdout.flush()
 
 # Announce 1 overlapping route per peer
-stdout.write("announce route 10.0.1.0/24 next-hop 172.16.1.%i\n" % peer)
+stdout.write("announce route 10.0.1.0/24 med %i next-hop 172.16.1.%i\n" % (peer, peer))
 stdout.flush()
 
 # Loop endlessly to allow ExaBGP to continue running
index d44c3e18e65205c81fbdfe76fb7beee9665c10ab..cd7f44ac665074c4f76cd2db096e19eb3242855f 100644 (file)
@@ -13,6 +13,7 @@ log file bgpd.log
 !
 router bgp 100 view 1
  bgp router-id 172.30.1.1
+ bgp always-compare-med
  no bgp ebgp-requires-policy
  network 172.20.0.0/28 route-map local1
  timers bgp 60 180
@@ -25,6 +26,7 @@ router bgp 100 view 1
 !
 router bgp 100 view 2
  bgp router-id 172.30.1.1
+ bgp always-compare-med
  no bgp ebgp-requires-policy
  network 172.20.0.0/28 route-map local2
  timers bgp 60 180
@@ -35,6 +37,7 @@ router bgp 100 view 2
 !
 router bgp 100 view 3
  bgp router-id 172.30.1.1
+ bgp always-compare-med
  no bgp ebgp-requires-policy
  network 172.20.0.0/28
  timers bgp 60 180
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1-post4.1.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1-post4.1.ref
deleted file mode 100644 (file)
index 6b20e1d..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1, vrf id -
-Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
-               i internal, r RIB-failure, S Stale, R Removed
-Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
-Origin codes:  i - IGP, e - EGP, ? - incomplete
-RPKI validation codes: V valid, I invalid, N Not found
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.5                             0 65005 i
-*                   172.16.1.2                             0 65002 i
-*>                  172.16.1.1                             0 65001 i
-*> 10.101.0.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.1.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.2.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.3.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.4.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.5.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.6.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.7.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.8.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.9.0/24    172.16.1.1             100              0 65001 i
-*> 10.102.0.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.1.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.2.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.3.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.4.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.5.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.6.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.7.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.8.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.9.0/24    172.16.1.2             100              0 65002 i
-*> 10.105.0.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.1.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.2.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.3.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.4.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.5.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.6.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.7.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.8.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.9.0/24    172.16.1.5             100              0 65005 i
-*> 172.20.0.0/28    0.0.0.0                  0          32768 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1-post6.1.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1-post6.1.ref
deleted file mode 100644 (file)
index 5469eaa..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1, vrf id -
-Default local pref 100, local AS 100
-Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
-               i internal, r RIB-failure, S Stale, R Removed
-Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
-Origin codes:  i - IGP, e - EGP, ? - incomplete
-RPKI validation codes: V valid, I invalid, N Not found
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.5                             0 65005 i
-*                   172.16.1.2                             0 65002 i
-*>                  172.16.1.1                             0 65001 i
-*> 10.101.0.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.1.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.2.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.3.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.4.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.5.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.6.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.7.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.8.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.9.0/24    172.16.1.1             100              0 65001 i
-*> 10.102.0.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.1.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.2.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.3.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.4.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.5.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.6.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.7.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.8.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.9.0/24    172.16.1.2             100              0 65002 i
-*> 10.105.0.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.1.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.2.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.3.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.4.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.5.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.6.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.7.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.8.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.9.0/24    172.16.1.5             100              0 65005 i
-*> 172.20.0.0/28    0.0.0.0                  0          32768 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_1.ref
deleted file mode 100644 (file)
index 6f1b1a1..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1
-Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
-              i internal, r RIB-failure, S Stale, R Removed
-Origin codes: i - IGP, e - EGP, ? - incomplete
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.5                             0 65005 i
-*                   172.16.1.2                             0 65002 i
-*>                  172.16.1.1                             0 65001 i
-*> 10.101.0.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.1.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.2.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.3.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.4.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.5.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.6.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.7.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.8.0/24    172.16.1.1             100              0 65001 i
-*> 10.101.9.0/24    172.16.1.1             100              0 65001 i
-*> 10.102.0.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.1.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.2.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.3.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.4.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.5.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.6.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.7.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.8.0/24    172.16.1.2             100              0 65002 i
-*> 10.102.9.0/24    172.16.1.2             100              0 65002 i
-*> 10.105.0.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.1.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.2.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.3.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.4.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.5.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.6.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.7.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.8.0/24    172.16.1.5             100              0 65005 i
-*> 10.105.9.0/24    172.16.1.5             100              0 65005 i
-*> 172.20.0.0/28    0.0.0.0                  0          32768 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2-post4.1.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2-post4.1.ref
deleted file mode 100644 (file)
index a64927c..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1, vrf id -
-Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
-               i internal, r RIB-failure, S Stale, R Removed
-Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
-Origin codes:  i - IGP, e - EGP, ? - incomplete
-RPKI validation codes: V valid, I invalid, N Not found
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.4                             0 65004 i
-*>                  172.16.1.3                             0 65003 i
-*> 10.103.0.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.1.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.2.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.3.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.4.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.5.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.6.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.7.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.8.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.9.0/24    172.16.1.3             100              0 65003 i
-*> 10.104.0.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.1.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.2.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.3.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.4.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.5.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.6.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.7.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.8.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.9.0/24    172.16.1.4             100              0 65004 i
-*> 172.20.0.0/28    0.0.0.0               9999          32768 100 100 100 100 100 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2-post6.1.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2-post6.1.ref
deleted file mode 100644 (file)
index 8d4a843..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1, vrf id -
-Default local pref 100, local AS 100
-Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
-               i internal, r RIB-failure, S Stale, R Removed
-Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
-Origin codes:  i - IGP, e - EGP, ? - incomplete
-RPKI validation codes: V valid, I invalid, N Not found
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.4                             0 65004 i
-*>                  172.16.1.3                             0 65003 i
-*> 10.103.0.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.1.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.2.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.3.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.4.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.5.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.6.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.7.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.8.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.9.0/24    172.16.1.3             100              0 65003 i
-*> 10.104.0.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.1.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.2.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.3.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.4.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.5.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.6.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.7.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.8.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.9.0/24    172.16.1.4             100              0 65004 i
-*> 172.20.0.0/28    0.0.0.0               9999          32768 100 100 100 100 100 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_2.ref
deleted file mode 100644 (file)
index 0230d25..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1
-Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
-              i internal, r RIB-failure, S Stale, R Removed
-Origin codes: i - IGP, e - EGP, ? - incomplete
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.4                             0 65004 i
-*>                  172.16.1.3                             0 65003 i
-*> 10.103.0.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.1.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.2.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.3.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.4.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.5.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.6.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.7.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.8.0/24    172.16.1.3             100              0 65003 i
-*> 10.103.9.0/24    172.16.1.3             100              0 65003 i
-*> 10.104.0.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.1.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.2.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.3.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.4.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.5.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.6.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.7.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.8.0/24    172.16.1.4             100              0 65004 i
-*> 10.104.9.0/24    172.16.1.4             100              0 65004 i
-*> 172.20.0.0/28    0.0.0.0               9999          32768 100 100 100 100 100 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3-post4.1.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3-post4.1.ref
deleted file mode 100644 (file)
index a3b9ef0..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1, vrf id -
-Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
-               i internal, r RIB-failure, S Stale, R Removed
-Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
-Origin codes:  i - IGP, e - EGP, ? - incomplete
-RPKI validation codes: V valid, I invalid, N Not found
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.8                             0 65008 i
-*                   172.16.1.7                             0 65007 i
-*>                  172.16.1.6                             0 65006 i
-*> 10.106.0.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.1.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.2.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.3.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.4.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.5.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.6.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.7.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.8.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.9.0/24    172.16.1.6             100              0 65006 i
-*> 10.107.0.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.1.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.2.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.3.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.4.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.5.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.6.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.7.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.8.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.9.0/24    172.16.1.7             100              0 65007 i
-*> 10.108.0.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.1.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.2.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.3.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.4.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.5.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.6.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.7.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.8.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.9.0/24    172.16.1.8             100              0 65008 i
-*> 172.20.0.0/28    0.0.0.0                  0          32768 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3-post6.1.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3-post6.1.ref
deleted file mode 100644 (file)
index 117e488..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1, vrf id -
-Default local pref 100, local AS 100
-Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
-               i internal, r RIB-failure, S Stale, R Removed
-Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
-Origin codes:  i - IGP, e - EGP, ? - incomplete
-RPKI validation codes: V valid, I invalid, N Not found
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.8                             0 65008 i
-*                   172.16.1.7                             0 65007 i
-*>                  172.16.1.6                             0 65006 i
-*> 10.106.0.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.1.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.2.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.3.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.4.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.5.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.6.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.7.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.8.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.9.0/24    172.16.1.6             100              0 65006 i
-*> 10.107.0.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.1.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.2.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.3.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.4.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.5.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.6.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.7.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.8.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.9.0/24    172.16.1.7             100              0 65007 i
-*> 10.108.0.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.1.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.2.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.3.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.4.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.5.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.6.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.7.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.8.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.9.0/24    172.16.1.8             100              0 65008 i
-*> 172.20.0.0/28    0.0.0.0                  0          32768 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3.ref b/tests/topotests/bgp_multiview_topo1/r1/show_ip_bgp_view_3.ref
deleted file mode 100644 (file)
index b7e8c79..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-BGP table version is XXX, local router ID is 172.30.1.1
-Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
-              i internal, r RIB-failure, S Stale, R Removed
-Origin codes: i - IGP, e - EGP, ? - incomplete
-
-   Network          Next Hop            Metric LocPrf Weight Path
-*  10.0.1.0/24      172.16.1.8                             0 65008 i
-*                   172.16.1.7                             0 65007 i
-*>                  172.16.1.6                             0 65006 i
-*> 10.106.0.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.1.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.2.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.3.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.4.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.5.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.6.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.7.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.8.0/24    172.16.1.6             100              0 65006 i
-*> 10.106.9.0/24    172.16.1.6             100              0 65006 i
-*> 10.107.0.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.1.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.2.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.3.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.4.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.5.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.6.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.7.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.8.0/24    172.16.1.7             100              0 65007 i
-*> 10.107.9.0/24    172.16.1.7             100              0 65007 i
-*> 10.108.0.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.1.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.2.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.3.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.4.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.5.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.6.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.7.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.8.0/24    172.16.1.8             100              0 65008 i
-*> 10.108.9.0/24    172.16.1.8             100              0 65008 i
-*> 172.20.0.0/28    0.0.0.0                  0          32768 i
diff --git a/tests/topotests/bgp_multiview_topo1/r1/view_1.json b/tests/topotests/bgp_multiview_topo1/r1/view_1.json
new file mode 100644 (file)
index 0000000..137b8a3
--- /dev/null
@@ -0,0 +1,728 @@
+{
+  "vrfName": "1",
+  "routerId": "172.30.1.1",
+  "defaultLocPrf": 100,
+  "localAS": 100,
+  "routes": {
+    "10.0.1.0/24": [
+      {
+        "valid": true,
+        "pathFrom": "external",
+        "prefix": "10.0.1.0",
+        "prefixLen": 24,
+        "network": "10.0.1.0/24",
+        "metric": 5,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      },
+      {
+        "valid": true,
+        "pathFrom": "external",
+        "prefix": "10.0.1.0",
+        "prefixLen": 24,
+        "network": "10.0.1.0/24",
+        "metric": 2,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      },
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.0.1.0",
+        "prefixLen": 24,
+        "network": "10.0.1.0/24",
+        "metric": 1,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.0.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.0.0",
+        "prefixLen": 24,
+        "network": "10.101.0.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.1.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.1.0",
+        "prefixLen": 24,
+        "network": "10.101.1.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.2.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.2.0",
+        "prefixLen": 24,
+        "network": "10.101.2.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.3.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.3.0",
+        "prefixLen": 24,
+        "network": "10.101.3.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.4.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.4.0",
+        "prefixLen": 24,
+        "network": "10.101.4.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.5.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.5.0",
+        "prefixLen": 24,
+        "network": "10.101.5.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.6.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.6.0",
+        "prefixLen": 24,
+        "network": "10.101.6.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.7.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.7.0",
+        "prefixLen": 24,
+        "network": "10.101.7.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.8.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.8.0",
+        "prefixLen": 24,
+        "network": "10.101.8.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.101.9.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.101.9.0",
+        "prefixLen": 24,
+        "network": "10.101.9.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.1",
+        "path": "65001",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.1",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.0.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.0.0",
+        "prefixLen": 24,
+        "network": "10.102.0.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.1.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.1.0",
+        "prefixLen": 24,
+        "network": "10.102.1.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.2.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.2.0",
+        "prefixLen": 24,
+        "network": "10.102.2.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.3.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.3.0",
+        "prefixLen": 24,
+        "network": "10.102.3.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.4.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.4.0",
+        "prefixLen": 24,
+        "network": "10.102.4.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.5.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.5.0",
+        "prefixLen": 24,
+        "network": "10.102.5.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.6.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.6.0",
+        "prefixLen": 24,
+        "network": "10.102.6.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.7.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.7.0",
+        "prefixLen": 24,
+        "network": "10.102.7.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.8.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.8.0",
+        "prefixLen": 24,
+        "network": "10.102.8.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.102.9.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.102.9.0",
+        "prefixLen": 24,
+        "network": "10.102.9.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.2",
+        "path": "65002",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.2",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.0.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.0.0",
+        "prefixLen": 24,
+        "network": "10.105.0.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.1.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.1.0",
+        "prefixLen": 24,
+        "network": "10.105.1.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.2.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.2.0",
+        "prefixLen": 24,
+        "network": "10.105.2.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.3.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.3.0",
+        "prefixLen": 24,
+        "network": "10.105.3.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.4.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.4.0",
+        "prefixLen": 24,
+        "network": "10.105.4.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.5.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.5.0",
+        "prefixLen": 24,
+        "network": "10.105.5.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.6.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.6.0",
+        "prefixLen": 24,
+        "network": "10.105.6.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.7.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.7.0",
+        "prefixLen": 24,
+        "network": "10.105.7.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.8.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.8.0",
+        "prefixLen": 24,
+        "network": "10.105.8.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.105.9.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.105.9.0",
+        "prefixLen": 24,
+        "network": "10.105.9.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.5",
+        "path": "65005",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.5",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/bgp_multiview_topo1/r1/view_2.json b/tests/topotests/bgp_multiview_topo1/r1/view_2.json
new file mode 100644 (file)
index 0000000..2ad28c5
--- /dev/null
@@ -0,0 +1,489 @@
+{
+  "vrfName": "2",
+  "routerId": "172.30.1.1",
+  "defaultLocPrf": 100,
+  "localAS": 100,
+  "routes": {
+    "10.0.1.0/24": [
+      {
+        "valid": true,
+        "pathFrom": "external",
+        "prefix": "10.0.1.0",
+        "prefixLen": 24,
+        "network": "10.0.1.0/24",
+        "metric": 4,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      },
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.0.1.0",
+        "prefixLen": 24,
+        "network": "10.0.1.0/24",
+        "metric": 3,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.0.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.0.0",
+        "prefixLen": 24,
+        "network": "10.103.0.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.1.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.1.0",
+        "prefixLen": 24,
+        "network": "10.103.1.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.2.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.2.0",
+        "prefixLen": 24,
+        "network": "10.103.2.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.3.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.3.0",
+        "prefixLen": 24,
+        "network": "10.103.3.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.4.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.4.0",
+        "prefixLen": 24,
+        "network": "10.103.4.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.5.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.5.0",
+        "prefixLen": 24,
+        "network": "10.103.5.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.6.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.6.0",
+        "prefixLen": 24,
+        "network": "10.103.6.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.7.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.7.0",
+        "prefixLen": 24,
+        "network": "10.103.7.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.8.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.8.0",
+        "prefixLen": 24,
+        "network": "10.103.8.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.103.9.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.103.9.0",
+        "prefixLen": 24,
+        "network": "10.103.9.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.3",
+        "path": "65003",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.3",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.0.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.0.0",
+        "prefixLen": 24,
+        "network": "10.104.0.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.1.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.1.0",
+        "prefixLen": 24,
+        "network": "10.104.1.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.2.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.2.0",
+        "prefixLen": 24,
+        "network": "10.104.2.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.3.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.3.0",
+        "prefixLen": 24,
+        "network": "10.104.3.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.4.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.4.0",
+        "prefixLen": 24,
+        "network": "10.104.4.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.5.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.5.0",
+        "prefixLen": 24,
+        "network": "10.104.5.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.6.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.6.0",
+        "prefixLen": 24,
+        "network": "10.104.6.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.7.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.7.0",
+        "prefixLen": 24,
+        "network": "10.104.7.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.8.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.8.0",
+        "prefixLen": 24,
+        "network": "10.104.8.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.104.9.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.104.9.0",
+        "prefixLen": 24,
+        "network": "10.104.9.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.4",
+        "path": "65004",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.4",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/bgp_multiview_topo1/r1/view_3.json b/tests/topotests/bgp_multiview_topo1/r1/view_3.json
new file mode 100644 (file)
index 0000000..d49694e
--- /dev/null
@@ -0,0 +1,728 @@
+{
+  "vrfName": "3",
+  "routerId": "172.30.1.1",
+  "defaultLocPrf": 100,
+  "localAS": 100,
+  "routes": {
+    "10.0.1.0/24": [
+      {
+        "valid": true,
+        "pathFrom": "external",
+        "prefix": "10.0.1.0",
+        "prefixLen": 24,
+        "network": "10.0.1.0/24",
+        "metric": 8,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      },
+      {
+        "valid": true,
+        "pathFrom": "external",
+        "prefix": "10.0.1.0",
+        "prefixLen": 24,
+        "network": "10.0.1.0/24",
+        "metric": 7,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      },
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.0.1.0",
+        "prefixLen": 24,
+        "network": "10.0.1.0/24",
+        "metric": 6,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.0.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.0.0",
+        "prefixLen": 24,
+        "network": "10.106.0.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.1.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.1.0",
+        "prefixLen": 24,
+        "network": "10.106.1.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.2.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.2.0",
+        "prefixLen": 24,
+        "network": "10.106.2.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.3.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.3.0",
+        "prefixLen": 24,
+        "network": "10.106.3.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.4.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.4.0",
+        "prefixLen": 24,
+        "network": "10.106.4.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.5.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.5.0",
+        "prefixLen": 24,
+        "network": "10.106.5.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.6.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.6.0",
+        "prefixLen": 24,
+        "network": "10.106.6.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.7.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.7.0",
+        "prefixLen": 24,
+        "network": "10.106.7.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.8.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.8.0",
+        "prefixLen": 24,
+        "network": "10.106.8.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.106.9.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.106.9.0",
+        "prefixLen": 24,
+        "network": "10.106.9.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.6",
+        "path": "65006",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.6",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.0.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.0.0",
+        "prefixLen": 24,
+        "network": "10.107.0.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.1.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.1.0",
+        "prefixLen": 24,
+        "network": "10.107.1.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.2.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.2.0",
+        "prefixLen": 24,
+        "network": "10.107.2.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.3.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.3.0",
+        "prefixLen": 24,
+        "network": "10.107.3.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.4.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.4.0",
+        "prefixLen": 24,
+        "network": "10.107.4.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.5.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.5.0",
+        "prefixLen": 24,
+        "network": "10.107.5.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.6.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.6.0",
+        "prefixLen": 24,
+        "network": "10.107.6.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.7.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.7.0",
+        "prefixLen": 24,
+        "network": "10.107.7.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.8.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.8.0",
+        "prefixLen": 24,
+        "network": "10.107.8.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.107.9.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.107.9.0",
+        "prefixLen": 24,
+        "network": "10.107.9.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.7",
+        "path": "65007",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.7",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.0.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.0.0",
+        "prefixLen": 24,
+        "network": "10.108.0.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.1.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.1.0",
+        "prefixLen": 24,
+        "network": "10.108.1.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.2.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.2.0",
+        "prefixLen": 24,
+        "network": "10.108.2.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.3.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.3.0",
+        "prefixLen": 24,
+        "network": "10.108.3.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.4.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.4.0",
+        "prefixLen": 24,
+        "network": "10.108.4.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.5.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.5.0",
+        "prefixLen": 24,
+        "network": "10.108.5.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.6.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.6.0",
+        "prefixLen": 24,
+        "network": "10.108.6.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.7.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.7.0",
+        "prefixLen": 24,
+        "network": "10.108.7.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.8.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.8.0",
+        "prefixLen": 24,
+        "network": "10.108.8.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ],
+    "10.108.9.0/24": [
+      {
+        "valid": true,
+        "bestpath": true,
+        "pathFrom": "external",
+        "prefix": "10.108.9.0",
+        "prefixLen": 24,
+        "network": "10.108.9.0/24",
+        "metric": 100,
+        "weight": 0,
+        "peerId": "172.16.1.8",
+        "path": "65008",
+        "origin": "IGP",
+        "nexthops": [
+          {
+            "ip": "172.16.1.8",
+            "afi": "ipv4",
+            "used": true
+          }
+        ]
+      }
+    ]
+  }
+}
index d8815a0d39b7e6bd64b1e96fc89f814a0158c994..caaa81066213183f4e0d6abdef43705970c16354 100644 (file)
@@ -67,6 +67,7 @@ import re
 import sys
 import pytest
 import glob
+import json
 from time import sleep
 
 from mininet.topo import Topo
@@ -81,6 +82,10 @@ from functools import partial
 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
 from lib import topotest
 
+
+pytestmark = [pytest.mark.bgpd]
+
+
 fatal_error = ""
 
 
@@ -216,8 +221,7 @@ def test_bgp_converge():
         pytest.skip(fatal_error)
 
     # Wait for BGP to converge  (All Neighbors in either Full or TwoWay State)
-    print("\n\n** Verify for BGP to converge")
-    print("******************************************\n")
+
     timeout = 125
     while timeout > 0:
         print("Timeout in %s: " % timeout),
@@ -269,84 +273,30 @@ def test_bgp_converge():
 def test_bgp_routingTable():
     global fatal_error
     global net
-
     # Skip if previous fatal error condition is raised
     if fatal_error != "":
         pytest.skip(fatal_error)
-
     thisDir = os.path.dirname(os.path.realpath(__file__))
-
-    print("\n\n** Verifying BGP Routing Tables")
-    print("******************************************\n")
-    diffresult = {}
-    for i in range(1, 2):
-        for view in range(1, 4):
-            success = 0
-            # This glob pattern should work as long as number of views < 10
-            for refTableFile in glob.glob(
-                "%s/r%s/show_ip_bgp_view_%s*.ref" % (thisDir, i, view)
-            ):
-
-                if os.path.isfile(refTableFile):
-                    # Read expected result from file
-                    expected = open(refTableFile).read().rstrip()
-                    # Fix newlines (make them all the same)
-                    expected = ("\n".join(expected.splitlines()) + "\n").splitlines(1)
-
-                    # Actual output from router
-                    actual = (
-                        net["r%s" % i]
-                        .cmd('vtysh -c "show ip bgp view %s" 2> /dev/null' % view)
-                        .rstrip()
-                    )
-
-                    # Fix inconsitent spaces between 0.99.24 and newer versions
-                    actual = re.sub("0             0", "0              0", actual)
-                    actual = re.sub(
-                        r"([0-9])         32768", r"\1          32768", actual
-                    )
-                    # Remove summary line (changed recently)
-                    actual = re.sub(r"Total number.*", "", actual)
-                    actual = re.sub(r"Displayed.*", "", actual)
-                    actual = actual.rstrip()
-                    # Fix table version (ignore it)
-                    actual = re.sub(r"(BGP table version is )[0-9]+", r"\1XXX", actual)
-
-                    # Fix newlines (make them all the same)
-                    actual = ("\n".join(actual.splitlines()) + "\n").splitlines(1)
-
-                # Generate Diff
-                diff = topotest.get_textdiff(
-                    actual,
-                    expected,
-                    title1="actual BGP routing table",
-                    title2="expected BGP routing table",
-                )
-
-                if diff:
-                    diffresult[refTableFile] = diff
-                else:
-                    success = 1
-                    print("template %s matched: r%s ok" % (refTableFile, i))
-                    break
-
-            if not success:
-                resultstr = "No template matched.\n"
-                for f in diffresult.keys():
-                    resultstr += (
-                        "template %s: r%s failed Routing Table Check for view %s:\n%s\n"
-                        % (f, i, view, diffresult[f])
-                    )
-                raise AssertionError(
-                    "Routing Table verification failed for router r%s, view %s:\n%s"
-                    % (i, view, resultstr)
-                )
-
+    print("Verifying BGP Routing Tables")
+    def router_json_cmp(router, cmd, data):
+        json_data = json.loads(router.cmd("vtysh -c \"{}\" 2> /dev/null".format(cmd)))
+        return topotest.json_cmp(json_data, data)
+    router = net["r1"]
+    for view in range(1, 4):
+        json_file = "{}/{}/view_{}.json".format(thisDir, router.name, view)
+        expected = json.loads(open(json_file).read())
+        test_func = partial(
+            router_json_cmp, router, "show ip bgp view {} json".format(view), expected
+        )
+        _, result = topotest.run_and_expect(test_func, None, count=5, wait=1)
+        assertmsg = "Routing Table verification failed for router {}, view {}".format(
+            router.name, view
+        )
+        assert result is None, assertmsg
     # Make sure that all daemons are running
     for i in range(1, 2):
         fatal_error = net["r%s" % i].checkRouterRunning()
         assert fatal_error == "", fatal_error
-
     # For debugging after starting FRR daemons, uncomment the next line
     # CLI(net)
 
index a9541a55c5c41bc38de71455d6e953a43f8d1530..a591c2f3f4ff4216c1bd17badeb6745917d13e36 100644 (file)
@@ -94,6 +94,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/bgp_path_attributes.json".format(CWD)
 
index 39a0beeb118c483400166bde3647f05544f47e3d..743fcf7b3a00a6d4e996353f07a905e38bf936f7 100755 (executable)
@@ -73,6 +73,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
 
 class PeerTypeRelaxTopo(Topo):
     def build(self, *_args, **_opts):
index 22952f645c4a0e12393b84bf852244c7c45a8e08..10dee0f77bea4f4c4ebb7ec79714b74b1775de01 100644 (file)
@@ -73,6 +73,9 @@ from lib.topolog import logger
 from lib.bgp import verify_bgp_convergence, create_router_bgp, clear_bgp_and_verify
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/prefix_lists.json".format(CWD)
 
index ceac84709b7e382d1663d40ae8fe57da1c86693a..fffe135b77dc6bb3b16012ebb4340bfd6505510c 100644 (file)
@@ -41,6 +41,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, **_opts):
index 25362530d41c090854602ec5d42e3e4bc1802f0a..703dcd7e2dbdc4c9c4c74398353228cadaa8ba62 100755 (executable)
@@ -41,6 +41,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, **_opts):
index e7d70f6d8ea4e2a618ce6a744e86100d5ad4fc89..2fe80c77f0a9f59d2e1d5790ec2d1d0c248528bc 100644 (file)
@@ -1103,7 +1103,7 @@ def test_next_hop_with_recursive_lookup_p1(request):
             tc_name, result
         )
 
-    step("Toggle the interface on R3(ifconfig 192.34).")
+    step("Toggle the interface on R3.")
 
     intf_r3_r4 = topo["routers"]["r3"]["links"]["r4"]["interface"]
     shutdown_bringup_interface(tgen, "r3", intf_r3_r4)
@@ -1161,7 +1161,7 @@ def test_next_hop_with_recursive_lookup_p1(request):
             tc_name, result
         )
 
-    step("Toggle the interface on R4(ifconfig 192.34).")
+    step("Toggle the interface on R4.")
 
     intf_r4_r3 = topo["routers"]["r4"]["links"]["r3"]["interface"]
     shutdown_bringup_interface(tgen, "r4", intf_r4_r3)
index d514dccd4aee5ddb38fa8b0862fc0ad81c8865b3..c644d2104f35eb990399c4fdd00e17993afcb123 100644 (file)
@@ -50,6 +50,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
diff --git a/tests/topotests/bgp_rmap_extcommunity_none/__init__.py b/tests/topotests/bgp_rmap_extcommunity_none/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/bgp_rmap_extcommunity_none/r1/bgpd.conf b/tests/topotests/bgp_rmap_extcommunity_none/r1/bgpd.conf
new file mode 100644 (file)
index 0000000..8ccdf9c
--- /dev/null
@@ -0,0 +1,8 @@
+!
+router bgp 65001
+ no bgp ebgp-requires-policy
+ neighbor 192.168.1.2 remote-as external
+!
+route-map r2 permit 10
+ set extcommunity none
+!
diff --git a/tests/topotests/bgp_rmap_extcommunity_none/r1/zebra.conf b/tests/topotests/bgp_rmap_extcommunity_none/r1/zebra.conf
new file mode 100644 (file)
index 0000000..b29940f
--- /dev/null
@@ -0,0 +1,4 @@
+!
+int r1-eth0
+ ip address 192.168.1.1/24
+!
diff --git a/tests/topotests/bgp_rmap_extcommunity_none/r2/bgpd.conf b/tests/topotests/bgp_rmap_extcommunity_none/r2/bgpd.conf
new file mode 100644 (file)
index 0000000..9d58078
--- /dev/null
@@ -0,0 +1,12 @@
+router bgp 65002
+ no bgp ebgp-requires-policy
+ neighbor 192.168.1.1 remote-as external
+ address-family ipv4 unicast
+  redistribute connected
+  neighbor 192.168.1.1 route-map r1 out
+ exit-address-family
+!
+route-map r1 permit 10
+ set community 123:123
+ set extcommunity bandwidth 200
+!
diff --git a/tests/topotests/bgp_rmap_extcommunity_none/r2/zebra.conf b/tests/topotests/bgp_rmap_extcommunity_none/r2/zebra.conf
new file mode 100644 (file)
index 0000000..dc15cf7
--- /dev/null
@@ -0,0 +1,7 @@
+!
+int lo
+ ip address 172.16.16.1/32
+!
+int r2-eth0
+ ip address 192.168.1.2/24
+!
diff --git a/tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py b/tests/topotests/bgp_rmap_extcommunity_none/test_bgp_rmap_extcommunity_none.py
new file mode 100644 (file)
index 0000000..3c11ba7
--- /dev/null
@@ -0,0 +1,141 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2021 by
+# Donatas Abraitis <donatas.abraitis@gmail.com>
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+"""
+Test if route-map extcommunity none works:
+
+route-map <name> permit 10
+ set extcommunity none
+"""
+
+import os
+import sys
+import json
+import time
+import pytest
+import functools
+
+pytestmark = pytest.mark.bgpd
+
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+from lib import topotest
+from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.topolog import logger
+from mininet.topo import Topo
+
+pytestmark = [pytest.mark.bgpd]
+
+
+class TemplateTopo(Topo):
+    def build(self, *_args, **_opts):
+        tgen = get_topogen(self)
+
+        for routern in range(1, 3):
+            tgen.add_router("r{}".format(routern))
+
+        switch = tgen.add_switch("s1")
+        switch.add_link(tgen.gears["r1"])
+        switch.add_link(tgen.gears["r2"])
+
+
+def setup_module(mod):
+    tgen = Topogen(TemplateTopo, mod.__name__)
+    tgen.start_topology()
+
+    router_list = tgen.routers()
+
+    for i, (rname, router) in enumerate(router_list.items(), 1):
+        router.load_config(
+            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
+        )
+        router.load_config(
+            TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname))
+        )
+
+    tgen.start_router()
+
+
+def teardown_module(mod):
+    tgen = get_topogen()
+    tgen.stop_topology()
+
+
+def test_bgp_extcommunity_none():
+    tgen = get_topogen()
+
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    router = tgen.gears["r1"]
+
+    def _bgp_converge(router):
+        output = json.loads(
+            router.vtysh_cmd("show bgp ipv4 unicast 172.16.16.1/32 json")
+        )
+        expected = {
+            "prefix": "172.16.16.1/32",
+            "paths": [
+                {
+                    "community": {
+                        "string": "123:123",
+                    },
+                    "extendedCommunity": {"string": "LB:65002:25000000 (200.000 Mbps)"},
+                }
+            ],
+        }
+
+        return topotest.json_cmp(output, expected)
+
+    test_func = functools.partial(_bgp_converge, router)
+    success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+    assert result is None, "BGP Converge failed"
+
+    def _bgp_extcommunity_strip(router):
+        router.vtysh_cmd(
+            "conf t\nrouter bgp 65001\naddress-family ipv4\nneighbor 192.168.1.2 route-map r2 in"
+        )
+        output = json.loads(
+            router.vtysh_cmd("show bgp ipv4 unicast 172.16.16.1/32 json")
+        )
+        expected = {
+            "prefix": "172.16.16.1/32",
+            "paths": [
+                {
+                    "community": {
+                        "string": "123:123",
+                    },
+                    "extendedCommunity": None,
+                }
+            ],
+        }
+
+        return topotest.json_cmp(output, expected)
+
+    test_func = functools.partial(_bgp_extcommunity_strip, router)
+    success, result = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+    assert result is None, "Failed to strip incoming extended communities from r2"
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index 0467bf1bfbc1f54ec28cb8a8e5002214445c2c86..ecf1ed521c4aa84ced6ee404bbaaae4cdd7b254c 100644 (file)
@@ -70,6 +70,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/bgp_aggregation.json".format(CWD)
 try:
index 74172501dbabdda74f1ceded88c435835d5b0476..7de56849c81c443f67512b953845aca1333a88af 100644 (file)
@@ -67,6 +67,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 #################################
 # TOPOLOGY
 #################################
index 958eceba62b75cf392cb94e87d12f37ac9d0e5b8..230a89ace1560ec7e005839ff6021b51d7e5494a 100644 (file)
@@ -149,6 +149,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/bgp_route_map_topo2.json".format(CWD)
 
index 6a604765ca1baa2c5ea075924967cfe8eb5c057c..664c9dc91a131a8ebe3a98825ef883012b037b5d 100644 (file)
@@ -49,6 +49,9 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
+
 #####################################################
 ##
 ##   Network Topology Definition
index af646489519a1431dfc519b1302f4edd6453e830..b4af911d91dd09cc289e06dd01156df9669e7302 100644 (file)
@@ -44,6 +44,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 2d80c66b0bdcdd17481b24c231000f6a010d5ed0..3251484514e945b78133d9df78aba664c8f663d8 100755 (executable)
@@ -39,6 +39,8 @@ from lib.topolog import logger
 from lib.common_config import required_linux_kernel_version
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class Topology(Topo):
     """
index c75055c26f8dbe4fc5d3ee6719ac145497e7fa79..476f6b556b70d7bef53554ed4e64f57f763eca74 100644 (file)
@@ -40,6 +40,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 7500c3b3ad1c9048c3084257006cc544bf8376ef..cb1d28cc06388a2d915510ec531d2d36fd90d666 100644 (file)
@@ -51,6 +51,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 71bd58bf7345602c05f9e9773200cb5bcda85cb7..2972a25f38dcacb2b7ac56d2fc18523238cea08b 100644 (file)
@@ -73,6 +73,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 83682fb36d37460117be33cec49bea9b49dac16a..ea1b1a42d79724db93ef4603b6a16344e74a4cb5 100644 (file)
@@ -81,6 +81,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/bgp_vrf_dynamic_route_leak_topo1.json".format(CWD)
 try:
@@ -120,8 +123,6 @@ LOOPBACK_1 = {
 LOOPBACK_2 = {
     "ipv4": "10.0.0.16/24",
     "ipv6": "fd00:0:0:3::5/64",
-    "ipv4_mask": "255.255.255.0",
-    "ipv6_mask": None,
 }
 PREFERRED_NEXT_HOP = "global"
 
@@ -689,14 +690,13 @@ def test_dynamic_imported_routes_advertised_to_iBGP_peer_p0(request):
             "loopback2",
             LOOPBACK_2[addr_type],
             "ISR",
-            LOOPBACK_2["{}_mask".format(addr_type)],
         )
 
     for addr_type in ADDR_TYPES:
 
         step(
             "On router R1 Change the next-hop of static routes in vrf "
-            "ISR to LOOPBACK_1"
+            "ISR to LOOPBACK_2"
         )
 
         input_routes_r1 = {
index 6e7495d929a082dd127bacca22fbf9e7b5948488..f701529b525572c39aae283fe6726f08bd9f1a00 100644 (file)
@@ -78,6 +78,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/bgp_vrf_dynamic_route_leak_topo2.json".format(CWD)
 try:
index a17819f74751e8c4718739226743cbfbf29ffabe..57ba87e887e3de8b78e029c74d8b1447c720c60e 100644 (file)
@@ -47,6 +47,8 @@ from lib.common_config import required_linux_kernel_version
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class BGPIPV6RTADVVRFTopo(Topo):
     "Test topology builder"
index cfe3f2e2b5de0fc992e53af0f0506103e1c1817c..572dce74557455a7056fe427025f193ab479af47 100644 (file)
@@ -1,5 +1,5 @@
 !
-router bgp 100 vrf r1-cust1
+router bgp 100 vrf r1-bgp-cust1
  bgp router-id 10.0.1.1
  bgp bestpath as-path multipath-relax
  no bgp ebgp-requires-policy
index 1a079ff130807044161d9b4fe85cd968b905c483..819f26133fb77474af7fefd74d2333703984f662 100644 (file)
@@ -2,7 +2,7 @@
 "ipv4Unicast":{
   "routerId":"10.0.1.1",
   "as":100,
-  "vrfName":"r1-cust1",
+  "vrfName":"r1-bgp-cust1",
   "peerCount":1,
   "peers":{
     "10.0.1.101":{
index 2b5787e6dadf0e5d33c670d4aae3405bf85102f6..ea04a56d85ec5fa0a675ec158315c8e1e8472871 100644 (file)
@@ -1,7 +1,7 @@
 {
   "routerId":"10.0.1.1",
   "as":100,
-  "vrfName":"re1-cust1",
+  "vrfName":"re1-bgp-cust1",
   "peerCount":1,
   "peers":{
     "10.0.1.101":{
index 817d9544d3caa2d9d169961a5729e2df79026a21..fd0e18f5fda0baafa8a5e2085686d5ae79186bf1 100644 (file)
@@ -1,5 +1,5 @@
 !
-interface r1-eth0 vrf r1-cust1
+interface r1-eth0 vrf r1-bgp-cust1
  ip address 10.0.1.1/24
 !
 line vty
index 30bb9595b7041a066581c37562380e482e611347..60511aebde75742c9842b3fb5ffabce55d936ce0 100644 (file)
@@ -44,6 +44,9 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
+
 total_ebgp_peers = 1
 CustomizeVrfWithNetns = True
 
@@ -103,13 +106,12 @@ def setup_module(module):
     if CustomizeVrfWithNetns == True:
         logger.info("Testing with VRF Namespace support")
 
-    # create VRF r1-cust1
-    # move r1-eth0 to VRF r1-cust1
+    # create VRF r1-bgp-cust1
+    # move r1-eth0 to VRF r1-bgp-cust1
     cmds = [
-        "if [ -e /var/run/netns/{0}-cust1 ] ; then ip netns del {0}-cust1 ; fi",
-        "ip netns add {0}-cust1",
-        "ip link set dev {0}-eth0 netns {0}-cust1",
-        "ip netns exec {0}-cust1 ifconfig {0}-eth0 up",
+        "if [ -e /var/run/netns/{0}-bgp-cust1 ] ; then ip netns del {0}-bgp-cust1 ; fi",
+        "ip netns add {0}-bgp-cust1",
+        "ip link set {0}-eth0 netns {0}-bgp-cust1 up",
     ]
     for cmd in cmds:
         cmd = cmd.format("r1")
@@ -151,10 +153,10 @@ def setup_module(module):
 def teardown_module(module):
     tgen = get_topogen()
     # move back r1-eth0 to default VRF
-    # delete VRF r1-cust1
+    # delete VRF r1-bgp-cust1
     cmds = [
-        "ip netns exec {0}-cust1 ip link set {0}-eth0 netns 1",
-        "ip netns delete {0}-cust1",
+        "ip netns exec {0}-bgp-cust1 ip link set {0}-eth0 netns 1",
+        "ip netns delete {0}-bgp-cust1",
     ]
     for cmd in cmds:
         tgen.net["r1"].cmd(cmd.format("r1"))
@@ -200,7 +202,7 @@ def test_bgp_convergence():
     expected = json.loads(open(reffile).read())
 
     test_func = functools.partial(
-        topotest.router_json_cmp, router, "show bgp vrf r1-cust1 summary json", expected
+        topotest.router_json_cmp, router, "show bgp vrf r1-bgp-cust1 summary json", expected
     )
     _, res = topotest.run_and_expect(test_func, None, count=90, wait=0.5)
     assertmsg = "BGP router network did not converge"
@@ -228,11 +230,11 @@ def test_bgp_vrf_netns():
     test_func = functools.partial(
         topotest.router_json_cmp,
         tgen.gears["r1"],
-        "show ip bgp vrf r1-cust1 ipv4 json",
+        "show ip bgp vrf r1-bgp-cust1 ipv4 json",
         expect,
     )
     _, res = topotest.run_and_expect(test_func, None, count=12, wait=0.5)
-    assertmsg = 'expected routes in "show ip bgp vrf r1-cust1 ipv4" output'
+    assertmsg = 'expected routes in "show ip bgp vrf r1-bgp-cust1 ipv4" output'
     assert res is None, assertmsg
 
 
index 71f64e9b706aa7324a287639cf7efc5c3483a29b..fcec0c23af2c84ac8fbc34103165eb8a6b452a12 100644 (file)
@@ -41,6 +41,8 @@ from lib.topolog import logger
 
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class BGPVRFTopo(Topo):
     def build(self, *_args, **_opts):
index d119b0931bdceec8cee35217344de844a497d42e..76e4714bfad72dc74708136ccbe1cef7564ad546 100755 (executable)
@@ -244,11 +244,11 @@ def pytest_runtest_makereport(item, call):
         modname = parent.module.__name__
 
         # Treat skips as non errors, don't pause after
-        if call.excinfo.typename != "AssertionError":
+        if call.excinfo.typename == "Skipped":
             pause = False
             error = False
             logger.info(
-                'assert skipped at "{}/{}": {}'.format(
+                'test skipped at "{}/{}": {}'.format(
                     modname, item.name, call.excinfo.value
                 )
             )
@@ -257,7 +257,7 @@ def pytest_runtest_makereport(item, call):
             # Handle assert failures
             parent._previousfailed = item  # pylint: disable=W0212
             logger.error(
-                'assert failed at "{}/{}": {}'.format(
+                'test failed at "{}/{}": {}'.format(
                     modname, item.name, call.excinfo.value
                 )
             )
index 293e25208629cd13728db0fe91d1ac0d2267abd2..d85f33d1fc2972fedfb4b0ab6127286136640708 100644 (file)
@@ -2,6 +2,7 @@ debug pim events
 debug pim nht
 debug pim zebra
 ip pim rp 192.168.100.1
+ip pim join-prune-interval 5
 !
 int lo
   ip pim
index 08d5a19a2acf4bd316eb5d3e2c07cea6ea79cb99..d775b800b3337508238ac1da01cd723b9ec75da2 100644 (file)
@@ -1,4 +1,5 @@
 ip pim rp 192.168.100.1
+ip pim join-prune-interval 5
 !
 int lo
   ip pim
index 56adda5cc47de46e73290e39013030b5c112e296..12c6d6f85c0fa015d3bd8f4bab705e5ab473c17a 100644 (file)
@@ -1,4 +1,5 @@
 ip pim rp 192.168.100.1
+ip pim join-prune-interval 5
 !
 int lo
   ip pim
index 260a197acae776aebbf1f4f9a29d6cbd77c94e36..b1f5daef1e435fc47f43aa2400bc54e12126bca9 100644 (file)
@@ -49,6 +49,9 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.bgpd]
+
+
 #####################################################
 ##
 ##   Network Topology Definition
index 46e21857c8e137e121c77156f69b06bec2ed01b5..09d66baa79ceb1b23d89a103c0fecab9f979703a 100644 (file)
@@ -85,6 +85,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/evpn_type5_chaos_topo1.json".format(CWD)
 try:
index 1a399ab32ebdd240150428ba21e474d2549c9207..521f2335b47331c98c36230aec8a8a72a7e07431 100644 (file)
@@ -91,6 +91,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/evpn_type5_topo1.json".format(CWD)
 try:
index 27dc1073c6f007903e82955aa7dce8121bd3fca5..70dcff035fc11578ed06b198c207b663b4d305d3 100755 (executable)
@@ -84,6 +84,9 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd]
+
+
 # Global multi-dimensional dictionary containing all expected outputs
 outputs = {}
 
index 9ad41c5934cf1764ddbb20591692c28f58061928..ded1a4cc22e986fc913bbdbcccb1f2dfa6434e18 100755 (executable)
@@ -82,7 +82,7 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
-pytestmark = [pytest.mark.isisd]
+pytestmark = [pytest.mark.isisd, pytest.mark.ldpd]
 
 # Global multi-dimensional dictionary containing all expected outputs
 outputs = {}
index 04e043847d8cb5003a98318520351c43f96a5d2e..2cd07299b0fb5fd6ea4790984932af907abe1679 100755 (executable)
@@ -82,6 +82,8 @@ from lib.snmptest import SnmpTester
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd, pytest.mark.ldpd, pytest.mark.snmp]
+
 
 class TemplateTopo(Topo):
     "Test topology builder"
index f47d9061570220971e03c0679f07e62932b020b4..8052316d7356d623ae4ea784b1096bbdc3720cef 100644 (file)
@@ -81,6 +81,7 @@ from lib.snmptest import SnmpTester
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.ldpd, pytest.mark.isisd, pytest.mark.snmp]
 
 class TemplateTopo(Topo):
     "Test topology builder"
index 331e6fafd41d800cec02c2b5a08a4f2b7dab329c..44b34c485f75385faa08b9c80ddd4af0802ec889 100644 (file)
@@ -80,6 +80,8 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.isisd, pytest.mark.ldpd]
+
 
 class TemplateTopo(Topo):
     "Test topology builder"
index 2f1f67439f8e92c65d915a00ff07401e5e63e513..519cd6735bdde0ff716ecc3873b569bebda38ebf 100644 (file)
@@ -33,7 +33,7 @@ from lib.topotest import frr_unicode
 
 # Import common_config to use commomnly used APIs
 from lib.common_config import (
-    create_common_configuration,
+    create_common_configurations,
     InvalidCLIError,
     load_config_to_router,
     check_address_types,
@@ -148,6 +148,8 @@ def create_router_bgp(tgen, topo, input_dict=None, build=False, load_config=True
         topo = topo["routers"]
         input_dict = deepcopy(input_dict)
 
+    config_data_dict = {}
+
     for router in input_dict.keys():
         if "bgp" not in input_dict[router]:
             logger.debug("Router %s: 'bgp' not present in input_dict", router)
@@ -158,6 +160,8 @@ def create_router_bgp(tgen, topo, input_dict=None, build=False, load_config=True
         if type(bgp_data_list) is not list:
             bgp_data_list = [bgp_data_list]
 
+        config_data = []
+
         for bgp_data in bgp_data_list:
             data_all_bgp = __create_bgp_global(tgen, bgp_data, router, build)
             if data_all_bgp:
@@ -198,16 +202,19 @@ def create_router_bgp(tgen, topo, input_dict=None, build=False, load_config=True
                         data_all_bgp = __create_l2vpn_evpn_address_family(
                             tgen, topo, bgp_data, router, config_data=data_all_bgp
                         )
+            if data_all_bgp:
+                config_data.extend(data_all_bgp)
 
-            try:
-                result = create_common_configuration(
-                    tgen, router, data_all_bgp, "bgp", build, load_config
-                )
-            except InvalidCLIError:
-                # Traceback
-                errormsg = traceback.format_exc()
-                logger.error(errormsg)
-                return errormsg
+        if config_data:
+            config_data_dict[router] = config_data
+
+    try:
+        result = create_common_configurations(
+            tgen, config_data_dict, "bgp", build, load_config
+        )
+    except InvalidCLIError:
+        logger.error("create_router_bgp", exc_info=True)
+        result = False
 
     logger.debug("Exiting lib API: create_router_bgp()")
     return result
@@ -226,7 +233,7 @@ def __create_bgp_global(tgen, input_dict, router, build=False):
 
     Returns
     -------
-    True or False
+    list of config commands
     """
 
     result = False
@@ -241,7 +248,7 @@ def __create_bgp_global(tgen, input_dict, router, build=False):
         logger.debug(
             "Router %s: 'local_as' not present in input_dict" "for BGP", router
         )
-        return False
+        return config_data
 
     local_as = bgp_data.setdefault("local_as", "")
     cmd = "router bgp {}".format(local_as)
@@ -265,6 +272,7 @@ def __create_bgp_global(tgen, input_dict, router, build=False):
     if router_id:
         config_data.append("bgp router-id {}".format(router_id))
 
+    config_data.append("bgp log-neighbor-changes")
     config_data.append("no bgp network import-check")
     bgp_peer_grp_data = bgp_data.setdefault("peer-group", {})
 
@@ -719,6 +727,7 @@ def __create_bgp_neighbor(topo, input_dict, router, addr_type, add_neigh=True):
     tgen = get_topogen()
     bgp_data = input_dict["address_family"]
     neigh_data = bgp_data[addr_type]["unicast"]["neighbor"]
+    global_connect = input_dict.get("connecttimer", 5)
 
     for name, peer_dict in neigh_data.items():
         for dest_link, peer in peer_dict["dest_link"].items():
@@ -798,6 +807,7 @@ def __create_bgp_neighbor(topo, input_dict, router, addr_type, add_neigh=True):
                 )
 
             disable_connected = peer.setdefault("disable_connected_check", False)
+            connect = peer.get("connecttimer", global_connect)
             keep_alive = peer.setdefault("keepalivetimer", 3)
             hold_down = peer.setdefault("holddowntimer", 10)
             password = peer.setdefault("password", None)
@@ -827,6 +837,9 @@ def __create_bgp_neighbor(topo, input_dict, router, addr_type, add_neigh=True):
                 config_data.append(
                     "{} timers {} {}".format(neigh_cxt, keep_alive, hold_down)
                 )
+            if int(connect) != 120:
+                config_data.append("{} timers connect {}".format(neigh_cxt, connect))
+
             if graceful_restart:
                 config_data.append("{} graceful-restart".format(neigh_cxt))
             elif graceful_restart == False:
@@ -1532,15 +1545,16 @@ def modify_as_number(tgen, topo, input_dict):
         create_router_bgp(tgen, topo, router_dict)
 
         logger.info("Applying modified bgp configuration")
-        create_router_bgp(tgen, new_topo)
-
+        result = create_router_bgp(tgen, new_topo)
+        if result is not True:
+            result = "Error applying new AS number config"
     except Exception as e:
         errormsg = traceback.format_exc()
         logger.error(errormsg)
         return errormsg
 
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
-    return True
+    return result
 
 
 @retry(retry_timeout=8)
@@ -3765,7 +3779,7 @@ def verify_graceful_restart_timers(tgen, topo, addr_type, input_dict, dut, peer)
 
 
 @retry(retry_timeout=8)
-def verify_gr_address_family(tgen, topo, addr_type, addr_family, dut, expected=True):
+def verify_gr_address_family(tgen, topo, addr_type, addr_family, dut, peer, expected=True):
     """
     This API is to verify gr_address_family in the BGP gr capability advertised
     by the neighbor router
@@ -3777,80 +3791,86 @@ def verify_gr_address_family(tgen, topo, addr_type, addr_family, dut, expected=T
     * `addr_type` : ip type ipv4/ipv6
     * `addr_type` : ip type IPV4 Unicast/IPV6 Unicast
     * `dut`: input dut router name
+    * `peer`: input peer router to check
     * `expected` : expected results from API, by-default True
 
     Usage
     -----
 
-    result = verify_gr_address_family(tgen, topo, "ipv4", "ipv4Unicast", "r1")
+    result = verify_gr_address_family(tgen, topo, "ipv4", "ipv4Unicast", "r1", "r3")
 
     Returns
     -------
-    errormsg(str) or True
+    errormsg(str) or None
     """
 
     logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
 
-    for router, rnode in tgen.routers().items():
-        if router != dut:
-            continue
+    if not check_address_types(addr_type):
+        logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
+        return
 
-        bgp_addr_type = topo["routers"][router]["bgp"]["address_family"]
+    routers = tgen.routers()
+    if dut not in routers:
+        return "{} not in routers".format(dut)
 
-        if addr_type in bgp_addr_type:
-            if not check_address_types(addr_type):
-                continue
+    rnode = routers[dut]
+    bgp_addr_type = topo["routers"][dut]["bgp"]["address_family"]
 
-            bgp_neighbors = bgp_addr_type[addr_type]["unicast"]["neighbor"]
+    if addr_type not in bgp_addr_type:
+        return "{} not in bgp_addr_types".format(addr_type)
 
-            for bgp_neighbor, peer_data in bgp_neighbors.items():
-                for dest_link, peer_dict in peer_data["dest_link"].items():
-                    data = topo["routers"][bgp_neighbor]["links"]
+    if peer not in bgp_addr_type[addr_type]["unicast"]["neighbor"]:
+        return "{} not a peer of {} over {}".format(peer, dut, addr_type)
 
-                    if dest_link in data:
-                        neighbor_ip = data[dest_link][addr_type].split("/")[0]
+    nbr_links = topo["routers"][peer]["links"]
+    if dut not in nbr_links or addr_type not in nbr_links[dut]:
+        return "peer {} missing back link to {} over {}".format(peer, dut, addr_type)
 
-            logger.info(
-                "[DUT: {}]: Checking bgp graceful-restart"
-                " show o/p  {}".format(dut, neighbor_ip)
-            )
+    neighbor_ip = nbr_links[dut][addr_type].split("/")[0]
 
-            show_bgp_graceful_json = run_frr_cmd(
-                rnode,
-                "show bgp {} neighbor {} graceful-restart json".format(
-                    addr_type, neighbor_ip
-                ),
-                isjson=True,
-            )
+    logger.info(
+        "[DUT: {}]: Checking bgp graceful-restart show o/p {} for {}".format(
+            dut, neighbor_ip, addr_family
+        )
+    )
 
-            show_bgp_graceful_json_out = show_bgp_graceful_json[neighbor_ip]
+    show_bgp_graceful_json = run_frr_cmd(
+        rnode,
+        "show bgp {} neighbor {} graceful-restart json".format(
+            addr_type, neighbor_ip
+        ),
+        isjson=True,
+    )
 
-            if show_bgp_graceful_json_out["neighborAddr"] == neighbor_ip:
-                logger.info("Neighbor ip matched  {}".format(neighbor_ip))
-            else:
-                errormsg = "Neighbor ip NOT a match {}".format(neighbor_ip)
-                return errormsg
+    show_bgp_graceful_json_out = show_bgp_graceful_json[neighbor_ip]
 
-            if addr_family == "ipv4Unicast":
-                if "ipv4Unicast" in show_bgp_graceful_json_out:
-                    logger.info("ipv4Unicast present for {} ".format(neighbor_ip))
-                    return True
-                else:
-                    errormsg = "ipv4Unicast NOT present for {} ".format(neighbor_ip)
-                    return errormsg
+    if show_bgp_graceful_json_out["neighborAddr"] == neighbor_ip:
+        logger.info("Neighbor ip matched  {}".format(neighbor_ip))
+    else:
+        errormsg = "Neighbor ip NOT a match {}".format(neighbor_ip)
+        return errormsg
 
-            elif addr_family == "ipv6Unicast":
-                if "ipv6Unicast" in show_bgp_graceful_json_out:
-                    logger.info("ipv6Unicast present for {} ".format(neighbor_ip))
-                    return True
-                else:
-                    errormsg = "ipv6Unicast NOT present for {} ".format(neighbor_ip)
-                    return errormsg
-            else:
-                errormsg = "Aaddress family: {} present for {} ".format(
-                    addr_family, neighbor_ip
-                )
-                return errormsg
+    if addr_family == "ipv4Unicast":
+        if "ipv4Unicast" in show_bgp_graceful_json_out:
+            logger.info("ipv4Unicast present for {} ".format(neighbor_ip))
+            return True
+        else:
+            errormsg = "ipv4Unicast NOT present for {} ".format(neighbor_ip)
+            return errormsg
+
+    elif addr_family == "ipv6Unicast":
+        if "ipv6Unicast" in show_bgp_graceful_json_out:
+            logger.info("ipv6Unicast present for {} ".format(neighbor_ip))
+            return True
+        else:
+            errormsg = "ipv6Unicast NOT present for {} ".format(neighbor_ip)
+            return errormsg
+    else:
+        errormsg = "Aaddress family: {} present for {} ".format(
+            addr_family, neighbor_ip
+        )
+        return errormsg
 
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
 
index 6a02e501270257b7c5ab0de66a2c0fcf81a4e07d..81c7ba4d5ca45f71e08e35e2fd1e081ace4be749 100644 (file)
@@ -22,20 +22,20 @@ from collections import OrderedDict
 from datetime import datetime, timedelta
 from time import sleep
 from copy import deepcopy
-from subprocess import call
-from subprocess import STDOUT as SUB_STDOUT
-from subprocess import PIPE as SUB_PIPE
-from subprocess import Popen
 from functools import wraps
 from re import search as re_search
 from tempfile import mkdtemp
 
+import json
+import logging
 import os
 import sys
 import traceback
 import socket
+import subprocess
 import ipaddress
 import platform
+import pytest
 
 try:
     # Imports from python2
@@ -235,14 +235,12 @@ def run_frr_cmd(rnode, cmd, isjson=False):
 
         if True:
             if isjson:
-                logger.debug(ret_data)
-                print_data = rnode.vtysh_cmd(cmd.rstrip("json"), isjson=False)
+                print_data = json.dumps(ret_data)
             else:
                 print_data = ret_data
-
             logger.info(
-                "Output for command [ %s] on router %s:\n%s",
-                cmd.rstrip("json"),
+                "Output for command [%s] on router %s:\n%s",
+                cmd,
                 rnode.name,
                 print_data,
             )
@@ -278,7 +276,8 @@ def apply_raw_config(tgen, input_dict):
     True or errormsg
     """
 
-    result = True
+    rlist = []
+
     for router_name in input_dict.keys():
         config_cmd = input_dict[router_name]["raw_config"]
 
@@ -290,13 +289,14 @@ def apply_raw_config(tgen, input_dict):
             for cmd in config_cmd:
                 cfg.write("{}\n".format(cmd))
 
-        result = load_config_to_router(tgen, router_name)
+        rlist.append(router_name)
 
-    return result
+    # Load config on all routers
+    return load_config_to_routers(tgen, rlist)
 
 
-def create_common_configuration(
-    tgen, router, data, config_type=None, build=False, load_config=True
+def create_common_configurations(
+    tgen, config_dict, config_type=None, build=False, load_config=True
 ):
     """
     API to create object of class FRRConfig and also create frr_json.conf
@@ -305,8 +305,8 @@ def create_common_configuration(
     Parameters
     ----------
     * `tgen`: tgen object
-    * `data`: Configuration data saved in a list.
-    * `router` : router id to be configured.
+    * `config_dict`: Configuration data saved in a dict of { router: config-list }
+    * `routers` : list of router id to be configured.
     * `config_type` : Syntactic information while writing configuration. Should
                       be one of the value as mentioned in the config_map below.
     * `build` : Only for initial setup phase this is set as True
@@ -316,8 +316,6 @@ def create_common_configuration(
     """
     TMPDIR = os.path.join(LOGDIR, tgen.modname)
 
-    fname = "{}/{}/{}".format(TMPDIR, router, FRRCFG_FILE)
-
     config_map = OrderedDict(
         {
             "general_config": "! FRR General Config\n",
@@ -342,27 +340,55 @@ def create_common_configuration(
     else:
         mode = "w"
 
-    try:
-        frr_cfg_fd = open(fname, mode)
-        if config_type:
-            frr_cfg_fd.write(config_map[config_type])
-        for line in data:
-            frr_cfg_fd.write("{} \n".format(str(line)))
-        frr_cfg_fd.write("\n")
-
-    except IOError as err:
-        logger.error(
-            "Unable to open FRR Config File. error(%s): %s" % (err.errno, err.strerror)
-        )
-        return False
-    finally:
-        frr_cfg_fd.close()
+    routers = config_dict.keys()
+    for router in routers:
+        fname = "{}/{}/{}".format(TMPDIR, router, FRRCFG_FILE)
+        try:
+            frr_cfg_fd = open(fname, mode)
+            if config_type:
+                frr_cfg_fd.write(config_map[config_type])
+            for line in config_dict[router]:
+                frr_cfg_fd.write("{} \n".format(str(line)))
+            frr_cfg_fd.write("\n")
+
+        except IOError as err:
+            logger.error(
+                "Unable to open FRR Config '%s': %s" % (fname, str(err))
+            )
+            return False
+        finally:
+            frr_cfg_fd.close()
 
     # If configuration applied from build, it will done at last
+    result = True
     if not build and load_config:
-        load_config_to_router(tgen, router)
+        result = load_config_to_routers(tgen, routers)
 
-    return True
+    return result
+
+
+def create_common_configuration(
+    tgen, router, data, config_type=None, build=False, load_config=True
+):
+    """
+    API to create object of class FRRConfig and also create frr_json.conf
+    file. It will create interface and common configurations and save it to
+    frr_json.conf and load to router
+    Parameters
+    ----------
+    * `tgen`: tgen object
+    * `data`: Configuration data saved in a list.
+    * `router` : router id to be configured.
+    * `config_type` : Syntactic information while writing configuration. Should
+                      be one of the value as mentioned in the config_map below.
+    * `build` : Only for initial setup phase this is set as True
+    Returns
+    -------
+    True or False
+    """
+    return create_common_configurations(
+        tgen, {router: data}, config_type, build, load_config
+    )
 
 
 def kill_router_daemons(tgen, router, daemons, save_config=True):
@@ -470,110 +496,149 @@ def reset_config_on_routers(tgen, routerName=None):
 
     logger.debug("Entering API: reset_config_on_routers")
 
+    # Trim the router list if needed
     router_list = tgen.routers()
-    for rname in ROUTER_LIST:
-        if routerName and routerName != rname:
-            continue
-
-        router = router_list[rname]
-        logger.info("Configuring router %s to initial test configuration", rname)
-
-        cfg = router.run("vtysh -c 'show running'")
-        fname = "{}/{}/frr.sav".format(TMPDIR, rname)
-        dname = "{}/{}/delta.conf".format(TMPDIR, rname)
-        f = open(fname, "w")
-        for line in cfg.split("\n"):
-            line = line.strip()
-
-            if (
-                line == "Building configuration..."
-                or line == "Current configuration:"
-                or not line
-            ):
-                continue
-            f.write(line)
-            f.write("\n")
-
-        f.close()
-        run_cfg_file = "{}/{}/frr.sav".format(TMPDIR, rname)
-        init_cfg_file = "{}/{}/frr_json_initial.conf".format(TMPDIR, rname)
-        command = "/usr/lib/frr/frr-reload.py --test --test-reset --input {} {} > {}".format(
-            run_cfg_file, init_cfg_file, dname
+    if routerName:
+        if ((routerName not in ROUTER_LIST) or (routerName not in router_list)):
+            logger.debug("Exiting API: reset_config_on_routers: no routers")
+            return True
+        router_list = { routerName: router_list[routerName] }
+
+    delta_fmt = TMPDIR + "/{}/delta.conf"
+    init_cfg_fmt = TMPDIR + "/{}/frr_json_initial.conf"
+    run_cfg_fmt = TMPDIR + "/{}/frr.sav"
+
+    #
+    # Get all running configs in parallel
+    #
+    procs = {}
+    for rname in router_list:
+        logger.info("Fetching running config for router %s", rname)
+        procs[rname] = router_list[rname].popen(
+            ["/usr/bin/env", "vtysh", "-c", "show running-config no-header"],
+            stdin=None,
+            stdout=open(run_cfg_fmt.format(rname), "w"),
+            stderr=subprocess.PIPE,
         )
-        result = call(command, shell=True, stderr=SUB_STDOUT, stdout=SUB_PIPE)
-
-        # Assert if command fail
-        if result > 0:
-            logger.error("Delta file creation failed. Command executed %s", command)
-            with open(run_cfg_file, "r") as fd:
-                logger.info(
-                    "Running configuration saved in %s is:\n%s", run_cfg_file, fd.read()
-                )
-            with open(init_cfg_file, "r") as fd:
-                logger.info(
-                    "Test configuration saved in %s is:\n%s", init_cfg_file, fd.read()
-                )
-
-            err_cmd = ["/usr/bin/vtysh", "-m", "-f", run_cfg_file]
-            result = Popen(err_cmd, stdout=SUB_PIPE, stderr=SUB_PIPE)
-            output = result.communicate()
-            for out_data in output:
-                temp_data = out_data.decode("utf-8").lower()
-                for out_err in ERROR_LIST:
-                    if out_err.lower() in temp_data:
-                        logger.error(
-                            "Found errors while validating data in" " %s", run_cfg_file
-                        )
-                        raise InvalidCLIError(out_data)
-            raise InvalidCLIError("Unknown error in %s", output)
-
-        delta = StringIO()
-        with open(dname, "r") as f:
-            delta.write(f.read())
-
-        output = router.vtysh_multicmd(delta.getvalue(), pretty_output=False)
-
-        delta.close()
-        delta = StringIO()
-        cfg = router.run("vtysh -c 'show running'")
-        for line in cfg.split("\n"):
-            line = line.strip()
-            delta.write(line)
-            delta.write("\n")
-
-        # Router current configuration to log file or console if
-        # "show_router_config" is defined in "pytest.ini"
-        if show_router_config:
-            logger.info("Configuration on router {} after reset:".format(rname))
-            logger.info(delta.getvalue())
-        delta.close()
+    for rname, p in procs.items():
+        _, error = p.communicate()
+        if p.returncode:
+            logger.error("Get running config for %s failed %d: %s", rname, p.returncode, error)
+            raise InvalidCLIError("vtysh show running error on {}: {}".format(rname, error))
+
+    #
+    # Get all delta's in parallel
+    #
+    procs = {}
+    for rname in router_list:
+        logger.info("Generating delta for router %s to new configuration", rname)
+        procs[rname] = subprocess.Popen(
+            [ "/usr/lib/frr/frr-reload.py",
+              "--test-reset",
+              "--input",
+              run_cfg_fmt.format(rname),
+              "--test",
+              init_cfg_fmt.format(rname) ],
+            stdin=None,
+            stdout=open(delta_fmt.format(rname), "w"),
+            stderr=subprocess.PIPE,
+        )
+    for rname, p in procs.items():
+        _, error = p.communicate()
+        if p.returncode:
+            logger.error("Delta file creation for %s failed %d: %s", rname, p.returncode, error)
+            raise InvalidCLIError("frr-reload error for {}: {}".format(rname, error))
+
+    #
+    # Apply all the deltas in parallel
+    #
+    procs = {}
+    for rname in router_list:
+        logger.info("Applying delta config on router %s", rname)
+
+        procs[rname] = router_list[rname].popen(
+            ["/usr/bin/env", "vtysh", "-f", delta_fmt.format(rname)],
+            stdin=None,
+            stdout=subprocess.PIPE,
+            stderr=subprocess.STDOUT,
+        )
+    for rname, p in procs.items():
+        output, _ = p.communicate()
+        vtysh_command = "vtysh -f {}".format(delta_fmt.format(rname))
+        if not p.returncode:
+            router_list[rname].logger.info(
+                '\nvtysh config apply => "{}"\nvtysh output <= "{}"'.format(vtysh_command, output)
+            )
+        else:
+            router_list[rname].logger.warning(
+                '\nvtysh config apply failed => "{}"\nvtysh output <= "{}"'.format(vtysh_command, output)
+            )
+            logger.error("Delta file apply for %s failed %d: %s", rname, p.returncode, output)
+
+            # We really need to enable this failure; however, currently frr-reload.py
+            # producing invalid "no" commands as it just preprends "no", but some of the
+            # command forms lack matching values (e.g., final values). Until frr-reload
+            # is fixed to handle this (or all the CLI no forms are adjusted) we can't
+            # fail tests.
+            # raise InvalidCLIError("frr-reload error for {}: {}".format(rname, output))
+
+    #
+    # Optionally log all new running config if "show_router_config" is defined in
+    # "pytest.ini"
+    #
+    if show_router_config:
+        procs = {}
+        for rname in router_list:
+            logger.info("Fetching running config for router %s", rname)
+            procs[rname] = router_list[rname].popen(
+                ["/usr/bin/env", "vtysh", "-c", "show running-config no-header"],
+                stdin=None,
+                stdout=subprocess.PIPE,
+                stderr=subprocess.STDOUT,
+            )
+        for rname, p in procs.items():
+            output, _ = p.communicate()
+            if p.returncode:
+                logger.warning("Get running config for %s failed %d: %s", rname, p.returncode, output)
+            else:
+                logger.info("Configuration on router %s after reset:\n%s", rname, output)
 
     logger.debug("Exiting API: reset_config_on_routers")
     return True
 
 
-def load_config_to_router(tgen, routerName, save_bkup=False):
+def load_config_to_routers(tgen, routers, save_bkup=False):
     """
-    Loads configuration on router from the file FRRCFG_FILE.
+    Loads configuration on routers from the file FRRCFG_FILE.
 
     Parameters
     ----------
     * `tgen` : Topogen object
-    * `routerName` : router for which configuration to be loaded
+    * `routers` : routers for which configuration is to be loaded
     * `save_bkup` : If True, Saves snapshot of FRRCFG_FILE to FRRCFG_BKUP_FILE
+    Returns
+    -------
+    True or False
     """
 
-    logger.debug("Entering API: load_config_to_router")
+    logger.debug("Entering API: load_config_to_routers")
 
-    router_list = tgen.routers()
-    for rname in ROUTER_LIST:
-        if routerName and rname != routerName:
+    base_router_list = tgen.routers()
+    router_list = {}
+    for router in routers:
+        if (router not in ROUTER_LIST) or (router not in base_router_list):
             continue
+        router_list[router] = base_router_list[router]
 
+    frr_cfg_file_fmt = TMPDIR + "/{}/" + FRRCFG_FILE
+    frr_cfg_bkup_fmt = TMPDIR + "/{}/" + FRRCFG_BKUP_FILE
+
+    procs = {}
+    for rname in router_list:
         router = router_list[rname]
         try:
-            frr_cfg_file = "{}/{}/{}".format(TMPDIR, rname, FRRCFG_FILE)
-            frr_cfg_bkup = "{}/{}/{}".format(TMPDIR, rname, FRRCFG_BKUP_FILE)
+            frr_cfg_file = frr_cfg_file_fmt.format(rname)
+            frr_cfg_bkup =  frr_cfg_bkup_fmt.format(rname)
             with open(frr_cfg_file, "r+") as cfg:
                 data = cfg.read()
                 logger.info(
@@ -583,31 +648,76 @@ def load_config_to_router(tgen, routerName, save_bkup=False):
                 if save_bkup:
                     with open(frr_cfg_bkup, "w") as bkup:
                         bkup.write(data)
-
-                output = router.vtysh_multicmd(data, pretty_output=False)
-                for out_err in ERROR_LIST:
-                    if out_err.lower() in output.lower():
-                        raise InvalidCLIError("%s" % output)
-
-                cfg.truncate(0)
-
+            procs[rname] = router_list[rname].popen(
+                ["/usr/bin/env", "vtysh", "-f", frr_cfg_file],
+                stdin=None,
+                stdout=subprocess.PIPE,
+                stderr=subprocess.STDOUT,
+            )
         except IOError as err:
-            errormsg = (
-                "Unable to open config File. error(%s):" "  %s",
-                (err.errno, err.strerror),
+            logging.error(
+                "Unable to open config File. error(%s): %s",
+                err.errno, err.strerror
             )
-            return errormsg
+            return False
+        except Exception as error:
+            logging.error("Unable to apply config on %s: %s", rname, str(error))
+            return False
+
+    errors = []
+    for rname, p in procs.items():
+        output, _ = p.communicate()
+        frr_cfg_file = frr_cfg_file_fmt.format(rname)
+        vtysh_command = "vtysh -f " + frr_cfg_file
+        if not p.returncode:
+            router_list[rname].logger.info(
+                '\nvtysh config apply => "{}"\nvtysh output <= "{}"'.format(vtysh_command, output)
+            )
+        else:
+            router_list[rname].logger.error(
+                '\nvtysh config apply failed => "{}"\nvtysh output <= "{}"'.format(vtysh_command, output)
+            )
+            logger.error("Config apply for %s failed %d: %s", rname, p.returncode, output)
+            # We can't thorw an exception here as we won't clear the config file.
+            errors.append(InvalidCLIError("load_config_to_routers error for {}: {}".format(rname, output)))
+
+        # Empty the config file or we append to it next time through.
+        with open(frr_cfg_file, "r+") as cfg:
+            cfg.truncate(0)
+
+    # Router current configuration to log file or console if
+    # "show_router_config" is defined in "pytest.ini"
+    if show_router_config:
+        procs = {}
+        for rname in router_list:
+            procs[rname] = router_list[rname].popen(
+                ["/usr/bin/env", "vtysh", "-c", "show running-config no-header"],
+                stdin=None,
+                stdout=subprocess.PIPE,
+                stderr=subprocess.STDOUT,
+            )
+        for rname, p in procs.items():
+            output, _ = p.communicate()
+            if p.returncode:
+                logger.warning("Get running config for %s failed %d: %s", rname, p.returncode, output)
+            else:
+                logger.info("New configuration for router %s:\n%s", rname,output)
 
-        # Router current configuration to log file or console if
-        # "show_router_config" is defined in "pytest.ini"
-        if show_router_config:
-            logger.info("New configuration for router {}:".format(rname))
-            new_config = router.run("vtysh -c 'show running'")
-            logger.info(new_config)
+    logger.debug("Exiting API: load_config_to_routers")
+    return not errors
 
-    logger.debug("Exiting API: load_config_to_router")
-    return True
 
+def load_config_to_router(tgen, routerName, save_bkup=False):
+    """
+    Loads configuration on router from the file FRRCFG_FILE.
+
+    Parameters
+    ----------
+    * `tgen` : Topogen object
+    * `routerName` : router for which configuration to be loaded
+    * `save_bkup` : If True, Saves snapshot of FRRCFG_FILE to FRRCFG_BKUP_FILE
+    """
+    return load_config_to_routers(tgen, [routerName], save_bkup)
 
 
 def get_frr_ipv6_linklocal(tgen, router, intf=None, vrf=None):
@@ -707,8 +817,8 @@ def generate_support_bundle():
         bundle_procs[rname] = tgen.net[rname].popen(
             "/usr/lib/frr/generate_support_bundle.py",
             stdin=None,
-            stdout=SUB_PIPE,
-            stderr=SUB_PIPE,
+            stdout=subprocess.PIPE,
+            stderr=subprocess.PIPE,
         )
 
     for rname, rnode in router_list.items():
@@ -944,22 +1054,31 @@ def add_interfaces_to_vlan(tgen, input_dict):
                 for intf_dict in interfaces:
                     for interface, data in intf_dict.items():
                         # Adding interface to VLAN
-                        cmd = "vconfig add {} {}".format(interface, vlan)
+                        vlan_intf = "{}.{}".format(interface, vlan)
+                        cmd = "ip link add link {} name {} type vlan id {}".format(
+                            interface,
+                            vlan_intf,
+                            vlan
+                        )
                         logger.info("[DUT: %s]: Running command: %s", dut, cmd)
                         rnode.run(cmd)
 
-                        vlan_intf = "{}.{}".format(interface, vlan)
-
-                        ip = data["ip"]
-                        subnet = data["subnet"]
-
                         # Bringing interface up
-                        cmd = "ip link set up {}".format(vlan_intf)
+                        cmd = "ip link set {} up".format(vlan_intf)
                         logger.info("[DUT: %s]: Running command: %s", dut, cmd)
                         rnode.run(cmd)
 
                         # Assigning IP address
-                        cmd = "ifconfig {} {} netmask {}".format(vlan_intf, ip, subnet)
+                        ifaddr = ipaddress.ip_interface(
+                            u"{}/{}".format(
+                                frr_unicode(data["ip"]),
+                                frr_unicode(data["subnet"])
+                            )
+                        )
+
+                        cmd = "ip -{0} a flush {1} scope global && ip a add {2} dev {1} && ip l set {1} up".format(
+                            ifaddr.version, vlan_intf, ifaddr
+                        )
                         logger.info("[DUT: %s]: Running command: %s", dut, cmd)
                         rnode.run(cmd)
 
@@ -1137,6 +1256,8 @@ def create_debug_log_config(tgen, input_dict, build=False):
 
     result = False
     try:
+        debug_config_dict = {}
+
         for router in input_dict.keys():
             debug_config = []
             if "debug" in input_dict[router]:
@@ -1167,10 +1288,12 @@ def create_debug_log_config(tgen, input_dict, build=False):
                     for daemon, debug_logs in disable_logs.items():
                         for debug_log in debug_logs:
                             debug_config.append("no {}".format(debug_log))
+            if debug_config:
+                debug_config_dict[router] = debug_config
 
-                result = create_common_configuration(
-                    tgen, router, debug_config, "debug_log_config", build=build
-                )
+        result = create_common_configurations(
+            tgen, debug_config_dict, "debug_log_config", build=build
+        )
     except InvalidCLIError:
         # Traceback
         errormsg = traceback.format_exc()
@@ -1248,11 +1371,14 @@ def create_vrf_cfg(tgen, topo, input_dict=None, build=False):
         input_dict = deepcopy(input_dict)
 
     try:
+        config_data_dict = {}
+
         for c_router, c_data in input_dict.items():
             rnode = tgen.routers()[c_router]
+            config_data = []
+
             if "vrfs" in c_data:
                 for vrf in c_data["vrfs"]:
-                    config_data = []
                     del_action = vrf.setdefault("delete", False)
                     name = vrf.setdefault("name", None)
                     table_id = vrf.setdefault("id", None)
@@ -1329,9 +1455,12 @@ def create_vrf_cfg(tgen, topo, input_dict=None, build=False):
                             cmd = "no vni {}".format(del_vni)
                             config_data.append(cmd)
 
-                        result = create_common_configuration(
-                            tgen, c_router, config_data, "vrf", build=build
-                        )
+            if config_data:
+                config_data_dict[c_router] = config_data
+
+        result = create_common_configurations(
+            tgen, config_data_dict, "vrf", build=build
+        )
 
     except InvalidCLIError:
         # Traceback
@@ -1364,15 +1493,20 @@ def create_interface_in_kernel(
     rnode = tgen.routers()[dut]
 
     if create:
-        cmd = "sudo ip link add name {} type dummy".format(name)
+        cmd = "ip link show {0} >/dev/null || ip link add {0} type dummy".format(name)
         rnode.run(cmd)
 
-    addr_type = validate_ip_address(ip_addr)
-    if addr_type == "ipv4":
-        cmd = "ifconfig {} {} netmask {}".format(name, ip_addr, netmask)
+    if not netmask:
+        ifaddr = ipaddress.ip_interface(frr_unicode(ip_addr))
     else:
-        cmd = "ifconfig {} inet6 add {}/{}".format(name, ip_addr, netmask)
-
+        ifaddr = ipaddress.ip_interface(u"{}/{}".format(
+            frr_unicode(ip_addr),
+            frr_unicode(netmask)
+        ))
+    cmd = "ip -{0} a flush {1} scope global && ip a add {2} dev {1} && ip l set {1} up".format(
+        ifaddr.version, name, ifaddr
+    )
+    logger.info("[DUT: %s]: Running command: %s", dut, cmd)
     rnode.run(cmd)
 
     if vrf:
@@ -1560,7 +1694,7 @@ def find_interface_with_greater_ip(topo, router, loopback=True, interface=True):
 
 
 def write_test_header(tc_name):
-    """ Display message at beginning of test case"""
+    """Display message at beginning of test case"""
     count = 20
     logger.info("*" * (len(tc_name) + count))
     step("START -> Testcase : %s" % tc_name, reset=True)
@@ -1568,7 +1702,7 @@ def write_test_header(tc_name):
 
 
 def write_test_footer(tc_name):
-    """ Display message at end of test case"""
+    """Display message at end of test case"""
     count = 21
     logger.info("=" * (len(tc_name) + count))
     logger.info("Testcase : %s -> PASSED", tc_name)
@@ -1596,7 +1730,8 @@ def interface_status(tgen, topo, input_dict):
     logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
 
     try:
-        global frr_cfg
+        rlist = []
+
         for router in input_dict.keys():
 
             interface_list = input_dict[router]["interface_list"]
@@ -1605,8 +1740,10 @@ def interface_status(tgen, topo, input_dict):
                 rnode = tgen.routers()[router]
                 interface_set_status(rnode, intf, status)
 
-            # Load config to router
-            load_config_to_router(tgen, router)
+            rlist.append(router)
+
+        # Load config to routers
+        load_config_to_routers(tgen, rlist)
 
     except Exception as e:
         errormsg = traceback.format_exc()
@@ -1795,6 +1932,8 @@ def create_interfaces_cfg(tgen, topo, build=False):
     topo = deepcopy(topo)
 
     try:
+        interface_data_dict = {}
+
         for c_router, c_data in topo.items():
             interface_data = []
             for destRouterLink, data in sorted(c_data["links"].items()):
@@ -1851,7 +1990,7 @@ def create_interfaces_cfg(tgen, topo, build=False):
                     "network",
                     "priority",
                     "cost",
-                    "mtu_ignore"
+                    "mtu_ignore",
                 ]
                 if "ospf" in data:
                     interface_data += _create_interfaces_ospf_cfg(
@@ -1859,12 +1998,14 @@ def create_interfaces_cfg(tgen, topo, build=False):
                     )
                 if "ospf6" in data:
                     interface_data += _create_interfaces_ospf_cfg(
-                        "ospf6", c_data, data, ospf_keywords
+                        "ospf6", c_data, data, ospf_keywords + ["area"]
                     )
+            if interface_data:
+                interface_data_dict[c_router] = interface_data
 
-            result = create_common_configuration(
-                tgen, c_router, interface_data, "interface_config", build=build
-            )
+        result = create_common_configurations(
+            tgen, interface_data_dict, "interface_config", build=build
+        )
 
     except InvalidCLIError:
         # Traceback
@@ -1923,6 +2064,8 @@ def create_static_routes(tgen, input_dict, build=False):
     input_dict = deepcopy(input_dict)
 
     try:
+        static_routes_list_dict = {}
+
         for router in input_dict.keys():
             if "static_routes" not in input_dict[router]:
                 errormsg = "static_routes not present in input_dict"
@@ -1978,9 +2121,12 @@ def create_static_routes(tgen, input_dict, build=False):
 
                     static_routes_list.append(cmd)
 
-            result = create_common_configuration(
-                tgen, router, static_routes_list, "static_route", build=build
-            )
+            if static_routes_list:
+                static_routes_list_dict[router] = static_routes_list
+
+        result = create_common_configurations(
+            tgen, static_routes_list_dict, "static_route", build=build
+        )
 
     except InvalidCLIError:
         # Traceback
@@ -2037,6 +2183,8 @@ def create_prefix_lists(tgen, input_dict, build=False):
     logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
     result = False
     try:
+        config_data_dict = {}
+
         for router in input_dict.keys():
             if "prefix_lists" not in input_dict[router]:
                 errormsg = "prefix_lists not present in input_dict"
@@ -2083,9 +2231,12 @@ def create_prefix_lists(tgen, input_dict, build=False):
                             cmd = "no {}".format(cmd)
 
                         config_data.append(cmd)
-            result = create_common_configuration(
-                tgen, router, config_data, "prefix_list", build=build
-            )
+            if config_data:
+                config_data_dict[router] = config_data
+
+        result = create_common_configurations(
+            tgen, config_data_dict, "prefix_list", build=build
+        )
 
     except InvalidCLIError:
         # Traceback
@@ -2181,6 +2332,8 @@ def create_route_maps(tgen, input_dict, build=False):
     logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
     input_dict = deepcopy(input_dict)
     try:
+        rmap_data_dict = {}
+
         for router in input_dict.keys():
             if "route_maps" not in input_dict[router]:
                 logger.debug("route_maps not present in input_dict")
@@ -2458,9 +2611,12 @@ def create_route_maps(tgen, input_dict, build=False):
                             cmd = "match metric {}".format(metric)
                             rmap_data.append(cmd)
 
-            result = create_common_configuration(
-                tgen, router, rmap_data, "route_maps", build=build
-            )
+            if rmap_data:
+                rmap_data_dict[router] = rmap_data
+
+        result = create_common_configurations(
+            tgen, rmap_data_dict, "route_maps", build=build
+        )
 
     except InvalidCLIError:
         # Traceback
@@ -2535,6 +2691,8 @@ def create_bgp_community_lists(tgen, input_dict, build=False):
     logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
     input_dict = deepcopy(input_dict)
     try:
+        config_data_dict = {}
+
         for router in input_dict.keys():
             if "bgp_community_lists" not in input_dict[router]:
                 errormsg = "bgp_community_lists not present in input_dict"
@@ -2571,9 +2729,12 @@ def create_bgp_community_lists(tgen, input_dict, build=False):
 
                 config_data.append(cmd)
 
-            result = create_common_configuration(
-                tgen, router, config_data, "bgp_community_list", build=build
-            )
+            if config_data:
+                config_data_dict[router] = config_data
+
+        result = create_common_configurations(
+            tgen, config_data_dict, "bgp_community_list", build=build
+        )
 
     except InvalidCLIError:
         # Traceback
@@ -2906,7 +3067,7 @@ def configure_interface_mac(tgen, input_dict):
         rnode = tgen.routers()[dut]
 
         for intf, mac in input_dict[dut].items():
-            cmd = "ifconfig {} hw ether {}".format(intf, mac)
+            cmd = "ip link set {} address {}".format(intf, mac)
             logger.info("[DUT: %s]: Running command: %s", dut, cmd)
 
             try:
@@ -4550,3 +4711,64 @@ def verify_ip_nht(tgen, input_dict):
 
     logger.debug("Exiting lib API: verify_ip_nht()")
     return False
+
+
+def scapy_send_raw_packet(
+    tgen, topo, senderRouter, intf, packet=None, interval=1, count=1
+):
+    """
+    Using scapy Raw() method to send BSR raw packet from one FRR
+    to other
+
+    Parameters:
+    -----------
+    * `tgen` : Topogen object
+    * `topo` : json file data
+    * `senderRouter` : Sender router
+    * `packet` : packet in raw format
+    * `interval` : Interval between the packets
+    * `count` : Number of packets to be sent
+
+    returns:
+    --------
+    errormsg or True
+    """
+
+    global CD
+    result = ""
+    logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
+    sender_interface = intf
+    rnode = tgen.routers()[senderRouter]
+
+    for destLink, data in topo["routers"][senderRouter]["links"].items():
+        if "type" in data and data["type"] == "loopback":
+            continue
+
+        if not packet:
+            packet = topo["routers"][senderRouter]["pkt"]["test_packets"][packet][
+                "data"
+            ]
+
+        if interval > 1 or count > 1:
+            cmd = (
+                "nohup /usr/bin/python {}/send_bsr_packet.py '{}' '{}' "
+                "--interval={} --count={} &".format(
+                    CD, packet, sender_interface, interval, count
+                )
+            )
+        else:
+            cmd = (
+                "/usr/bin/python {}/send_bsr_packet.py '{}' '{}' "
+                "--interval={} --count={}".format(
+                    CD, packet, sender_interface, interval, count
+                )
+            )
+
+        logger.info("Scapy cmd: \n %s", cmd)
+        result = rnode.run(cmd)
+
+        if result == "":
+            return result
+
+    logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
+    return True
index dc9fe0fccaeb008e328e7d55cbb7a3e19b05f3e4..beac7689056431697e0845c95de61d4d2b8cf357 100644 (file)
@@ -18,7 +18,6 @@
 # OF THIS SOFTWARE.
 #
 
-import traceback
 import ipaddr
 import ipaddress
 import sys
@@ -28,9 +27,11 @@ from time import sleep
 from lib.topolog import logger
 from lib.topotest import frr_unicode
 from ipaddress import IPv6Address
+import sys
+
 # Import common_config to use commomnly used APIs
 from lib.common_config import (
-    create_common_configuration,
+    create_common_configurations,
     InvalidCLIError,
     retry,
     generate_ips,
@@ -84,32 +85,36 @@ def create_router_ospf(tgen, topo, input_dict=None, build=False, load_config=Tru
         topo = topo["routers"]
         input_dict = deepcopy(input_dict)
 
-    for router in input_dict.keys():
-        if "ospf" not in input_dict[router]:
-            logger.debug("Router %s: 'ospf' not present in input_dict", router)
-            continue
-
-        result = __create_ospf_global(
-            tgen, input_dict, router, build, load_config)
-        if result is True:
-            ospf_data = input_dict[router]["ospf"]
+    for ospf in ["ospf", "ospf6"]:
+        config_data_dict = {}
 
-    for router in input_dict.keys():
-        if "ospf6" not in input_dict[router]:
-            logger.debug("Router %s: 'ospf6' not present in input_dict", router)
-            continue
+        for router in input_dict.keys():
+            if ospf not in input_dict[router]:
+                logger.debug("Router %s: %s not present in input_dict", router, ospf)
+                continue
 
-        result = __create_ospf_global(
-            tgen, input_dict, router, build, load_config, ospf='ospf6')
-        if result is True:
-            ospf_data = input_dict[router]["ospf6"]
+            config_data = __create_ospf_global(
+                tgen, input_dict, router, build, load_config, ospf
+            )
+            if config_data:
+                if router not in config_data_dict:
+                    config_data_dict[router] = config_data
+                else:
+                    config_data_dict[router].extend(config_data)
+        try:
+            result = create_common_configurations(
+                tgen, config_data_dict, ospf, build, load_config
+            )
+        except InvalidCLIError:
+            logger.error("create_router_ospf (ipv4)", exc_info=True)
+            result = False
 
     logger.debug("Exiting lib API: create_router_ospf()")
     return result
 
 
 def __create_ospf_global(
-    tgen, input_dict, router, build=False, load_config=True, ospf="ospf"
+    tgen, input_dict, router, build, load_config, ospf
 ):
     """
     Helper API to create ospf global configuration.
@@ -131,12 +136,12 @@ def __create_ospf_global(
             "links": {
                 "r3": {
                     "ipv6": "2013:13::1/64",
-                     "ospf6": {
+                    "ospf6": {
                         "hello_interval": 1,
                         "dead_interval": 4,
                         "network": "point-to-point"
                     }
-               }
+                }
             },
             "ospf6": {
                 "router_id": "1.1.1.1",
@@ -151,194 +156,221 @@ def __create_ospf_global(
 
     Returns
     -------
-    True or False
+    list of configuration commands
     """
 
-    result = False
-    logger.debug("Entering lib API: __create_ospf_global()")
-    try:
+    config_data = []
 
-        ospf_data = input_dict[router][ospf]
-        del_ospf_action = ospf_data.setdefault("delete", False)
-        if del_ospf_action:
-            config_data = ["no router {}".format(ospf)]
-            result = create_common_configuration(
-                tgen, router, config_data, ospf, build, load_config
-            )
-            return result
+    if ospf not in input_dict[router]:
+        return config_data
 
-        config_data = []
-        cmd = "router {}".format(ospf)
+    logger.debug("Entering lib API: __create_ospf_global()")
 
+    ospf_data = input_dict[router][ospf]
+    del_ospf_action = ospf_data.setdefault("delete", False)
+    if del_ospf_action:
+        config_data = ["no router {}".format(ospf)]
+        return config_data
+
+    cmd = "router {}".format(ospf)
+
+    config_data.append(cmd)
+
+    # router id
+    router_id = ospf_data.setdefault("router_id", None)
+    del_router_id = ospf_data.setdefault("del_router_id", False)
+    if del_router_id:
+        config_data.append("no {} router-id".format(ospf))
+    if router_id:
+        config_data.append("{} router-id {}".format(ospf, router_id))
+
+    # log-adjacency-changes
+    log_adj_changes = ospf_data.setdefault("log_adj_changes", None)
+    del_log_adj_changes = ospf_data.setdefault("del_log_adj_changes", False)
+    if del_log_adj_changes:
+        config_data.append("no log-adjacency-changes detail")
+    if log_adj_changes:
+        config_data.append("log-adjacency-changes {}".format(
+            log_adj_changes))
+
+    # aggregation timer
+    aggr_timer = ospf_data.setdefault("aggr_timer", None)
+    del_aggr_timer = ospf_data.setdefault("del_aggr_timer", False)
+    if del_aggr_timer:
+        config_data.append("no aggregation timer")
+    if aggr_timer:
+        config_data.append("aggregation timer {}".format(
+            aggr_timer))
+
+    # maximum path information
+    ecmp_data = ospf_data.setdefault("maximum-paths", {})
+    if ecmp_data:
+        cmd = "maximum-paths {}".format(ecmp_data)
+        del_action = ospf_data.setdefault("del_max_path", False)
+        if del_action:
+            cmd = "no maximum-paths"
         config_data.append(cmd)
 
+    # redistribute command
+    redistribute_data = ospf_data.setdefault("redistribute", {})
+    if redistribute_data:
+        for redistribute in redistribute_data:
+            if "redist_type" not in redistribute:
+                logger.debug(
+                    "Router %s: 'redist_type' not present in " "input_dict", router
+                )
+            else:
+                cmd = "redistribute {}".format(redistribute["redist_type"])
+                for red_type in redistribute_data:
+                    if "route_map" in red_type:
+                        cmd = cmd + " route-map {}".format(red_type["route_map"])
+                del_action = redistribute.setdefault("delete", False)
+                if del_action:
+                    cmd = "no {}".format(cmd)
+                config_data.append(cmd)
 
-        # router id
-        router_id = ospf_data.setdefault("router_id", None)
-        del_router_id = ospf_data.setdefault("del_router_id", False)
-        if del_router_id:
-            config_data.append("no {} router-id".format(ospf))
-        if router_id:
-            config_data.append("{} router-id {}".format(ospf, router_id))
-
-        # log-adjacency-changes
-        log_adj_changes = ospf_data.setdefault("log_adj_changes", None)
-        del_log_adj_changes = ospf_data.setdefault("del_log_adj_changes", False)
-        if del_log_adj_changes:
-            config_data.append("no log-adjacency-changes detail")
-        if log_adj_changes:
-            config_data.append("log-adjacency-changes {}".format(
-                log_adj_changes))
-
-        # aggregation timer
-        aggr_timer = ospf_data.setdefault("aggr_timer", None)
-        del_aggr_timer = ospf_data.setdefault("del_aggr_timer", False)
-        if del_aggr_timer:
-            config_data.append("no aggregation timer")
-        if aggr_timer:
-            config_data.append("aggregation timer {}".format(
-                aggr_timer))
-
-        # maximum path information
-        ecmp_data = ospf_data.setdefault("maximum-paths", {})
-        if ecmp_data:
-            cmd = "maximum-paths {}".format(ecmp_data)
-            del_action = ospf_data.setdefault("del_max_path", False)
-            if del_action:
-                cmd = "no maximum-paths"
-            config_data.append(cmd)
-
-        # redistribute command
-        redistribute_data = ospf_data.setdefault("redistribute", {})
-        if redistribute_data:
-            for redistribute in redistribute_data:
-                if "redist_type" not in redistribute:
-                    logger.debug(
-                        "Router %s: 'redist_type' not present in " "input_dict", router
-                    )
-                else:
-                    cmd = "redistribute {}".format(redistribute["redist_type"])
-                    for red_type in redistribute_data:
-                        if "route_map" in red_type:
-                            cmd = cmd + " route-map {}".format(red_type["route_map"])
-                    del_action = redistribute.setdefault("delete", False)
-                    if del_action:
-                        cmd = "no {}".format(cmd)
-                    config_data.append(cmd)
+    # area information
+    area_data = ospf_data.setdefault("area", {})
+    if area_data:
+        for area in area_data:
+            if "id" not in area:
+                logger.debug(
+                    "Router %s: 'area id' not present in " "input_dict", router
+                )
+            else:
+                cmd = "area {}".format(area["id"])
 
-        # area information
-        area_data = ospf_data.setdefault("area", {})
-        if area_data:
-            for area in area_data:
-                if "id" not in area:
-                    logger.debug(
-                        "Router %s: 'area id' not present in " "input_dict", router
-                    )
-                else:
-                    cmd = "area {}".format(area["id"])
+                if "type" in area:
+                    cmd = cmd + " {}".format(area["type"])
 
-                    if "type" in area:
-                        cmd = cmd + " {}".format(area["type"])
+                del_action = area.setdefault("delete", False)
+                if del_action:
+                    cmd = "no {}".format(cmd)
+                config_data.append(cmd)
 
-                    del_action = area.setdefault("delete", False)
-                    if del_action:
-                        cmd = "no {}".format(cmd)
-                    config_data.append(cmd)
+    #def route information
+    def_rte_data = ospf_data.setdefault("default-information", {})
+    if def_rte_data:
+        if "originate" not in def_rte_data:
+            logger.debug("Router %s: 'originate key' not present in "
+                        "input_dict", router)
+        else:
+            cmd = "default-information originate"
 
-        #def route information
-        def_rte_data = ospf_data.setdefault("default-information", {})
-        if def_rte_data:
-            if "originate" not in def_rte_data:
-                logger.debug("Router %s: 'originate key' not present in "
-                            "input_dict", router)
-            else:
-                cmd = "default-information originate"
+            if "always" in def_rte_data:
+                cmd = cmd + " always"
 
-                if "always" in def_rte_data:
-                    cmd = cmd + " always"
+            if "metric" in def_rte_data:
+                cmd = cmd + " metric {}".format(def_rte_data["metric"])
 
-                if "metric" in def_rte_data:
-                    cmd = cmd + " metric {}".format(def_rte_data["metric"])
+            if "metric-type" in def_rte_data:
+                cmd = cmd + " metric-type {}".format(def_rte_data[
+                    "metric-type"])
 
-                if "metric-type" in def_rte_data:
-                    cmd = cmd + " metric-type {}".format(def_rte_data[
-                        "metric-type"])
+            if "route-map" in def_rte_data:
+                cmd = cmd + " route-map {}".format(def_rte_data["route-map"])
 
-                if "route-map" in def_rte_data:
-                    cmd = cmd + " route-map {}".format(def_rte_data[
-                        "route-map"])
+            del_action = def_rte_data.setdefault("delete", False)
+            if del_action:
+                cmd = "no {}".format(cmd)
+            config_data.append(cmd)
 
-                del_action = def_rte_data.setdefault("delete", False)
-                if del_action:
-                    cmd = "no {}".format(cmd)
-                config_data.append(cmd)
+    # area interface information for ospf6d only
+    if ospf == "ospf6":
+        area_iface = ospf_data.setdefault("neighbors", {})
+        if area_iface:
+            for neighbor in area_iface:
+                if "area" in area_iface[neighbor]:
+                    iface = input_dict[router]["links"][neighbor]["interface"]
+                    cmd = "interface {} area {}".format(
+                        iface, area_iface[neighbor]["area"]
+                    )
+                    if area_iface[neighbor].setdefault("delete", False):
+                        cmd = "no {}".format(cmd)
+                    config_data.append(cmd)
 
-        # area interface information for ospf6d only
-        if ospf == "ospf6":
-            area_iface = ospf_data.setdefault("neighbors", {})
-            if area_iface:
-                for neighbor in area_iface:
-                    if "area" in area_iface[neighbor]:
+                try:
+                    if "area" in input_dict[router]['links'][neighbor][
+                        'ospf6']:
                         iface = input_dict[router]["links"][neighbor]["interface"]
                         cmd = "interface {} area {}".format(
-                            iface, area_iface[neighbor]["area"]
-                        )
-                        if area_iface[neighbor].setdefault("delete", False):
+                            iface, input_dict[router]['links'][neighbor][
+                        'ospf6']['area'])
+                        if input_dict[router]['links'][neighbor].setdefault(
+                            "delete", False):
                             cmd = "no {}".format(cmd)
                         config_data.append(cmd)
+                except KeyError:
+                        pass
 
-                    try:
-                        if "area" in input_dict[router]['links'][neighbor][
-                            'ospf6']:
-                            iface = input_dict[router]["links"][neighbor]["interface"]
-                            cmd = "interface {} area {}".format(
-                                iface, input_dict[router]['links'][neighbor][
-                            'ospf6']['area'])
-                            if input_dict[router]['links'][neighbor].setdefault(
-                                "delete", False):
-                                cmd = "no {}".format(cmd)
-                            config_data.append(cmd)
-                    except KeyError:
-                            pass
 
+    # summary information
+    summary_data = ospf_data.setdefault("summary-address", {})
+    if summary_data:
+        for summary in summary_data:
+            if "prefix" not in summary:
+                logger.debug(
+                    "Router %s: 'summary-address' not present in " "input_dict",
+                    router,
+                )
+            else:
+                cmd = "summary {}/{}".format(summary["prefix"], summary["mask"])
 
-        # summary information
-        summary_data = ospf_data.setdefault("summary-address", {})
-        if summary_data:
-            for summary in summary_data:
-                if "prefix" not in summary:
-                    logger.debug(
-                        "Router %s: 'summary-address' not present in " "input_dict",
-                        router,
-                    )
-                else:
-                    cmd = "summary {}/{}".format(summary["prefix"], summary["mask"])
+                _tag = summary.setdefault("tag", None)
+                if _tag:
+                    cmd = "{} tag {}".format(cmd, _tag)
 
-                    _tag = summary.setdefault("tag", None)
-                    if _tag:
-                        cmd = "{} tag {}".format(cmd, _tag)
+                _advertise = summary.setdefault("advertise", True)
+                if not _advertise:
+                    cmd = "{} no-advertise".format(cmd)
 
-                    _advertise = summary.setdefault("advertise", True)
-                    if not _advertise:
-                        cmd = "{} no-advertise".format(cmd)
+                del_action = summary.setdefault("delete", False)
+                if del_action:
+                    cmd = "no {}".format(cmd)
+                config_data.append(cmd)
 
-                    del_action = summary.setdefault("delete", False)
-                    if del_action:
-                        cmd = "no {}".format(cmd)
-                    config_data.append(cmd)
+    # ospf gr information
+    gr_data = ospf_data.setdefault("graceful-restart", {})
+    if gr_data:
 
-        result = create_common_configuration(
-            tgen, router, config_data, ospf, build, load_config
-        )
+        if "opaque" in gr_data and gr_data["opaque"]:
+            cmd = "capability opaque"
+            if gr_data.setdefault("delete", False):
+                cmd = "no {}".format(cmd)
+            config_data.append(cmd)
 
-    except InvalidCLIError:
-        # Traceback
-        errormsg = traceback.format_exc()
-        logger.error(errormsg)
-        return errormsg
+        if "helper-only" in gr_data and not gr_data["helper-only"]:
+            cmd = "graceful-restart helper-only"
+            if gr_data.setdefault("delete", False):
+                cmd = "no {}".format(cmd)
+            config_data.append(cmd)
+        elif "helper-only" in gr_data and type(gr_data["helper-only"]) is list:
+            for rtrs in gr_data["helper-only"]:
+                cmd = "graceful-restart helper-only {}".format(rtrs)
+                if gr_data.setdefault("delete", False):
+                    cmd = "no {}".format(cmd)
+                config_data.append(cmd)
+
+        if "helper" in gr_data:
+            if type(gr_data["helper"]) is not list:
+                gr_data["helper"] = list(gr_data["helper"])
+            for helper_role in gr_data["helper"]:
+                cmd = "graceful-restart helper {}".format(helper_role)
+                if gr_data.setdefault("delete", False):
+                    cmd = "no {}".format(cmd)
+                config_data.append(cmd)
+
+        if "supported-grace-time" in gr_data:
+            cmd = "graceful-restart helper supported-grace-time {}".format(
+                gr_data["supported-grace-time"]
+            )
+            if gr_data.setdefault("delete", False):
+                cmd = "no {}".format(cmd)
+            config_data.append(cmd)
 
     logger.debug("Exiting lib API: create_ospf_global()")
-    return result
+
+    return config_data
 
 
 def create_router_ospf6(tgen, topo, input_dict=None, build=False, load_config=True):
@@ -373,14 +405,27 @@ def create_router_ospf6(tgen, topo, input_dict=None, build=False, load_config=Tr
     else:
         topo = topo["routers"]
         input_dict = deepcopy(input_dict)
+
+    config_data_dict = {}
+
     for router in input_dict.keys():
         if "ospf6" not in input_dict[router]:
             logger.debug("Router %s: 'ospf6' not present in input_dict", router)
             continue
 
-        result = __create_ospf_global(
+        config_data = __create_ospf_global(
             tgen, input_dict, router, build, load_config, "ospf6"
         )
+        if config_data:
+            config_data_dict[router] = config_data
+
+    try:
+        result = create_common_configurations(
+            tgen, config_data_dict, "ospf6", build, load_config
+        )
+    except InvalidCLIError:
+        logger.error("create_router_ospf6", exc_info=True)
+        result = False
 
     logger.debug("Exiting lib API: create_router_ospf6()")
     return result
@@ -420,10 +465,14 @@ def config_ospf_interface(tgen, topo, input_dict=None, build=False, load_config=
     True or False
     """
     logger.debug("Enter lib config_ospf_interface")
+    result = False
     if not input_dict:
         input_dict = deepcopy(topo)
     else:
         input_dict = deepcopy(input_dict)
+
+    config_data_dict = {}
+
     for router in input_dict.keys():
         config_data = []
         for lnk in input_dict[router]["links"].keys():
@@ -502,16 +551,20 @@ def config_ospf_interface(tgen, topo, input_dict=None, build=False, load_config=
             # interface ospf mtu
             if data_ospf_mtu:
                 cmd = "ip ospf mtu-ignore"
-                if 'del_action' in ospf_data:
+                if "del_action" in ospf_data:
                     cmd = "no {}".format(cmd)
                 config_data.append(cmd)
 
             if build:
                 return config_data
-            else:
-                result = create_common_configuration(
-                    tgen, router, config_data, "interface_config", build=build
-                )
+
+        if config_data:
+            config_data_dict[router] = config_data
+
+    result = create_common_configurations(
+        tgen, config_data_dict, "interface_config", build=build
+    )
+
     logger.debug("Exiting lib API: config_ospf_interface()")
     return result
 
@@ -543,8 +596,7 @@ def clear_ospf(tgen, router, ospf=None):
         version = "ip"
 
     cmd = "clear {} ospf interface".format(version)
-    logger.info(
-        "Clearing ospf process on router %s.. using command '%s'", router, cmd)
+    logger.info("Clearing ospf process on router %s.. using command '%s'", router, cmd)
     run_frr_cmd(rnode, cmd)
 
     logger.debug("Exiting lib API: clear_ospf()")
@@ -774,7 +826,7 @@ def verify_ospf_neighbor(tgen, topo, dut=None, input_dict=None, lan=False, expec
 ################################
 # Verification procs
 ################################
-@retry(retry_timeout=20)
+@retry(retry_timeout=50)
 def verify_ospf6_neighbor(tgen, topo, dut=None, input_dict=None, lan=False):
     """
     This API is to verify ospf neighborship by running
@@ -825,105 +877,133 @@ def verify_ospf6_neighbor(tgen, topo, dut=None, input_dict=None, lan=False):
 
     if input_dict:
         for router, rnode in tgen.routers().items():
-            if 'ospf6' not in topo['routers'][router]:
+            if "ospf6" not in topo["routers"][router]:
                 continue
 
             if dut is not None and dut != router:
                 continue
 
             logger.info("Verifying OSPF neighborship on router %s:", router)
-            show_ospf_json = run_frr_cmd(rnode,
-                "show ipv6 ospf neighbor json", isjson=True)
+            show_ospf_json = run_frr_cmd(
+                rnode, "show ipv6 ospf neighbor json", isjson=True
+            )
             # Verifying output dictionary show_ospf_json is empty or not
             if not bool(show_ospf_json):
                 errormsg = "OSPF6 is not running"
                 return errormsg
 
             ospf_data_list = input_dict[router]["ospf6"]
-            ospf_nbr_list = ospf_data_list['neighbors']
+            ospf_nbr_list = ospf_data_list["neighbors"]
 
             for ospf_nbr, nbr_data in ospf_nbr_list.items():
-                data_ip = data_rid = topo['routers'][ospf_nbr]['ospf6']['router_id']
+
+                try:
+                    data_ip = data_rid = topo["routers"][ospf_nbr]["ospf6"]["router_id"]
+                except KeyError:
+                    data_ip = data_rid = topo["routers"][nbr_data["nbr"]]["ospf6"][
+                        "router_id"
+                    ]
+
                 if ospf_nbr in data_ip:
                     nbr_details = nbr_data[ospf_nbr]
                 elif lan:
-                    for switch in topo['switches']:
-                        if 'ospf6' in topo['switches'][switch]['links'][router]:
+                    for switch in topo["switches"]:
+                        if "ospf6" in topo["switches"][switch]["links"][router]:
                             neighbor_ip = data_ip
                         else:
                             continue
                 else:
-                    neighbor_ip = data_ip[router]['ipv6'].split("/")[0]
+                    neighbor_ip = data_ip[router]["ipv6"].split("/")[0]
 
                 nh_state = None
                 neighbor_ip = neighbor_ip.lower()
                 nbr_rid = data_rid
-                get_index_val = dict((d['neighborId'], dict( \
-                        d, index=index)) for (index, d) in enumerate( \
-                            show_ospf_json['neighbors']))
+                get_index_val = dict(
+                    (d["neighborId"], dict(d, index=index))
+                    for (index, d) in enumerate(show_ospf_json["neighbors"])
+                )
                 try:
-                    nh_state =  get_index_val.get(neighbor_ip)['state']
-                    intf_state = get_index_val.get(neighbor_ip)['ifState']
+                    nh_state = get_index_val.get(neighbor_ip)["state"]
+                    intf_state = get_index_val.get(neighbor_ip)["ifState"]
                 except TypeError:
-                    errormsg = "[DUT: {}] OSPF peer {} missing,from "\
-                        "{} ".format(router,
-                    nbr_rid, ospf_nbr)
+                    errormsg = "[DUT: {}] OSPF peer {} missing,from " "{} ".format(
+                        router, nbr_rid, ospf_nbr
+                    )
                     return errormsg
 
-                nbr_state = nbr_data.setdefault("state",None)
-                nbr_role = nbr_data.setdefault("role",None)
+                nbr_state = nbr_data.setdefault("state", None)
+                nbr_role = nbr_data.setdefault("role", None)
 
                 if nbr_state:
                     if nbr_state == nh_state:
-                        logger.info("[DUT: {}] OSPF6 Nbr is {}:{} State {}".format
-                        (router, ospf_nbr, nbr_rid, nh_state))
+                        logger.info(
+                            "[DUT: {}] OSPF6 Nbr is {}:{} State {}".format(
+                                router, ospf_nbr, nbr_rid, nh_state
+                            )
+                        )
                         result = True
                     else:
-                        errormsg = ("[DUT: {}] OSPF6 is not Converged, neighbor"
-                        " state is {} , Expected state is {}".format(router,
-                        nh_state, nbr_state))
+                        errormsg = (
+                            "[DUT: {}] OSPF6 is not Converged, neighbor"
+                            " state is {} , Expected state is {}".format(
+                                router, nh_state, nbr_state
+                            )
+                        )
                         return errormsg
                 if nbr_role:
                     if nbr_role == intf_state:
-                        logger.info("[DUT: {}] OSPF6 Nbr is {}: {} Role {}".format(
-                        router, ospf_nbr, nbr_rid, nbr_role))
+                        logger.info(
+                            "[DUT: {}] OSPF6 Nbr is {}: {} Role {}".format(
+                                router, ospf_nbr, nbr_rid, nbr_role
+                            )
+                        )
                     else:
-                        errormsg = ("[DUT: {}] OSPF6 is not Converged with rid"
-                        "{}, role is {}, Expected role is {}".format(router,
-                        nbr_rid, intf_state, nbr_role))
+                        errormsg = (
+                            "[DUT: {}] OSPF6 is not Converged with rid"
+                            "{}, role is {}, Expected role is {}".format(
+                                router, nbr_rid, intf_state, nbr_role
+                            )
+                        )
                         return errormsg
                 continue
     else:
 
         for router, rnode in tgen.routers().items():
-            if 'ospf6' not in topo['routers'][router]:
+            if "ospf6" not in topo["routers"][router]:
                 continue
 
             if dut is not None and dut != router:
                 continue
 
             logger.info("Verifying OSPF6 neighborship on router %s:", router)
-            show_ospf_json = run_frr_cmd(rnode,
-                "show ipv6 ospf neighbor json", isjson=True)
+            show_ospf_json = run_frr_cmd(
+                rnode, "show ipv6 ospf neighbor json", isjson=True
+            )
             # Verifying output dictionary show_ospf_json is empty or not
             if not bool(show_ospf_json):
                 errormsg = "OSPF6 is not running"
                 return errormsg
 
             ospf_data_list = topo["routers"][router]["ospf6"]
-            ospf_neighbors = ospf_data_list['neighbors']
+            ospf_neighbors = ospf_data_list["neighbors"]
             total_peer = 0
             total_peer = len(ospf_neighbors.keys())
             no_of_ospf_nbr = 0
-            ospf_nbr_list = ospf_data_list['neighbors']
+            ospf_nbr_list = ospf_data_list["neighbors"]
             no_of_peer = 0
             for ospf_nbr, nbr_data in ospf_nbr_list.items():
-                data_ip = data_rid = topo['routers'][ospf_nbr]['ospf6']['router_id']
+                try:
+                    data_ip = data_rid = topo["routers"][ospf_nbr]["ospf6"]["router_id"]
+                except KeyError:
+                    data_ip = data_rid = topo["routers"][nbr_data["nbr"]]["ospf6"][
+                        "router_id"
+                    ]
+
                 if ospf_nbr in data_ip:
                     nbr_details = nbr_data[ospf_nbr]
                 elif lan:
-                    for switch in topo['switches']:
-                        if 'ospf6' in topo['switches'][switch]['links'][router]:
+                    for switch in topo["switches"]:
+                        if "ospf6" in topo["switches"][switch]["links"][router]:
                             neighbor_ip = data_ip
                         else:
                             continue
@@ -933,26 +1013,27 @@ def verify_ospf6_neighbor(tgen, topo, dut=None, input_dict=None, lan=False):
                 nh_state = None
                 neighbor_ip = neighbor_ip.lower()
                 nbr_rid = data_rid
-                get_index_val = dict((d['neighborId'], dict( \
-                        d, index=index)) for (index, d) in enumerate( \
-                            show_ospf_json['neighbors']))
+                get_index_val = dict(
+                    (d["neighborId"], dict(d, index=index))
+                    for (index, d) in enumerate(show_ospf_json["neighbors"])
+                )
                 try:
-                    nh_state =  get_index_val.get(neighbor_ip)['state']
-                    intf_state = get_index_val.get(neighbor_ip)['ifState']
+                    nh_state = get_index_val.get(neighbor_ip)["state"]
+                    intf_state = get_index_val.get(neighbor_ip)["ifState"]
                 except TypeError:
-                    errormsg = "[DUT: {}] OSPF peer {} missing,from "\
-                        "{} ".format(router,
-                    nbr_rid, ospf_nbr)
+                    errormsg = "[DUT: {}] OSPF peer {} missing,from " "{} ".format(
+                        router, nbr_rid, ospf_nbr
+                    )
                     return errormsg
 
-                if nh_state == 'Full':
+                if nh_state == "Full":
                     no_of_peer += 1
 
             if no_of_peer == total_peer:
                 logger.info("[DUT: {}] OSPF6 is Converged".format(router))
                 result = True
             else:
-                errormsg = ("[DUT: {}] OSPF6 is not Converged".format(router))
+                errormsg = "[DUT: {}] OSPF6 is not Converged".format(router)
                 return errormsg
 
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
@@ -1491,7 +1572,7 @@ def verify_ospf_database(tgen, topo, dut, input_dict, expected=True):
 
 
 @retry(retry_timeout=20)
-def verify_ospf_summary(tgen, topo, dut, input_dict, expected=True):
+def verify_ospf_summary(tgen, topo, dut, input_dict, ospf=None, expected=True):
     """
     This API is to verify ospf routes by running
     show ip ospf interface command.
@@ -1502,7 +1583,6 @@ def verify_ospf_summary(tgen, topo, dut, input_dict, expected=True):
     * `topo` : topology descriptions
     * `dut`: device under test
     * `input_dict` : Input dict data, required when configuring from testcase
-    * `expected` : expected results from API, by-default True
 
     Usage
     -----
@@ -1522,18 +1602,30 @@ def verify_ospf_summary(tgen, topo, dut, input_dict, expected=True):
     True or False (Error Message)
     """
 
-    logger.debug("Entering lib API: verify_ospf_summary()")
+    logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
     result = False
     router = dut
 
     logger.info("Verifying OSPF summary on router %s:", router)
 
-    if "ospf" not in topo["routers"][dut]:
-        errormsg = "[DUT: {}] OSPF is not configured on the router.".format(router)
-        return errormsg
-
     rnode = tgen.routers()[dut]
-    show_ospf_json = run_frr_cmd(rnode, "show ip ospf summary detail json", isjson=True)
+
+    if ospf:
+        if 'ospf6' not in topo['routers'][dut]:
+            errormsg = "[DUT: {}] OSPF6 is not configured on the router.".format(
+                router)
+            return errormsg
+
+        show_ospf_json = run_frr_cmd(rnode, "show ipv6 ospf summary detail json",
+                                 isjson=True)
+    else:
+        if 'ospf' not in topo['routers'][dut]:
+            errormsg = "[DUT: {}] OSPF is not configured on the router.".format(
+                router)
+            return errormsg
+
+        show_ospf_json = run_frr_cmd(rnode, "show ip ospf summary detail json",
+                                 isjson=True)
 
     # Verifying output dictionary show_ospf_json is empty or not
     if not bool(show_ospf_json):
@@ -1542,35 +1634,31 @@ def verify_ospf_summary(tgen, topo, dut, input_dict, expected=True):
 
     # To find neighbor ip type
     ospf_summary_data = input_dict
+
+    if ospf:
+        show_ospf_json = show_ospf_json['default']
+
     for ospf_summ, summ_data in ospf_summary_data.items():
         if ospf_summ not in show_ospf_json:
             continue
-        summary = ospf_summary_data[ospf_summ]["Summary address"]
+        summary = ospf_summary_data[ospf_summ]['Summary address']
+
         if summary in show_ospf_json:
             for summ in summ_data:
                 if summ_data[summ] == show_ospf_json[summary][summ]:
-                    logger.info(
-                        "[DUT: %s] OSPF summary %s:%s is %s",
-                        router,
-                        summary,
-                        summ,
-                        summ_data[summ],
-                    )
+                    logger.info("[DUT: %s] OSPF summary %s:%s is %s",
+                                router, summary, summ, summ_data[summ])
                     result = True
                 else:
-                    errormsg = (
-                        "[DUT: {}] OSPF summary {}:{} is %s, "
-                        "Expected is {}".format(
-                            router, summary, summ, show_ospf_json[summary][summ]
-                        )
-                    )
+                    errormsg = ("[DUT: {}] OSPF summary {} : {} is {}, "
+                    "Expected is {}".format(router, summary, summ,show_ospf_json[
+                        summary][summ], summ_data[summ] ))
                     return errormsg
 
-    logger.debug("Exiting API: verify_ospf_summary()")
+    logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
     return result
 
 
-
 @retry(retry_timeout=30)
 def verify_ospf6_rib(tgen, dut, input_dict, next_hop=None,
             tag=None, metric=None, fib=None):
@@ -1627,31 +1715,34 @@ def verify_ospf6_rib(tgen, dut, input_dict, next_hop=None,
             found_routes = []
             missing_routes = []
 
-            if "static_routes" in input_dict[routerInput] or \
-                "prefix" in input_dict[routerInput]:
+            if (
+                "static_routes" in input_dict[routerInput]
+                or "prefix" in input_dict[routerInput]
+            ):
                 if "prefix" in input_dict[routerInput]:
                     static_routes = input_dict[routerInput]["prefix"]
                 else:
                     static_routes = input_dict[routerInput]["static_routes"]
 
-
                 for static_route in static_routes:
                     cmd = "{}".format(command)
 
                     cmd = "{} json".format(cmd)
 
-                    ospf_rib_json =  run_frr_cmd(rnode, cmd, isjson=True)
+                    ospf_rib_json = run_frr_cmd(rnode, cmd, isjson=True)
 
                     # Fix for PR 2644182
                     try:
-                        ospf_rib_json = ospf_rib_json['routes']
+                        ospf_rib_json = ospf_rib_json["routes"]
                     except KeyError:
                         pass
 
                     # Verifying output dictionary ospf_rib_json is not empty
                     if bool(ospf_rib_json) is False:
-                        errormsg = "[DUT: {}] No routes found in OSPF6 route " \
+                        errormsg = (
+                            "[DUT: {}] No routes found in OSPF6 route "
                             "table".format(router)
+                        )
                         return errormsg
 
                     network = static_route["network"]
@@ -1659,7 +1750,6 @@ def verify_ospf6_rib(tgen, dut, input_dict, next_hop=None,
                     _tag = static_route.setdefault("tag", None)
                     _rtype = static_route.setdefault("routeType", None)
 
-
                     # Generating IPs for verification
                     ip_list = generate_ips(network, no_of_ip)
                     st_found = False
@@ -1668,7 +1758,7 @@ def verify_ospf6_rib(tgen, dut, input_dict, next_hop=None,
                         st_rt = str(ipaddress.ip_network(frr_unicode(st_rt)))
 
                         _addr_type = validate_ip_address(st_rt)
-                        if _addr_type != 'ipv6':
+                        if _addr_type != "ipv6":
                             continue
 
                         if st_rt in ospf_rib_json:
@@ -1681,17 +1771,26 @@ def verify_ospf6_rib(tgen, dut, input_dict, next_hop=None,
                                     next_hop = [next_hop]
 
                                 for mnh in range(0, len(ospf_rib_json[st_rt])):
-                                    if 'fib' in ospf_rib_json[st_rt][
-                                        mnh]["nextHops"][0]:
-                                        found_hops.append([rib_r[
-                                            "ip"] for rib_r in ospf_rib_json[
-                                                st_rt][mnh]["nextHops"]])
+                                    if (
+                                        "fib"
+                                        in ospf_rib_json[st_rt][mnh]["nextHops"][0]
+                                    ):
+                                        found_hops.append(
+                                            [
+                                                rib_r["ip"]
+                                                for rib_r in ospf_rib_json[st_rt][mnh][
+                                                    "nextHops"
+                                                ]
+                                            ]
+                                        )
 
                                 if found_hops[0]:
-                                    missing_list_of_nexthops = \
-                                        set(found_hops[0]).difference(next_hop)
-                                    additional_nexthops_in_required_nhs = \
-                                        set(next_hop).difference(found_hops[0])
+                                    missing_list_of_nexthops = set(
+                                        found_hops[0]
+                                    ).difference(next_hop)
+                                    additional_nexthops_in_required_nhs = set(
+                                        next_hop
+                                    ).difference(found_hops[0])
 
                                     if additional_nexthops_in_required_nhs:
                                         logger.info(
@@ -1699,13 +1798,18 @@ def verify_ospf6_rib(tgen, dut, input_dict, next_hop=None,
                                             "%s is not active for route %s in "
                                             "RIB of router %s\n",
                                             additional_nexthops_in_required_nhs,
-                                            st_rt, dut)
+                                            st_rt,
+                                            dut,
+                                        )
                                         errormsg = (
                                             "Nexthop {} is not active"
                                             " for route {} in RIB of router"
                                             " {}\n".format(
-                                            additional_nexthops_in_required_nhs,
-                                            st_rt, dut))
+                                                additional_nexthops_in_required_nhs,
+                                                st_rt,
+                                                dut,
+                                            )
+                                        )
                                         return errormsg
                                     else:
                                         nh_found = True
@@ -1713,98 +1817,118 @@ def verify_ospf6_rib(tgen, dut, input_dict, next_hop=None,
                             elif next_hop and fib is None:
                                 if type(next_hop) is not list:
                                     next_hop = [next_hop]
-                                found_hops = [rib_r['nextHop'] for rib_r in
-                                              ospf_rib_json[st_rt][
-                                    "nextHops"]]
+                                found_hops = [
+                                    rib_r["nextHop"]
+                                    for rib_r in ospf_rib_json[st_rt]["nextHops"]
+                                ]
 
                                 if found_hops:
-                                    missing_list_of_nexthops = \
-                                        set(found_hops).difference(next_hop)
-                                    additional_nexthops_in_required_nhs = \
-                                        set(next_hop).difference(found_hops)
+                                    missing_list_of_nexthops = set(
+                                        found_hops
+                                    ).difference(next_hop)
+                                    additional_nexthops_in_required_nhs = set(
+                                        next_hop
+                                    ).difference(found_hops)
                                     if additional_nexthops_in_required_nhs:
                                         logger.info(
-                                            "Missing nexthop %s for route"\
-                                        " %s in RIB of router %s\n", \
-                                        additional_nexthops_in_required_nhs,  \
-                                        st_rt, dut)
-                                        errormsg=("Nexthop {} is Missing for "\
-                                        "route {} in RIB of router {}\n".format(
+                                            "Missing nexthop %s for route"
+                                            " %s in RIB of router %s\n",
                                             additional_nexthops_in_required_nhs,
-                                            st_rt, dut))
+                                            st_rt,
+                                            dut,
+                                        )
+                                        errormsg = (
+                                            "Nexthop {} is Missing for "
+                                            "route {} in RIB of router {}\n".format(
+                                                additional_nexthops_in_required_nhs,
+                                                st_rt,
+                                                dut,
+                                            )
+                                        )
                                         return errormsg
                                     else:
                                         nh_found = True
                             if _rtype:
-                                if "destinationType" not in ospf_rib_json[
-                                    st_rt]:
-                                    errormsg = ("[DUT: {}]: destinationType missing"
-                                                "for route {} in OSPF RIB \n".\
-                                                format(dut, st_rt))
+                                if "destinationType" not in ospf_rib_json[st_rt]:
+                                    errormsg = (
+                                        "[DUT: {}]: destinationType missing"
+                                        "for route {} in OSPF RIB \n".format(dut, st_rt)
+                                    )
                                     return errormsg
-                                elif _rtype != ospf_rib_json[st_rt][
-                                    "destinationType"]:
-                                    errormsg = ("[DUT: {}]: destinationType mismatch"
-                                                "for route {} in OSPF RIB \n".\
-                                                format(dut, st_rt))
+                                elif _rtype != ospf_rib_json[st_rt]["destinationType"]:
+                                    errormsg = (
+                                        "[DUT: {}]: destinationType mismatch"
+                                        "for route {} in OSPF RIB \n".format(dut, st_rt)
+                                    )
                                     return errormsg
                                 else:
-                                    logger.info("DUT: {}]: Found destinationType {}"
-                                                "for route {}".\
-                                                format(dut, _rtype, st_rt))
+                                    logger.info(
+                                        "DUT: {}]: Found destinationType {}"
+                                        "for route {}".format(dut, _rtype, st_rt)
+                                    )
                             if tag:
-                                if "tag" not in ospf_rib_json[
-                                    st_rt]:
-                                    errormsg = ("[DUT: {}]: tag is not"
-                                                " present for"
-                                                " route {} in RIB \n".\
-                                                format(dut, st_rt
-                                                ))
+                                if "tag" not in ospf_rib_json[st_rt]:
+                                    errormsg = (
+                                        "[DUT: {}]: tag is not"
+                                        " present for"
+                                        " route {} in RIB \n".format(dut, st_rt)
+                                    )
                                     return errormsg
 
-                                if _tag != ospf_rib_json[
-                                    st_rt]["tag"]:
-                                    errormsg = ("[DUT: {}]: tag value {}"
-                                                " is not matched for"
-                                                " route {} in RIB \n".\
-                                                format(dut, _tag, st_rt,
-                                                ))
+                                if _tag != ospf_rib_json[st_rt]["tag"]:
+                                    errormsg = (
+                                        "[DUT: {}]: tag value {}"
+                                        " is not matched for"
+                                        " route {} in RIB \n".format(
+                                            dut,
+                                            _tag,
+                                            st_rt,
+                                        )
+                                    )
                                     return errormsg
 
                             if metric is not None:
-                                if "type2cost" not in ospf_rib_json[
-                                    st_rt]:
-                                    errormsg = ("[DUT: {}]: metric is"
-                                                " not present for"
-                                                " route {} in RIB \n".\
-                                                format(dut, st_rt))
+                                if "type2cost" not in ospf_rib_json[st_rt]:
+                                    errormsg = (
+                                        "[DUT: {}]: metric is"
+                                        " not present for"
+                                        " route {} in RIB \n".format(dut, st_rt)
+                                    )
                                     return errormsg
 
-                                if metric != ospf_rib_json[
-                                    st_rt]["type2cost"]:
-                                    errormsg = ("[DUT: {}]: metric value "
-                                                "{} is not matched for "
-                                                "route {} in RIB \n".\
-                                                format(dut, metric, st_rt,
-                                                ))
+                                if metric != ospf_rib_json[st_rt]["type2cost"]:
+                                    errormsg = (
+                                        "[DUT: {}]: metric value "
+                                        "{} is not matched for "
+                                        "route {} in RIB \n".format(
+                                            dut,
+                                            metric,
+                                            st_rt,
+                                        )
+                                    )
                                     return errormsg
 
                         else:
                             missing_routes.append(st_rt)
 
                 if nh_found:
-                    logger.info("[DUT: {}]: Found next_hop {} for all OSPF"
-                                " routes in RIB".format(router, next_hop))
+                    logger.info(
+                        "[DUT: {}]: Found next_hop {} for all OSPF"
+                        " routes in RIB".format(router, next_hop)
+                    )
 
                 if len(missing_routes) > 0:
-                    errormsg = ("[DUT: {}]: Missing route in RIB, "
-                                "routes: {}".\
-                                    format(dut, missing_routes))
+                    errormsg = "[DUT: {}]: Missing route in RIB, " "routes: {}".format(
+                        dut, missing_routes
+                    )
                     return errormsg
 
                 if found_routes:
-                    logger.info("[DUT: %s]: Verified routes in RIB, found"
-                                " routes are: %s\n", dut, found_routes)
+                    logger.info(
+                        "[DUT: %s]: Verified routes in RIB, found" " routes are: %s\n",
+                        dut,
+                        found_routes,
+                    )
                     result = True
 
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
@@ -1855,15 +1979,16 @@ def verify_ospf6_interface(tgen, topo, dut=None,lan=False, input_dict=None):
     result = False
 
     for router, rnode in tgen.routers().iteritems():
-        if 'ospf6' not in topo['routers'][router]:
+        if "ospf6" not in topo["routers"][router]:
             continue
 
         if dut is not None and dut != router:
             continue
 
         logger.info("Verifying OSPF interface on router %s:", router)
-        show_ospf_json = run_frr_cmd(rnode, "show ipv6 ospf interface json",
-                                    isjson=True)
+        show_ospf_json = run_frr_cmd(
+            rnode, "show ipv6 ospf interface json", isjson=True
+        )
 
         # Verifying output dictionary show_ospf_json is empty or not
         if not bool(show_ospf_json):
@@ -1873,32 +1998,49 @@ def verify_ospf6_interface(tgen, topo, dut=None,lan=False, input_dict=None):
         # To find neighbor ip type
         ospf_intf_data = input_dict[router]["links"]
         for ospf_intf, intf_data in ospf_intf_data.items():
-            intf = topo['routers'][router]['links'][ospf_intf]['interface']
-            if  intf in show_ospf_json:
-                for intf_attribute in intf_data['ospf6']:
-                    if intf_data['ospf6'][intf_attribute] is not list:
-                        if intf_data['ospf6'][intf_attribute] ==  show_ospf_json[
-                            intf][intf_attribute]:
-                            logger.info("[DUT: %s] OSPF6 interface %s: %s is %s",
-                            router, intf, intf_attribute, intf_data['ospf6'][
-                                intf_attribute])
-                    elif intf_data['ospf6'][intf_attribute] is list:
+            intf = topo["routers"][router]["links"][ospf_intf]["interface"]
+            if intf in show_ospf_json:
+                for intf_attribute in intf_data["ospf6"]:
+                    if intf_data["ospf6"][intf_attribute] is not list:
+                        if (
+                            intf_data["ospf6"][intf_attribute]
+                            == show_ospf_json[intf][intf_attribute]
+                        ):
+                            logger.info(
+                                "[DUT: %s] OSPF6 interface %s: %s is %s",
+                                router,
+                                intf,
+                                intf_attribute,
+                                intf_data["ospf6"][intf_attribute],
+                            )
+                    elif intf_data["ospf6"][intf_attribute] is list:
                         for addr_list in len(show_ospf_json[intf][intf_attribute]):
-                            if show_ospf_json[intf][intf_attribute][addr_list][
-                                'address'].split('/')[0] == intf_data['ospf6'][
-                                    'internetAddress'][0]['address']:
-                                    break
+                            if (
+                                show_ospf_json[intf][intf_attribute][addr_list][
+                                    "address"
+                                ].split("/")[0]
+                                == intf_data["ospf6"]["internetAddress"][0]["address"]
+                            ):
+                                break
                             else:
-                                errormsg= "[DUT: {}] OSPF6 interface {}: {} is {}, \
-                                    Expected is {}".format(router, intf, intf_attribute,
-                                    intf_data['ospf6'][intf_attribute], intf_data['ospf6'][
-                                    intf_attribute])
+                                errormsg = "[DUT: {}] OSPF6 interface {}: {} is {}, \
+                                    Expected is {}".format(
+                                    router,
+                                    intf,
+                                    intf_attribute,
+                                    intf_data["ospf6"][intf_attribute],
+                                    intf_data["ospf6"][intf_attribute],
+                                )
                                 return errormsg
                     else:
-                        errormsg= "[DUT: {}] OSPF6 interface {}: {} is {}, \
-                        Expected is {}".format(router, intf, intf_attribute,
-                        intf_data['ospf6'][intf_attribute], intf_data['ospf6'][
-                            intf_attribute])
+                        errormsg = "[DUT: {}] OSPF6 interface {}: {} is {}, \
+                        Expected is {}".format(
+                            router,
+                            intf,
+                            intf_attribute,
+                            intf_data["ospf6"][intf_attribute],
+                            intf_data["ospf6"][intf_attribute],
+                        )
                         return errormsg
         result = True
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
@@ -1956,16 +2098,14 @@ def verify_ospf6_database(tgen, topo, dut, input_dict):
     router = dut
     logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
 
-    if 'ospf' not in topo['routers'][dut]:
-        errormsg = "[DUT: {}] OSPF is not configured on the router.".format(
-            dut)
+    if "ospf" not in topo["routers"][dut]:
+        errormsg = "[DUT: {}] OSPF is not configured on the router.".format(dut)
         return errormsg
 
     rnode = tgen.routers()[dut]
 
     logger.info("Verifying OSPF interface on router %s:", dut)
-    show_ospf_json = run_frr_cmd(rnode, "show ip ospf database json",
-                                isjson=True)
+    show_ospf_json = run_frr_cmd(rnode, "show ip ospf database json", isjson=True)
     # Verifying output dictionary show_ospf_json is empty or not
     if not bool(show_ospf_json):
         errormsg = "OSPF is not running"
@@ -1973,167 +2113,209 @@ def verify_ospf6_database(tgen, topo, dut, input_dict):
 
     # for inter and inter lsa's
     ospf_db_data = input_dict.setdefault("areas", None)
-    ospf_external_lsa = input_dict.setdefault(
-        'asExternalLinkStates', None)
+    ospf_external_lsa = input_dict.setdefault("asExternalLinkStates", None)
 
     if ospf_db_data:
-            for ospf_area, area_lsa in ospf_db_data.items():
-                if ospf_area in show_ospf_json['areas']:
-                    if 'routerLinkStates' in area_lsa:
-                        for lsa in area_lsa['routerLinkStates']:
-                            for rtrlsa in show_ospf_json['areas'][ospf_area][
-                                'routerLinkStates']:
-                                if lsa['lsaId'] == rtrlsa['lsaId'] and \
-                                    lsa['advertisedRouter'] == rtrlsa[
-                                        'advertisedRouter']:
-                                                result = True
-                                                break
-                            if result:
-                                logger.info(
-                                    "[DUT: %s]  OSPF LSDB area %s:Router "
-                                    "LSA %s", router, ospf_area, lsa)
+        for ospf_area, area_lsa in ospf_db_data.items():
+            if ospf_area in show_ospf_json["areas"]:
+                if "routerLinkStates" in area_lsa:
+                    for lsa in area_lsa["routerLinkStates"]:
+                        for rtrlsa in show_ospf_json["areas"][ospf_area][
+                            "routerLinkStates"
+                        ]:
+                            if (
+                                lsa["lsaId"] == rtrlsa["lsaId"]
+                                and lsa["advertisedRouter"]
+                                == rtrlsa["advertisedRouter"]
+                            ):
+                                result = True
                                 break
-                        else:
-                            errormsg = \
-                            "[DUT: {}]  OSPF LSDB area {}: expected" \
+                        if result:
+                            logger.info(
+                                "[DUT: %s]  OSPF LSDB area %s:Router " "LSA %s",
+                                router,
+                                ospf_area,
+                                lsa,
+                            )
+                            break
+                    else:
+                        errormsg = (
+                            "[DUT: {}]  OSPF LSDB area {}: expected"
                             " Router LSA is {}".format(router, ospf_area, lsa)
-                            return errormsg
+                        )
+                        return errormsg
 
-                    if 'networkLinkStates' in area_lsa:
-                        for lsa in area_lsa['networkLinkStates']:
-                            for netlsa in show_ospf_json['areas'][ospf_area][
-                                'networkLinkStates']:
-                                if lsa in show_ospf_json['areas'][ospf_area][
-                                    'networkLinkStates']:
-                                    if lsa['lsaId'] == netlsa['lsaId'] and \
-                                    lsa['advertisedRouter'] == netlsa[
-                                        'advertisedRouter']:
-                                                result = True
-                                                break
-                            if result:
-                                logger.info(
-                                    "[DUT: %s]  OSPF LSDB area %s:Network "
-                                    "LSA %s", router, ospf_area, lsa)
-                                break
-                            else:
-                                errormsg = \
-                                "[DUT: {}]  OSPF LSDB area {}: expected" \
+                if "networkLinkStates" in area_lsa:
+                    for lsa in area_lsa["networkLinkStates"]:
+                        for netlsa in show_ospf_json["areas"][ospf_area][
+                            "networkLinkStates"
+                        ]:
+                            if (
+                                lsa
+                                in show_ospf_json["areas"][ospf_area][
+                                    "networkLinkStates"
+                                ]
+                            ):
+                                if (
+                                    lsa["lsaId"] == netlsa["lsaId"]
+                                    and lsa["advertisedRouter"]
+                                    == netlsa["advertisedRouter"]
+                                ):
+                                    result = True
+                                    break
+                        if result:
+                            logger.info(
+                                "[DUT: %s]  OSPF LSDB area %s:Network " "LSA %s",
+                                router,
+                                ospf_area,
+                                lsa,
+                            )
+                            break
+                        else:
+                            errormsg = (
+                                "[DUT: {}]  OSPF LSDB area {}: expected"
                                 " Network LSA is {}".format(router, ospf_area, lsa)
-                                return errormsg
+                            )
+                            return errormsg
 
-                    if 'summaryLinkStates' in area_lsa:
-                        for lsa in area_lsa['summaryLinkStates']:
-                            for t3lsa in show_ospf_json['areas'][ospf_area][
-                                'summaryLinkStates']:
-                                if lsa['lsaId'] == t3lsa['lsaId'] and \
-                                lsa['advertisedRouter'] == t3lsa[
-                                    'advertisedRouter']:
-                                            result = True
-                                            break
-                            if result:
-                                logger.info(
-                                    "[DUT: %s]  OSPF LSDB area %s:Summary "
-                                    "LSA %s", router, ospf_area, lsa)
+                if "summaryLinkStates" in area_lsa:
+                    for lsa in area_lsa["summaryLinkStates"]:
+                        for t3lsa in show_ospf_json["areas"][ospf_area][
+                            "summaryLinkStates"
+                        ]:
+                            if (
+                                lsa["lsaId"] == t3lsa["lsaId"]
+                                and lsa["advertisedRouter"] == t3lsa["advertisedRouter"]
+                            ):
+                                result = True
                                 break
-                            else:
-                                errormsg = \
-                                "[DUT: {}]  OSPF LSDB area {}: expected" \
+                        if result:
+                            logger.info(
+                                "[DUT: %s]  OSPF LSDB area %s:Summary " "LSA %s",
+                                router,
+                                ospf_area,
+                                lsa,
+                            )
+                            break
+                        else:
+                            errormsg = (
+                                "[DUT: {}]  OSPF LSDB area {}: expected"
                                 " Summary LSA is {}".format(router, ospf_area, lsa)
-                                return errormsg
+                            )
+                            return errormsg
 
-                    if 'nssaExternalLinkStates' in area_lsa:
-                        for lsa in area_lsa['nssaExternalLinkStates']:
-                            for t7lsa in show_ospf_json['areas'][ospf_area][
-                                'nssaExternalLinkStates']:
-                                if lsa['lsaId'] == t7lsa['lsaId'] and \
-                                lsa['advertisedRouter'] == t7lsa[
-                                    'advertisedRouter']:
-                                            result = True
-                                            break
-                            if result:
-                                logger.info(
-                                    "[DUT: %s]  OSPF LSDB area %s:Type7 "
-                                    "LSA %s", router, ospf_area, lsa)
+                if "nssaExternalLinkStates" in area_lsa:
+                    for lsa in area_lsa["nssaExternalLinkStates"]:
+                        for t7lsa in show_ospf_json["areas"][ospf_area][
+                            "nssaExternalLinkStates"
+                        ]:
+                            if (
+                                lsa["lsaId"] == t7lsa["lsaId"]
+                                and lsa["advertisedRouter"] == t7lsa["advertisedRouter"]
+                            ):
+                                result = True
                                 break
-                            else:
-                                errormsg = \
-                                "[DUT: {}]  OSPF LSDB area {}: expected" \
+                        if result:
+                            logger.info(
+                                "[DUT: %s]  OSPF LSDB area %s:Type7 " "LSA %s",
+                                router,
+                                ospf_area,
+                                lsa,
+                            )
+                            break
+                        else:
+                            errormsg = (
+                                "[DUT: {}]  OSPF LSDB area {}: expected"
                                 " Type7 LSA is {}".format(router, ospf_area, lsa)
-                                return errormsg
+                            )
+                            return errormsg
 
-                    if 'asbrSummaryLinkStates' in area_lsa:
-                        for lsa in area_lsa['asbrSummaryLinkStates']:
-                            for t4lsa in show_ospf_json['areas'][ospf_area][
-                                'asbrSummaryLinkStates']:
-                                if lsa['lsaId'] == t4lsa['lsaId'] and \
-                                lsa['advertisedRouter'] == t4lsa[
-                                    'advertisedRouter']:
-                                            result = True
-                                            break
-                            if result:
-                                logger.info(
-                                    "[DUT: %s]  OSPF LSDB area %s:ASBR Summary "
-                                    "LSA %s", router, ospf_area, lsa)
+                if "asbrSummaryLinkStates" in area_lsa:
+                    for lsa in area_lsa["asbrSummaryLinkStates"]:
+                        for t4lsa in show_ospf_json["areas"][ospf_area][
+                            "asbrSummaryLinkStates"
+                        ]:
+                            if (
+                                lsa["lsaId"] == t4lsa["lsaId"]
+                                and lsa["advertisedRouter"] == t4lsa["advertisedRouter"]
+                            ):
                                 result = True
-                            else:
-                                errormsg = \
-                                    "[DUT: {}]  OSPF LSDB area {}: expected" \
-                                    " ASBR Summary LSA is {}".format(
-                                        router, ospf_area, lsa)
-                                return errormsg
+                                break
+                        if result:
+                            logger.info(
+                                "[DUT: %s]  OSPF LSDB area %s:ASBR Summary " "LSA %s",
+                                router,
+                                ospf_area,
+                                lsa,
+                            )
+                            result = True
+                        else:
+                            errormsg = (
+                                "[DUT: {}]  OSPF LSDB area {}: expected"
+                                " ASBR Summary LSA is {}".format(router, ospf_area, lsa)
+                            )
+                            return errormsg
 
-                    if 'linkLocalOpaqueLsa' in area_lsa:
-                        for lsa in area_lsa['linkLocalOpaqueLsa']:
-                            try:
-                                for lnklsa in show_ospf_json['areas'][ospf_area][
-                                    'linkLocalOpaqueLsa']:
-                                    if lsa['lsaId'] in lnklsa['lsaId'] and \
-                                        'linkLocalOpaqueLsa' in show_ospf_json[
-                                            'areas'][ospf_area]:
-                                        logger.info((
-                                        "[DUT: FRR]  OSPF LSDB area %s:Opaque-LSA"
-                                        "%s", ospf_area, lsa))
-                                        result = True
-                                    else:
-                                        errormsg = ("[DUT: FRR] OSPF LSDB area: {} "
-                                    "expected Opaque-LSA is {}, Found is {}".format(
-                                        ospf_area, lsa, show_ospf_json))
-                                        raise ValueError (errormsg)
-                                        return errormsg
-                            except KeyError:
-                                errormsg = ("[DUT: FRR] linkLocalOpaqueLsa Not "
-                                                "present")
-                                return errormsg
+                if "linkLocalOpaqueLsa" in area_lsa:
+                    for lsa in area_lsa["linkLocalOpaqueLsa"]:
+                        try:
+                            for lnklsa in show_ospf_json["areas"][ospf_area][
+                                "linkLocalOpaqueLsa"
+                            ]:
+                                if (
+                                    lsa["lsaId"] in lnklsa["lsaId"]
+                                    and "linkLocalOpaqueLsa"
+                                    in show_ospf_json["areas"][ospf_area]
+                                ):
+                                    logger.info(
+                                        (
+                                            "[DUT: FRR]  OSPF LSDB area %s:Opaque-LSA"
+                                            "%s",
+                                            ospf_area,
+                                            lsa,
+                                        )
+                                    )
+                                    result = True
+                                else:
+                                    errormsg = (
+                                        "[DUT: FRR] OSPF LSDB area: {} "
+                                        "expected Opaque-LSA is {}, Found is {}".format(
+                                            ospf_area, lsa, show_ospf_json
+                                        )
+                                    )
+                                    raise ValueError(errormsg)
+                                    return errormsg
+                        except KeyError:
+                            errormsg = "[DUT: FRR] linkLocalOpaqueLsa Not " "present"
+                            return errormsg
 
     if ospf_external_lsa:
-            for lsa in ospf_external_lsa:
-                try:
-                    for t5lsa in show_ospf_json['asExternalLinkStates']:
-                        if lsa['lsaId'] == t5lsa['lsaId'] and \
-                            lsa['advertisedRouter'] == t5lsa[
-                                        'advertisedRouter']:
-                            result = True
-                            break
-                except KeyError:
-                        result = False
-                if result:
-                    logger.info(
-                            "[DUT: %s]  OSPF LSDB:External LSA %s",
-                            router, lsa)
-                    result = True
-                else:
-                    errormsg = \
-                            "[DUT: {}]  OSPF LSDB : expected" \
-                            " External LSA is {}".format(router, lsa)
-                    return errormsg
+        for lsa in ospf_external_lsa:
+            try:
+                for t5lsa in show_ospf_json["asExternalLinkStates"]:
+                    if (
+                        lsa["lsaId"] == t5lsa["lsaId"]
+                        and lsa["advertisedRouter"] == t5lsa["advertisedRouter"]
+                    ):
+                        result = True
+                        break
+            except KeyError:
+                result = False
+            if result:
+                logger.info("[DUT: %s]  OSPF LSDB:External LSA %s", router, lsa)
+                result = True
+            else:
+                errormsg = (
+                    "[DUT: {}]  OSPF LSDB : expected"
+                    " External LSA is {}".format(router, lsa)
+                )
+                return errormsg
 
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
     return result
 
 
-
-def config_ospf6_interface (tgen, topo, input_dict=None, build=False,
-        load_config=True):
+def config_ospf6_interface(tgen, topo, input_dict=None, build=False, load_config=True):
     """
     API to configure ospf on router.
 
@@ -2172,6 +2354,9 @@ def config_ospf6_interface (tgen, topo, input_dict=None, build=False,
         input_dict = deepcopy(topo)
     else:
         input_dict = deepcopy(input_dict)
+
+    config_data_dict = {}
+
     for router in input_dict.keys():
         config_data = []
         for lnk in input_dict[router]['links'].keys():
@@ -2180,17 +2365,17 @@ def config_ospf6_interface (tgen, topo, input_dict=None, build=False,
                              "input_dict, passed input_dict %s", router,
                              str(input_dict))
                 continue
-            ospf_data = input_dict[router]['links'][lnk]['ospf6']
+            ospf_data = input_dict[router]["links"][lnk]["ospf6"]
             data_ospf_area = ospf_data.setdefault("area", None)
-            data_ospf_auth = ospf_data.setdefault("authentication", None)
+            data_ospf_auth = ospf_data.setdefault("hash-algo", None)
             data_ospf_dr_priority = ospf_data.setdefault("priority", None)
             data_ospf_cost = ospf_data.setdefault("cost", None)
             data_ospf_mtu = ospf_data.setdefault("mtu_ignore", None)
 
             try:
-                intf = topo['routers'][router]['links'][lnk]['interface']
+                intf = topo["routers"][router]["links"][lnk]["interface"]
             except KeyError:
-                intf = topo['switches'][router]['links'][lnk]['interface']
+                intf = topo["switches"][router]["links"][lnk]["interface"]
 
             # interface
             cmd = "interface {}".format(intf)
@@ -2201,34 +2386,117 @@ def config_ospf6_interface (tgen, topo, input_dict=None, build=False,
                 cmd = "ipv6 ospf area {}".format(data_ospf_area)
                 config_data.append(cmd)
 
+            # interface ospf auth
+            if data_ospf_auth:
+                cmd = "ipv6 ospf6 authentication"
+
+                if "del_action" in ospf_data:
+                    cmd = "no {}".format(cmd)
+
+                if "hash-algo" in ospf_data:
+                    cmd = "{} key-id {} hash-algo {} key {}".format(
+                        cmd,
+                        ospf_data["key-id"],
+                        ospf_data["hash-algo"],
+                        ospf_data["key"],
+                    )
+                    if "del_action" in ospf_data:
+                        cmd = "no {}".format(cmd)
+                    config_data.append(cmd)
+
             # interface ospf dr priority
             if data_ospf_dr_priority:
-                cmd = "ipv6 ospf priority {}".format(
-                    ospf_data["priority"])
-                if 'del_action' in ospf_data:
+                cmd = "ipv6 ospf priority {}".format(ospf_data["priority"])
+                if "del_action" in ospf_data:
                     cmd = "no {}".format(cmd)
                 config_data.append(cmd)
 
             # interface ospf cost
             if data_ospf_cost:
-                cmd = "ipv6 ospf cost {}".format(
-                    ospf_data["cost"])
-                if 'del_action' in ospf_data:
+                cmd = "ipv6 ospf cost {}".format(ospf_data["cost"])
+                if "del_action" in ospf_data:
                     cmd = "no {}".format(cmd)
                 config_data.append(cmd)
 
             # interface ospf mtu
             if data_ospf_mtu:
                 cmd = "ipv6 ospf mtu-ignore"
-                if 'del_action' in ospf_data:
+                if "del_action" in ospf_data:
                     cmd = "no {}".format(cmd)
                 config_data.append(cmd)
 
             if build:
                 return config_data
+
+            if config_data:
+                config_data_dict[router] = config_data
+
+        result = create_common_configurations(
+            tgen, config_data_dict, "interface_config", build=build
+        )
+
+    logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
+    return result
+
+@retry(retry_timeout=20)
+def verify_ospf_gr_helper(tgen, topo, dut, input_dict=None):
+    """
+    This API is used to vreify gr helper using command
+    show ip ospf graceful-restart helper
+
+    Parameters
+    ----------
+    * `tgen` : Topogen object
+    * `topo` : topology descriptions
+    * 'dut' : router
+    * 'input_dict' - values to be verified
+
+    Usage:
+    -------
+    input_dict = {
+                    "helperSupport":"Disabled",
+                    "strictLsaCheck":"Enabled",
+                    "restartSupoort":"Planned and Unplanned Restarts",
+                    "supportedGracePeriod":1800
+                }
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+
+    """
+    logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
+    result = False
+
+    if 'ospf' not in topo['routers'][dut]:
+        errormsg = "[DUT: {}] OSPF is not configured on the router.".format(
+            dut)
+        return errormsg
+
+    rnode = tgen.routers()[dut]
+    logger.info("Verifying OSPF GR details on router %s:", dut)
+    show_ospf_json = run_frr_cmd(rnode, "show ip ospf graceful-restart helper json",
+                                 isjson=True)
+
+    # Verifying output dictionary show_ospf_json is empty or not
+    if not bool(show_ospf_json):
+        errormsg = "OSPF is not running"
+        raise ValueError (errormsg)
+        return errormsg
+
+    for ospf_gr, gr_data  in input_dict.items():
+        try:
+            if input_dict[ospf_gr] == show_ospf_json[ospf_gr]:
+                logger.info("[DUT: FRR] OSPF GR Helper: %s is %s", ospf_gr,
+                    show_ospf_json[ospf_gr])
+                result = True
             else:
-                result = create_common_configuration(tgen, router, config_data,
-                                             "interface_config",
-                                             build=build)
+                errormsg = ("[DUT: FRR] OSPF GR Helper: {} expected is {}, Found "
+                "is {}".format(ospf_gr, input_dict[ospf_gr], show_ospf_json[
+                    ospf_gr]))
+                raise ValueError (errormsg)
+                return errormsg
+
+        except KeyError:
+            errormsg = ("[DUT: FRR] OSPF GR Helper: {}".format(ospf_gr))
+            return errormsg
+
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
     return result
index 7de1c7a2f9a5b8e1987672ebd00f05da979e9b93..e702e53c0062accdc1aafc1e862b08fa5536d503 100644 (file)
@@ -29,6 +29,7 @@ from lib.topolog import logger
 # Import common_config to use commomnly used APIs
 from lib.common_config import (
     create_common_configuration,
+    create_common_configurations,
     InvalidCLIError,
     retry,
     run_frr_cmd,
@@ -55,7 +56,7 @@ def create_pim_config(tgen, topo, input_dict=None, build=False, load_config=True
     input_dict = {
         "r1": {
             "pim": {
-                "disable" : ["l1-i1-eth1"],
+                "join-prune-interval": "5",
                 "rp": [{
                     "rp_addr" : "1.0.3.17".
                     "keep-alive-timer": "100"
@@ -79,30 +80,40 @@ def create_pim_config(tgen, topo, input_dict=None, build=False, load_config=True
     else:
         topo = topo["routers"]
         input_dict = deepcopy(input_dict)
+
+    config_data_dict = {}
+
     for router in input_dict.keys():
-        result = _enable_disable_pim(tgen, topo, input_dict, router, build)
+        config_data = _enable_disable_pim_config(tgen, topo, input_dict, router, build)
 
+        if config_data:
+            config_data_dict[router] = config_data
+
+    # Now add RP config to all routers
+    for router in input_dict.keys():
         if "pim" not in input_dict[router]:
-            logger.debug("Router %s: 'pim' is not present in " "input_dict", router)
             continue
+        if "rp" not in input_dict[router]["pim"]:
+            continue
+        _add_pim_rp_config(
+            tgen, topo, input_dict, router, build, config_data_dict
+        )
 
-        if result is True:
-            if "rp" not in input_dict[router]["pim"]:
-                continue
-
-            result = _create_pim_config(
-                tgen, topo, input_dict, router, build, load_config
-            )
-            if result is not True:
-                return False
+    try:
+        result = create_common_configurations(
+            tgen, config_data_dict, "pim", build, load_config
+        )
+    except InvalidCLIError:
+        logger.error("create_pim_config", exc_info=True)
+        result = False
 
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
     return result
 
 
-def _create_pim_config(tgen, topo, input_dict, router, build=False, load_config=False):
+def _add_pim_rp_config(tgen, topo, input_dict, router, build, config_data_dict):
     """
-    Helper API to create pim configuration.
+    Helper API to create pim RP configurations.
 
     Parameters
     ----------
@@ -111,107 +122,91 @@ def _create_pim_config(tgen, topo, input_dict, router, build=False, load_config=
     * `input_dict` : Input dict data, required when configuring from testcase
     * `router` : router id to be configured.
     * `build` : Only for initial setup phase this is set as True.
-
+    * `config_data_dict` : OUT: adds `router` config to dictinary
     Returns
     -------
-    True or False
+    None
     """
 
-    result = False
     logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
-    try:
 
-        pim_data = input_dict[router]["pim"]
+    pim_data = input_dict[router]["pim"]
+    rp_data = pim_data["rp"]
 
-        for dut in tgen.routers():
-            if "pim" not in input_dict[router]:
-                continue
+    # Configure this RP on every router.
+    for dut in tgen.routers():
+        # At least one interface must be enabled for PIM on the router
+        pim_if_enabled = False
+        for destLink, data in topo[dut]["links"].items():
+            if "pim" in data:
+                pim_if_enabled = True
+        if not pim_if_enabled:
+            continue
 
-            for destLink, data in topo[dut]["links"].items():
-                if "pim" not in data:
-                    continue
+        config_data = []
 
-                if "rp" in pim_data:
-                    config_data = []
-                    rp_data = pim_data["rp"]
+        for rp_dict in deepcopy(rp_data):
+            # ip address of RP
+            if "rp_addr" not in rp_dict and build:
+                logger.error(
+                    "Router %s: 'ip address of RP' not "
+                    "present in input_dict/JSON",
+                    router,
+                )
 
-                for rp_dict in deepcopy(rp_data):
-                    # ip address of RP
-                    if "rp_addr" not in rp_dict and build:
-                        logger.error(
-                            "Router %s: 'ip address of RP' not "
-                            "present in input_dict/JSON",
-                            router,
-                        )
+                return False
+            rp_addr = rp_dict.setdefault("rp_addr", None)
 
-                        return False
-                    rp_addr = rp_dict.setdefault("rp_addr", None)
+            # Keep alive Timer
+            keep_alive_timer = rp_dict.setdefault("keep_alive_timer", None)
 
-                    # Keep alive Timer
-                    keep_alive_timer = rp_dict.setdefault("keep_alive_timer", None)
+            # Group Address range to cover
+            if "group_addr_range" not in rp_dict and build:
+                logger.error(
+                    "Router %s:'Group Address range to cover'"
+                    " not present in input_dict/JSON",
+                    router,
+                )
 
-                    # Group Address range to cover
-                    if "group_addr_range" not in rp_dict and build:
-                        logger.error(
-                            "Router %s:'Group Address range to cover'"
-                            " not present in input_dict/JSON",
-                            router,
-                        )
+                return False
+            group_addr_range = rp_dict.setdefault("group_addr_range", None)
 
-                        return False
-                    group_addr_range = rp_dict.setdefault("group_addr_range", None)
+            # Group prefix-list filter
+            prefix_list = rp_dict.setdefault("prefix_list", None)
 
-                    # Group prefix-list filter
-                    prefix_list = rp_dict.setdefault("prefix_list", None)
+            # Delete rp config
+            del_action = rp_dict.setdefault("delete", False)
 
-                    # Delete rp config
-                    del_action = rp_dict.setdefault("delete", False)
+            if keep_alive_timer:
+                cmd = "ip pim rp keep-alive-timer {}".format(keep_alive_timer)
+                if del_action:
+                    cmd = "no {}".format(cmd)
+                config_data.append(cmd)
 
-                    if keep_alive_timer:
-                        cmd = "ip pim rp keep-alive-timer {}".format(keep_alive_timer)
-                        config_data.append(cmd)
+            if rp_addr:
+                if group_addr_range:
+                    if type(group_addr_range) is not list:
+                        group_addr_range = [group_addr_range]
 
+                    for grp_addr in group_addr_range:
+                        cmd = "ip pim rp {} {}".format(rp_addr, grp_addr)
                         if del_action:
                             cmd = "no {}".format(cmd)
-                            config_data.append(cmd)
-
-                    if rp_addr:
-                        if group_addr_range:
-                            if type(group_addr_range) is not list:
-                                group_addr_range = [group_addr_range]
-
-                            for grp_addr in group_addr_range:
-                                cmd = "ip pim rp {} {}".format(rp_addr, grp_addr)
-                                config_data.append(cmd)
-
-                                if del_action:
-                                    cmd = "no {}".format(cmd)
-                                    config_data.append(cmd)
-
-                        if prefix_list:
-                            cmd = "ip pim rp {} prefix-list {}".format(
-                                rp_addr, prefix_list
-                            )
-                            config_data.append(cmd)
-
-                            if del_action:
-                                cmd = "no {}".format(cmd)
-                                config_data.append(cmd)
-
-            result = create_common_configuration(
-                tgen, dut, config_data, "pim", build, load_config
-            )
-            if result is not True:
-                return False
+                        config_data.append(cmd)
 
-    except InvalidCLIError:
-        # Traceback
-        errormsg = traceback.format_exc()
-        logger.error(errormsg)
-        return errormsg
+                if prefix_list:
+                    cmd = "ip pim rp {} prefix-list {}".format(
+                        rp_addr, prefix_list
+                    )
+                    if del_action:
+                        cmd = "no {}".format(cmd)
+                    config_data.append(cmd)
 
-    logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
-    return result
+            if config_data:
+                if dut not in config_data_dict:
+                    config_data_dict[dut] = config_data
+                else:
+                    config_data_dict[dut].extend(config_data)
 
 
 def create_igmp_config(tgen, topo, input_dict=None, build=False):
@@ -258,6 +253,9 @@ def create_igmp_config(tgen, topo, input_dict=None, build=False):
     else:
         topo = topo["routers"]
         input_dict = deepcopy(input_dict)
+
+    config_data_dict = {}
+
     for router in input_dict.keys():
         if "igmp" not in input_dict[router]:
             logger.debug("Router %s: 'igmp' is not present in " "input_dict", router)
@@ -303,21 +301,22 @@ def create_igmp_config(tgen, topo, input_dict=None, build=False):
                                     cmd = "no {}".format(cmd)
 
                             config_data.append(cmd)
-        try:
+        if config_data:
+            config_data_dict[router] = config_data
 
-            result = create_common_configuration(
-                tgen, router, config_data, "interface_config", build=build
-            )
-        except InvalidCLIError:
-            errormsg = traceback.format_exc()
-            logger.error(errormsg)
-            return errormsg
+    try:
+        result = create_common_configurations(
+            tgen, config_data_dict, "interface_config", build=build
+        )
+    except InvalidCLIError:
+        logger.error("create_igmp_config", exc_info=True)
+        result = False
 
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
     return result
 
 
-def _enable_disable_pim(tgen, topo, input_dict, router, build=False):
+def _enable_disable_pim_config(tgen, topo, input_dict, router, build=False):
     """
     Helper API to enable or disable pim on interfaces
 
@@ -331,57 +330,40 @@ def _enable_disable_pim(tgen, topo, input_dict, router, build=False):
 
     Returns
     -------
-    True or False
+    list of config
     """
-    result = False
-    logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
-    try:
-        config_data = []
-
-        enable_flag = True
-        # Disable pim on interface
-        if "pim" in input_dict[router]:
-            if "disable" in input_dict[router]["pim"]:
-                enable_flag = False
-                interfaces = input_dict[router]["pim"]["disable"]
 
-                if type(interfaces) is not list:
-                    interfaces = [interfaces]
-
-                for interface in interfaces:
-                    cmd = "interface {}".format(interface)
-                    config_data.append(cmd)
-                    config_data.append("no ip pim")
-
-        # Enable pim on interface
-        if enable_flag:
-            for destRouterLink, data in sorted(topo[router]["links"].items()):
-                if "pim" in data and data["pim"] == "enable":
-
-                    # Loopback interfaces
-                    if "type" in data and data["type"] == "loopback":
-                        interface_name = destRouterLink
-                    else:
-                        interface_name = data["interface"]
+    config_data = []
 
-                    cmd = "interface {}".format(interface_name)
-                    config_data.append(cmd)
-                    config_data.append("ip pim")
+    # Enable pim on interfaces
+    for destRouterLink, data in sorted(topo[router]["links"].items()):
+        if "pim" in data and data["pim"] == "enable":
+            # Loopback interfaces
+            if "type" in data and data["type"] == "loopback":
+                interface_name = destRouterLink
+            else:
+                interface_name = data["interface"]
 
-        result = create_common_configuration(
-            tgen, router, config_data, "interface_config", build=build
-        )
-        if result is not True:
-            return False
+            cmd = "interface {}".format(interface_name)
+            config_data.append(cmd)
+            config_data.append("ip pim")
 
-    except InvalidCLIError:
-        # Traceback
-        errormsg = traceback.format_exc()
-        logger.error(errormsg)
-        return errormsg
+    # pim global config
+    if "pim" in input_dict[router]:
+        pim_data = input_dict[router]["pim"]
+        del_action = pim_data.setdefault("delete", False)
+        for t in [
+                "join-prune-interval",
+                "keep-alive-timer",
+                "register-suppress-time",
+        ]:
+            if t in pim_data:
+                cmd = "ip pim {} {}".format(t, pim_data[t])
+                if del_action:
+                    cmd = "no {}".format(cmd)
+                config_data.append(cmd)
 
-    logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
-    return result
+    return config_data
 
 
 def find_rp_details(tgen, topo):
@@ -454,7 +436,9 @@ def configure_pim_force_expire(tgen, topo, input_dict, build=False):
 
     result = False
     logger.debug("Entering lib API: {}".format(sys._getframe().f_code.co_name))
+
     try:
+        config_data_dict = {}
 
         for dut in input_dict.keys():
             if "pim" not in input_dict[dut]:
@@ -462,8 +446,8 @@ def configure_pim_force_expire(tgen, topo, input_dict, build=False):
 
             pim_data = input_dict[dut]["pim"]
 
+            config_data = []
             if "force_expire" in pim_data:
-                config_data = []
                 force_expire_data = pim_data["force_expire"]
 
                 for source, groups in force_expire_data.items():
@@ -476,17 +460,15 @@ def configure_pim_force_expire(tgen, topo, input_dict, build=False):
                         )
                         config_data.append(cmd)
 
-                    result = create_common_configuration(
-                        tgen, dut, config_data, "pim", build=build
-                    )
-                    if result is not True:
-                        return False
+            if config_data:
+                config_data_dict[dut] = config_data
 
+        result = create_common_configurations(
+            tgen, config_data_dict, "pim", build=build
+        )
     except InvalidCLIError:
-        # Traceback
-        errormsg = traceback.format_exc()
-        logger.error(errormsg)
-        return errormsg
+        logger.error("configure_pim_force_expire", exc_info=True)
+        result = False
 
     logger.debug("Exiting lib API: {}".format(sys._getframe().f_code.co_name))
     return result
@@ -966,7 +948,7 @@ def verify_join_state_and_timer(tgen, dut, iif, src_address, group_addresses, ex
     return True
 
 
-@retry(retry_timeout=80)
+@retry(retry_timeout=120)
 def verify_ip_mroutes(
     tgen, dut, src_address, group_addresses, iif, oil, return_uptime=False, mwait=0, expected=True
 ):
@@ -2029,6 +2011,7 @@ def add_rp_interfaces_and_pim_config(tgen, topo, interface, rp, rp_mapping):
                 config_data.append("ip address {}".format(_rp))
                 config_data.append("ip pim")
 
+            # Why not config just once, why per group?
             result = create_common_configuration(
                 tgen, rp, config_data, "interface_config"
             )
diff --git a/tests/topotests/lib/scapy_sendpkt.py b/tests/topotests/lib/scapy_sendpkt.py
new file mode 100755 (executable)
index 0000000..0bb6a72
--- /dev/null
@@ -0,0 +1,61 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 eval: (blacken-mode 1) -*-
+#
+# July 29 2021, Christian Hopps <chopps@labn.net>
+#
+# Copyright (c) 2021, LabN Consulting, L.L.C. ("LabN")
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+#
+import argparse
+import logging
+import re
+import sys
+
+from scapy.all import conf, srp
+
+conf.verb = 0
+
+
+def main():
+    parser = argparse.ArgumentParser()
+    parser.add_argument("-i", "--interface", help="interface to send packet on.")
+    parser.add_argument("-I", "--imports", help="scapy symbols to import")
+    parser.add_argument(
+        "-t", "--timeout", type=float, default=2.0, help="timeout for reply receipts"
+    )
+    parser.add_argument("pktdef", help="scapy packet definition to send")
+    args = parser.parse_args()
+
+    if args.imports:
+        i = args.imports.replace("\n", "").strip()
+        if not re.match("[a-zA-Z0-9_ \t,]", i):
+            logging.critical('Invalid imports specified: "%s"', i)
+            sys.exit(1)
+        exec("from scapy.all import " + i, globals(), locals())
+
+    ans, unans = srp(eval(args.pktdef), iface=args.interface, timeout=args.timeout)
+    if not ans:
+        sys.exit(2)
+    for pkt in ans:
+        print(pkt.answer.show(dump=True))
+
+
+if __name__ == "__main__":
+    main()
index b9988781187517d3831765407e140f5fba5ce6e5..8888421bf1fc880054457827faca1c6dbc07c250 100644 (file)
@@ -471,6 +471,12 @@ class TopoGear(object):
         """
         return self.tgen.net[self.name].cmd(command)
 
+    def popen(self, *params, **kwargs):
+        """
+        Popen on the router.
+        """
+        return self.tgen.net[self.name].popen(*params, **kwargs)
+
     def add_link(self, node, myif=None, nodeif=None):
         """
         Creates a link (connection) between myself and the specified node.
index fcc6c198685dce016aa0fffdf299205cfb5ce797..003a97137343635b4993184eccf059e092018ad4 100644 (file)
@@ -34,7 +34,7 @@ from lib.topolog import logger
 from lib.common_config import (
     number_to_row,
     number_to_column,
-    load_config_to_router,
+    load_config_to_routers,
     create_interfaces_cfg,
     create_static_routes,
     create_prefix_lists,
@@ -293,6 +293,24 @@ def build_topo_from_json(tgen, topo):
             )
 
 
+def linux_intf_config_from_json(tgen, topo):
+    """Configure interfaces from linux based on topo."""
+    routers = topo["routers"]
+    for rname in routers:
+        router = tgen.gears[rname]
+        links = routers[rname]["links"]
+        for rrname in links:
+            link = links[rrname]
+            if rrname == "lo":
+                lname = "lo"
+            else:
+                lname = link["interface"]
+            if "ipv4" in link:
+                router.run("ip addr add {} dev {}".format(link["ipv4"], lname))
+            if "ipv6" in link:
+                router.run("ip -6 addr add {} dev {}".format(link["ipv6"], lname))
+
+
 def build_config_from_json(tgen, topo, save_bkup=True):
     """
     Reads initial configuraiton from JSON for each router, builds
@@ -324,10 +342,8 @@ def build_config_from_json(tgen, topo, save_bkup=True):
 
         func_dict.get(func_type)(tgen, data, build=True)
 
-    for router in sorted(topo["routers"].keys()):
-        logger.debug("Configuring router {}...".format(router))
-
-        result = load_config_to_router(tgen, router, save_bkup)
-        if not result:
-            logger.info("Failed while configuring {}".format(router))
-            pytest.exit(1)
+    routers = sorted(topo["routers"].keys())
+    result = load_config_to_routers(tgen, routers, save_bkup)
+    if not result:
+        logger.info("build_config_from_json: failed to configure topology")
+        pytest.exit(1)
index 23dcced2bf125c867569be5e18ac70f5d8ba5b5a..6112b4b6331e0a9e8c0a663ed328e14faa21b04a 100644 (file)
@@ -1235,25 +1235,28 @@ class Router(Node):
             dmns = rundaemons.split("\n")
             # Exclude empty string at end of list
             for d in dmns[:-1]:
-                daemonpid = self.cmd("cat %s" % d.rstrip()).rstrip()
-                if daemonpid.isdigit() and pid_exists(int(daemonpid)):
-                    daemonname = os.path.basename(d.rstrip().rsplit(".", 1)[0])
-                    logger.info("{}: stopping {}".format(self.name, daemonname))
-                    try:
-                        os.kill(int(daemonpid), signal.SIGTERM)
-                    except OSError as err:
-                        if err.errno == errno.ESRCH:
-                            logger.error(
-                                "{}: {} left a dead pidfile (pid={})".format(
-                                    self.name, daemonname, daemonpid
+                # Only check if daemonfilepath starts with /
+                # Avoids hang on "-> Connection closed" in above self.cmd()
+                if d[0] == '/':
+                    daemonpid = self.cmd("cat %s" % d.rstrip()).rstrip()
+                    if daemonpid.isdigit() and pid_exists(int(daemonpid)):
+                        daemonname = os.path.basename(d.rstrip().rsplit(".", 1)[0])
+                        logger.info("{}: stopping {}".format(self.name, daemonname))
+                        try:
+                            os.kill(int(daemonpid), signal.SIGTERM)
+                        except OSError as err:
+                            if err.errno == errno.ESRCH:
+                                logger.error(
+                                    "{}: {} left a dead pidfile (pid={})".format(
+                                        self.name, daemonname, daemonpid
+                                    )
                                 )
-                            )
-                        else:
-                            logger.info(
-                                "{}: {} could not kill pid {}: {}".format(
-                                    self.name, daemonname, daemonpid, str(err)
+                            else:
+                                logger.info(
+                                    "{}: {} could not kill pid {}: {}".format(
+                                        self.name, daemonname, daemonpid, str(err)
+                                    )
                                 )
-                            )
 
             if not wait:
                 return errors
@@ -1449,7 +1452,7 @@ class Router(Node):
                 logger.info("BFD Test, but no bfdd compiled or installed")
                 return "BFD Test, but no bfdd compiled or installed"
 
-        return self.startRouterDaemons()
+        return self.startRouterDaemons(tgen=tgen)
 
     def getStdErr(self, daemon):
         return self.getLog("err", daemon)
@@ -1460,7 +1463,7 @@ class Router(Node):
     def getLog(self, log, daemon):
         return self.cmd("cat {}/{}/{}.{}".format(self.logdir, self.name, daemon, log))
 
-    def startRouterDaemons(self, daemons=None):
+    def startRouterDaemons(self, daemons=None, tgen=None):
         "Starts all FRR daemons for this router."
 
         asan_abort = g_extra_config["asan_abort"]
index 30cecee9e1ecf55722a158fe55708ad8724fc7dc..c2ffed4762348a15601e1651c0858829909c8022 100644 (file)
@@ -10,6 +10,7 @@ interface r1-eth1
  ip igmp
 !
 ip pim rp 10.254.254.1
+ip pim join-prune-interval 5
 ip msdp timers 10 20 3
 ip msdp mesh-group mg-1 source 10.254.254.1
 ip msdp mesh-group mg-1 member 10.254.254.2
index a51c6d58c759da09f896457eb86797a9842d20a3..1719a17007ffed0a91825edff266609ee87672ae 100644 (file)
@@ -9,6 +9,7 @@ interface r2-eth1
  ip pim
 !
 ip pim rp 10.254.254.2
+ip pim join-prune-interval 5
 ip msdp timers 10 20 3
 ip msdp mesh-group mg-1 source 10.254.254.2
 ip msdp mesh-group mg-1 member 10.254.254.1
index 663f78620e1334eb26dca55f3297c0b01328c336..2748a55d83a585fcf3cbd06556ff62c27d66afab 100644 (file)
@@ -9,6 +9,7 @@ interface r3-eth1
  ip pim
  ip igmp
 !
+ip pim join-prune-interval 5
 ip pim rp 10.254.254.3
 ip msdp timers 10 20 3
 ip msdp mesh-group mg-1 source 10.254.254.3
index fc289031f44e161656dcc81d4d21e217f61cfd1a..42743152714e2282e1908c8c2892c81a0d27a624 100644 (file)
@@ -19,3 +19,4 @@ ip msdp timers 10 20 3
 ip msdp peer 192.168.0.2 source 192.168.0.1
 ip msdp peer 192.168.1.2 source 192.168.1.1
 ip pim rp 10.254.254.1
+ip pim join-prune-interval 5
index ffa80b12d30dcd73eb1119ea2bffd1113644fe2c..a4a69bf05c62ab5d2106e5dad2528af67b0b02fe 100644 (file)
@@ -15,3 +15,4 @@ ip msdp timers 10 20 3
 ip msdp peer 192.168.0.1 source 192.168.0.2
 ip msdp peer 192.168.2.2 source 192.168.2.1
 ip pim rp 10.254.254.2
+ip pim join-prune-interval 5
index ab12f0573a2b82a91b1c45408631a95ae2a6f17b..db94447c767de6adcc7ba61ba56ab90ecc6cd4e5 100644 (file)
@@ -15,3 +15,4 @@ ip msdp timers 10 20 3
 ip msdp peer 192.168.1.1 source 192.168.1.2
 ip msdp peer 192.168.3.2 source 192.168.3.1
 ip pim rp 10.254.254.3
+ip pim join-prune-interval 5
index b2e05cb3cb63ca5e5f58a6ac4f4e46ac50e01e0a..e9bb59054ccef428c7e72cfd1ff52ba60c327932 100644 (file)
@@ -19,3 +19,4 @@ ip msdp timers 10 20 3
 ip msdp peer 192.168.2.1 source 192.168.2.2
 ip msdp peer 192.168.3.1 source 192.168.3.2
 ip pim rp 10.254.254.4
+ip pim join-prune-interval 5
index d85e16086d0d638d6ffcabf3a6a82b06ee6f9055..b860c04faa286623f5ca422aa0bd2c51875ebded 100755 (executable)
@@ -128,7 +128,7 @@ class MSDPTopo1(Topo):
         switch.add_link(tgen.gears["r4"])
 
         switch = tgen.add_switch("s4")
-        switch.add_link(tgen.gears["r3"])
+        #switch.add_link(tgen.gears["r3"])
         switch.add_link(tgen.gears["r4"])
 
         switch = tgen.add_switch("s5")
@@ -434,11 +434,11 @@ def test_msdp():
             "local": "192.168.1.2",
             "state": "established"
         },
-        "192.168.3.2": {
-            "peer": "192.168.3.2",
-            "local": "192.168.3.1",
-            "state": "established"
-        }
+        #"192.169.3.2": {
+        #    "peer": "192.168.3.2",
+        #    "local": "192.168.3.1",
+        #    "state": "established"
+        #}
     }
     r4_expect = {
         "192.168.2.1": {
@@ -446,11 +446,11 @@ def test_msdp():
             "local": "192.168.2.2",
             "state": "established"
         },
-        "192.168.3.1": {
-            "peer": "192.168.3.1",
-            "local": "192.168.3.2",
-            "state": "established"
-        }
+        #"192.168.3.1": {
+        #    "peer": "192.168.3.1",
+        #    "local": "192.168.3.2",
+        #    "state": "established"
+        #}
     }
     r4_sa_expect = {
         "229.1.2.3": {
index cd398a51117ad5cfb9840277e54dcddcc3d1c74e..827dde69ecb376a932d3c8feb16e97c7dacafc01 100644 (file)
@@ -113,6 +113,9 @@ from lib.pim import (
 from lib.topolog import logger
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.pimd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/mcast_pim_bsmp_01.json".format(CWD)
 try:
index 60bd6de35d9ff343667a9e14f9eeee39340a4e21..894326f19f5b3462eac62db7d6bbdf88f7d7f99a 100644 (file)
@@ -104,8 +104,7 @@ from lib.pim import (
 from lib.topolog import logger
 from lib.topojson import build_topo_from_json, build_config_from_json
 
-
-pytestmark = [pytest.mark.pimd]
+pytestmark = [pytest.mark.pimd, pytest.mark.staticd]
 
 
 # Reading the data from JSON File for topology creation
@@ -1009,8 +1008,8 @@ def test_BSM_fragmentation_p1(request):
 
     # set mtu of fhr(f1) to i1 interface to 100 so that bsm fragments
     step("set mtu of fhr(f1) to i1 interface to 100 so that bsm fragments")
-    fhr_node.run("ifconfig f1-i1-eth2 mtu 100")
-    inter_node.run("ifconfig i1-f1-eth0 mtu 100")
+    fhr_node.run("ip link set f1-i1-eth2 mtu 100")
+    inter_node.run("ip link set i1-f1-eth0 mtu 100")
 
     # Use scapy to send pre-defined packet from senser to receiver
     result = scapy_send_bsr_raw_packet(tgen, topo, "b1", "f1", "packet2")
index 71454c2ab2ea1d6b3ec0d9496f50b47d7c163922..cc20abbe6a5fa84d952df38fa2b4df290c5ddb62 100644 (file)
                 "r2": {"ipv4": "auto", "pim": "enable"},
                 "c1": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "igmp": {
                 "interfaces": {
                     "l1-i1-eth1" :{
                         "igmp":{
+                            "query": {"query-max-response-time": 40, "query-interval": 5},
                             "version":  "2"
                         }
                     }
@@ -38,6 +40,7 @@
                 "f1": {"ipv4": "auto", "pim": "enable"},
                 "i3": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24"],
                 "next_hop": "10.0.7.1"
@@ -55,6 +58,7 @@
                 "i2": {"ipv4": "auto", "pim": "enable"},
                 "i8": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.12.0/24", "10.0.11.0/24"],
                 "next_hop": "10.0.7.2"
@@ -71,6 +75,7 @@
                 "l1": {"ipv4": "auto", "pim": "enable"},
                 "i4": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.3.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.12.0/24", "10.0.10.0/24", "10.0.11.0/24"],
                 "next_hop": "10.0.2.2"
@@ -87,6 +92,7 @@
                 "f1": {"ipv4": "auto", "pim": "enable"},
                 "i5": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.7.0/24", "10.0.10.0/24", "10.0.11.0/24"],
                 "next_hop": "10.0.3.2"
index b880e0e46283a23a21d9ab97dc1a8ad4ded357e8..36a3103c9da6107ccb1f0154a3dcda1dee110a0f 100755 (executable)
@@ -78,6 +78,7 @@ from lib.common_config import (
     step,
     iperfSendIGMPJoin,
     addKernelRoute,
+    apply_raw_config,
     reset_config_on_routers,
     iperfSendTraffic,
     kill_iperf,
@@ -107,6 +108,9 @@ from lib.pim import (
 from lib.topolog import logger
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.pimd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/multicast_pim_sm_topo1.json".format(CWD)
 try:
@@ -1550,8 +1554,10 @@ def test_modify_igmp_max_query_response_timer_p0(request):
         assert result is True, "Testcase {} : Failed Error: {}".format(tc_name, result)
 
     step("Delete the PIM and IGMP on FRR1")
-    input_dict_1 = {"l1": {"pim": {"disable": ["l1-i1-eth1"]}}}
-    result = create_pim_config(tgen, topo, input_dict_1)
+    raw_config = {
+        "l1": {"raw_config": ["interface l1-i1-eth1", "no ip pim"]}
+    }
+    result = apply_raw_config(tgen, raw_config)
     assert result is True, "Testcase {}: Failed Error: {}".format(tc_name, result)
 
     input_dict_2 = {
index 71454c2ab2ea1d6b3ec0d9496f50b47d7c163922..cc20abbe6a5fa84d952df38fa2b4df290c5ddb62 100644 (file)
                 "r2": {"ipv4": "auto", "pim": "enable"},
                 "c1": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "igmp": {
                 "interfaces": {
                     "l1-i1-eth1" :{
                         "igmp":{
+                            "query": {"query-max-response-time": 40, "query-interval": 5},
                             "version":  "2"
                         }
                     }
@@ -38,6 +40,7 @@
                 "f1": {"ipv4": "auto", "pim": "enable"},
                 "i3": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24"],
                 "next_hop": "10.0.7.1"
@@ -55,6 +58,7 @@
                 "i2": {"ipv4": "auto", "pim": "enable"},
                 "i8": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.12.0/24", "10.0.11.0/24"],
                 "next_hop": "10.0.7.2"
@@ -71,6 +75,7 @@
                 "l1": {"ipv4": "auto", "pim": "enable"},
                 "i4": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.3.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.12.0/24", "10.0.10.0/24", "10.0.11.0/24"],
                 "next_hop": "10.0.2.2"
@@ -87,6 +92,7 @@
                 "f1": {"ipv4": "auto", "pim": "enable"},
                 "i5": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.7.0/24", "10.0.10.0/24", "10.0.11.0/24"],
                 "next_hop": "10.0.3.2"
index ad3b77b843ec219de4f435516d122a58f3827049..f30902c1b20a0823040ec92d5a430ef5a0e0dd1f 100755 (executable)
@@ -102,6 +102,9 @@ from lib.pim import (
 from lib.topolog import logger
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.pimd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/multicast_pim_sm_topo2.json".format(CWD)
 try:
index f582f4929d164a20671b9eea0e1da7c7a10d0c02..89c54a41d6480125300a12d3c2b2ccb3c174803a 100644 (file)
                 "r2": {"ipv4": "auto", "pim": "enable"},
                 "c1": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "igmp": {
                 "interfaces": {
                     "l1-i1-eth1" :{
                         "igmp":{
+                            "query": {"query-max-response-time": 40, "query-interval": 5},
                             "version":  "2"
                         }
                     }
@@ -38,6 +40,7 @@
                 "f1": {"ipv4": "auto", "pim": "enable"},
                 "i3": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["10.0.5.0/24", "10.0.6.0/24", "1.0.2.2/32", "10.0.1.0/24", "1.0.3.5/32"],
                 "next_hop": "10.0.7.1"
@@ -55,6 +58,7 @@
                 "i2": {"ipv4": "auto", "pim": "enable"},
                 "i8": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24", "10.0.12.0/24"],
                 "next_hop": "10.0.7.2"
@@ -71,6 +75,7 @@
                 "l1": {"ipv4": "auto", "pim": "enable"},
                 "i4": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.6.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24"],
                 "next_hop": "10.0.2.2"
@@ -87,6 +92,7 @@
                 "f1": {"ipv4": "auto", "pim": "enable"},
                 "i5": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.5.17/32", "10.0.5.0/24", "10.0.6.0/24", "10.0.7.0/24", "10.0.8.0/24", "10.0.9.0/24", "10.0.10.0/24", "10.0.11.0/24"],
                 "next_hop": "10.0.3.2"
index 4635dac7d24fb0d815a56c0872b7c74e752b0117..afb55994a78507606de3fec41fbd8a6a04319211 100644 (file)
                 "r2": {"ipv4": "auto", "pim": "enable"},
                 "c1": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "igmp": {
                 "interfaces": {
                     "l1-i1-eth1" :{
                         "igmp":{
+                            "query": {"query-max-response-time": 40, "query-interval": 5},
                             "version":  "2"
                         }
                     }
@@ -40,6 +42,7 @@
                 "f1": {"ipv4": "auto", "pim": "enable"},
                 "i3": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["10.0.4.0/24","10.0.3.1/24"],
                 "next_hop": "10.0.7.1"
@@ -57,6 +60,7 @@
                 "i2": {"ipv4": "auto", "pim": "enable"},
                 "i8": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["10.0.4.0/24","10.0.3.1/24"],
                 "next_hop": "10.0.3.1"
@@ -73,6 +77,7 @@
                 "l1": {"ipv4": "auto", "pim": "enable"},
                 "i4": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [{
                 "network": ["1.0.4.11/32","10.0.4.2/24", "10.0.3.1/24"],
                 "next_hop": "10.0.2.2"
@@ -87,6 +92,7 @@
                 "f1": {"ipv4": "auto", "pim": "enable"},
                 "i5": {"ipv4": "auto", "pim": "enable"}
             },
+            "pim": { "join-prune-interval": "5", "keep-alive-timer": 15, "register-suppress-time": 12 },
             "static_routes": [
             {
                 "network": ["1.0.4.11/32", "10.0.2.1/24", "10.0.1.2/24"],
index 33f476de443b005266308b2ceeabb3669e755604..033c76081a0a10f6747ed540d7cf6a59a76eed6b 100755 (executable)
@@ -2014,7 +2014,7 @@ def test_verify_remove_add_igmp_commands_when_pim_configured_p0(request):
 
     intf_l1_i1 = topo["routers"]["l1"]["links"]["i1"]["interface"]
     input_dict_1 = {
-        "l1": {"igmp": {"interfaces": {intf_l1_i1: {"igmp": {"version": "2"}}}}}
+        "l1": {"igmp": {"interfaces": {intf_l1_i1: {"igmp": {"version": "2", "query": {"query-max-response-time": 40, "query-interval": 5}}}}}}
     }
 
     result = verify_igmp_config(tgen, input_dict_1)
@@ -2231,8 +2231,10 @@ def test_verify_remove_add_pim_commands_when_igmp_configured_p1(request):
     step("Remove 'no ip pim' on receiver interface on FRR1")
 
     intf_l1_i1 = topo["routers"]["l1"]["links"]["i1"]["interface"]
-    input_dict_1 = {"l1": {"pim": {"disable": intf_l1_i1}}}
-    result = create_pim_config(tgen, topo, input_dict_1)
+    raw_config = {
+        "l1": {"raw_config": ["interface {}".format(intf_l1_i1), "no ip pim"]}
+    }
+    result = apply_raw_config(tgen, raw_config)
     assert result is True, "Testcase {}: Failed Error: {}".format(tc_name, result)
 
     step("Verify that no core is observed")
index 6d6c047b001735138d6a62cd0d68c86d1cfcd740..39c68408b4a857baddd21898b14759e2d48cd15c 100644 (file)
@@ -4,7 +4,11 @@
     "link_ip_start": {"ipv4": "10.0.0.0", "v4mask": 24},
     "lo_prefix": {"ipv4": "1.0.", "v4mask": 32},
     "routers": {
-        "r0": {"links": {"r1": {"ipv4": "auto"}}},
+        "r0": {
+            "links": {
+                "r1": {"ipv4": "auto"}
+            }
+        },
         "r1": {
             "links": {
                 "lo": {"ipv4": "auto", "type": "loopback", "pim": "enable"},
                 "r4": {"ipv4": "auto", "pim": "enable"}
             },
             "pim": {
-                "rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}]
+                "join-prune-interval": "5",
+                "keep-alive-timer": 15,
+                "register-suppress-time": 12
+            },
+            "igmp": {
+                "interfaces": {
+                    "r1-r0-eth0": {
+                        "igmp": {
+                            "query": {"query-max-response-time": 40, "query-interval": 5},
+                            "version": "2"
+                        }
+                    }
+                }
             },
-            "igmp": {"interfaces": {"r1-r0-eth0": {"igmp": {"version": "2"}}}},
             "static_routes": [
                 {"network": "10.0.4.0/24", "next_hop": "10.0.2.2"},
                 {"network": "10.0.5.0/24", "next_hop": "10.0.2.2"},
@@ -35,6 +50,9 @@
                 "r3": {"ipv4": "auto", "pim": "enable"}
             },
             "pim": {
+                "join-prune-interval": "5",
+                "keep-alive-timer": 15,
+                "register-suppress-time": 12,
                 "rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}]
             },
             "static_routes": [
@@ -57,7 +75,9 @@
                 "r5": {"ipv4": "auto", "pim": "enable"}
             },
             "pim": {
-                "rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}]
+                "join-prune-interval": "5",
+                "keep-alive-timer": 15,
+                "register-suppress-time": 12
             },
             "static_routes": [
                 {"network": "10.0.0.0/24", "next_hop": "10.0.2.1"},
@@ -75,7 +95,9 @@
                 "r3": {"ipv4": "auto", "pim": "enable"}
             },
             "pim": {
-                "rp": [{"rp_addr": "1.0.2.17", "group_addr_range": ["224.0.0.0/4"]}]
+                "join-prune-interval": "5",
+                "keep-alive-timer": 15,
+                "register-suppress-time": 12
             },
             "static_routes": [
                 {"network": "10.0.0.0/24", "next_hop": "10.0.3.1"},
                 {"network": "1.0.3.17/32", "next_hop": "10.0.5.1"}
             ]
         },
-        "r5": {"links": {"r3": {"ipv4": "auto"}}}
+        "r5": {
+            "links": {
+                "r3": {"ipv4": "auto"}
+            }
+        }
     }
 }
index d73e8dc9e82020e505aa02701a285ef285eb15fd..736cb1659c344a3f5e58c3c23d85c1c45872fdfe 100755 (executable)
@@ -153,6 +153,9 @@ from lib.pim import (
     clear_ip_mroute_verify,
 )
 
+pytestmark = [pytest.mark.pimd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology and configuration creation
 jsonFile = "{}/multicast_pim_static_rp.json".format(CWD)
 try:
index 1687961f34af57013799ff3d59314ef8ed459abd..f59e3ae1b98e123103f9192e18987ee5f5276980 100644 (file)
@@ -45,6 +45,8 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.nhrpd]
+
 
 class NHRPTopo(Topo):
     "Test topology builder"
@@ -115,7 +117,7 @@ def setup_module(mod):
             )
 
     # Initialize all routers.
-    logger.info('Launching BGP, NHRP')
+    logger.info('Launching NHRP')
     for name in router_list:
         router = tgen.gears[name]
         router.start()
diff --git a/tests/topotests/ospf-sr-te-topo1/dst/zebra.conf b/tests/topotests/ospf-sr-te-topo1/dst/zebra.conf
deleted file mode 100644 (file)
index 4cb50fd..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-log file zebra.log
-!
-hostname dst
-!
-debug zebra kernel
-debug zebra packet
-debug zebra mpls
-!
-interface lo
- ip address 9.9.9.2/32
- ipv6 address 2001:db8:1066::2/128
-!
-interface eth-rt6
- ip address 10.0.11.2/24
- link-params
-  enable
-  exit-link-params
-!
-!
-ip forwarding
-!
-line vty
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt1/bgpd.conf b/tests/topotests/ospf-sr-te-topo1/rt1/bgpd.conf
deleted file mode 100644 (file)
index efc0370..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-log file bgpd.log
-!
-router bgp 1
- bgp router-id 1.1.1.1
- neighbor 6.6.6.6 remote-as 1
- neighbor 6.6.6.6 update-source lo
- !
- address-family ipv4 unicast
-  redistribute static
-  neighbor 6.6.6.6 next-hop-self
-  neighbor 6.6.6.6 route-map SET_SR_POLICY in
- exit-address-family
-!
-route-map SET_SR_POLICY permit 10
- set sr-te color 1
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt1/ospfd.conf b/tests/topotests/ospf-sr-te-topo1/rt1/ospfd.conf
deleted file mode 100644 (file)
index 225ac93..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-password 1
-hostname rt1
-log file ospfd.log
-!
-debug ospf sr
-debug ospf te
-debug ospf event
-debug ospf lsa
-debug ospf zebra
-!
-interface lo
- ip ospf area 0.0.0.0
-!
-interface eth-sw1
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-router ospf
- ospf router-id 1.1.1.1
- network 1.1.1.1/32 area 0.0.0.0
- network 10.0.0.0/16 area 0.0.0.0
- capability opaque
- !ospf opaque-lsa
- mpls-te on
- mpls-te export
- mpls-te router-address 1.1.1.1
- router-info area 0.0.0.0
- passive-interface lo
- segment-routing on
- segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
- segment-routing node-msd 8
- segment-routing prefix 1.1.1.1/32 index 10
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt1/pathd.conf b/tests/topotests/ospf-sr-te-topo1/rt1/pathd.conf
deleted file mode 100644 (file)
index 55d5857..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-log file pathd.log
-!
-hostname rt1
-!
-segment-routing
- traffic-eng
-  mpls-te on
-   mpls-te import ospfv2
-  segment-list default
-   index 10  nai adjacency 10.0.1.1 10.0.1.2
-   index 20  nai adjacency 10.0.2.2 10.0.2.4
-   index 30  nai adjacency 10.0.7.4 10.0.7.6
-
-
-  !
-  segment-list test
-   index 10  nai adjacency 10.0.1.1 10.0.1.2
-   index 20  nai adjacency 10.0.2.2 10.0.2.4
-   index 30  nai adjacency 10.0.6.4 10.0.6.5
-   index 40  nai adjacency 10.0.8.5 10.0.8.6
-  !
-  policy color 1 endpoint 6.6.6.6
-   name default
-   binding-sid 1111
-  !
- !
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt1/step2/show_operational_data.ref b/tests/topotests/ospf-sr-te-topo1/rt1/step2/show_operational_data.ref
deleted file mode 100644 (file)
index 4ef8d94..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "frr-pathd:pathd": {
-    "srte": {
-      "policy": [
-        {
-          "color": 1,
-          "endpoint": "6.6.6.6",
-          "is-operational": false
-        }
-      ]
-    }
-  }
-}
diff --git a/tests/topotests/ospf-sr-te-topo1/rt1/step2/show_operational_data_with_candidate.ref b/tests/topotests/ospf-sr-te-topo1/rt1/step2/show_operational_data_with_candidate.ref
deleted file mode 100644 (file)
index 9b28f6a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "frr-pathd:pathd": {
-    "srte": {
-      "policy": [
-        {
-          "color": 1,
-          "endpoint": "6.6.6.6",
-          "is-operational": true,
-          "candidate-path": [
-            {
-              "preference": 100,
-              "discriminator": "*",
-              "is-best-candidate-path": true
-            }
-          ]
-        }
-      ]
-    }
-  }
-}
diff --git a/tests/topotests/ospf-sr-te-topo1/rt1/step3/show_operational_data_with_single_candidate.ref b/tests/topotests/ospf-sr-te-topo1/rt1/step3/show_operational_data_with_single_candidate.ref
deleted file mode 100644 (file)
index 9b28f6a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-{
-  "frr-pathd:pathd": {
-    "srte": {
-      "policy": [
-        {
-          "color": 1,
-          "endpoint": "6.6.6.6",
-          "is-operational": true,
-          "candidate-path": [
-            {
-              "preference": 100,
-              "discriminator": "*",
-              "is-best-candidate-path": true
-            }
-          ]
-        }
-      ]
-    }
-  }
-}
diff --git a/tests/topotests/ospf-sr-te-topo1/rt1/step3/show_operational_data_with_two_candidates.ref b/tests/topotests/ospf-sr-te-topo1/rt1/step3/show_operational_data_with_two_candidates.ref
deleted file mode 100644 (file)
index 2491171..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-{
-  "frr-pathd:pathd": {
-    "srte": {
-      "policy": [
-        {
-          "color": 1,
-          "endpoint": "6.6.6.6",
-          "is-operational": true,
-          "candidate-path": [
-            {
-              "preference": 100,
-              "discriminator": "*",
-              "is-best-candidate-path": false
-            },
-            {
-              "preference": 200,
-              "discriminator": "*",
-              "is-best-candidate-path": true
-            }
-          ]
-        }
-      ]
-    }
-  }
-}
diff --git a/tests/topotests/ospf-sr-te-topo1/rt1/zebra.conf b/tests/topotests/ospf-sr-te-topo1/rt1/zebra.conf
deleted file mode 100644 (file)
index dd686ea..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-log file zebra.log
-!
-hostname rt1
-!
-debug zebra kernel
-debug zebra packet
-debug zebra mpls
-!
-interface lo
- ip address 1.1.1.1/32
-!
-interface eth-sw1
- ip address 10.0.1.1/24
- link-params
-  enable
-  exit-link-params
-!
-ip forwarding
-!
-line vty
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt2/ospfd.conf b/tests/topotests/ospf-sr-te-topo1/rt2/ospfd.conf
deleted file mode 100644 (file)
index f6a7bbb..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-hostname rt2
-log file ospfd.log
-!
-debug ospf sr
-debug ospf te
-debug ospf event
-debug ospf lsa
-debug ospf zebra
-!
-interface lo
- ip ospf area 0.0.0.0
-!
-interface eth-sw1
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt4-1
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt4-2
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-router ospf
- ospf router-id 2.2.2.2
- network 2.2.2.2/32 area 0.0.0.0
- network 10.0.0.0/16 area 0.0.0.0
- capability opaque
- !ospf opaque-lsa
- mpls-te on
- !mpls-te export
- mpls-te router-address 2.2.2.2
- router-info area 0.0.0.0
- passive-interface lo
- segment-routing on
- segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
- segment-routing node-msd 8
- segment-routing prefix 2.2.2.2/32 index 20
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt2/zebra.conf b/tests/topotests/ospf-sr-te-topo1/rt2/zebra.conf
deleted file mode 100644 (file)
index ddd50ba..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-log file zebra.log
-!
-hostname rt2
-!
-debug zebra kernel
-debug zebra packet
-debug zebra mpls
-!
-interface lo
- ip address 2.2.2.2/32
-!
-interface eth-sw1
- ip address 10.0.1.2/24
- link-params
-  enable
-  exit-link-params
-!
-interface eth-rt4-1
- ip address 10.0.2.2/24
- link-params
-  enable
-  exit-link-params
-!
-!
-interface eth-rt4-2
- ip address 10.0.3.2/24
- link-params
-  enable
-  exit-link-params
-!
-!
-ip forwarding
-!
-line vty
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt3/ospfd.conf b/tests/topotests/ospf-sr-te-topo1/rt3/ospfd.conf
deleted file mode 100644 (file)
index 5f71cd8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-hostname rt3
-log file ospfd.log
-!
-debug ospf sr
-debug ospf te
-debug ospf event
-debug ospf lsa
-debug ospf zebra
-!
-interface lo
- ip ospf area 0.0.0.0
-!
-interface eth-sw1
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt5-1
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt5-2
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-router ospf
- ospf router-id 3.3.3.3
- network 3.3.3.3/32 area 0.0.0.0
- network 10.0.0.0/16 area 0.0.0.0
- capability opaque
- !ospf opaque-lsa
- mpls-te on
- !mpls-te export
- mpls-te router-address 3.3.3.3
- router-info area 0.0.0.0
- segment-routing on
- segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
- segment-routing node-msd 8
- segment-routing prefix 3.3.3.3/32 index 30
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt3/zebra.conf b/tests/topotests/ospf-sr-te-topo1/rt3/zebra.conf
deleted file mode 100644 (file)
index 0825b5c..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-log file zebra.log
-!
-hostname rt3
-!
-debug zebra kernel
-debug zebra packet
-debug zebra mpls
-!
-interface lo
- ip address 3.3.3.3/32
-!
-interface eth-sw1
- ip address 10.0.1.3/24
- link-params
-  enable
-  exit-link-params
-!!
-interface eth-rt5-1
- ip address 10.0.4.3/24
- link-params
-  enable
-  exit-link-params
-!!
-interface eth-rt5-2
- ip address 10.0.5.3/24
- link-params
-  enable
-  exit-link-params
-!!
-ip forwarding
-!
-line vty
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt4/ospfd.conf b/tests/topotests/ospf-sr-te-topo1/rt4/ospfd.conf
deleted file mode 100644 (file)
index d4862cd..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-hostname rt4
-log file ospfd.log
-!
-debug ospf sr
-debug ospf te
-debug ospf event
-debug ospf lsa
-debug ospf zebra
-!
-interface lo
- ip ospf area 0.0.0.0
-!
-interface eth-rt2-1
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt2-2
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt5
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt6
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-router ospf
- ospf router-id 4.4.4.4
- network 4.4.4.4/32 area 0.0.0.0
- network 10.0.0.0/16 area 0.0.0.0
- capability opaque
- !ospf opaque-lsa
- mpls-te on
- !mpls-te export
- mpls-te router-address 4.4.4.4
- router-info area 0.0.0.0
- passive-interface lo
- segment-routing on
- segment-routing global-block 16000 23999
- !segment-routing local-block 15000 15999
- segment-routing node-msd 8
- segment-routing prefix 4.4.4.4/32 index 40
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt4/zebra.conf b/tests/topotests/ospf-sr-te-topo1/rt4/zebra.conf
deleted file mode 100644 (file)
index c6d1f4f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-log file zebra.log
-!
-hostname rt4
-!
-debug zebra kernel
-debug zebra packet
-debug zebra mpls
-!
-interface lo
- ip address 4.4.4.4/32
-!
-interface eth-rt2-1
- ip address 10.0.2.4/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-interface eth-rt2-2
- ip address 10.0.3.4/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-interface eth-rt5
- ip address 10.0.6.4/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-interface eth-rt6
- ip address 10.0.7.4/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-ip forwarding
-!
-line vty
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt5/ospfd.conf b/tests/topotests/ospf-sr-te-topo1/rt5/ospfd.conf
deleted file mode 100644 (file)
index fdc0dcf..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-hostname rt5
-log file ospfd.log
-!
-debug ospf sr
-debug ospf te
-debug ospf event
-debug ospf lsa
-debug ospf zebra
-!
-interface lo
- ip ospf area 0.0.0.0
-!
-interface eth-rt3-1
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt3-2
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt4
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt6
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-router ospf
- ospf router-id 5.5.5.5
- network 5.5.5.5/32 area 0.0.0.0
- network 10.0.0.0/16 area 0.0.0.0
- capability opaque
-! ospf opaque-lsa
- mpls-te on
-! mpls-te export
- mpls-te router-address 5.5.5.5
- router-info area 0.0.0.0
- passive-interface lo
- segment-routing on
- segment-routing global-block 16000 23999
-! segment-routing local-block 15000 15999
- segment-routing node-msd 8
- segment-routing prefix 5.5.5.5/32 index 50
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt5/zebra.conf b/tests/topotests/ospf-sr-te-topo1/rt5/zebra.conf
deleted file mode 100644 (file)
index 96b732d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-log file zebra.log
-!
-hostname rt5
-!
-debug zebra kernel
-debug zebra packet
-debug zebra mpls
-!
-interface lo
- ip address 5.5.5.5/32
-!
-interface eth-rt3-1
- ip address 10.0.4.5/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-interface eth-rt3-2
- ip address 10.0.5.5/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-interface eth-rt4
- ip address 10.0.6.5/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-interface eth-rt6
- ip address 10.0.8.5/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-ip forwarding
-!
-line vty
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt6/bgpd.conf b/tests/topotests/ospf-sr-te-topo1/rt6/bgpd.conf
deleted file mode 100644 (file)
index e72ee52..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-log file bgpd.log
-!
-router bgp 1
- bgp router-id 6.6.6.6
- neighbor 1.1.1.1 remote-as 1
- neighbor 1.1.1.1 update-source lo
- !
- address-family ipv4 unicast
-  redistribute static
-  neighbor 1.1.1.1 next-hop-self
- exit-address-family
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt6/ospfd.conf b/tests/topotests/ospf-sr-te-topo1/rt6/ospfd.conf
deleted file mode 100644 (file)
index c06565b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-hostname rt6
-log file ospfd.log
-!
-debug ospf sr
-debug ospf te
-debug ospf event
-debug ospf lsa
-debug ospf zebra
-!
-interface lo
- ip ospf area 0.0.0.0
-!
-interface eth-rt4
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-interface eth-rt5
-  ip ospf network point-to-point
-  ip ospf hello-interval 2
-  ip ospf dead-interval 10
-  ip ospf area 0.0.0.0
-!
-router ospf
- ospf router-id 6.6.6.6
- network 6.6.6.6/32 area 0.0.0.0
- network 10.0.0.0/16 area 0.0.0.0
- capability opaque
-! ospf opaque-lsa
- mpls-te on
- mpls-te export
- mpls-te router-address 6.6.6.6
- router-info area 0.0.0.0
- passive-interface lo
- segment-routing on
- segment-routing global-block 16000 23999
-! segment-routing local-block 15000 15999
- segment-routing node-msd 8
- segment-routing prefix 6.6.6.6/32 index 60
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt6/pathd.conf b/tests/topotests/ospf-sr-te-topo1/rt6/pathd.conf
deleted file mode 100644 (file)
index 696df22..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-log file pathd.log
-!
-hostname rt6
-!
-segment-routing
- traffic-eng
-  mpls-te on
-   mpls-te import ospfv2
-  segment-list default
-   index 10  nai adjacency 10.0.7.6 10.0.7.4
-   index 20  nai adjacency 10.0.2.4 10.0.2.2
-   index 30  nai adjacency 10.0.1.2 10.0.1.1
-  !
-  segment-list test
-   index 10  nai adjacency 10.0.8.6 10.0.8.5
-   index 20  nai adjacency 10.0.6.5 10.0.6.4
-   index 30  nai adjacency 10.0.2.4 10.0.2.2
-   index 40  nai adjacency 10.0.1.2 10.0.1.1
-  !
-  policy color 1 endpoint 1.1.1.1
-   name default
-   binding-sid 6666
-  !
- !
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/rt6/step2/show_operational_data.ref b/tests/topotests/ospf-sr-te-topo1/rt6/step2/show_operational_data.ref
deleted file mode 100644 (file)
index 241c80b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "frr-pathd:pathd": {
-    "srte": {
-        "policy": [
-        {
-          "color": 1,
-          "endpoint": "1.1.1.1",
-          "is-operational": false
-        }
-      ]
-    }
-  }
-}
diff --git a/tests/topotests/ospf-sr-te-topo1/rt6/step2/show_operational_data_with_candidate.ref b/tests/topotests/ospf-sr-te-topo1/rt6/step2/show_operational_data_with_candidate.ref
deleted file mode 100644 (file)
index 20ea69e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-  "frr-pathd:pathd": {
-    "srte": {
-      "policy": [
-        {
-          "color": 1,
-          "endpoint": "1.1.1.1",
-          "is-operational": true,
-          "candidate-path": [
-            {
-              "preference": 100,
-              "is-best-candidate-path": true
-            }
-          ]
-        }
-      ]
-    }
-  }
-}
diff --git a/tests/topotests/ospf-sr-te-topo1/rt6/step3/show_operational_data_with_single_candidate.ref b/tests/topotests/ospf-sr-te-topo1/rt6/step3/show_operational_data_with_single_candidate.ref
deleted file mode 100644 (file)
index 20ea69e..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-  "frr-pathd:pathd": {
-    "srte": {
-      "policy": [
-        {
-          "color": 1,
-          "endpoint": "1.1.1.1",
-          "is-operational": true,
-          "candidate-path": [
-            {
-              "preference": 100,
-              "is-best-candidate-path": true
-            }
-          ]
-        }
-      ]
-    }
-  }
-}
diff --git a/tests/topotests/ospf-sr-te-topo1/rt6/step3/show_operational_data_with_two_candidates.ref b/tests/topotests/ospf-sr-te-topo1/rt6/step3/show_operational_data_with_two_candidates.ref
deleted file mode 100644 (file)
index 10cafe9..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-{
-  "frr-pathd:pathd": {
-    "srte": {
-      "policy": [
-        {
-          "color": 1,
-          "endpoint": "1.1.1.1",
-          "is-operational": true,
-          "candidate-path": [
-            {
-              "preference": 100,
-              "is-best-candidate-path": false
-            },
-            {
-              "preference": 200,
-              "is-best-candidate-path": true
-            }
-          ]
-        }
-      ]
-    }
-  }
-}
diff --git a/tests/topotests/ospf-sr-te-topo1/rt6/zebra.conf b/tests/topotests/ospf-sr-te-topo1/rt6/zebra.conf
deleted file mode 100644 (file)
index 360837c..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-log file zebra.log
-!
-hostname rt6
-!
-debug zebra kernel
-debug zebra packet
-debug zebra mpls
-!
-interface lo
- ip address 6.6.6.6/32
-!
-interface eth-rt4
- ip address 10.0.7.6/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-interface eth-rt5
- ip address 10.0.8.6/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-interface eth-dst
- ip address 10.0.11.1/24
- link-params
-  enable
-  exit-link-params
-!!
-!
-ip forwarding
-!
-ip route 9.9.9.2/32 10.0.11.2
-!
-line vty
-!
diff --git a/tests/topotests/ospf-sr-te-topo1/test_ospf_sr_te_topo1.py b/tests/topotests/ospf-sr-te-topo1/test_ospf_sr_te_topo1.py
deleted file mode 100755 (executable)
index 6c1122a..0000000
+++ /dev/null
@@ -1,640 +0,0 @@
-#!/usr/bin/env python
-
-#
-# test_ospf_sr_te_topo1.py
-#
-# Copyright (c) 2021 by
-# Volta Networks
-#
-# Permission to use, copy, modify, and/or distribute this software
-# for any purpose with or without fee is hereby granted, provided
-# that the above copyright notice and this permission notice appear
-# in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
-# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
-# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
-# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
-# OF THIS SOFTWARE.
-#
-
-"""
-test_ospf_sr_te_topo1.py:
-
-                         +---------+
-                         |         |
-                         |   RT1   |
-                         | 1.1.1.1 |
-                         |         |
-                         +---------+
-                              |eth-sw1
-                              |
-                              |
-                              |
-         +---------+          |          +---------+
-         |         |          |          |         |
-         |   RT2   |eth-sw1   |   eth-sw1|   RT3   |
-         | 2.2.2.2 +----------+          + 3.3.3.3 |
-         |         |     10.0.1.0/24     |         |
-         +---------+                     +---------+
-    eth-rt4-1|                      eth-rt5-1|  |eth-rt5-2
-             |                               |  |
-  10.0.2.0/24|                    10.0.4.0/24|  |10.0.5.0/24
-             |                               |  |
-    eth-rt2-1|                      eth-rt3-1|  |eth-rt3-2
-         +---------+                     +---------+
-         |         |                     |         |
-         |   RT4   |     10.0.6.0/24     |   RT5   |
-         | 4.4.4.4 +---------------------+ 5.5.5.5 |
-         |         |eth-rt5       eth-rt4|         |
-         +---------+                     +---------+
-       eth-rt6|                                |eth-rt6
-              |                                |
-   10.0.7.0/24|                                |10.0.8.0/24
-              |          +---------+           |
-              |          |         |           |
-              |          |   RT6   |           |
-              +----------+ 6.6.6.6 +-----------+
-                  eth-rt4|         |eth-rt5
-                         +---------+
-                              |eth-dst (.1)
-                              |
-                              |10.0.11.0/24
-                              |
-                              |eth-rt6 (.2)
-                         +---------+
-                         |         |
-                         |   DST   |
-                         | 9.9.9.2 |
-                         |         |
-                         +---------+
-
-"""
-
-import os
-import sys
-import pytest
-import json
-import re
-from time import sleep
-from functools import partial
-
-# Save the Current Working Directory to find configuration files.
-CWD = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(CWD, "../"))
-
-# pylint: disable=C0413
-# Import topogen and topotest helpers
-from lib import topotest
-from lib.topogen import Topogen, TopoRouter, get_topogen
-from lib.topolog import logger
-
-# Required to instantiate the topology builder class.
-from mininet.topo import Topo
-
-pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd, pytest.mark.pathd]
-
-
-class TemplateTopo(Topo):
-    "Test topology builder"
-
-    def build(self, *_args, **_opts):
-        "Build function"
-        tgen = get_topogen(self)
-
-        #
-        # Define FRR Routers
-        #
-        for router in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6", "dst"]:
-            tgen.add_router(router)
-
-        #
-        # Define connections
-        #
-        switch = tgen.add_switch("s1")
-        switch.add_link(tgen.gears["rt1"], nodeif="eth-sw1")
-        switch.add_link(tgen.gears["rt2"], nodeif="eth-sw1")
-        #switch.add_link(tgen.gears["rt3"], nodeif="eth-sw1")
-
-        switch = tgen.add_switch("s2")
-        switch.add_link(tgen.gears["rt2"], nodeif="eth-rt4-1")
-        switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2-1")
-
-        #switch = tgen.add_switch("s3")
-        #switch.add_link(tgen.gears["rt2"], nodeif="eth-rt4-2")
-        #switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2-2")
-
-        switch = tgen.add_switch("s4")
-        switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5-1")
-        switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3-1")
-
-        switch = tgen.add_switch("s5")
-        switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5-2")
-        switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3-2")
-
-        switch = tgen.add_switch("s6")
-        switch.add_link(tgen.gears["rt4"], nodeif="eth-rt5")
-        switch.add_link(tgen.gears["rt5"], nodeif="eth-rt4")
-
-        switch = tgen.add_switch("s7")
-        switch.add_link(tgen.gears["rt4"], nodeif="eth-rt6")
-        switch.add_link(tgen.gears["rt6"], nodeif="eth-rt4")
-
-        switch = tgen.add_switch("s8")
-        switch.add_link(tgen.gears["rt5"], nodeif="eth-rt6")
-        switch.add_link(tgen.gears["rt6"], nodeif="eth-rt5")
-
-        switch = tgen.add_switch("s9")
-        switch.add_link(tgen.gears["rt6"], nodeif="eth-dst")
-        switch.add_link(tgen.gears["dst"], nodeif="eth-rt6")
-
-
-def setup_module(mod):
-    "Sets up the pytest environment"
-
-    tgen = Topogen(TemplateTopo, mod.__name__)
-
-    frrdir = tgen.config.get(tgen.CONFIG_SECTION, "frrdir")
-    if not os.path.isfile(os.path.join(frrdir, "pathd")):
-        pytest.skip("pathd daemon wasn't built in:"+frrdir)
-
-    tgen.start_topology()
-
-    router_list = tgen.routers()
-
-    # For all registered routers, load the zebra configuration file
-    for rname, router in router_list.items():
-        router.load_config(
-            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
-        )
-        router.load_config(
-            TopoRouter.RD_OSPF, os.path.join(CWD, "{}/ospfd.conf".format(rname))
-        )
-        router.load_config(
-            TopoRouter.RD_PATH, os.path.join(CWD, "{}/pathd.conf".format(rname))
-        )
-        router.load_config(
-            TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname))
-        )
-
-    tgen.start_router()
-
-
-def teardown_module(mod):
-    "Teardown the pytest environment"
-    tgen = get_topogen()
-
-    # This function tears down the whole topology.
-    tgen.stop_topology()
-
-
-def setup_testcase(msg):
-    logger.info(msg)
-    tgen = get_topogen()
-
-    # Skip if previous fatal error condition is raised
-    if tgen.routers_have_failure():
-        pytest.skip(tgen.errors)
-
-    return tgen
-
-
-def print_cmd_result(rname, command):
-    print(get_topogen().gears[rname].vtysh_cmd(command, isjson=False))
-
-
-def compare_json_test(router, command, reference, exact):
-    output = router.vtysh_cmd(command, isjson=True)
-    result = topotest.json_cmp(output, reference)
-
-    # Note: topotest.json_cmp() just checks on inclusion of keys.
-    # For exact matching also compare the other way around.
-    if not result and exact:
-        return topotest.json_cmp(reference, output)
-    else:
-        return result
-
-
-def cmp_json_output(rname, command, reference, exact=False):
-    "Compare router JSON output"
-
-    logger.info('Comparing router "%s" "%s" output', rname, command)
-
-    tgen = get_topogen()
-    filename = "{}/{}/{}".format(CWD, rname, reference)
-    expected = json.loads(open(filename).read())
-
-    # Run test function until we get an result. Wait at most 60 seconds.
-    test_func = partial(compare_json_test, tgen.gears[rname], command, expected, exact)
-    _, diff = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
-    assertmsg = '"{}" JSON output mismatches the expected result'.format(rname)
-    assert diff is None, assertmsg
-
-
-def cmp_json_output_exact(rname, command, reference):
-    return cmp_json_output(rname, command, reference, True)
-
-
-def add_candidate_path(rname, endpoint, pref, name, segment_list="default"):
-    get_topogen().net[rname].cmd(
-        """ \
-        vtysh -c "conf t" \
-              -c "segment-routing" \
-              -c "traffic-eng" \
-              -c "policy color 1 endpoint """
-        + endpoint
-        + """" \
-              -c "candidate-path preference """
-        + str(pref)
-        + """ name """
-        + name
-        + """ explicit segment-list """
-        + segment_list
-        + '''"'''
-    )
-
-
-def delete_candidate_path(rname, endpoint, pref):
-    get_topogen().net[rname].cmd(
-        """ \
-        vtysh -c "conf t" \
-              -c "segment-routing" \
-              -c "traffic-eng" \
-              -c "policy color 1 endpoint """
-        + endpoint
-        + """" \
-              -c "no candidate-path preference """
-        + str(pref)
-        + '''"'''
-    )
-
-
-def add_segment(rname, name, index, label):
-    get_topogen().net[rname].cmd(
-        """ \
-        vtysh -c "conf t" \
-              -c "segment-routing" \
-              -c "traffic-eng" \
-              -c "segment-list """
-        + name
-        + """" \
-              -c "index """
-        + str(index)
-        + """ mpls label """
-        + str(label)
-        + '''"'''
-    )
-
-
-def delete_segment(rname, name, index):
-    get_topogen().net[rname].cmd(
-        """ \
-        vtysh -c "conf t" \
-              -c "segment-routing" \
-              -c "traffic-eng" \
-              -c "segment-list """
-        + name
-        + """" \
-              -c "no index """
-        + str(index)
-        + '''"'''
-    )
-
-
-def add_segment_adj(rname, name, index, src, dst):
-    get_topogen().net[rname].cmd(
-        """ \
-        vtysh -c "conf t" \
-              -c "segment-routing" \
-              -c "traffic-eng" \
-              -c "segment-list """
-        + name
-        + """" \
-              -c "index """
-        + str(index)
-        + """ nai adjacency """
-        + str(src)
-        + """ """
-        + str(dst)
-        + '''"'''
-    )
-
-
-def create_sr_policy(rname, endpoint, bsid):
-    get_topogen().net[rname].cmd(
-        """ \
-        vtysh -c "conf t" \
-              -c "segment-routing" \
-              -c "traffic-eng" \
-              -c "policy color 1 endpoint """
-        + endpoint
-        + """" \
-              -c "name default" \
-              -c "binding-sid """
-        + str(bsid)
-        + '''"'''
-    )
-
-
-def delete_sr_policy(rname, endpoint):
-    get_topogen().net[rname].cmd(
-        """ \
-        vtysh -c "conf t" \
-              -c "segment-routing" \
-              -c "traffic-eng" \
-              -c "no policy color 1 endpoint """
-        + endpoint
-        + '''"'''
-    )
-
-
-def create_prefix_sid(rname, prefix, sid):
-    get_topogen().net[rname].cmd(
-        """ \
-        vtysh -c "conf t" \
-              -c "router ospf " \
-              -c "segment-routing prefix """
-        + prefix
-        + " index "
-        + str(sid)
-        + '''"'''
-    )
-
-
-def delete_prefix_sid(rname, prefix):
-    get_topogen().net[rname].cmd(
-        ''' \
-        vtysh -c "conf t" \
-              -c "router ospf " \
-              -c "no segment-routing prefix "'''
-        + prefix
-    )
-
-
-def check_bsid(rt, bsid, fn_name, positive):
-    """
-    Search for a bsid in rt1 and rt6
-    Positive means that check is true is bsid is found
-    Positive="False" means that check is true is bsid is NOT found
-    """
-
-    logger.info('Checking "%s" bsid "%s" for router "%s" ', positive, bsid, rt)
-
-    count = 0
-    candidate_key = bsid
-    candidate_output = ""
-    # First wait for convergence
-    tgen = get_topogen()
-    while count < 30:
-        matched = False
-        matched_key = False
-        sleep(1)
-        count += 1
-        router = tgen.gears[rt]
-        candidate_output = router.vtysh_cmd("show mpls table json")
-        candidate_output_json = json.loads(candidate_output)
-        for item in candidate_output_json.items():
-                # logger.info('item "%s"', item)
-                if item[0] == candidate_key:
-                    matched_key = True
-                    if positive:
-                        break
-        if positive:
-            if matched_key:
-                matched = True
-            assertmsg = "{} don't has entry {} but is was expected".format(
-                 router.name, candidate_key)
-        else:
-            if not matched_key:
-                matched = True
-            assertmsg = "{} has entry {} but is wans't expected".format(
-                router.name, candidate_key)
-        if matched:
-            logger.info('Success "%s" in "%s"', router.name, fn_name)
-            return
-    assert matched, assertmsg
-
-
-#
-# Step 1
-#
-# Checking the MPLS table using a single SR Policy and a single Candidate Path
-# Segment list are base in adjacency that query TED
-#
-def test_srte_init_step1():
-    setup_testcase("Test (step 1): wait OSPF convergence / label distribution")
-
-    check_bsid("rt1", "1111", test_srte_init_step1.__name__, False)
-    check_bsid("rt6", "6666", test_srte_init_step1.__name__, False)
-
-
-def test_srte_add_candidate_check_mpls_table_step1():
-    setup_testcase("Test (step 1): check MPLS table regarding the added Candidate Path")
-
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        add_candidate_path(rname, endpoint, 100, "default")
-        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
-        delete_candidate_path(rname, endpoint, 100)
-
-
-def test_srte_reinstall_sr_policy_check_mpls_table_step1():
-    setup_testcase(
-        "Test (step 1): check MPLS table after the SR Policy was removed and reinstalled"
-    )
-
-    for rname, endpoint, bsid in [("rt1", "6.6.6.6", 1111), ("rt6", "1.1.1.1", 6666)]:
-        add_candidate_path(rname, endpoint, 100, "default")
-        delete_sr_policy(rname, endpoint)
-        check_bsid(rname, bsid, test_srte_init_step1.__name__, False)
-        create_sr_policy(rname, endpoint, bsid)
-        add_candidate_path(rname, endpoint, 100, "default")
-        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
-        delete_candidate_path(rname, endpoint, 100)
-
-
-#
-# Step 2
-#
-# Checking pathd operational data using a single SR Policy and a single Candidate Path
-# Segment list are base in adjacency that query TED
-#
-def test_srte_bare_policy_step2():
-    setup_testcase("Test (step 2): bare SR Policy should not be operational")
-
-    for rname in ["rt1", "rt6"]:
-        cmp_json_output_exact(
-            rname,
-            "show yang operational-data /frr-pathd:pathd pathd",
-            "step2/show_operational_data.ref",
-        )
-
-
-def test_srte_add_candidate_check_operational_data_step2():
-    setup_testcase(
-        "Test (step 2): add single Candidate Path, SR Policy should be operational"
-    )
-
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        add_candidate_path(rname, endpoint, 100, "default")
-        cmp_json_output(
-            rname,
-            "show yang operational-data /frr-pathd:pathd pathd",
-            "step2/show_operational_data_with_candidate.ref",
-        )
-
-
-def test_srte_config_remove_candidate_check_operational_data_step2():
-    setup_testcase(
-        "Test (step 2): remove single Candidate Path, SR Policy should not be operational anymore"
-    )
-
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        delete_candidate_path(rname, endpoint, 100)
-        cmp_json_output_exact(
-            rname,
-            "show yang operational-data /frr-pathd:pathd pathd",
-            "step2/show_operational_data.ref",
-        )
-
-
-#
-# Step 3
-#
-# Testing the Candidate Path selection
-# Segment list are based in adjacencies resolved by query TED
-#
-def test_srte_add_two_candidates_step3():
-    setup_testcase("Test (step 3): second Candidate Path has higher Priority")
-
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        for pref, cand_name in [("100", "first"), ("200", "second")]:
-            add_candidate_path(rname, endpoint, pref, cand_name)
-        cmp_json_output(
-            rname,
-            "show yang operational-data /frr-pathd:pathd pathd",
-            "step3/show_operational_data_with_two_candidates.ref",
-        )
-
-    # cleanup
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        for pref in ["100", "200"]:
-            delete_candidate_path(rname, endpoint, pref)
-
-
-def test_srte_add_two_candidates_with_reverse_priority_step3():
-    setup_testcase("Test (step 3): second Candidate Path has lower Priority")
-
-    # Use reversed priorities here
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        for pref, cand_name in [("200", "first"), ("100", "second")]:
-            add_candidate_path(rname, endpoint, pref, cand_name)
-        cmp_json_output(
-            rname,
-            "show yang operational-data /frr-pathd:pathd pathd",
-            "step3/show_operational_data_with_two_candidates.ref",
-        )
-
-    # cleanup
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        for pref in ["100", "200"]:
-            delete_candidate_path(rname, endpoint, pref)
-
-
-def test_srte_remove_best_candidate_step3():
-    setup_testcase("Test (step 3): delete the Candidate Path with higher priority")
-
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        for pref, cand_name in [("100", "first"), ("200", "second")]:
-            add_candidate_path(rname, endpoint, pref, cand_name)
-
-    # Delete candidate with higher priority
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        delete_candidate_path(rname, endpoint, 200)
-
-    # Candidate with lower priority should get active now
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        cmp_json_output(
-            rname,
-            "show yang operational-data /frr-pathd:pathd pathd",
-            "step3/show_operational_data_with_single_candidate.ref",
-        )
-        # cleanup
-        delete_candidate_path(rname, endpoint, 100)
-
-
-#
-# Step 4
-#
-# Checking MPLS table with a single SR Policy and a Candidate Path with different Segment Lists and other modifications
-# Segment list are base in adjacency that query TED
-#
-def test_srte_change_segment_list_check_mpls_table_step4():
-    setup_testcase("Test (step 4): check MPLS table for changed Segment List")
-
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        add_candidate_path(rname, endpoint, 100, "default")
-        # now change the segment list name
-        add_candidate_path(rname, endpoint, 100, "default", "test")
-        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
-        delete_segment(rname, "test", 10)
-        delete_segment(rname, "test", 20)
-        delete_segment(rname, "test", 30)
-        delete_segment(rname, "test", 40)
-        if rname == "rt1":
-            add_segment_adj(rname, "test", 10, "10.0.1.1", "10.0.1.2")
-            add_segment_adj(rname, "test", 20, "10.0.2.2", "10.0.2.4")
-            add_segment_adj(rname, "test", 30, "10.0.6.4", "10.0.6.5")
-            add_segment_adj(rname, "test", 40, "10.0.8.5", "10.0.8.6")
-        else:
-            add_segment_adj(rname, "test", 10, "10.0.8.6", "10.0.8.5")
-            add_segment_adj(rname, "test", 20, "10.0.6.5", "10.0.6.4")
-            add_segment_adj(rname, "test", 30, "10.0.2.4", "10.0.2.2")
-            add_segment_adj(rname, "test", 40, "10.0.1.2", "10.0.1.1")
-        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
-        delete_candidate_path(rname, endpoint, 100)
-
-
-def test_srte_change_sl_priority_error_ted_check_mpls_table_step4():
-    setup_testcase("Test (step 4): check MPLS table keeps low prio sl")
-
-    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
-        add_candidate_path(rname, endpoint, 100, "default")
-        # now change the segment list name
-        add_candidate_path(rname, endpoint, 200, "test", "test")
-        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
-        delete_segment(rname, "test", 10)
-        delete_segment(rname, "test", 20)
-        delete_segment(rname, "test", 30)
-        delete_segment(rname, "test", 40)
-        # These won't resolv
-        if rname == "rt1":
-            add_segment_adj(rname, "test", 10, "10.0.1.99", "10.0.1.99")
-            add_segment_adj(rname, "test", 20, "10.0.2.99", "10.0.2.99")
-            add_segment_adj(rname, "test", 30, "10.0.6.99", "10.0.6.99")
-            add_segment_adj(rname, "test", 40, "10.0.8.99", "10.0.8.99")
-        else:
-            add_segment_adj(rname, "test", 10, "10.0.8.99", "10.0.8.99")
-            add_segment_adj(rname, "test", 20, "10.0.6.99", "10.0.6.99")
-            add_segment_adj(rname, "test", 30, "10.0.2.99", "10.0.2.99")
-            add_segment_adj(rname, "test", 40, "10.0.1.99", "10.0.1.99")
-        # So policy sticks with default sl even higher prio
-        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
-        delete_candidate_path(rname, endpoint, 100)
-
-
-# Memory leak test template
-def test_memory_leak():
-    "Run the memory leak test and report results."
-    tgen = get_topogen()
-    if not tgen.is_memleak_enabled():
-        pytest.skip("Memory leak test/report is disabled")
-
-    tgen.report_memory_leaks()
-
-
-if __name__ == "__main__":
-    args = ["-s"] + sys.argv[1:]
-    sys.exit(pytest.main(args))
index bbd18a57ff4adb6d12b77339007735cbf78abd13..8a6544734a5166daa48ebc1ed644c51b02666369 100644 (file)
@@ -91,6 +91,9 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 import platform
 
+pytestmark = [pytest.mark.ospfd]
+
+
 #####################################################
 ##
 ##   Network Topology Definition
index b158099d9a7373073394e4c482294c89c26576ba..61a80cc9ec416dfa1239385ed39ca0f5ac8345e9 100755 (executable)
@@ -94,6 +94,9 @@ from lib.topolog import logger
 from lib.topotest import iproute2_is_vrf_capable
 from lib.common_config import required_linux_kernel_version
 
+pytestmark = [pytest.mark.ospfd]
+
+
 #####################################################
 ##
 ##   Network Topology Definition
index c403fcd8dc978174fbed5db947384ad2e8ba33ae..2e465e6d1f6ee5e503b4afe2086d852309ad1066 100644 (file)
@@ -1,3 +1,28 @@
+debug ospf6 lsa router
+debug ospf6 lsa router originate
+debug ospf6 lsa router examine
+debug ospf6 lsa router flooding
+debug ospf6 lsa as-external
+debug ospf6 lsa as-external originate
+debug ospf6 lsa as-external examine
+debug ospf6 lsa as-external flooding
+debug ospf6 lsa intra-prefix
+debug ospf6 lsa intra-prefix originate
+debug ospf6 lsa intra-prefix examine
+debug ospf6 lsa intra-prefix flooding
+debug ospf6 border-routers
+debug ospf6 zebra
+debug ospf6 interface
+debug ospf6 neighbor
+debug ospf6 flooding
+debug ospf6 gr helper
+debug ospf6 spf process
+debug ospf6 route intra-area
+debug ospf6 route inter-area
+debug ospf6 abr
+debug ospf6 asbr
+debug ospf6 nssa
+!
 interface r1-eth0
  ipv6 ospf6 hello-interval 2
  ipv6 ospf6 dead-interval 10
index e88e965c78333f35cbb80d55273d138e2acb7ad6..4a1d10693dba60d8e48c42e0b8d1ea26f4a6b447 100644 (file)
@@ -1,3 +1,28 @@
+debug ospf6 lsa router
+debug ospf6 lsa router originate
+debug ospf6 lsa router examine
+debug ospf6 lsa router flooding
+debug ospf6 lsa as-external
+debug ospf6 lsa as-external originate
+debug ospf6 lsa as-external examine
+debug ospf6 lsa as-external flooding
+debug ospf6 lsa intra-prefix
+debug ospf6 lsa intra-prefix originate
+debug ospf6 lsa intra-prefix examine
+debug ospf6 lsa intra-prefix flooding
+debug ospf6 border-routers
+debug ospf6 zebra
+debug ospf6 interface
+debug ospf6 neighbor
+debug ospf6 flooding
+debug ospf6 gr helper
+debug ospf6 spf process
+debug ospf6 route intra-area
+debug ospf6 route inter-area
+debug ospf6 abr
+debug ospf6 asbr
+debug ospf6 nssa
+!
 interface r2-eth0
  ipv6 ospf6 hello-interval 2
  ipv6 ospf6 dead-interval 10
index aaef00d5bbfef327fdb3afd8af59b2d15dfcf097..5faeb70e56e0d8a0f4e25c540b2fafac166a1012 100644 (file)
@@ -1,3 +1,28 @@
+debug ospf6 lsa router
+debug ospf6 lsa router originate
+debug ospf6 lsa router examine
+debug ospf6 lsa router flooding
+debug ospf6 lsa as-external
+debug ospf6 lsa as-external originate
+debug ospf6 lsa as-external examine
+debug ospf6 lsa as-external flooding
+debug ospf6 lsa intra-prefix
+debug ospf6 lsa intra-prefix originate
+debug ospf6 lsa intra-prefix examine
+debug ospf6 lsa intra-prefix flooding
+debug ospf6 border-routers
+debug ospf6 zebra
+debug ospf6 interface
+debug ospf6 neighbor
+debug ospf6 flooding
+debug ospf6 gr helper
+debug ospf6 spf process
+debug ospf6 route intra-area
+debug ospf6 route inter-area
+debug ospf6 abr
+debug ospf6 asbr
+debug ospf6 nssa
+!
 interface r3-eth0
  ipv6 ospf6 hello-interval 2
  ipv6 ospf6 dead-interval 10
index 813c0abff208e4c13e0e9b1adc4d3b4cf245e607..04d763f6a81512b8a03e3bda6ffc2cb08c55d389 100644 (file)
@@ -1,3 +1,28 @@
+debug ospf6 lsa router
+debug ospf6 lsa router originate
+debug ospf6 lsa router examine
+debug ospf6 lsa router flooding
+debug ospf6 lsa as-external
+debug ospf6 lsa as-external originate
+debug ospf6 lsa as-external examine
+debug ospf6 lsa as-external flooding
+debug ospf6 lsa intra-prefix
+debug ospf6 lsa intra-prefix originate
+debug ospf6 lsa intra-prefix examine
+debug ospf6 lsa intra-prefix flooding
+debug ospf6 border-routers
+debug ospf6 zebra
+debug ospf6 interface
+debug ospf6 neighbor
+debug ospf6 flooding
+debug ospf6 gr helper
+debug ospf6 spf process
+debug ospf6 route intra-area
+debug ospf6 route inter-area
+debug ospf6 abr
+debug ospf6 asbr
+debug ospf6 nssa
+!
 interface r4-eth0
  ipv6 ospf6 hello-interval 2
  ipv6 ospf6 dead-interval 10
index 0fe5228ce63acf5b7d0fcecb4f97053cc0590d0b..8c5f1e6f607615301745fb194994b674e0c50fc7 100644 (file)
@@ -73,15 +73,20 @@ def expect_lsas(router, area, lsas, wait=5, extra_params=""):
     assert result is None, assertmsg
 
 
-def expect_ospfv3_routes(router, routes, wait=5):
+def expect_ospfv3_routes(router, routes, wait=5, detail=False):
     "Run command `ipv6 ospf6 route` and expect route with type."
     tgen = get_topogen()
 
+    if detail == False:
+        cmd = "show ipv6 ospf6 route json"
+    else:
+        cmd = "show ipv6 ospf6 route detail json"
+
     logger.info("waiting OSPFv3 router '{}' route".format(router))
     test_func = partial(
         topotest.router_json_cmp,
         tgen.gears[router],
-        "show ipv6 ospf6 route json",
+        cmd,
         {"routes": routes}
     )
     _, result = topotest.run_and_expect(test_func, None, count=wait, wait=1)
@@ -199,7 +204,7 @@ def test_ospfv3_expected_route_types():
         {
             "numberOfIntraAreaRoutes": 1,
             "numberOfInterAreaRoutes": 2,
-            "numberOfExternal1Routes": 0,
+            "numberOfExternal1Routes": 4,
             "numberOfExternal2Routes": 0,
         },
     )
@@ -236,6 +241,51 @@ def test_ospf6_default_route():
     expect_route("r1", "::/0", metric + 10)
 
 
+def test_redistribute_metrics():
+    """
+    Test that the configured metrics are honored when a static route is
+    redistributed.
+    """
+    tgen = get_topogen()
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    # Add new static route on r3.
+    config = """
+    configure terminal
+    ipv6 route 2001:db8:500::/64 Null0
+    """
+    tgen.gears["r3"].vtysh_cmd(config)
+
+    route = {
+        "2001:db8:500::/64": {
+            "metricType":2, 
+            "metricCost":10,
+        }
+    }
+    logger.info("Expecting AS-external route 2001:db8:500::/64 to show up with default metrics")
+    expect_ospfv3_routes("r2", route, wait=30, detail=True)
+
+    # Change the metric of redistributed routes of the static type on r3.
+    config = """
+    configure terminal
+    router ospf6
+    redistribute static metric 50 metric-type 1
+    """
+    tgen.gears["r3"].vtysh_cmd(config)
+
+    # Check if r3 reinstalled 2001:db8:500::/64 using the new metric type and value.
+    route = {
+        "2001:db8:500::/64": {
+            "metricType":1, 
+            "metricCost":60,
+        }
+    }
+    logger.info("Expecting AS-external route 2001:db8:500::/64 to show up with updated metric type and value")
+    expect_ospfv3_routes("r2", route, wait=30, detail=True)
+
+
+
 def test_nssa_lsa_type7():
     """
     Test that static route gets announced as external route when redistributed
index 41960ac79f7e8ce9d64461f801f8fb2e3ca88fd7..a3f1bc76ffec17ad3591b60fc795d6a4a0250b64 100644 (file)
@@ -70,6 +70,9 @@ from lib.ospf import (
     verify_ospf_summary,
 )
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 # Reading the data from JSON File for topology creation
@@ -1381,7 +1384,7 @@ def test_ospf_type5_summary_tc45_p0(request):
 
     step("Verify that summary lsa is withdrawn from R1 and deleted from R0.")
     dut = "r1"
-    result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
+    result = verify_ospf_rib(tgen, dut, input_dict_summary, expected=False)
     assert (
         result is not True
     ), "Testcase {} : Failed \n Error: " "Routes still present in OSPF RIB {}".format(
index 393eb19a53f27c9c0feb3965546b157fba5b57c6..db177360b447a851f4efff42eb7ee8fbd4b84969 100644 (file)
@@ -70,6 +70,9 @@ from lib.ospf import (
     verify_ospf_summary,
 )
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 # Reading the data from JSON File for topology creation
index a7f2893eab260a21bbd44685138427aed7a5c469..bdba8fd8e423f17a1568319467cad7973c6995be 100644 (file)
@@ -56,6 +56,9 @@ from lib.topojson import build_topo_from_json, build_config_from_json
 from lib.ospf import verify_ospf_neighbor, config_ospf_interface, clear_ospf
 from ipaddress import IPv4Address
 
+pytestmark = [pytest.mark.ospfd]
+
+
 # Global variables
 topo = None
 # Reading the data from JSON File for topology creation
index 49ecaac9f78c83535804d421b7ed0cb7750257a7..5c57f8be25583d9b3157572082ecadd941331dea 100644 (file)
@@ -68,6 +68,9 @@ from lib.ospf import (
     redistribute_ospf,
 )
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 topo = None
 
 # Reading the data from JSON File for topology creation
index 47c6c45e391cdc5c13854afde2a87c8d03e66e6d..96f781c150e8b6e374082d45c2fe8489c010fc32 100644 (file)
@@ -70,6 +70,9 @@ from lib.ospf import (
 )
 from ipaddress import IPv4Address
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 # Reading the data from JSON File for topology creation
index d9b90a132af07282fc748872549a588a5f569ac7..c89a663380f9b9d4b5c67877c08777cc68194608 100644 (file)
@@ -71,6 +71,9 @@ from lib.ospf import (
 )
 from ipaddress import IPv4Address
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 # Reading the data from JSON File for topology creation
index 3644bff3dcaeff9839aec7acb8e9ec6aa2980716..0af83548b9d7e51b4e7fa933d3ab43567a31d0ac 100644 (file)
@@ -63,6 +63,9 @@ sys.path.append(os.path.join(CWD, "../lib/"))
 # pylint: disable=C0413
 # Import topogen and topotest helpers
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 # Reading the data from JSON File for topology creation
index be18ba5a783d5ba7081b115049ac291312376c28..0172f589c52ad7853668e7143d2ffb33883015eb 100644 (file)
@@ -68,6 +68,9 @@ from lib.ospf import (
     verify_ospf_database,
 )
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 
index 0848f6c94afa28dba2f92d0d50f2d2b7568ad1cf..066f53aa58ef42dcba5a314c68af6d85f0a0d8ac 100644 (file)
@@ -53,6 +53,7 @@ from lib.common_config import (
     create_route_maps,
     verify_prefix_lists,
     topo_daemons,
+    shutdown_bringup_interface
 )
 from lib.topolog import logger
 from lib.topojson import build_topo_from_json, build_config_from_json
@@ -65,6 +66,9 @@ from lib.ospf import (
     redistribute_ospf,
 )
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 # Reading the data from JSON File for topology creation
@@ -1043,6 +1047,336 @@ def test_ospf_routemaps_functionality_tc24_p0(request):
     write_test_footer(tc_name)
 
 
+def test_ospf_routemaps_functionality_tc25_p0(request):
+    """
+    OSPF route map support functionality.
+
+    Verify OSPF route map support functionality
+    when route map actions are toggled.
+
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    global topo
+    step("Bring up the base config as per the topology")
+
+    reset_config_on_routers(tgen)
+
+    step(
+        "Create static routes(10.0.20.1/32) in R1 and redistribute "
+        "to OSPF using route map.")
+
+    # Create Static routes
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK['ipv4'][0],
+                    "no_of_ip": 5,
+                    "next_hop": 'Null0',
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    ospf_red_r0 = {
+        "r0": {
+            "ospf": {
+                "redistribute": [{
+                    "redist_type": "static",
+                    "route_map": "rmap_ipv4"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_red_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+    step("Configure route map with permit rule")
+    # Create route map
+    routemaps = {
+    "r0": {
+        "route_maps": {
+            "rmap_ipv4": [{
+                "action": "permit"
+            }]
+        }
+    }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step("Verify that route is advertised to R1.")
+    dut = 'r1'
+    protocol = 'ospf'
+    result = verify_ospf_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+    step("Configure route map with deny rule")
+    # Create route map
+    routemaps = {
+    "r0": {
+        "route_maps": {
+            "rmap_ipv4": [{
+                "seq_id": 10,
+                "action": "deny"
+            }]
+        }
+    }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    # Api call verify whether OSPF is converged
+    ospf_covergence = verify_ospf_neighbor(tgen, topo)
+    assert ospf_covergence is True, ("setup_module :Failed \n Error:"
+                                      " {}".format(ospf_covergence))
+
+    step("Verify that route is not advertised to R1.")
+    dut = 'r1'
+    protocol = 'ospf'
+    result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol,
+                            expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_ospf_routemaps_functionality_tc22_p0(request):
+    """
+    OSPF Route map - Multiple sequence numbers.
+
+    Verify OSPF route map support  functionality with multiple sequence
+    numbers in a single  route-map for different match/set clauses.
+
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    global topo
+    step("Bring up the base config as per the topology")
+
+    reset_config_on_routers(tgen)
+
+    step(
+        "Configure route map with seq number 10 to with ip prefix"
+        " permitting route 10.0.20.1/32 in R1")
+    step(
+        "Configure route map with seq number 20 to with  ip prefix"
+        "  permitting route 10.0.20.2/32 in R1")
+
+    # Create route map
+    input_dict_3 = {
+    "r0": {
+        "route_maps": {
+            "rmap_ipv4": [{
+                    "action": "permit",
+                    'seq_id': '10',
+                    "match": {
+                        "ipv4": {
+                        "prefix_lists": "pf_list_1_ipv4"
+                    }
+                    }
+                },
+                {
+                    "action": "permit",
+                    'seq_id': '20',
+                    "match": {
+                        "ipv4": {
+                        "prefix_lists": "pf_list_2_ipv4"
+                    }
+                    }
+                }
+            ]
+        }
+    }
+    }
+    result = create_route_maps(tgen, input_dict_3)
+    assert result is True, 'Testcase {} : Failed \n Error: {}'.format(
+        tc_name, result)
+
+    # Create ip prefix list
+    input_dict_2 = {
+        'r0': {
+            'prefix_lists': {
+                'ipv4': {
+                'pf_list_1_ipv4': [{
+                    'seqid': 10,
+                    'network': NETWORK['ipv4'][0],
+                    'action': 'permit'
+                }]
+            }
+            }
+        }
+    }
+    result = create_prefix_lists(tgen, input_dict_2)
+    assert result is True, 'Testcase {} : Failed \n Error: {}'.format(
+        tc_name, result)
+
+    # Create ip prefix list
+    input_dict_2 = {
+        'r0': {
+            'prefix_lists': {
+                'ipv4': {
+                'pf_list_2_ipv4': [{
+                    'seqid': 10,
+                    'network': NETWORK['ipv4'][1],
+                    'action': 'permit'
+                }]
+            }
+            }
+        }
+    }
+    result = create_prefix_lists(tgen, input_dict_2)
+    assert result is True, 'Testcase {} : Failed \n Error: {}'.format(
+        tc_name, result)
+
+    step("Configure static routes 10.0.20.1/32 and 10.0.20.2 in R1")
+    # Create Static routes
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK['ipv4'][0],
+                    "no_of_ip": 5,
+                    "next_hop": 'Null0',
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step("Configure redistribute static route with route map.")
+    ospf_red_r0 = {
+        "r0": {
+            "ospf": {
+                "redistribute": [{
+                    "redist_type": "static",
+                    "route_map": "rmap_ipv4"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_red_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK['ipv4'][0],
+                    "no_of_ip": 2,
+                    "next_hop": 'Null0',
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step("Verify that both routes are learned in R1 and R2")
+    dut = 'r1'
+    protocol = 'ospf'
+    result = verify_ospf_rib(tgen, dut, input_dict)
+    assert result is  True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol)
+    assert result is  True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    dut = 'r2'
+    protocol = 'ospf'
+    result = verify_ospf_rib(tgen, dut, input_dict)
+    assert result is  True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol)
+    assert result is  True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step("Change route map with seq number 20 to deny.")
+    # Create route map
+    input_dict_3 = {
+    "r0": {
+        "route_maps": {
+            "rmap_ipv4": [
+                {
+                    "action": "deny",
+                    'seq_id': '20',
+                    "match": {
+                        "ipv4": {
+                        "prefix_lists": "pf_list_2_ipv4"
+                    }
+                    }
+                }
+            ]
+        }
+    }
+    }
+    result = create_route_maps(tgen, input_dict_3)
+    assert result is True, 'Testcase {} : Failed \n Error: {}'.format(
+        tc_name, result)
+
+    step(
+        "Verify the route 10.0.20.2/32 is withdrawn and not present "
+        "in the routing table of R0 and R1.")
+
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK['ipv4'][1],
+                    "next_hop": 'Null0'
+                }
+            ]
+        }
+    }
+
+    dut = 'r1'
+    protocol = 'ospf'
+    result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol,
+                        expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    dut = 'r2'
+    protocol = 'ospf'
+    result = verify_ospf_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv4", dut, input_dict, protocol=protocol,
+                        expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    write_test_footer(tc_name)
+
+
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]
     sys.exit(pytest.main(args))
index f17346d5b1dd6a2484dfa857e8552c7489fcc9a8..0e2fef4a2251e2aabd31c2eab125b3fac27704e0 100644 (file)
@@ -66,6 +66,9 @@ from lib.ospf import (
     verify_ospf_interface,
 )
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 
index e94680d974219c56bcd1741caf9118aaf51e74af..0d0668a931aecf3afdef58ff551647e67ccfb440 100644 (file)
@@ -69,6 +69,7 @@ from lib.ospf import (
     verify_ospf_database,
 )
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
 # Global variables
 topo = None
 
@@ -1010,7 +1011,7 @@ def test_ospf_tc4_mtu_ignore_p0(request):
     r0_r1_intf = topo["routers"]["r0"]["links"]["r1"]["interface"]
     r1_r0_intf = topo["routers"]["r1"]["links"]["r0"]["interface"]
 
-    rtr0.run("ifconfig {} mtu 1200".format(r0_r1_intf))
+    rtr0.run("ip link set {} mtu 1200".format(r0_r1_intf))
 
     clear_ospf(tgen, "r0")
 
@@ -1036,7 +1037,7 @@ def test_ospf_tc4_mtu_ignore_p0(request):
         "Modify the MTU to non default Value on R0 to R1 interface. "
         "Reset ospf neighbors on R0."
     )
-    rtr0.run("ifconfig {} mtu 1500".format(r0_r1_intf))
+    rtr0.run("ip link set {} mtu 1500".format(r0_r1_intf))
 
     clear_ospf(tgen, "r0")
 
@@ -1061,7 +1062,7 @@ def test_ospf_tc4_mtu_ignore_p0(request):
     result = config_ospf_interface(tgen, topo, r1_ospf_mtu)
     assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
 
-    rtr0.run("ifconfig {} mtu 1200".format(r0_r1_intf))
+    rtr0.run("ip link set {} mtu 1200".format(r0_r1_intf))
 
     clear_ospf(tgen, "r0")
 
@@ -1075,7 +1076,7 @@ def test_ospf_tc4_mtu_ignore_p0(request):
     )
 
     r1_ospf_mtu = {
-        "r1": {"links": {"r0": {"ospf": {"mtu_ignore": True, "delete": True}}}}
+        "r1": {"links": {"r0": {"ospf": {"mtu_ignore": True, "del_action": True}}}}
     }
     result = config_ospf_interface(tgen, topo, r1_ospf_mtu)
     assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
@@ -1093,7 +1094,7 @@ def test_ospf_tc4_mtu_ignore_p0(request):
 
     step("Modify the MTU to again default valaue on R0 to R1 interface.")
 
-    rtr0.run("ifconfig {} mtu 1500".format(r0_r1_intf))
+    rtr0.run("ip link set {} mtu 1500".format(r0_r1_intf))
 
     clear_ospf(tgen, "r0")
 
@@ -1105,8 +1106,8 @@ def test_ospf_tc4_mtu_ignore_p0(request):
         "Configure ospf interface with jumbo MTU (9216)." "Reset ospf neighbors on R0."
     )
 
-    rtr0.run("ifconfig {} mtu 9216".format(r0_r1_intf))
-    rtr1.run("ifconfig {} mtu 9216".format(r1_r0_intf))
+    rtr0.run("ip link set {} mtu 9216".format(r0_r1_intf))
+    rtr1.run("ip link set {} mtu 9216".format(r1_r0_intf))
 
     clear_ospf(tgen, "r0")
     clear_ospf(tgen, "r1")
index 5e7802fa04294234e5eba026e2de9293a0968509..b5f535cd0687155eefb2d07c4a2bb05e5c9b2057 100644 (file)
@@ -42,6 +42,9 @@ from lib.ospf import (
     verify_ospf_database,
 )
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 
diff --git a/tests/topotests/ospf_gr_helper/ospf_gr_helper.json b/tests/topotests/ospf_gr_helper/ospf_gr_helper.json
new file mode 100644 (file)
index 0000000..efd339e
--- /dev/null
@@ -0,0 +1,119 @@
+{
+    "ipv4base": "10.0.0.0",
+    "ipv4mask": 24,
+    "link_ip_start": {
+        "ipv4": "10.0.0.0",
+        "v4mask": 24
+    },
+    "lo_prefix": {
+        "ipv4": "1.0.",
+        "v4mask": 32
+    },
+    "switches": {
+        "s1": {
+            "links": {
+                "r0": {
+                    "ipv4": "17.1.1.2/24",
+                    "ospf": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 40,
+                        "priority": 98
+                    }
+                },
+                "r1": {
+                    "ipv4": "17.1.1.1/24",
+                    "ospf": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 40,
+                        "priority": 99
+                    }
+                },
+                "r2": {
+                    "ipv4": "17.1.1.3/24",
+                    "ospf": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 40,
+                        "priority": 0
+                    }
+                },
+                "r3": {
+                    "ipv4": "17.1.1.4/24",
+                    "ospf": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 40,
+                        "priority": 0
+                    }
+                }
+            }
+        }
+    },
+    "routers": {
+        "r0": {
+            "links": {
+                "lo": {
+                    "ipv4": "auto",
+                    "type": "loopback"
+                }
+            },
+            "ospf": {
+                "router_id": "100.1.1.0",
+                "neighbors": {
+                    "r1": {},
+                    "r2": {},
+                    "r3": {}
+                }
+            }
+        },
+        "r1": {
+            "links": {
+                "lo": {
+                    "ipv4": "auto",
+                    "type": "loopback"
+                }
+            },
+            "ospf": {
+                "router_id": "1.1.1.1",
+                "neighbors": {
+                    "r0": {},
+                    "r2": {},
+                    "r3": {}
+                }
+            },
+            "opq_lsa_hex": "01005e00000570708bd051ef080045c0005cc18b0000015904f711010101e00000050204004801010101000000001e8d0000000000000000000000000001000102090300000001010101800000013bd1002c000100040000070800020001010000000003000411010101"
+        },
+        "r2": {
+            "links": {
+                "lo": {
+                    "ipv4": "auto",
+                    "type": "loopback"
+                }
+            },
+            "ospf": {
+                "router_id": "100.1.1.2",
+                "neighbors": {
+                    "r1": {},
+                    "r0": {}
+                }
+            }
+        },
+        "r3": {
+            "links": {
+                "lo": {
+                    "ipv4": "auto",
+                    "type": "loopback"
+                }
+            },
+            "ospf": {
+                "router_id": "100.1.1.3",
+                "neighbors": {
+                    "r0": {},
+                    "r1": {}
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/topotests/ospf_gr_helper/test_ospf_gr_helper.py b/tests/topotests/ospf_gr_helper/test_ospf_gr_helper.py
new file mode 100644 (file)
index 0000000..5363822
--- /dev/null
@@ -0,0 +1,752 @@
+#!/usr/bin/python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""OSPF Basic Functionality Automation."""
+import os
+import sys
+import time
+import pytest
+import json
+from time import sleep
+from copy import deepcopy
+import ipaddress
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from mininet.topo import Topo
+from lib.topogen import Topogen, get_topogen
+
+# Import topoJson from lib, to create topology and initial configuration
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    write_test_footer,
+    reset_config_on_routers,
+    verify_rib,
+    create_static_routes,
+    step,
+    create_route_maps,
+    shutdown_bringup_interface,
+    create_interfaces_cfg,
+    topo_daemons,
+    scapy_send_raw_packet
+)
+
+from lib.topolog import logger
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+from lib.ospf import (
+    verify_ospf_neighbor,
+    clear_ospf,
+    verify_ospf_gr_helper,
+    create_router_ospf,
+    verify_ospf_interface,
+    verify_ospf_database,
+)
+
+# Global variables
+topo = None
+Iters = 5
+sw_name = None
+intf = None
+intf1 = None
+pkt = None
+
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/ospf_gr_helper.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+"""
+Topology:
+
+      Please view in a fixed-width font such as Courier.
+      Topo : Broadcast Networks
+      DUT - HR      RR
+        +---+       +---+          +---+           +---+
+        |R0 +       +R1 +          +R2 +           +R3 |
+        +-+-+       +-+-+          +-+-+           +-+-+
+          |           |              |               |
+          |           |              |               |
+        --+-----------+--------------+---------------+-----
+                         Ethernet Segment
+
+Testcases:
+
+TC1.    Verify by default helper support is disabled for FRR ospf
+TC2.    OSPF GR on Broadcast : Verify DUT enters Helper mode when neighbor
+        sends grace lsa, helps RR to restart gracefully (RR = DR)
+TC3.    OSPF GR on Broadcast : Verify DUT enters Helper mode when neighbor
+        sends grace lsa, helps RR to restart gracefully (RR = BDR)
+TC4.    OSPF GR on Broadcast : Verify DUT enters Helper mode when neighbor
+        sends grace lsa, helps RR to restart gracefully (RR = DRother)
+TC5.    OSPF GR on P2P : Verify DUT enters Helper mode when neighbor sends
+        grace lsa, helps RR to restart gracefully.
+TC6.    Verify all the show commands newly introducted as part of ospf
+        helper support - Json Key verification wrt to show commands.
+TC7.    Verify helper when grace lsa is received with different configured
+        value in process level (higher, lower, grace lsa timer above 1800)
+TC8.    Verify helper functionality when dut is helping RR and new grace lsa
+        is received from RR.
+"""
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """
+    Sets up the pytest environment
+
+    * `mod`: module name
+    """
+    global topo, intf, intf1, sw_name, pkt
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+    # ... and here it calls Mininet initialization functions.
+
+    # get list of daemons needs to be started for this suite.
+    daemons = topo_daemons(tgen, topo)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen, daemons)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    ospf_covergence = verify_ospf_neighbor(tgen, topo, lan=True)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    sw_name = topo["switches"].keys()[0]
+    intf = topo["routers"]["r0"]["links"][sw_name]["interface"]
+    intf1 = topo["routers"]["r1"]["links"][sw_name]["interface"]
+    pkt = topo["routers"]["r1"]["opq_lsa_hex"]
+
+    logger.info("Running setup_module() done")
+
+
+def teardown_module():
+    """Teardown the pytest environment"""
+
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    try:
+        # Stop toplogy and Remove tmp files
+        tgen.stop_topology
+
+    except OSError:
+        # OSError exception is raised when mininet tries to stop switch
+        # though switch is stopped once but mininet tries to stop same
+        # switch again, where it ended up with exception
+        pass
+
+
+def delete_ospf():
+    """delete ospf process after each test"""
+    tgen = get_topogen()
+    step("Delete ospf process")
+    for rtr in topo["routers"]:
+        ospf_del = {rtr: {"ospf": {"delete": True}}}
+        result = create_router_ospf(tgen, topo, ospf_del)
+        assert result is True, "Testcase: Failed \n Error: {}".format(result)
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+
+
+def test_ospf_gr_helper_tc1_p0(request):
+    """Verify by default helper support is disabled for FRR ospf"""
+
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo, intf, intf1, pkt
+
+    step("Bring up the base config as per the topology")
+    reset_config_on_routers(tgen)
+    ospf_covergence = verify_ospf_neighbor(tgen, topo, lan=True)
+    assert (
+        ospf_covergence is True
+    ), "OSPF is not after reset config \n Error:" " {}".format(ospf_covergence)
+
+    step("Verify that GR helper route is disabled by default to the in" "the DUT.")
+    input_dict = {
+        "helperSupport": "Disabled",
+        "strictLsaCheck": "Enabled",
+        "restartSupoort": "Planned and Unplanned Restarts",
+        "supportedGracePeriod": 1800,
+    }
+    dut = "r0"
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that DUT does not enter helper mode upon receiving the " "grace lsa.")
+
+    # send grace lsa
+    scapy_send_raw_packet(tgen, topo, "r1", intf1, pkt)
+
+    input_dict = {"activeRestarterCnt": 1}
+    dut = "r0"
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed. DUT entered helper role " " \n Error: {}".format(
+        tc_name, result
+    )
+
+    step("Configure graceful restart in the DUT")
+    ospf_gr_r0 = {
+        "r0": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that GR helper route is enabled in the DUT.")
+    input_dict = {
+        "helperSupport": "Enabled",
+        "strictLsaCheck": "Enabled",
+        "restartSupoort": "Planned and Unplanned Restarts",
+        "supportedGracePeriod": 1800,
+    }
+    dut = "r0"
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_gr_r1 = {
+        "r1": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Perform GR in RR.")
+    step("Verify that DUT does enter helper mode upon receiving" " the grace lsa.")
+    input_dict = {"activeRestarterCnt": 1}
+    gracelsa_sent = False
+    repeat = 0
+    dut = "r0"
+    while not gracelsa_sent and repeat < Iters:
+        gracelsa_sent = scapy_send_raw_packet(tgen, topo, "r1", intf1, pkt)
+        result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+        if isinstance(result, str):
+            repeat += 1
+            gracelsa_sent = False
+
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Unconfigure the GR helper command.")
+    ospf_gr_r0 = {
+        "r0": {
+            "ospf": {
+                "graceful-restart": {"helper-only": [], "opaque": True, "delete": True}
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    input_dict = {"helperSupport": "Disabled"}
+    dut = "r0"
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Configure gr helper using the router id")
+    ospf_gr_r0 = {
+        "r0": {
+            "ospf": {"graceful-restart": {"helper-only": ["1.1.1.1"], "opaque": True}}
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that DUT does enter helper mode upon receiving" " the grace lsa.")
+    input_dict = {"activeRestarterCnt": 1}
+    gracelsa_sent = False
+    repeat = 0
+    dut = "r0"
+    while not gracelsa_sent and repeat < Iters:
+        gracelsa_sent = scapy_send_raw_packet(tgen, topo, "r1", intf1, pkt)
+        result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+        if isinstance(result, str):
+            repeat += 1
+            gracelsa_sent = False
+
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Un Configure gr helper using the router id")
+    ospf_gr_r0 = {
+        "r0": {
+            "ospf": {
+                "graceful-restart": {
+                    "helper-only": ["1.1.1.1"],
+                    "opaque": True,
+                    "delete": True,
+                }
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that GR helper router is disabled in the DUT for" " router id x.x.x.x")
+    input_dict = {"enabledRouterIds": [{"routerId": "1.1.1.1"}]}
+    dut = "r0"
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed, Helper role enabled for RR\n Error: {}".format(
+        tc_name, result
+    )
+    delete_ospf()
+    write_test_footer(tc_name)
+
+
+def test_ospf_gr_helper_tc2_p0(request):
+    """
+    OSPF GR on Broadcast : Verify DUT enters Helper mode when neighbor
+    sends grace lsa, helps RR to restart gracefully (RR = DR)
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo, intf, intf1, pkt
+
+    step("Bring up the base config as per the topology")
+    step(
+        "Configure DR priority as 99 in RR , DUT dr priority = 98 "
+        "& reset ospf process in all the routers"
+    )
+    reset_config_on_routers(tgen)
+    ospf_covergence = verify_ospf_neighbor(tgen, topo, lan=True)
+    assert (
+        ospf_covergence is True
+    ), "OSPF is not after reset config \n Error:" " {}".format(ospf_covergence)
+    ospf_gr_r0 = {
+        "r0": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_gr_r1 = {
+        "r1": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that DUT enters into helper mode.")
+
+    input_dict = {"activeRestarterCnt": 1}
+    gracelsa_sent = False
+    repeat = 0
+    dut = "r0"
+    while not gracelsa_sent and repeat < Iters:
+        gracelsa_sent = scapy_send_raw_packet(tgen, topo, "r1", intf1, pkt)
+        result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+        if isinstance(result, str):
+            repeat += 1
+            gracelsa_sent = False
+
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    delete_ospf()
+    write_test_footer(tc_name)
+
+
+def test_ospf_gr_helper_tc3_p1(request):
+    """
+    OSPF GR on Broadcast : Verify DUT enters Helper mode when neighbor
+    sends grace lsa, helps RR to restart gracefully (RR = BDR)
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo, intf, intf1, pkt
+
+    step("Bring up the base config as per the topology")
+    step(
+        "Configure DR priority as 99 in RR , DUT dr priority = 98 "
+        "& reset ospf process in all the routers"
+    )
+    reset_config_on_routers(tgen)
+    ospf_covergence = verify_ospf_neighbor(tgen, topo, lan=True)
+    assert (
+        ospf_covergence is True
+    ), "OSPF is not after reset config \n Error:" " {}".format(ospf_covergence)
+    step(
+        "Configure DR pririty 100 on R0 and clear ospf neighbors " "on all the routers."
+    )
+
+    input_dict = {
+        "r0": {
+            "links": {
+                sw_name: {
+                    "interface": topo["routers"]["r0"]["links"][sw_name]["interface"],
+                    "ospf": {"priority": 100},
+                }
+            }
+        }
+    }
+
+    result = create_interfaces_cfg(tgen, input_dict)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Clear ospf neighbours in all routers")
+    for rtr in topo["routers"]:
+        clear_ospf(tgen, rtr)
+
+    step("Verify that DR election is triggered and R0 is elected as DR")
+    input_dict = {
+        "r0": {
+            "ospf": {
+                "neighbors": {
+                    "r1": {"state": "Full", "role": "Backup"},
+                    "r2": {"state": "Full", "role": "DROther"},
+                    "r3": {"state": "Full", "role": "DROther"},
+                }
+            }
+        }
+    }
+    dut = "r0"
+    result = verify_ospf_neighbor(tgen, topo, dut, input_dict, lan=True)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_gr_r0 = {
+        "r0": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_gr_r1 = {
+        "r1": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that DUT enters into helper mode.")
+
+    input_dict = {"activeRestarterCnt": 1}
+    gracelsa_sent = False
+    repeat = 0
+    dut = "r0"
+    while not gracelsa_sent and repeat < Iters:
+        gracelsa_sent = scapy_send_raw_packet(tgen, topo, "r1", intf1, pkt)
+        result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+        if isinstance(result, str):
+            repeat += 1
+            gracelsa_sent = False
+
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    delete_ospf()
+    write_test_footer(tc_name)
+
+
+def test_ospf_gr_helper_tc4_p1(request):
+    """
+    OSPF GR on Broadcast : Verify DUT enters Helper mode when neighbor
+    sends grace lsa, helps RR to restart gracefully (RR = DRother)
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo, intf, intf1, pkt
+
+    step("Bring up the base config as per the topology")
+    step(
+        "Configure DR priority as 99 in RR , DUT dr priority = 98 "
+        "& reset ospf process in all the routers"
+    )
+    reset_config_on_routers(tgen)
+    ospf_covergence = verify_ospf_neighbor(tgen, topo, lan=True)
+    assert (
+        ospf_covergence is True
+    ), "OSPF is not after reset config \n Error:" " {}".format(ospf_covergence)
+    step(
+        "Configure DR pririty 100 on R0 and clear ospf neighbors " "on all the routers."
+    )
+
+    input_dict = {
+        "r0": {
+            "links": {
+                sw_name: {
+                    "interface": topo["routers"]["r0"]["links"][sw_name]["interface"],
+                    "ospf": {"priority": 0},
+                }
+            }
+        }
+    }
+
+    result = create_interfaces_cfg(tgen, input_dict)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    step("Clear ospf neighbours in all routers")
+    for rtr in topo["routers"]:
+        clear_ospf(tgen, rtr)
+
+    step("Verify that DR election is triggered and R0 is elected as 2-Way")
+    input_dict = {
+        "r0": {
+            "ospf": {
+                "neighbors": {
+                    "r1": {"state": "Full", "role": "DR"},
+                    "r2": {"state": "2-Way", "role": "DROther"},
+                    "r3": {"state": "2-Way", "role": "DROther"},
+                }
+            }
+        }
+    }
+    dut = "r0"
+    result = verify_ospf_neighbor(tgen, topo, dut, input_dict, lan=True)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_gr_r0 = {
+        "r0": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_gr_r1 = {
+        "r1": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that DUT enters into helper mode.")
+
+    input_dict = {"activeRestarterCnt": 1}
+    gracelsa_sent = False
+    repeat = 0
+    dut = "r0"
+    while not gracelsa_sent and repeat < Iters:
+        gracelsa_sent = scapy_send_raw_packet(tgen, topo, "r1", intf1, pkt)
+        result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+        if isinstance(result, str):
+            repeat += 1
+            gracelsa_sent = False
+
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    delete_ospf()
+
+    write_test_footer(tc_name)
+
+
+def test_ospf_gr_helper_tc7_p1(request):
+    """
+    Test ospf gr helper
+    Verify helper when grace lsa is received with different configured
+    value in process level (higher, lower, grace lsa timer above 1800)
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo, intf, intf1, pkt
+
+    step("Bring up the base config as per the topology")
+    step(
+        "Configure DR priority as 99 in RR , DUT dr priority = 98 "
+        "& reset ospf process in all the routers"
+    )
+    step(
+        "Enable GR on RR and DUT with grace period on RR = 333"
+        "and grace period on DUT = 300"
+    )
+    reset_config_on_routers(tgen)
+    ospf_covergence = verify_ospf_neighbor(tgen, topo, lan=True)
+    assert (
+        ospf_covergence is True
+    ), "OSPF is not after reset config \n Error:" " {}".format(ospf_covergence)
+    ospf_gr_r0 = {
+        "r0": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_gr_r1 = {
+        "r1": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    input_dict = {"supportedGracePeriod": 1800}
+    dut = "r0"
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Configure grace period = 1801 on RR and restart ospf .")
+    grace_period_1801 = "01005e00000570708bd051ef080045c0005cbeb10000015907d111010101e00000050204004801010101000000009714000000000000000000000000000100010209030000000101010180000001c8e9002c000100040000016800020001010000000003000411010101"
+    gracelsa_sent = scapy_send_raw_packet(tgen, topo, "r1", intf1, grace_period_1801)
+
+    step("Verify R0 does not enter helper mode.")
+    input_dict = {"activeRestarterCnt": 1}
+    dut = "r0"
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed. DUT entered helper role " " \n Error: {}".format(
+        tc_name, result
+    )
+
+    delete_ospf()
+
+    write_test_footer(tc_name)
+
+
+def test_ospf_gr_helper_tc8_p1(request):
+    """
+    Test ospf gr helper
+
+    Verify helper functionality when dut is helping RR and new grace lsa
+    is received from RR.
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo, intf, intf1, pkt
+
+    step("Bring up the base config as per the topology")
+    step("Enable GR")
+    reset_config_on_routers(tgen)
+    ospf_covergence = verify_ospf_neighbor(tgen, topo, lan=True)
+    assert (
+        ospf_covergence is True
+    ), "OSPF is not after reset config \n Error:" " {}".format(ospf_covergence)
+    ospf_gr_r0 = {
+        "r0": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_gr_r1 = {
+        "r1": {"ospf": {"graceful-restart": {"helper-only": [], "opaque": True}}}
+    }
+    result = create_router_ospf(tgen, topo, ospf_gr_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    input_dict = {"supportedGracePeriod": 1800}
+    dut = "r0"
+    result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that DUT enters into helper mode.")
+
+    input_dict = {"activeRestarterCnt": 1}
+    gracelsa_sent = False
+    repeat = 0
+    dut = "r0"
+    while not gracelsa_sent and repeat < Iters:
+        gracelsa_sent = scapy_send_raw_packet(tgen, topo, "r1", intf1, pkt)
+        result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+        if isinstance(result, str):
+            repeat += 1
+            gracelsa_sent = False
+
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Send the Grace LSA again to DUT when RR is in GR.")
+    input_dict = {"activeRestarterCnt": 1}
+    gracelsa_sent = False
+    repeat = 0
+    dut = "r0"
+    while not gracelsa_sent and repeat < Iters:
+        gracelsa_sent = scapy_send_raw_packet(tgen, topo, "r1", intf1, pkt)
+        result = verify_ospf_gr_helper(tgen, topo, dut, input_dict)
+        if isinstance(result, str):
+            repeat += 1
+            gracelsa_sent = False
+
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    delete_ospf()
+
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
diff --git a/tests/topotests/ospf_sr_te_topo1/dst/zebra.conf b/tests/topotests/ospf_sr_te_topo1/dst/zebra.conf
new file mode 100644 (file)
index 0000000..4cb50fd
--- /dev/null
@@ -0,0 +1,23 @@
+log file zebra.log
+!
+hostname dst
+!
+debug zebra kernel
+debug zebra packet
+debug zebra mpls
+!
+interface lo
+ ip address 9.9.9.2/32
+ ipv6 address 2001:db8:1066::2/128
+!
+interface eth-rt6
+ ip address 10.0.11.2/24
+ link-params
+  enable
+  exit-link-params
+!
+!
+ip forwarding
+!
+line vty
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/bgpd.conf b/tests/topotests/ospf_sr_te_topo1/rt1/bgpd.conf
new file mode 100644 (file)
index 0000000..efc0370
--- /dev/null
@@ -0,0 +1,16 @@
+log file bgpd.log
+!
+router bgp 1
+ bgp router-id 1.1.1.1
+ neighbor 6.6.6.6 remote-as 1
+ neighbor 6.6.6.6 update-source lo
+ !
+ address-family ipv4 unicast
+  redistribute static
+  neighbor 6.6.6.6 next-hop-self
+  neighbor 6.6.6.6 route-map SET_SR_POLICY in
+ exit-address-family
+!
+route-map SET_SR_POLICY permit 10
+ set sr-te color 1
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt1/ospfd.conf
new file mode 100644 (file)
index 0000000..225ac93
--- /dev/null
@@ -0,0 +1,36 @@
+password 1
+hostname rt1
+log file ospfd.log
+!
+debug ospf sr
+debug ospf te
+debug ospf event
+debug ospf lsa
+debug ospf zebra
+!
+interface lo
+ ip ospf area 0.0.0.0
+!
+interface eth-sw1
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+router ospf
+ ospf router-id 1.1.1.1
+ network 1.1.1.1/32 area 0.0.0.0
+ network 10.0.0.0/16 area 0.0.0.0
+ capability opaque
+ !ospf opaque-lsa
+ mpls-te on
+ mpls-te export
+ mpls-te router-address 1.1.1.1
+ router-info area 0.0.0.0
+ passive-interface lo
+ segment-routing on
+ segment-routing global-block 16000 23999
+ !segment-routing local-block 15000 15999
+ segment-routing node-msd 8
+ segment-routing prefix 1.1.1.1/32 index 10
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/pathd.conf b/tests/topotests/ospf_sr_te_topo1/rt1/pathd.conf
new file mode 100644 (file)
index 0000000..55d5857
--- /dev/null
@@ -0,0 +1,27 @@
+log file pathd.log
+!
+hostname rt1
+!
+segment-routing
+ traffic-eng
+  mpls-te on
+   mpls-te import ospfv2
+  segment-list default
+   index 10  nai adjacency 10.0.1.1 10.0.1.2
+   index 20  nai adjacency 10.0.2.2 10.0.2.4
+   index 30  nai adjacency 10.0.7.4 10.0.7.6
+
+
+  !
+  segment-list test
+   index 10  nai adjacency 10.0.1.1 10.0.1.2
+   index 20  nai adjacency 10.0.2.2 10.0.2.4
+   index 30  nai adjacency 10.0.6.4 10.0.6.5
+   index 40  nai adjacency 10.0.8.5 10.0.8.6
+  !
+  policy color 1 endpoint 6.6.6.6
+   name default
+   binding-sid 1111
+  !
+ !
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/step2/show_operational_data.ref b/tests/topotests/ospf_sr_te_topo1/rt1/step2/show_operational_data.ref
new file mode 100644 (file)
index 0000000..4ef8d94
--- /dev/null
@@ -0,0 +1,13 @@
+{
+  "frr-pathd:pathd": {
+    "srte": {
+      "policy": [
+        {
+          "color": 1,
+          "endpoint": "6.6.6.6",
+          "is-operational": false
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/step2/show_operational_data_with_candidate.ref b/tests/topotests/ospf_sr_te_topo1/rt1/step2/show_operational_data_with_candidate.ref
new file mode 100644 (file)
index 0000000..9b28f6a
--- /dev/null
@@ -0,0 +1,20 @@
+{
+  "frr-pathd:pathd": {
+    "srte": {
+      "policy": [
+        {
+          "color": 1,
+          "endpoint": "6.6.6.6",
+          "is-operational": true,
+          "candidate-path": [
+            {
+              "preference": 100,
+              "discriminator": "*",
+              "is-best-candidate-path": true
+            }
+          ]
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/step3/show_operational_data_with_single_candidate.ref b/tests/topotests/ospf_sr_te_topo1/rt1/step3/show_operational_data_with_single_candidate.ref
new file mode 100644 (file)
index 0000000..9b28f6a
--- /dev/null
@@ -0,0 +1,20 @@
+{
+  "frr-pathd:pathd": {
+    "srte": {
+      "policy": [
+        {
+          "color": 1,
+          "endpoint": "6.6.6.6",
+          "is-operational": true,
+          "candidate-path": [
+            {
+              "preference": 100,
+              "discriminator": "*",
+              "is-best-candidate-path": true
+            }
+          ]
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/step3/show_operational_data_with_two_candidates.ref b/tests/topotests/ospf_sr_te_topo1/rt1/step3/show_operational_data_with_two_candidates.ref
new file mode 100644 (file)
index 0000000..2491171
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "frr-pathd:pathd": {
+    "srte": {
+      "policy": [
+        {
+          "color": 1,
+          "endpoint": "6.6.6.6",
+          "is-operational": true,
+          "candidate-path": [
+            {
+              "preference": 100,
+              "discriminator": "*",
+              "is-best-candidate-path": false
+            },
+            {
+              "preference": 200,
+              "discriminator": "*",
+              "is-best-candidate-path": true
+            }
+          ]
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/ospf_sr_te_topo1/rt1/zebra.conf b/tests/topotests/ospf_sr_te_topo1/rt1/zebra.conf
new file mode 100644 (file)
index 0000000..dd686ea
--- /dev/null
@@ -0,0 +1,21 @@
+log file zebra.log
+!
+hostname rt1
+!
+debug zebra kernel
+debug zebra packet
+debug zebra mpls
+!
+interface lo
+ ip address 1.1.1.1/32
+!
+interface eth-sw1
+ ip address 10.0.1.1/24
+ link-params
+  enable
+  exit-link-params
+!
+ip forwarding
+!
+line vty
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt2/ospfd.conf
new file mode 100644 (file)
index 0000000..f6a7bbb
--- /dev/null
@@ -0,0 +1,47 @@
+hostname rt2
+log file ospfd.log
+!
+debug ospf sr
+debug ospf te
+debug ospf event
+debug ospf lsa
+debug ospf zebra
+!
+interface lo
+ ip ospf area 0.0.0.0
+!
+interface eth-sw1
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt4-1
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt4-2
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+router ospf
+ ospf router-id 2.2.2.2
+ network 2.2.2.2/32 area 0.0.0.0
+ network 10.0.0.0/16 area 0.0.0.0
+ capability opaque
+ !ospf opaque-lsa
+ mpls-te on
+ !mpls-te export
+ mpls-te router-address 2.2.2.2
+ router-info area 0.0.0.0
+ passive-interface lo
+ segment-routing on
+ segment-routing global-block 16000 23999
+ !segment-routing local-block 15000 15999
+ segment-routing node-msd 8
+ segment-routing prefix 2.2.2.2/32 index 20
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt2/zebra.conf b/tests/topotests/ospf_sr_te_topo1/rt2/zebra.conf
new file mode 100644 (file)
index 0000000..ddd50ba
--- /dev/null
@@ -0,0 +1,35 @@
+log file zebra.log
+!
+hostname rt2
+!
+debug zebra kernel
+debug zebra packet
+debug zebra mpls
+!
+interface lo
+ ip address 2.2.2.2/32
+!
+interface eth-sw1
+ ip address 10.0.1.2/24
+ link-params
+  enable
+  exit-link-params
+!
+interface eth-rt4-1
+ ip address 10.0.2.2/24
+ link-params
+  enable
+  exit-link-params
+!
+!
+interface eth-rt4-2
+ ip address 10.0.3.2/24
+ link-params
+  enable
+  exit-link-params
+!
+!
+ip forwarding
+!
+line vty
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt3/ospfd.conf
new file mode 100644 (file)
index 0000000..5f71cd8
--- /dev/null
@@ -0,0 +1,46 @@
+hostname rt3
+log file ospfd.log
+!
+debug ospf sr
+debug ospf te
+debug ospf event
+debug ospf lsa
+debug ospf zebra
+!
+interface lo
+ ip ospf area 0.0.0.0
+!
+interface eth-sw1
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt5-1
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt5-2
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+router ospf
+ ospf router-id 3.3.3.3
+ network 3.3.3.3/32 area 0.0.0.0
+ network 10.0.0.0/16 area 0.0.0.0
+ capability opaque
+ !ospf opaque-lsa
+ mpls-te on
+ !mpls-te export
+ mpls-te router-address 3.3.3.3
+ router-info area 0.0.0.0
+ segment-routing on
+ segment-routing global-block 16000 23999
+ !segment-routing local-block 15000 15999
+ segment-routing node-msd 8
+ segment-routing prefix 3.3.3.3/32 index 30
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt3/zebra.conf b/tests/topotests/ospf_sr_te_topo1/rt3/zebra.conf
new file mode 100644 (file)
index 0000000..0825b5c
--- /dev/null
@@ -0,0 +1,33 @@
+log file zebra.log
+!
+hostname rt3
+!
+debug zebra kernel
+debug zebra packet
+debug zebra mpls
+!
+interface lo
+ ip address 3.3.3.3/32
+!
+interface eth-sw1
+ ip address 10.0.1.3/24
+ link-params
+  enable
+  exit-link-params
+!!
+interface eth-rt5-1
+ ip address 10.0.4.3/24
+ link-params
+  enable
+  exit-link-params
+!!
+interface eth-rt5-2
+ ip address 10.0.5.3/24
+ link-params
+  enable
+  exit-link-params
+!!
+ip forwarding
+!
+line vty
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt4/ospfd.conf
new file mode 100644 (file)
index 0000000..d4862cd
--- /dev/null
@@ -0,0 +1,53 @@
+hostname rt4
+log file ospfd.log
+!
+debug ospf sr
+debug ospf te
+debug ospf event
+debug ospf lsa
+debug ospf zebra
+!
+interface lo
+ ip ospf area 0.0.0.0
+!
+interface eth-rt2-1
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt2-2
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt5
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt6
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+router ospf
+ ospf router-id 4.4.4.4
+ network 4.4.4.4/32 area 0.0.0.0
+ network 10.0.0.0/16 area 0.0.0.0
+ capability opaque
+ !ospf opaque-lsa
+ mpls-te on
+ !mpls-te export
+ mpls-te router-address 4.4.4.4
+ router-info area 0.0.0.0
+ passive-interface lo
+ segment-routing on
+ segment-routing global-block 16000 23999
+ !segment-routing local-block 15000 15999
+ segment-routing node-msd 8
+ segment-routing prefix 4.4.4.4/32 index 40
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt4/zebra.conf b/tests/topotests/ospf_sr_te_topo1/rt4/zebra.conf
new file mode 100644 (file)
index 0000000..c6d1f4f
--- /dev/null
@@ -0,0 +1,43 @@
+log file zebra.log
+!
+hostname rt4
+!
+debug zebra kernel
+debug zebra packet
+debug zebra mpls
+!
+interface lo
+ ip address 4.4.4.4/32
+!
+interface eth-rt2-1
+ ip address 10.0.2.4/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+interface eth-rt2-2
+ ip address 10.0.3.4/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+interface eth-rt5
+ ip address 10.0.6.4/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+interface eth-rt6
+ ip address 10.0.7.4/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+ip forwarding
+!
+line vty
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt5/ospfd.conf
new file mode 100644 (file)
index 0000000..fdc0dcf
--- /dev/null
@@ -0,0 +1,53 @@
+hostname rt5
+log file ospfd.log
+!
+debug ospf sr
+debug ospf te
+debug ospf event
+debug ospf lsa
+debug ospf zebra
+!
+interface lo
+ ip ospf area 0.0.0.0
+!
+interface eth-rt3-1
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt3-2
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt4
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt6
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+router ospf
+ ospf router-id 5.5.5.5
+ network 5.5.5.5/32 area 0.0.0.0
+ network 10.0.0.0/16 area 0.0.0.0
+ capability opaque
+! ospf opaque-lsa
+ mpls-te on
+! mpls-te export
+ mpls-te router-address 5.5.5.5
+ router-info area 0.0.0.0
+ passive-interface lo
+ segment-routing on
+ segment-routing global-block 16000 23999
+! segment-routing local-block 15000 15999
+ segment-routing node-msd 8
+ segment-routing prefix 5.5.5.5/32 index 50
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt5/zebra.conf b/tests/topotests/ospf_sr_te_topo1/rt5/zebra.conf
new file mode 100644 (file)
index 0000000..96b732d
--- /dev/null
@@ -0,0 +1,43 @@
+log file zebra.log
+!
+hostname rt5
+!
+debug zebra kernel
+debug zebra packet
+debug zebra mpls
+!
+interface lo
+ ip address 5.5.5.5/32
+!
+interface eth-rt3-1
+ ip address 10.0.4.5/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+interface eth-rt3-2
+ ip address 10.0.5.5/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+interface eth-rt4
+ ip address 10.0.6.5/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+interface eth-rt6
+ ip address 10.0.8.5/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+ip forwarding
+!
+line vty
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/bgpd.conf b/tests/topotests/ospf_sr_te_topo1/rt6/bgpd.conf
new file mode 100644 (file)
index 0000000..e72ee52
--- /dev/null
@@ -0,0 +1,12 @@
+log file bgpd.log
+!
+router bgp 1
+ bgp router-id 6.6.6.6
+ neighbor 1.1.1.1 remote-as 1
+ neighbor 1.1.1.1 update-source lo
+ !
+ address-family ipv4 unicast
+  redistribute static
+  neighbor 1.1.1.1 next-hop-self
+ exit-address-family
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf b/tests/topotests/ospf_sr_te_topo1/rt6/ospfd.conf
new file mode 100644 (file)
index 0000000..c06565b
--- /dev/null
@@ -0,0 +1,41 @@
+hostname rt6
+log file ospfd.log
+!
+debug ospf sr
+debug ospf te
+debug ospf event
+debug ospf lsa
+debug ospf zebra
+!
+interface lo
+ ip ospf area 0.0.0.0
+!
+interface eth-rt4
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+interface eth-rt5
+  ip ospf network point-to-point
+  ip ospf hello-interval 2
+  ip ospf dead-interval 10
+  ip ospf area 0.0.0.0
+!
+router ospf
+ ospf router-id 6.6.6.6
+ network 6.6.6.6/32 area 0.0.0.0
+ network 10.0.0.0/16 area 0.0.0.0
+ capability opaque
+! ospf opaque-lsa
+ mpls-te on
+ mpls-te export
+ mpls-te router-address 6.6.6.6
+ router-info area 0.0.0.0
+ passive-interface lo
+ segment-routing on
+ segment-routing global-block 16000 23999
+! segment-routing local-block 15000 15999
+ segment-routing node-msd 8
+ segment-routing prefix 6.6.6.6/32 index 60
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/pathd.conf b/tests/topotests/ospf_sr_te_topo1/rt6/pathd.conf
new file mode 100644 (file)
index 0000000..696df22
--- /dev/null
@@ -0,0 +1,25 @@
+log file pathd.log
+!
+hostname rt6
+!
+segment-routing
+ traffic-eng
+  mpls-te on
+   mpls-te import ospfv2
+  segment-list default
+   index 10  nai adjacency 10.0.7.6 10.0.7.4
+   index 20  nai adjacency 10.0.2.4 10.0.2.2
+   index 30  nai adjacency 10.0.1.2 10.0.1.1
+  !
+  segment-list test
+   index 10  nai adjacency 10.0.8.6 10.0.8.5
+   index 20  nai adjacency 10.0.6.5 10.0.6.4
+   index 30  nai adjacency 10.0.2.4 10.0.2.2
+   index 40  nai adjacency 10.0.1.2 10.0.1.1
+  !
+  policy color 1 endpoint 1.1.1.1
+   name default
+   binding-sid 6666
+  !
+ !
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/step2/show_operational_data.ref b/tests/topotests/ospf_sr_te_topo1/rt6/step2/show_operational_data.ref
new file mode 100644 (file)
index 0000000..241c80b
--- /dev/null
@@ -0,0 +1,13 @@
+{
+  "frr-pathd:pathd": {
+    "srte": {
+        "policy": [
+        {
+          "color": 1,
+          "endpoint": "1.1.1.1",
+          "is-operational": false
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/step2/show_operational_data_with_candidate.ref b/tests/topotests/ospf_sr_te_topo1/rt6/step2/show_operational_data_with_candidate.ref
new file mode 100644 (file)
index 0000000..20ea69e
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "frr-pathd:pathd": {
+    "srte": {
+      "policy": [
+        {
+          "color": 1,
+          "endpoint": "1.1.1.1",
+          "is-operational": true,
+          "candidate-path": [
+            {
+              "preference": 100,
+              "is-best-candidate-path": true
+            }
+          ]
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/step3/show_operational_data_with_single_candidate.ref b/tests/topotests/ospf_sr_te_topo1/rt6/step3/show_operational_data_with_single_candidate.ref
new file mode 100644 (file)
index 0000000..20ea69e
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "frr-pathd:pathd": {
+    "srte": {
+      "policy": [
+        {
+          "color": 1,
+          "endpoint": "1.1.1.1",
+          "is-operational": true,
+          "candidate-path": [
+            {
+              "preference": 100,
+              "is-best-candidate-path": true
+            }
+          ]
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/step3/show_operational_data_with_two_candidates.ref b/tests/topotests/ospf_sr_te_topo1/rt6/step3/show_operational_data_with_two_candidates.ref
new file mode 100644 (file)
index 0000000..10cafe9
--- /dev/null
@@ -0,0 +1,23 @@
+{
+  "frr-pathd:pathd": {
+    "srte": {
+      "policy": [
+        {
+          "color": 1,
+          "endpoint": "1.1.1.1",
+          "is-operational": true,
+          "candidate-path": [
+            {
+              "preference": 100,
+              "is-best-candidate-path": false
+            },
+            {
+              "preference": 200,
+              "is-best-candidate-path": true
+            }
+          ]
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/zebra.conf b/tests/topotests/ospf_sr_te_topo1/rt6/zebra.conf
new file mode 100644 (file)
index 0000000..360837c
--- /dev/null
@@ -0,0 +1,38 @@
+log file zebra.log
+!
+hostname rt6
+!
+debug zebra kernel
+debug zebra packet
+debug zebra mpls
+!
+interface lo
+ ip address 6.6.6.6/32
+!
+interface eth-rt4
+ ip address 10.0.7.6/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+interface eth-rt5
+ ip address 10.0.8.6/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+interface eth-dst
+ ip address 10.0.11.1/24
+ link-params
+  enable
+  exit-link-params
+!!
+!
+ip forwarding
+!
+ip route 9.9.9.2/32 10.0.11.2
+!
+line vty
+!
diff --git a/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py b/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py
new file mode 100755 (executable)
index 0000000..6c1122a
--- /dev/null
@@ -0,0 +1,640 @@
+#!/usr/bin/env python
+
+#
+# test_ospf_sr_te_topo1.py
+#
+# Copyright (c) 2021 by
+# Volta Networks
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+"""
+test_ospf_sr_te_topo1.py:
+
+                         +---------+
+                         |         |
+                         |   RT1   |
+                         | 1.1.1.1 |
+                         |         |
+                         +---------+
+                              |eth-sw1
+                              |
+                              |
+                              |
+         +---------+          |          +---------+
+         |         |          |          |         |
+         |   RT2   |eth-sw1   |   eth-sw1|   RT3   |
+         | 2.2.2.2 +----------+          + 3.3.3.3 |
+         |         |     10.0.1.0/24     |         |
+         +---------+                     +---------+
+    eth-rt4-1|                      eth-rt5-1|  |eth-rt5-2
+             |                               |  |
+  10.0.2.0/24|                    10.0.4.0/24|  |10.0.5.0/24
+             |                               |  |
+    eth-rt2-1|                      eth-rt3-1|  |eth-rt3-2
+         +---------+                     +---------+
+         |         |                     |         |
+         |   RT4   |     10.0.6.0/24     |   RT5   |
+         | 4.4.4.4 +---------------------+ 5.5.5.5 |
+         |         |eth-rt5       eth-rt4|         |
+         +---------+                     +---------+
+       eth-rt6|                                |eth-rt6
+              |                                |
+   10.0.7.0/24|                                |10.0.8.0/24
+              |          +---------+           |
+              |          |         |           |
+              |          |   RT6   |           |
+              +----------+ 6.6.6.6 +-----------+
+                  eth-rt4|         |eth-rt5
+                         +---------+
+                              |eth-dst (.1)
+                              |
+                              |10.0.11.0/24
+                              |
+                              |eth-rt6 (.2)
+                         +---------+
+                         |         |
+                         |   DST   |
+                         | 9.9.9.2 |
+                         |         |
+                         +---------+
+
+"""
+
+import os
+import sys
+import pytest
+import json
+import re
+from time import sleep
+from functools import partial
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib import topotest
+from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.topolog import logger
+
+# Required to instantiate the topology builder class.
+from mininet.topo import Topo
+
+pytestmark = [pytest.mark.bgpd, pytest.mark.ospfd, pytest.mark.pathd]
+
+
+class TemplateTopo(Topo):
+    "Test topology builder"
+
+    def build(self, *_args, **_opts):
+        "Build function"
+        tgen = get_topogen(self)
+
+        #
+        # Define FRR Routers
+        #
+        for router in ["rt1", "rt2", "rt3", "rt4", "rt5", "rt6", "dst"]:
+            tgen.add_router(router)
+
+        #
+        # Define connections
+        #
+        switch = tgen.add_switch("s1")
+        switch.add_link(tgen.gears["rt1"], nodeif="eth-sw1")
+        switch.add_link(tgen.gears["rt2"], nodeif="eth-sw1")
+        #switch.add_link(tgen.gears["rt3"], nodeif="eth-sw1")
+
+        switch = tgen.add_switch("s2")
+        switch.add_link(tgen.gears["rt2"], nodeif="eth-rt4-1")
+        switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2-1")
+
+        #switch = tgen.add_switch("s3")
+        #switch.add_link(tgen.gears["rt2"], nodeif="eth-rt4-2")
+        #switch.add_link(tgen.gears["rt4"], nodeif="eth-rt2-2")
+
+        switch = tgen.add_switch("s4")
+        switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5-1")
+        switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3-1")
+
+        switch = tgen.add_switch("s5")
+        switch.add_link(tgen.gears["rt3"], nodeif="eth-rt5-2")
+        switch.add_link(tgen.gears["rt5"], nodeif="eth-rt3-2")
+
+        switch = tgen.add_switch("s6")
+        switch.add_link(tgen.gears["rt4"], nodeif="eth-rt5")
+        switch.add_link(tgen.gears["rt5"], nodeif="eth-rt4")
+
+        switch = tgen.add_switch("s7")
+        switch.add_link(tgen.gears["rt4"], nodeif="eth-rt6")
+        switch.add_link(tgen.gears["rt6"], nodeif="eth-rt4")
+
+        switch = tgen.add_switch("s8")
+        switch.add_link(tgen.gears["rt5"], nodeif="eth-rt6")
+        switch.add_link(tgen.gears["rt6"], nodeif="eth-rt5")
+
+        switch = tgen.add_switch("s9")
+        switch.add_link(tgen.gears["rt6"], nodeif="eth-dst")
+        switch.add_link(tgen.gears["dst"], nodeif="eth-rt6")
+
+
+def setup_module(mod):
+    "Sets up the pytest environment"
+
+    tgen = Topogen(TemplateTopo, mod.__name__)
+
+    frrdir = tgen.config.get(tgen.CONFIG_SECTION, "frrdir")
+    if not os.path.isfile(os.path.join(frrdir, "pathd")):
+        pytest.skip("pathd daemon wasn't built in:"+frrdir)
+
+    tgen.start_topology()
+
+    router_list = tgen.routers()
+
+    # For all registered routers, load the zebra configuration file
+    for rname, router in router_list.items():
+        router.load_config(
+            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
+        )
+        router.load_config(
+            TopoRouter.RD_OSPF, os.path.join(CWD, "{}/ospfd.conf".format(rname))
+        )
+        router.load_config(
+            TopoRouter.RD_PATH, os.path.join(CWD, "{}/pathd.conf".format(rname))
+        )
+        router.load_config(
+            TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname))
+        )
+
+    tgen.start_router()
+
+
+def teardown_module(mod):
+    "Teardown the pytest environment"
+    tgen = get_topogen()
+
+    # This function tears down the whole topology.
+    tgen.stop_topology()
+
+
+def setup_testcase(msg):
+    logger.info(msg)
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    return tgen
+
+
+def print_cmd_result(rname, command):
+    print(get_topogen().gears[rname].vtysh_cmd(command, isjson=False))
+
+
+def compare_json_test(router, command, reference, exact):
+    output = router.vtysh_cmd(command, isjson=True)
+    result = topotest.json_cmp(output, reference)
+
+    # Note: topotest.json_cmp() just checks on inclusion of keys.
+    # For exact matching also compare the other way around.
+    if not result and exact:
+        return topotest.json_cmp(reference, output)
+    else:
+        return result
+
+
+def cmp_json_output(rname, command, reference, exact=False):
+    "Compare router JSON output"
+
+    logger.info('Comparing router "%s" "%s" output', rname, command)
+
+    tgen = get_topogen()
+    filename = "{}/{}/{}".format(CWD, rname, reference)
+    expected = json.loads(open(filename).read())
+
+    # Run test function until we get an result. Wait at most 60 seconds.
+    test_func = partial(compare_json_test, tgen.gears[rname], command, expected, exact)
+    _, diff = topotest.run_and_expect(test_func, None, count=60, wait=0.5)
+    assertmsg = '"{}" JSON output mismatches the expected result'.format(rname)
+    assert diff is None, assertmsg
+
+
+def cmp_json_output_exact(rname, command, reference):
+    return cmp_json_output(rname, command, reference, True)
+
+
+def add_candidate_path(rname, endpoint, pref, name, segment_list="default"):
+    get_topogen().net[rname].cmd(
+        """ \
+        vtysh -c "conf t" \
+              -c "segment-routing" \
+              -c "traffic-eng" \
+              -c "policy color 1 endpoint """
+        + endpoint
+        + """" \
+              -c "candidate-path preference """
+        + str(pref)
+        + """ name """
+        + name
+        + """ explicit segment-list """
+        + segment_list
+        + '''"'''
+    )
+
+
+def delete_candidate_path(rname, endpoint, pref):
+    get_topogen().net[rname].cmd(
+        """ \
+        vtysh -c "conf t" \
+              -c "segment-routing" \
+              -c "traffic-eng" \
+              -c "policy color 1 endpoint """
+        + endpoint
+        + """" \
+              -c "no candidate-path preference """
+        + str(pref)
+        + '''"'''
+    )
+
+
+def add_segment(rname, name, index, label):
+    get_topogen().net[rname].cmd(
+        """ \
+        vtysh -c "conf t" \
+              -c "segment-routing" \
+              -c "traffic-eng" \
+              -c "segment-list """
+        + name
+        + """" \
+              -c "index """
+        + str(index)
+        + """ mpls label """
+        + str(label)
+        + '''"'''
+    )
+
+
+def delete_segment(rname, name, index):
+    get_topogen().net[rname].cmd(
+        """ \
+        vtysh -c "conf t" \
+              -c "segment-routing" \
+              -c "traffic-eng" \
+              -c "segment-list """
+        + name
+        + """" \
+              -c "no index """
+        + str(index)
+        + '''"'''
+    )
+
+
+def add_segment_adj(rname, name, index, src, dst):
+    get_topogen().net[rname].cmd(
+        """ \
+        vtysh -c "conf t" \
+              -c "segment-routing" \
+              -c "traffic-eng" \
+              -c "segment-list """
+        + name
+        + """" \
+              -c "index """
+        + str(index)
+        + """ nai adjacency """
+        + str(src)
+        + """ """
+        + str(dst)
+        + '''"'''
+    )
+
+
+def create_sr_policy(rname, endpoint, bsid):
+    get_topogen().net[rname].cmd(
+        """ \
+        vtysh -c "conf t" \
+              -c "segment-routing" \
+              -c "traffic-eng" \
+              -c "policy color 1 endpoint """
+        + endpoint
+        + """" \
+              -c "name default" \
+              -c "binding-sid """
+        + str(bsid)
+        + '''"'''
+    )
+
+
+def delete_sr_policy(rname, endpoint):
+    get_topogen().net[rname].cmd(
+        """ \
+        vtysh -c "conf t" \
+              -c "segment-routing" \
+              -c "traffic-eng" \
+              -c "no policy color 1 endpoint """
+        + endpoint
+        + '''"'''
+    )
+
+
+def create_prefix_sid(rname, prefix, sid):
+    get_topogen().net[rname].cmd(
+        """ \
+        vtysh -c "conf t" \
+              -c "router ospf " \
+              -c "segment-routing prefix """
+        + prefix
+        + " index "
+        + str(sid)
+        + '''"'''
+    )
+
+
+def delete_prefix_sid(rname, prefix):
+    get_topogen().net[rname].cmd(
+        ''' \
+        vtysh -c "conf t" \
+              -c "router ospf " \
+              -c "no segment-routing prefix "'''
+        + prefix
+    )
+
+
+def check_bsid(rt, bsid, fn_name, positive):
+    """
+    Search for a bsid in rt1 and rt6
+    Positive means that check is true is bsid is found
+    Positive="False" means that check is true is bsid is NOT found
+    """
+
+    logger.info('Checking "%s" bsid "%s" for router "%s" ', positive, bsid, rt)
+
+    count = 0
+    candidate_key = bsid
+    candidate_output = ""
+    # First wait for convergence
+    tgen = get_topogen()
+    while count < 30:
+        matched = False
+        matched_key = False
+        sleep(1)
+        count += 1
+        router = tgen.gears[rt]
+        candidate_output = router.vtysh_cmd("show mpls table json")
+        candidate_output_json = json.loads(candidate_output)
+        for item in candidate_output_json.items():
+                # logger.info('item "%s"', item)
+                if item[0] == candidate_key:
+                    matched_key = True
+                    if positive:
+                        break
+        if positive:
+            if matched_key:
+                matched = True
+            assertmsg = "{} don't has entry {} but is was expected".format(
+                 router.name, candidate_key)
+        else:
+            if not matched_key:
+                matched = True
+            assertmsg = "{} has entry {} but is wans't expected".format(
+                router.name, candidate_key)
+        if matched:
+            logger.info('Success "%s" in "%s"', router.name, fn_name)
+            return
+    assert matched, assertmsg
+
+
+#
+# Step 1
+#
+# Checking the MPLS table using a single SR Policy and a single Candidate Path
+# Segment list are base in adjacency that query TED
+#
+def test_srte_init_step1():
+    setup_testcase("Test (step 1): wait OSPF convergence / label distribution")
+
+    check_bsid("rt1", "1111", test_srte_init_step1.__name__, False)
+    check_bsid("rt6", "6666", test_srte_init_step1.__name__, False)
+
+
+def test_srte_add_candidate_check_mpls_table_step1():
+    setup_testcase("Test (step 1): check MPLS table regarding the added Candidate Path")
+
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        add_candidate_path(rname, endpoint, 100, "default")
+        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
+        delete_candidate_path(rname, endpoint, 100)
+
+
+def test_srte_reinstall_sr_policy_check_mpls_table_step1():
+    setup_testcase(
+        "Test (step 1): check MPLS table after the SR Policy was removed and reinstalled"
+    )
+
+    for rname, endpoint, bsid in [("rt1", "6.6.6.6", 1111), ("rt6", "1.1.1.1", 6666)]:
+        add_candidate_path(rname, endpoint, 100, "default")
+        delete_sr_policy(rname, endpoint)
+        check_bsid(rname, bsid, test_srte_init_step1.__name__, False)
+        create_sr_policy(rname, endpoint, bsid)
+        add_candidate_path(rname, endpoint, 100, "default")
+        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
+        delete_candidate_path(rname, endpoint, 100)
+
+
+#
+# Step 2
+#
+# Checking pathd operational data using a single SR Policy and a single Candidate Path
+# Segment list are base in adjacency that query TED
+#
+def test_srte_bare_policy_step2():
+    setup_testcase("Test (step 2): bare SR Policy should not be operational")
+
+    for rname in ["rt1", "rt6"]:
+        cmp_json_output_exact(
+            rname,
+            "show yang operational-data /frr-pathd:pathd pathd",
+            "step2/show_operational_data.ref",
+        )
+
+
+def test_srte_add_candidate_check_operational_data_step2():
+    setup_testcase(
+        "Test (step 2): add single Candidate Path, SR Policy should be operational"
+    )
+
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        add_candidate_path(rname, endpoint, 100, "default")
+        cmp_json_output(
+            rname,
+            "show yang operational-data /frr-pathd:pathd pathd",
+            "step2/show_operational_data_with_candidate.ref",
+        )
+
+
+def test_srte_config_remove_candidate_check_operational_data_step2():
+    setup_testcase(
+        "Test (step 2): remove single Candidate Path, SR Policy should not be operational anymore"
+    )
+
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        delete_candidate_path(rname, endpoint, 100)
+        cmp_json_output_exact(
+            rname,
+            "show yang operational-data /frr-pathd:pathd pathd",
+            "step2/show_operational_data.ref",
+        )
+
+
+#
+# Step 3
+#
+# Testing the Candidate Path selection
+# Segment list are based in adjacencies resolved by query TED
+#
+def test_srte_add_two_candidates_step3():
+    setup_testcase("Test (step 3): second Candidate Path has higher Priority")
+
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        for pref, cand_name in [("100", "first"), ("200", "second")]:
+            add_candidate_path(rname, endpoint, pref, cand_name)
+        cmp_json_output(
+            rname,
+            "show yang operational-data /frr-pathd:pathd pathd",
+            "step3/show_operational_data_with_two_candidates.ref",
+        )
+
+    # cleanup
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        for pref in ["100", "200"]:
+            delete_candidate_path(rname, endpoint, pref)
+
+
+def test_srte_add_two_candidates_with_reverse_priority_step3():
+    setup_testcase("Test (step 3): second Candidate Path has lower Priority")
+
+    # Use reversed priorities here
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        for pref, cand_name in [("200", "first"), ("100", "second")]:
+            add_candidate_path(rname, endpoint, pref, cand_name)
+        cmp_json_output(
+            rname,
+            "show yang operational-data /frr-pathd:pathd pathd",
+            "step3/show_operational_data_with_two_candidates.ref",
+        )
+
+    # cleanup
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        for pref in ["100", "200"]:
+            delete_candidate_path(rname, endpoint, pref)
+
+
+def test_srte_remove_best_candidate_step3():
+    setup_testcase("Test (step 3): delete the Candidate Path with higher priority")
+
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        for pref, cand_name in [("100", "first"), ("200", "second")]:
+            add_candidate_path(rname, endpoint, pref, cand_name)
+
+    # Delete candidate with higher priority
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        delete_candidate_path(rname, endpoint, 200)
+
+    # Candidate with lower priority should get active now
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        cmp_json_output(
+            rname,
+            "show yang operational-data /frr-pathd:pathd pathd",
+            "step3/show_operational_data_with_single_candidate.ref",
+        )
+        # cleanup
+        delete_candidate_path(rname, endpoint, 100)
+
+
+#
+# Step 4
+#
+# Checking MPLS table with a single SR Policy and a Candidate Path with different Segment Lists and other modifications
+# Segment list are base in adjacency that query TED
+#
+def test_srte_change_segment_list_check_mpls_table_step4():
+    setup_testcase("Test (step 4): check MPLS table for changed Segment List")
+
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        add_candidate_path(rname, endpoint, 100, "default")
+        # now change the segment list name
+        add_candidate_path(rname, endpoint, 100, "default", "test")
+        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
+        delete_segment(rname, "test", 10)
+        delete_segment(rname, "test", 20)
+        delete_segment(rname, "test", 30)
+        delete_segment(rname, "test", 40)
+        if rname == "rt1":
+            add_segment_adj(rname, "test", 10, "10.0.1.1", "10.0.1.2")
+            add_segment_adj(rname, "test", 20, "10.0.2.2", "10.0.2.4")
+            add_segment_adj(rname, "test", 30, "10.0.6.4", "10.0.6.5")
+            add_segment_adj(rname, "test", 40, "10.0.8.5", "10.0.8.6")
+        else:
+            add_segment_adj(rname, "test", 10, "10.0.8.6", "10.0.8.5")
+            add_segment_adj(rname, "test", 20, "10.0.6.5", "10.0.6.4")
+            add_segment_adj(rname, "test", 30, "10.0.2.4", "10.0.2.2")
+            add_segment_adj(rname, "test", 40, "10.0.1.2", "10.0.1.1")
+        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
+        delete_candidate_path(rname, endpoint, 100)
+
+
+def test_srte_change_sl_priority_error_ted_check_mpls_table_step4():
+    setup_testcase("Test (step 4): check MPLS table keeps low prio sl")
+
+    for rname, endpoint in [("rt1", "6.6.6.6"), ("rt6", "1.1.1.1")]:
+        add_candidate_path(rname, endpoint, 100, "default")
+        # now change the segment list name
+        add_candidate_path(rname, endpoint, 200, "test", "test")
+        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
+        delete_segment(rname, "test", 10)
+        delete_segment(rname, "test", 20)
+        delete_segment(rname, "test", 30)
+        delete_segment(rname, "test", 40)
+        # These won't resolv
+        if rname == "rt1":
+            add_segment_adj(rname, "test", 10, "10.0.1.99", "10.0.1.99")
+            add_segment_adj(rname, "test", 20, "10.0.2.99", "10.0.2.99")
+            add_segment_adj(rname, "test", 30, "10.0.6.99", "10.0.6.99")
+            add_segment_adj(rname, "test", 40, "10.0.8.99", "10.0.8.99")
+        else:
+            add_segment_adj(rname, "test", 10, "10.0.8.99", "10.0.8.99")
+            add_segment_adj(rname, "test", 20, "10.0.6.99", "10.0.6.99")
+            add_segment_adj(rname, "test", 30, "10.0.2.99", "10.0.2.99")
+            add_segment_adj(rname, "test", 40, "10.0.1.99", "10.0.1.99")
+        # So policy sticks with default sl even higher prio
+        check_bsid(rname, "1111" if rname == "rt1" else "6666", test_srte_init_step1.__name__, True)
+        delete_candidate_path(rname, endpoint, 100)
+
+
+# Memory leak test template
+def test_memory_leak():
+    "Run the memory leak test and report results."
+    tgen = get_topogen()
+    if not tgen.is_memleak_enabled():
+        pytest.skip("Memory leak test/report is disabled")
+
+    tgen.report_memory_leaks()
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index 76e50beb5c16b089f3046f9bb8e896e6205a5804..a22fbf458a85c23d9d14993a26acd607806c9296 100644 (file)
@@ -50,6 +50,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.ospfd]
+
 
 class NetworkTopo(Topo):
     "OSPF topology builder"
index 489690471c371668f240a447df7898312fe21b3e..b3da6e2a1a580747e5dacba6aa9e0d789b330e02 100644 (file)
@@ -71,6 +71,8 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.ospfd]
+
 
 class TemplateTopo(Topo):
     "Test topology builder"
index 9a686355680a05d87ed40e519973f352376cb1e8..e1e2bfb99a777e93fe35d885d7ebee8aa24c6eb9 100644 (file)
@@ -3,7 +3,7 @@ hostname r1
 password zebra
 log file /tmp/r1-ospfd.log
 !
-router ospf vrf r1-cust1
+router ospf vrf r1-ospf-cust1
   ospf router-id 10.0.255.1
   redistribute kernel
   redistribute connected
index 134a10a454966356c656a2054cd84a6ed65d46d6..d617ab36d91c75284e35e784587c1565f099d2c2 100644 (file)
@@ -1,4 +1,4 @@
-VRF Name: r1-cust1
+VRF Name: r1-ospf-cust1
 ============ OSPF network routing table ============
 N    10.0.1.0/24           [10] area: 0.0.0.0
                            directly attached to r1-eth0
index 083d77126cbc760d9a600390edf0947fdc9275a4..4f7fd699cf6506985459f66a30a727760e7893f7 100644 (file)
@@ -1,4 +1,4 @@
-VRF Name: r1-cust1
+VRF Name: r1-ospf-cust1
 ============ OSPF network routing table ============
 N    10.0.1.0/24           [10] area: 0.0.0.0
                            directly attached to r1-eth0
index e826793657641c1f3116e2dc15e04294f5775500..e100d3b121d348d8a4ad04f9b84f88db8dc71fcf 100644 (file)
@@ -7,10 +7,10 @@ hostname r1
 password zebra
 log file /tmp/r1-zebra.log
 !
-interface r1-eth0 vrf r1-cust1
+interface r1-eth0 vrf r1-ospf-cust1
  ip address 10.0.1.1/24
 !
-interface r1-eth1 vrf r1-cust1
+interface r1-eth1 vrf r1-ospf-cust1
  ip address 10.0.3.2/24
 !
 ip forwarding
index d72aa3b8e5695b1d7f469dd0aa12dbee86e1cb2c..979af20c59e234f1f05ab33ac9b9d7a1da9d1e23 100644 (file)
@@ -1,4 +1,4 @@
-VRF r1-cust1:
+VRF r1-ospf-cust1:
 O   10.0.1.0/24 [110/10] is directly connected, r1-eth0, weight 1, XX:XX:XX
 C>* 10.0.1.0/24 is directly connected, r1-eth0, XX:XX:XX
 O>* 10.0.2.0/24 [110/20] via 10.0.3.3, r1-eth1, weight 1, XX:XX:XX
index 5ea6bdc04d1101fc6f8aceeae6d7727f959d1445..ec99fad762ded6d506463e578e87710126978fc8 100644 (file)
@@ -1,4 +1,4 @@
-VRF r1-cust1:
+VRF r1-ospf-cust1:
 O   10.0.1.0/24 [110/10] is directly connected, r1-eth0, weight 1, XX:XX:XX
 C>* 10.0.1.0/24 is directly connected, r1-eth0, XX:XX:XX
 O>* 10.0.2.0/24 [110/20] via 10.0.3.3, r1-eth1, weight 1, XX:XX:XX
index ad481a996d7e47aa2510638dca9e663a16e435e0..c1984276f407f26caad81a10173095a2d5802e45 100644 (file)
@@ -4,7 +4,7 @@ password zebra
 log file /tmp/r2-ospfd.log
 !
 !
-router ospf vrf r2-cust1
+router ospf vrf r2-ospf-cust1
   ospf router-id 10.0.255.2
   redistribute kernel
   redistribute connected
index a49cb7724933b428c490f6657f56d64241e6f17a..89763ff7332692861431b27f26655c90ed34319e 100644 (file)
@@ -1,4 +1,4 @@
-VRF Name: r2-cust1
+VRF Name: r2-ospf-cust1
 ============ OSPF network routing table ============
 N    10.0.1.0/24           [20] area: 0.0.0.0
                            via 10.0.3.2, r2-eth1
index 2227bedf07680abfff6df740b0fd0060842ee285..d946f02dfde98cb56d551b02b3e2b8d87b2f85d5 100644 (file)
@@ -1,4 +1,4 @@
-VRF Name: r2-cust1
+VRF Name: r2-ospf-cust1
 ============ OSPF network routing table ============
 N    10.0.1.0/24           [20] area: 0.0.0.0
                            via 10.0.3.2, r2-eth1
index 8dcb713da6fbd49c24722d0076d5772d301b0908..6ff72d1267f6c2d466dd61c402471a289dc9a565 100644 (file)
@@ -3,10 +3,10 @@ hostname r2
 password zebra
 log file /tmp/r2-zebra.log
 !
-interface r2-eth0 vrf r2-cust1
+interface r2-eth0 vrf r2-ospf-cust1
  ip address 10.0.2.1/24
 !
-interface r2-eth1 vrf r2-cust1
+interface r2-eth1 vrf r2-ospf-cust1
  ip address 10.0.3.3/24
 !
 ip forwarding
index ce5e5f3bab57227c321e29bab24f3508af5b2c15..df66e92abc88133d46ba37925f19417daa84dd35 100644 (file)
@@ -1,4 +1,4 @@
-VRF r2-cust1:
+VRF r2-ospf-cust1:
 O>* 10.0.1.0/24 [110/20] via 10.0.3.2, r2-eth1, weight 1, XX:XX:XX
 O   10.0.2.0/24 [110/10] is directly connected, r2-eth0, weight 1, XX:XX:XX
 C>* 10.0.2.0/24 is directly connected, r2-eth0, XX:XX:XX
index 157811ec77d046b02b8ecdf2f62e955895bd2159..4afc354ca7ec2ac82cf9de6a3851c0f7b5fec551 100644 (file)
@@ -1,4 +1,4 @@
-VRF r2-cust1:
+VRF r2-ospf-cust1:
 O>* 10.0.1.0/24 [110/20] via 10.0.3.2, r2-eth1, weight 1, XX:XX:XX
 O   10.0.2.0/24 [110/10] is directly connected, r2-eth0, weight 1, XX:XX:XX
 C>* 10.0.2.0/24 is directly connected, r2-eth0, XX:XX:XX
index d5214f734e7df4f07bee6b300fa25029ec0ea8bf..b73d547e3e138f8cc3cdf7964963f82ccb88bca3 100644 (file)
@@ -4,7 +4,7 @@ password zebra
 log file /tmp/r3-ospfd.log
 !
 !
-router ospf vrf r3-cust1
+router ospf vrf r3-ospf-cust1
   ospf router-id 10.0.255.3
   redistribute kernel
   redistribute connected
index 3b16bfbd55449b893293c40509fa6d91e02f891e..917702b14c84375172853d9fae553097b13050f9 100644 (file)
@@ -1,4 +1,4 @@
-VRF Name: r3-cust1
+VRF Name: r3-ospf-cust1
 ============ OSPF network routing table ============
 N    10.0.1.0/24           [20] area: 0.0.0.0
                            via 10.0.3.2, r3-eth0
index 39beac7a732ba8c09489108858b964e82e5e7404..966185e49567ee79ae5b712eefe1b50368ee1bde 100644 (file)
@@ -1,4 +1,4 @@
-VRF Name: r3-cust1
+VRF Name: r3-ospf-cust1
 ============ OSPF network routing table ============
 N    10.0.10.0/24          [10] area: 0.0.0.0
                            directly attached to r3-eth1
index b5486943303b8e240465adc8a89d6a49e2aa9881..15341500480ad6cf9c14be81fee878e90230256c 100644 (file)
@@ -3,10 +3,10 @@ hostname r3
 password zebra
 log file /tmp/r3-zebra.log
 !
-interface r3-eth0 vrf r3-cust1
+interface r3-eth0 vrf r3-ospf-cust1
  ip address 10.0.3.1/24
 !
-interface r3-eth1 vrf r3-cust1
+interface r3-eth1 vrf r3-ospf-cust1
  ip address 10.0.10.1/24
 !
 ip forwarding
index f40b7b09af1bd5a979f1415ff0b313b62363d532..b435c2ebe5444b551e16cb5caa7ec53246e32139 100644 (file)
@@ -1,4 +1,4 @@
-VRF r3-cust1:
+VRF r3-ospf-cust1:
 O>* 10.0.1.0/24 [110/20] via 10.0.3.2, r3-eth0, weight 1, XX:XX:XX
 O>* 10.0.2.0/24 [110/20] via 10.0.3.3, r3-eth0, weight 1, XX:XX:XX
 O   10.0.3.0/24 [110/10] is directly connected, r3-eth0, weight 1, XX:XX:XX
index 89cd6f56c4cb14f3ac202c4ff1539261c680a5a8..f30a4be6c684b1bdea0e61d58eaa5c9c8155a0b8 100644 (file)
@@ -1,4 +1,4 @@
-VRF r3-cust1:
+VRF r3-ospf-cust1:
 O   10.0.10.0/24 [110/10] is directly connected, r3-eth1, weight 1, XX:XX:XX
 C>* 10.0.10.0/24 is directly connected, r3-eth1, XX:XX:XX
 
index e2cb7bff038075802eba5e61a4546f3f36636e3a..713a65a812f2ab38337fc9bafb0bce58e3720b28 100644 (file)
@@ -100,17 +100,17 @@ def setup_module(mod):
     logger.info("Testing with VRF Namespace support")
 
     cmds = [
-        "if [ -e /var/run/netns/{0}-cust1 ] ; then ip netns del {0}-cust1 ; fi",
-        "ip netns add {0}-cust1",
-        "ip link set dev {0}-eth0 netns {0}-cust1",
-        "ip netns exec {0}-cust1 ifconfig {0}-eth0 up",
-        "ip link set dev {0}-eth1 netns {0}-cust1",
-        "ip netns exec {0}-cust1 ifconfig {0}-eth1 up",
+        "if [ -e /var/run/netns/{0}-ospf-cust1 ] ; then ip netns del {0}-ospf-cust1 ; fi",
+        "ip netns add {0}-ospf-cust1",
+        "ip link set dev {0}-eth0 netns {0}-ospf-cust1",
+        "ip netns exec {0}-ospf-cust1 ip link set {0}-eth0 up",
+        "ip link set dev {0}-eth1 netns {0}-ospf-cust1",
+        "ip netns exec {0}-ospf-cust1 ip link set {0}-eth1 up",
     ]
 
     for rname, router in router_list.items():
 
-        # create VRF rx-cust1 and link rx-eth0 to rx-cust1
+        # create VRF rx-ospf-cust1 and link rx-eth0 to rx-ospf-cust1
         for cmd in cmds:
             output = tgen.net[rname].cmd(cmd.format(rname))
 
@@ -137,9 +137,9 @@ def teardown_module(mod):
     # move back rx-eth0 to default VRF
     # delete rx-vrf
     cmds = [
-        "ip netns exec {0}-cust1 ip link set {0}-eth0 netns 1",
-        "ip netns exec {0}-cust1 ip link set {0}-eth1 netns 1",
-        "ip netns delete {0}-cust1",
+        "ip netns exec {0}-ospf-cust1 ip link set {0}-eth0 netns 1",
+        "ip netns exec {0}-ospf-cust1 ip link set {0}-eth1 netns 1",
+        "ip netns delete {0}-ospf-cust1",
     ]
 
     router_list = tgen.routers()
@@ -152,11 +152,11 @@ def teardown_module(mod):
 # Shared test function to validate expected output.
 def compare_show_ip_route_vrf(rname, expected):
     """
-    Calls 'show ip ospf vrf [rname]-cust1 route' for router `rname` and compare the obtained
+    Calls 'show ip ospf vrf [rname]-ospf-cust1 route' for router `rname` and compare the obtained
     result with the expected output.
     """
     tgen = get_topogen()
-    vrf_name = "{0}-cust1".format(rname)
+    vrf_name = "{0}-ospf-cust1".format(rname)
     current = topotest.ip4_route_zebra(tgen.gears[rname], vrf_name)
     ret = topotest.difflines(
         current, expected, title1="Current output", title2="Expected output"
@@ -182,7 +182,7 @@ def test_ospf_convergence():
         test_func = partial(
             topotest.router_output_cmp,
             router,
-            "show ip ospf vrf {0}-cust1 route".format(rname),
+            "show ip ospf vrf {0}-ospf-cust1 route".format(rname),
             expected,
         )
         result, diff = topotest.run_and_expect(test_func, "", count=160, wait=0.5)
@@ -220,13 +220,13 @@ def test_ospf_json():
 
     for rname, router in tgen.routers().items():
         logger.info(
-            'Comparing router "%s" "show ip ospf vrf %s-cust1 json" output',
+            'Comparing router "%s" "show ip ospf vrf %s-ospf-cust1 json" output',
             router.name,
             router.name,
         )
         expected = {
-            "{}-cust1".format(router.name): {
-                "vrfName": "{}-cust1".format(router.name),
+            "{}-ospf-cust1".format(router.name): {
+                "vrfName": "{}-ospf-cust1".format(router.name),
                 "routerId": "10.0.255.{}".format(rname[1:]),
                 "tosRoutesOnly": True,
                 "rfc2328Conform": True,
@@ -244,7 +244,7 @@ def test_ospf_json():
         }
         # Area specific additional checks
         if router.name == "r1" or router.name == "r2" or router.name == "r3":
-            expected["{}-cust1".format(router.name)]["areas"]["0.0.0.0"] = {
+            expected["{}-ospf-cust1".format(router.name)]["areas"]["0.0.0.0"] = {
                 "areaIfActiveCounter": 2,
                 "areaIfTotalCounter": 2,
                 "authentication": "authenticationNone",
@@ -263,7 +263,7 @@ def test_ospf_json():
         test_func = partial(
             topotest.router_json_cmp,
             router,
-            "show ip ospf vrf {0}-cust1 json".format(rname),
+            "show ip ospf vrf {0}-ospf-cust1 json".format(rname),
             expected,
         )
         _, diff = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
@@ -281,7 +281,7 @@ def test_ospf_link_down():
     # Simulate a network down event on router3 switch3 interface.
     router3 = tgen.gears["r3"]
     topotest.interface_set_status(
-        router3, "r3-eth0", ifaceaction=False, vrf_name="r3-cust1"
+        router3, "r3-eth0", ifaceaction=False, vrf_name="r3-ospf-cust1"
     )
 
     # Expect convergence on all routers
@@ -295,7 +295,7 @@ def test_ospf_link_down():
         test_func = partial(
             topotest.router_output_cmp,
             router,
-            "show ip ospf vrf {0}-cust1 route".format(rname),
+            "show ip ospf vrf {0}-ospf-cust1 route".format(rname),
             expected,
         )
         result, diff = topotest.run_and_expect(test_func, "", count=140, wait=0.5)
@@ -316,7 +316,7 @@ def test_ospf_link_down_kernel_route():
             'Checking OSPF IPv4 kernel routes in "%s" after link down', router.name
         )
 
-        str = "{0}-cust1".format(router.name)
+        str = "{0}-ospf-cust1".format(router.name)
         reffile = os.path.join(CWD, "{}/zebraroutedown.txt".format(router.name))
         expected = open(reffile).read()
         # Run test function until we get an result. Wait at most 60 seconds.
index 6451f5fb329ec964f5fca2f030d0b20abca83359..8b8d5d6e9f1654f482c46d4abc0573ff425f0c83 100644 (file)
@@ -46,6 +46,8 @@ from lib.topolog import logger
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.ospfd]
+
 
 class OSPFTopo(Topo):
     "Test topology builder"
diff --git a/tests/topotests/ospfv3_basic_functionality/ospfv3_asbr_summary_topo1.json b/tests/topotests/ospfv3_basic_functionality/ospfv3_asbr_summary_topo1.json
new file mode 100644 (file)
index 0000000..74a0de4
--- /dev/null
@@ -0,0 +1,198 @@
+{
+    "address_types": [
+        "ipv6"
+    ],
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {
+        "ipv6": "fd00::",
+        "v6mask": 64
+    },
+    "lo_prefix": {
+        "ipv6": "2001:db8:f::",
+        "v6mask": 128
+    },
+    "routers": {
+        "r0": {
+            "links": {
+                "lo": {
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4,
+                        "network": "point-to-point"
+                    }
+                },
+                "r3-link0": {
+                    "ipv6": "auto",
+                    "description": "DummyIntftoR3"
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.0",
+                "neighbors": {
+                    "r1": {},
+                    "r2": {},
+                    "r3": {}
+                }
+            }
+        },
+        "r1": {
+            "links": {
+                "lo": {
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3-link0": {
+                    "ipv6": "auto",
+                    "description": "DummyIntftoR3"
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.1",
+                "neighbors": {
+                    "r0": {},
+                    "r2": {},
+                    "r3": {}
+                }
+            }
+        },
+        "r2": {
+            "links": {
+                "lo": {
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.2",
+                "neighbors": {
+                    "r1": {},
+                    "r0": {},
+                    "r3": {}
+                }
+            }
+        },
+        "r3": {
+            "links": {
+                "lo": {
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4,
+                        "network": "point-to-point"
+                    }
+                },
+                "r0-link0": {
+                    "ipv6": "auto",
+                    "description": "DummyIntftoR0"
+                },
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link0": {
+                    "ipv6": "auto",
+                    "description": "DummyIntftoR1",
+                    "ospf6": {
+                        "area": "0.0.0.0"
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.3",
+                "neighbors": {
+                    "r0": {},
+                    "r1": {},
+                    "r2": {}
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/topotests/ospfv3_basic_functionality/ospfv3_ecmp.json b/tests/topotests/ospfv3_basic_functionality/ospfv3_ecmp.json
new file mode 100644 (file)
index 0000000..c928093
--- /dev/null
@@ -0,0 +1,347 @@
+{
+    "address_types": [
+        "ipv6"
+    ],
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {
+        "ipv6": "fd00::",
+        "v6mask": 64
+    },
+    "lo_prefix": {
+        "ipv6": "2001:db8:f::",
+        "v6mask": 128
+    },
+    "routers": {
+        "r0": {
+            "links": {
+                "lo": {
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link4": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link5": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link6": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link7": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4,
+                        "network": "point-to-point"
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.0",
+                "neighbors": {
+                    "r1": {},
+                    "r1-link1": {
+                        "nbr": "r1"
+                    },
+                    "r1-link2": {
+                        "nbr": "r1"
+                    },
+                    "r1-link3": {
+                        "nbr": "r1"
+                    },
+                    "r1-link4": {
+                        "nbr": "r1"
+                    },
+                    "r1-link5": {
+                        "nbr": "r1"
+                    },
+                    "r1-link6": {
+                        "nbr": "r1"
+                    },
+                    "r1-link7": {
+                        "nbr": "r1"
+                    },
+                    "r2": {},
+                    "r3": {}
+                }
+            }
+        },
+        "r1": {
+            "links": {
+                "lo": {
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r0-link1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r0-link2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r0-link3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r0-link4": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r0-link5": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r0-link6": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r0-link7": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3-link0": {
+                    "ipv6": "auto",
+                    "description": "DummyIntftoR3"
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.1",
+                "neighbors": {
+                    "r0": {},
+                    "r0-link1": {
+                        "nbr": "r0"
+                    },
+                    "r0-link2": {
+                        "nbr": "r0"
+                    },
+                    "r0-link3": {
+                        "nbr": "r0"
+                    },
+                    "r0-link4": {
+                        "nbr": "r0"
+                    },
+                    "r0-link5": {
+                        "nbr": "r0"
+                    },
+                    "r0-link6": {
+                        "nbr": "r0"
+                    },
+                    "r0-link7": {
+                        "nbr": "r0"
+                    },
+                    "r2": {},
+                    "r3": {}
+                }
+            }
+        },
+        "r2": {
+            "links": {
+                "lo": {
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.2",
+                "neighbors": {
+                    "r1": {},
+                    "r0": {},
+                    "r3": {}
+                }
+            }
+        },
+        "r3": {
+            "links": {
+                "lo": {
+                    "ipv6": "auto",
+                    "type": "loopback"
+                },
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4,
+                        "network": "point-to-point"
+                    }
+                },
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1-link0": {
+                    "ipv6": "auto",
+                    "description": "DummyIntftoR1",
+                    "ospf": {
+                        "area": "0.0.0.0"
+                    },
+                    "ospf6": {
+                        "area": "0.0.0.0"
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.3",
+                "neighbors": {
+                    "r0": {},
+                    "r1": {},
+                    "r2": {}
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/tests/topotests/ospfv3_basic_functionality/ospfv3_routemaps.json b/tests/topotests/ospfv3_basic_functionality/ospfv3_routemaps.json
new file mode 100644 (file)
index 0000000..226f84f
--- /dev/null
@@ -0,0 +1,137 @@
+{
+    "address_types": ["ipv6"],
+    "ipv6base": "fd00::",
+    "ipv6mask": 64,
+    "link_ip_start": {"ipv6": "fd00::", "v6mask": 64},
+    "lo_prefix": {"ipv6": "2001:db8:f::", "v6mask": 128},
+    "routers": {
+        "r0": {
+            "links": {
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.0",
+                "neighbors": {"r1": {}, "r2": {}, "r3": {}}
+            }
+        },
+        "r1": {
+            "links": {
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.1",
+                "neighbors": {"r0": {}, "r2": {}, "r3": {}}
+            }
+        },
+        "r2": {
+            "links": {
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r3": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.2",
+                "neighbors": {"r1": {}, "r0": {}, "r3": {}}
+            }
+        },
+        "r3": {
+            "links": {
+                "r0": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r1": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                },
+                "r2": {
+                    "ipv6": "auto",
+                    "ospf6": {
+                        "area": "0.0.0.0",
+                        "hello_interval": 1,
+                        "dead_interval": 4
+                    }
+                }
+            },
+            "ospf6": {
+                "router_id": "100.1.1.3",
+                "neighbors": {"r0": {}, "r1": {}, "r2": {}}
+            }
+        }
+    }
+}
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_asbr_summary_topo1.py
new file mode 100644 (file)
index 0000000..6a4b60f
--- /dev/null
@@ -0,0 +1,1928 @@
+#!/usr/bin/python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""OSPF Summarisation Functionality Automation."""
+import os
+import sys
+import time
+import pytest
+import json
+from copy import deepcopy
+from ipaddress import IPv4Address
+from lib.topotest import frr_unicode
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../lib/"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from mininet.topo import Topo
+from lib.topogen import Topogen, get_topogen
+import ipaddress
+from time import sleep
+
+# Import topoJson from lib, to create topology and initial configuration
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    kill_router_daemons,
+    write_test_footer,
+    reset_config_on_routers,
+    stop_router,
+    start_router,
+    verify_rib,
+    create_static_routes,
+    step,
+    start_router_daemons,
+    create_route_maps,
+    shutdown_bringup_interface,
+    create_prefix_lists,
+    create_route_maps,
+    create_interfaces_cfg,
+    topo_daemons,
+)
+from lib.topolog import logger
+from lib.topojson import build_topo_from_json, build_config_from_json
+from lib.ospf import (
+    verify_ospf6_neighbor,
+    clear_ospf,
+    verify_ospf6_rib,
+    create_router_ospf,
+    verify_ospf_summary,
+)
+
+
+# Global variables
+topo = None
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/ospfv3_asbr_summary_topo1.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+NETWORK = {
+    "ipv4": [
+        "11.0.20.1/32",
+        "11.0.20.2/32",
+        "11.0.20.3/32",
+        "11.0.20.4/32",
+        "11.0.20.5/32",
+    ],
+    "ipv6": [
+        "2011:0:20::1/128",
+        "2011:0:20::2/128",
+        "2011:0:20::3/128",
+        "2011:0:20::4/128",
+        "2011:0:20::5/128",
+    ],
+}
+NETWORK_11 = {
+    "ipv4": ["11.0.20.6/32", "11.0.20.7/32"],
+    "ipv6": ["2011:0:20::6/128", "2011:0:20::7/128"],
+}
+
+NETWORK2 = {
+    "ipv4": [
+        "12.0.20.1/32",
+        "12.0.20.2/32",
+        "12.0.20.3/32",
+        "12.0.20.4/32",
+        "12.0.20.5/32",
+    ],
+    "ipv6": [
+        "2012:0:20::1/128",
+        "2012:0:20::2/128",
+        "2012:0:20::3/128",
+        "2012:0:20::4/128",
+        "2012:0:20::5/128",
+    ],
+}
+SUMMARY = {
+    "ipv4": ["11.0.0.0/8", "12.0.0.0/8", "11.0.0.0/24"],
+    "ipv6": ["2011::/32", "2012::/32", "2011::/64", "2011::/24"],
+}
+"""
+TOPOOLOGY =
+      Please view in a fixed-width font such as Courier.
+      +---+  A0       +---+
+      +R1 +------------+R2 |
+      +-+-+-           +--++
+        |  --        --  |
+        |    -- A0 --    |
+      A0|      ----      |
+        |      ----      | A0
+        |    --    --    |
+        |  --        --  |
+      +-+-+-            +-+-+
+      +R0 +-------------+R3 |
+      +---+     A0     +---+
+
+TESTCASES =
+1. OSPF summarisation functionality.
+2. OSPF summarisation with advertise and no advertise option
+3. OSPF summarisation with route map modification of metric type.
+4. OSPF CLI Show  verify ospf ASBR summary config and show commands behaviours.
+5. OSPF summarisation Chaos.
+"""
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """
+    Sets up the pytest environment
+
+    * `mod`: module name
+    """
+    global topo
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+    # ... and here it calls Mininet initialization functions.
+
+    # get list of daemons needs to be started for this suite.
+    daemons = topo_daemons(tgen, topo)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen, daemons)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+    # Api call verify whether OSPF is converged
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    logger.info("Running setup_module() done")
+
+
+def teardown_module(mod):
+    """
+    Teardown the pytest environment.
+
+    * `mod`: module name
+    """
+
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+    logger.info(
+        "Testsuite end time: {}".format(time.asctime(time.localtime(time.time())))
+    )
+    logger.info("=" * 40)
+
+
+def red_static(dut, config=True):
+    """
+    Local 'def' for Redstribute static routes inside ospf.
+
+    Parameters
+    ----------
+    * `dut` : DUT on which configs have to be made.
+    * `config` : True or False, True by default for configure, set False for
+                 unconfiguration.
+    """
+    global topo
+    tgen = get_topogen()
+    if config:
+        ospf_red = {dut: {"ospf6": {"redistribute": [{"redist_type": "static"}]}}}
+    else:
+        ospf_red = {
+            dut: {
+                "ospf6": {"redistribute": [{"redist_type": "static", "delete": True}]}
+            }
+        }
+    result = create_router_ospf(tgen, topo, ospf_red)
+    assert result is True, "Testcase : Failed \n Error: {}".format(result)
+
+
+def red_connected(dut, config=True):
+    """
+    Local 'def' for Redstribute connected routes inside ospf
+
+    Parameters
+    ----------
+    * `dut` : DUT on which configs have to be made.
+    * `config` : True or False, True by default for configure, set False for
+                 unconfiguration.
+    """
+    global topo
+    tgen = get_topogen()
+    if config:
+        ospf_red = {dut: {"ospf6": {"redistribute": [{"redist_type": "connected"}]}}}
+    else:
+        ospf_red = {
+            dut: {
+                "ospf6": {
+                    "redistribute": [{"redist_type": "connected", "delete": True}]
+                }
+            }
+        }
+    result = create_router_ospf(tgen, topo, ospf_red)
+    assert result is True, "Testcase: Failed \n Error: {}".format(result)
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+
+def test_ospfv3_type5_summary_tc42_p0(request):
+    """OSPF summarisation functionality."""
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config as per the topology")
+    reset_config_on_routers(tgen)
+
+    protocol = 'ospf'
+
+    step(
+        "Configure 5 static routes from the same network on R0"
+        "5 static routes from different networks and redistribute in R0")
+    input_dict_static_rtes = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                },
+                {
+                    "network": NETWORK2["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    dut = 'r0'
+    red_static(dut)
+
+    step("Verify that routes are learnt on R1.")
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_static_rtes, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step(
+        "Configure External Route summary in R0 to summarise 5"
+        " routes to one route. with aggregate timer as 6 sec")
+
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32"
+                }],
+                "aggr_timer": 6
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured summary "
+        "address on R0 after 5 secs of delay timer expiry and only one "
+        "route is sent to R1.")
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Verify that show ip ospf summary should show the summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step(
+        "Verify that originally advertised routes are withdraw from there"
+        " peer.")
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol,
+                            expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    step("Delete the configured summary")
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32",
+                    "del_aggr_timer": True,
+                    "delete": True
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step("Verify that summary lsa is withdrawn from R1 and deleted from R0.")
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol, expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Summary Route still present in RIB".format(tc_name)
+
+    step("show ip ospf summary should not have any summary address.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6', expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Summary still present in DB".format(tc_name)
+
+    dut = 'r1'
+    step("All 5 routes are advertised after deletion of configured summary.")
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_static_rtes, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("configure the summary again and delete static routes .")
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole",
+                    "delete": True
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    step("Verify that summary route is withdrawn from R1.")
+
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol, expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    step("Add back static routes.")
+    input_dict_static_rtes = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured summary"
+        " address on R0 and only one route is sent to R1.")
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_static_rtes, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(
+                            tgen, "ipv6", dut, input_dict_static_rtes,
+                            protocol=protocol, expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Verify that show ip ospf summary should show configure summaries.")
+
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step("Configure new static route which is matching configured summary.")
+    input_dict_static_rtes = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK_11["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    # step("verify that summary lsa is not refreshed.")
+    # show ip ospf database command is not working, waiting for DEV fix.
+
+    step("Delete one of the static route.")
+    input_dict_static_rtes = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK_11["ipv6"],
+                    "next_hop": "blackhole",
+                    "delete": True
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    # step("verify that summary lsa is not refreshed.")
+    # show ip ospf database command is not working, waiting for DEV fix.
+
+    # step("Verify that deleted static route is removed from ospf LSDB.")
+    # show ip ospf database command is not working, waiting for DEV fix.
+
+    step(
+        "Configure redistribute connected and configure ospf external"
+        " summary address to summarise the connected routes.")
+
+    dut = 'r0'
+    red_connected(dut)
+    clear_ospf(tgen, dut, ospf='ospf6')
+
+    ip = topo['routers']['r0']['links']['r3']['ipv6']
+
+    ip_net = str(ipaddress.ip_interface(u'{}'.format(ip)).network)
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": ip_net.split('/')[0],
+                    "mask": "8"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured "
+        "summary address on R0 and only one route is sent to R1.")
+
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": "fd00::/64"}]
+        }
+    }
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Shut one of the interface")
+    intf = topo['routers']['r0']['links']['r3-link0']['interface']
+    shutdown_bringup_interface(tgen, dut, intf, False)
+
+    # step("verify that summary lsa is not refreshed.")
+    # show ip ospf database command is not working, waiting for DEV fix.
+
+    # step("Verify that deleted connected route is removed from ospf LSDB.")
+    # show ip ospf database command is not working, waiting for DEV fix.
+
+    step("Un do shut the interface")
+    shutdown_bringup_interface(tgen, dut, intf, True)
+
+    # step("verify that summary lsa is not refreshed.")
+    # show ip ospf database command is not working, waiting for DEV fix.
+
+    # step("Verify that deleted connected route is removed from ospf LSDB.")
+    # show ip ospf database command is not working, waiting for DEV fix.
+
+    step("Delete OSPF process.")
+    ospf_del = {
+        "r0": {
+            "ospf6": {
+                "delete": True
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_del)
+    assert result is True, "Testcase : Failed \n Error: {}".format(result)
+
+    step("Reconfigure ospf process with summary")
+    reset_config_on_routers(tgen)
+
+    input_dict_static_rtes = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                },
+                {
+                    "network": NETWORK2["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    dut = 'r0'
+    red_static(dut)
+    red_connected(dut)
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+    step(
+        "Verify that external routes are summarised to configured summary "
+        "address on R0 and only one route is sent to R1.")
+
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    # step("verify that summary lsa is not refreshed.")
+    # show ip ospf database command is not working, waiting for DEV fix.
+
+    step("Delete the redistribute command in ospf.")
+    dut = 'r0'
+    red_connected(dut, config=False)
+    red_static(dut, config=False)
+
+    step("Verify that summary route is withdrawn from the peer.")
+
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol, expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32",
+                    "metric": "1234"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_type5_summary_tc46_p0(request):
+    """OSPF summarisation with advertise and no advertise option"""
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config as per the topology")
+    step("Configure OSPF on all the routers of the topology.")
+    reset_config_on_routers(tgen)
+
+    protocol = 'ospf'
+
+    step(
+        "Configure 5 static routes from the same network on R0"
+        "5 static routes from different networks and redistribute in R0")
+    input_dict_static_rtes = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                },
+                {
+                    "network": NETWORK2["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    dut = 'r0'
+    red_static(dut)
+
+    step("Verify that routes are learnt on R1.")
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_static_rtes, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step(
+        "Configure External Route summary in R0 to summarise 5"
+        " routes to one route with no advertise option.")
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32",
+                    "advertise": False
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured summary"
+        " address on R0 and  summary route is not advertised to neighbor as"
+        " no advertise is configured..")
+
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict_summary,
+                        protocol=protocol, expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    step(
+        "Verify that show ip ospf summary should show the "
+        "configured summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step("Delete the configured summary")
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32",
+                    "delete": True
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step("Summary has 5 sec delay timer, sleep 5 secs...")
+    sleep(5)
+
+    step("Verify that summary lsa is withdrawn from R1 and deleted from R0.")
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol, expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Summary Route still present in RIB".format(tc_name)
+
+    step("show ip ospf summary should not have any summary address.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 1234,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6', expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Summary still present in DB".format(tc_name)
+
+    step("Reconfigure summary with no advertise.")
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32",
+                    "advertise": False
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured summary"
+        " address on R0 and  summary route is not advertised to neighbor as"
+        " no advertise is configured..")
+
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict_summary,
+                        protocol=protocol, expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    step(
+        "Verify that show ip ospf summary should show the "
+        "configured summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step(
+        "Change summary address from no advertise to advertise "
+        "(summary-address 10.0.0.0 255.255.0.0)")
+
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32",
+                    "advertise": False
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured summary "
+        "address on R0 after 5 secs of delay timer expiry and only one "
+        "route is sent to R1.")
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Verify that show ip ospf summary should show the summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step(
+        "Verify that originally advertised routes are withdraw from there"
+        " peer.")
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol,
+                            expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes is present in RIB".format(tc_name)
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_type5_summary_tc48_p0(request):
+    """OSPF summarisation with route map modification of metric type."""
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config as per the topology")
+    reset_config_on_routers(tgen)
+
+    protocol = 'ospf'
+
+    step(
+        "Configure 5 static routes from the same network on R0"
+        "5 static routes from different networks and redistribute in R0")
+    input_dict_static_rtes = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                },
+                {
+                    "network": NETWORK2["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    dut = 'r0'
+    red_static(dut)
+
+    step("Verify that routes are learnt on R1.")
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_static_rtes, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step(
+        "Configure External Route summary in R0 to summarise 5"
+        " routes to one route.")
+
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured summary "
+        "address on R0 after 5 secs of delay timer expiry and only one "
+        "route is sent to R1.")
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Verify that show ip ospf summary should show the summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step(
+        "Verify that originally advertised routes are withdraw from there"
+        " peer.")
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol,
+                        expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    step(
+        "Configure route map and & rule to permit configured summary address,"
+        " redistribute static & connected routes with the route map.")
+    step("Configure prefixlist to permit the static routes, add to route map.")
+    # Create ip prefix list
+    pfx_list = {
+        "r0": {
+            "prefix_lists": {
+                "ipv6": {
+                    "pf_list_1_ipv6": [
+                    {
+                        "seqid": 10,
+                        "network": "any",
+                        "action": "permit"
+                    }
+                    ]
+                }
+            }
+        }
+    }
+    result = create_prefix_lists(tgen, pfx_list)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+
+    routemaps = {
+            "r0": {
+                "route_maps": {
+                    "rmap_ipv6": [{
+                        "action": "permit",
+                        "seq_id": '1',
+                        "match": {
+                            "ipv6": {
+                                "prefix_lists":
+                                    "pf_list_1_ipv6"
+                            }
+                        }
+                    }]
+                }
+            }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    ospf_red_r1 = {
+        "r0": {
+            "ospf6": {
+                "redistribute": [{
+                    "redist_type": "static",
+                    "route_map": "rmap_ipv6"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_red_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured"
+        "summary address on R0 and only one route is sent to R1. Verify that "
+        "show ip ospf summary should show the configure summaries.")
+
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step("Configure metric type as 1 in route map.")
+
+
+    routemaps = {
+            "r0": {
+                "route_maps": {
+                    "rmap_ipv6": [{
+                        "seq_id": '1',
+                        "action": "permit",
+                        "set":{
+                            "metric-type": "type-1"
+                        }
+                    }]
+                }
+            }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes(static / connected) are summarised"
+        " to configured summary address with metric type 2.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step("Un configure metric type from route map.")
+
+    routemaps = {
+            "r0": {
+                "route_maps": {
+                    "rmap_ipv6": [{
+                        "action": "permit",
+                        "seq_id": '1',
+                        "set":{
+                            "metric-type": "type-1",
+                            "delete": True
+                        }
+                    }]
+                }
+            }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes(static / connected) are summarised"
+        " to configured summary address with metric type 2.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step("Change rule from permit to deny in prefix list.")
+    pfx_list = {
+        "r0": {
+            "prefix_lists": {
+                "ipv6": {
+                    "pf_list_1_ipv6": [
+                    {
+                        "seqid": 10,
+                        "network": "any",
+                        "action": "deny"
+                    }
+                    ]
+                }
+            }
+        }
+    }
+    result = create_prefix_lists(tgen, pfx_list)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that previously originated summary lsa "
+        "is withdrawn from the neighbor.")
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    step("summary route has delay of 5 secs, wait for 5 secs")
+
+    sleep(5)
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol, expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_type5_summary_tc51_p2(request):
+    """OSPF CLI Show.
+
+    verify ospf ASBR summary config and show commands behaviours.
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config as per the topology")
+    reset_config_on_routers(tgen)
+
+    step("Configure all the supported OSPF ASBR summary commands on DUT.")
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32",
+                    "tag": 4294967295
+                },
+                {
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "16",
+                    "advertise": True
+                },
+                {
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "24",
+                    "advertise": False
+                },
+                {
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "24",
+                    "advertise": False
+                },
+                ]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+
+    step("Configure and re configure all the commands 10 times in a loop.")
+
+    for itrate in range(0,10):
+        ospf_summ_r1 = {
+            "r0": {
+                "ospf6": {
+                    "summary-address": [{
+                        "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                        "mask": "8",
+                        "tag": 4294967295
+                    },
+                    {
+                        "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                        "mask": "16",
+                        "advertise": True
+                    },
+                    {
+                        "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                        "mask": "24",
+                        "advertise": False
+                    },
+                    {
+                        "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                        "mask": "24",
+                        "advertise": False
+                    },
+                    ]
+                }
+             }
+        }
+        result = create_router_ospf(tgen, topo, ospf_summ_r1)
+        assert result is True, "Testcase {} : Failed \n Error: {}".format(
+            tc_name, result)
+
+        ospf_summ_r1 = {
+            "r0": {
+                "ospf6": {
+                    "summary-address": [{
+                        "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                        "mask": "8",
+                        "tag": 4294967295,
+                        "delete": True
+                    },
+                    {
+                        "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                        "mask": "16",
+                        "advertise": True,
+                        "delete": True
+                    },
+                    {
+                        "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                        "mask": "24",
+                        "advertise": False,
+                        "delete": True
+                    },
+                    {
+                        "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                        "mask": "24",
+                        "advertise": False,
+                        "delete": True
+                    },
+                    ]
+                }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step("Verify the show commands")
+
+    input_dict = {
+        SUMMARY["ipv6"][3]: {
+            "Summary address": SUMMARY["ipv6"][3],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 0
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_type5_summary_tc49_p2(request):
+    """OSPF summarisation Chaos."""
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config as per the topology")
+    reset_config_on_routers(tgen)
+
+    protocol = 'ospf'
+
+    step(
+        "Configure 5 static routes from the same network on R0"
+        "5 static routes from different networks and redistribute in R0")
+    input_dict_static_rtes = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                },
+                {
+                    "network": NETWORK2["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    dut = 'r0'
+    red_static(dut)
+
+    step("Verify that routes are learnt on R1.")
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_static_rtes)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_static_rtes, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step(
+        "Configure External Route summary in R0 to summarise 5"
+        " routes to one route.")
+
+    ospf_summ_r1 = {
+        "r0": {
+            "ospf6": {
+                "summary-address": [{
+                    "prefix": SUMMARY["ipv6"][0].split('/')[0],
+                    "mask": "32"
+                }]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_summ_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    step(
+        "Verify that external routes are summarised to configured summary "
+        "address on R0 after 5 secs of delay timer expiry and only one "
+        "route is sent to R1.")
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Verify that show ip ospf summary should show the summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step(
+        "Verify that originally advertised routes are withdraw from there"
+        " peer.")
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol,
+                        expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    step('Reload the FRR router')
+    # stop/start -> restart FRR router and verify
+    stop_router(tgen, 'r0')
+    start_router(tgen, 'r0')
+
+    step(
+        "Verify that external routes are summarised to configured summary "
+        "address on R0 after 5 secs of delay timer expiry and only one "
+        "route is sent to R1.")
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Verify that show ip ospf summary should show the summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step(
+        "Verify that originally advertised routes are withdraw from there"
+        " peer.")
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol,
+                        expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    step("Kill OSPF6d daemon on R0.")
+    kill_router_daemons(tgen, "r0", ["ospf6d"])
+
+    step("Bring up OSPF6d daemon on R0.")
+    start_router_daemons(tgen, "r0", ["ospf6d"])
+
+    step("Verify OSPF neighbors are up after bringing back ospf6d in R0")
+    # Api call verify whether OSPF is converged
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo)
+    assert ospf_covergence is True, ("setup_module :Failed \n Error:"
+                                          " {}".format(ospf_covergence))
+
+    step(
+        "Verify that external routes are summarised to configured summary "
+        "address on R0 after 5 secs of delay timer expiry and only one "
+        "route is sent to R1.")
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Verify that show ip ospf summary should show the summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step(
+        "Verify that originally advertised routes are withdraw from there"
+        " peer.")
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol,
+                        expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    step("restart zebrad")
+    kill_router_daemons(tgen, "r0", ["zebra"])
+
+    step("Bring up zebra daemon on R0.")
+    start_router_daemons(tgen, "r0", ["zebra"])
+
+    step(
+        "Verify that external routes are summarised to configured summary "
+        "address on R0 after 5 secs of delay timer expiry and only one "
+        "route is sent to R1.")
+    input_dict_summary = {
+        "r0": {
+            "static_routes": [{"network": SUMMARY["ipv6"][0]}]
+        }
+    }
+    dut = 'r1'
+
+    result = verify_ospf6_rib(tgen, dut, input_dict_summary)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(
+        tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut,
+                        input_dict_summary, protocol=protocol)
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Routes is missing in RIB".format(tc_name)
+
+    step("Verify that show ip ospf summary should show the summaries.")
+    input_dict = {
+        SUMMARY["ipv6"][0]: {
+            "Summary address": SUMMARY["ipv6"][0],
+            "Metric-type": "E2",
+            "Metric": 20,
+            "Tag": 0,
+            "External route count": 5
+        }
+    }
+    dut = 'r0'
+    result = verify_ospf_summary(tgen, topo, dut, input_dict, ospf='ospf6')
+    assert result is True, "Testcase {} : Failed" \
+        "Error: Summary missing in OSPF DB".format(tc_name)
+
+    step(
+        "Verify that originally advertised routes are withdraw from there"
+        " peer.")
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"],
+                    "next_hop": "blackhole"
+                }
+            ]
+        }
+    }
+    dut = 'r1'
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert result is not True, "Testcase {} : Failed \n Error: "\
+    "Routes still present in OSPF RIB {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol,
+                        expected=False)
+    assert result is not True, "Testcase {} : Failed" \
+        "Error: Routes still present in RIB".format(tc_name)
+
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_ecmp.py
new file mode 100644 (file)
index 0000000..50c5144
--- /dev/null
@@ -0,0 +1,523 @@
+#!/usr/bin/python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""OSPF Basic Functionality Automation."""
+import os
+import sys
+import time
+import pytest
+import json
+from copy import deepcopy
+from ipaddress import IPv4Address
+from lib.topotest import frr_unicode
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../lib/"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from mininet.topo import Topo
+from lib.topogen import Topogen, get_topogen
+import ipaddress
+
+# Import topoJson from lib, to create topology and initial configuration
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    write_test_footer,
+    reset_config_on_routers,
+    verify_rib,
+    create_static_routes,
+    step,
+    create_route_maps,
+    shutdown_bringup_interface,
+    create_interfaces_cfg,
+    topo_daemons,
+    get_frr_ipv6_linklocal,
+)
+from lib.topolog import logger
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+from lib.ospf import (
+    verify_ospf6_neighbor,
+    config_ospf_interface,
+    clear_ospf,
+    verify_ospf6_rib,
+    create_router_ospf,
+    verify_ospf6_interface,
+    verify_ospf6_database,
+    config_ospf6_interface,
+)
+
+from ipaddress import IPv6Address
+
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
+# Global variables
+topo = None
+
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/ospfv3_ecmp.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+NETWORK = {
+    "ipv4": [
+        "11.0.20.1/32",
+        "11.0.20.2/32",
+        "11.0.20.3/32",
+        "11.0.20.4/32",
+        "11.0.20.5/32",
+    ],
+    "ipv6": ["2::1/128", "2::2/128", "2::3/128", "2::4/128", "2::5/128"],
+}
+"""
+TOPOLOGY :
+      Please view in a fixed-width font such as Courier.
+      +---+  A1       +---+
+      +R1 +------------+R2 |
+      +-+-+-           +--++
+        |  --        --  |
+        |    -- A0 --    |
+      A0|      ----      |
+        |      ----      | A2
+        |    --    --    |
+        |  --        --  |
+      +-+-+-            +-+-+
+      +R0 +-------------+R3 |
+      +---+     A3     +---+
+
+TESTCASES :
+1. Verify OSPF ECMP with max path configured as 8 (ECMPconfigured at FRR level)
+2. Verify OSPF ECMP with max path configured as 2 (Edge having 2 uplink ports)
+ """
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """
+    Sets up the pytest environment
+
+    * `mod`: module name
+    """
+    global topo
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+    # ... and here it calls Mininet initialization functions.
+
+    # get list of daemons needs to be started for this suite.
+    daemons = topo_daemons(tgen, topo)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen, daemons)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    logger.info("Running setup_module() done")
+
+
+def teardown_module(mod):
+    """
+    Teardown the pytest environment.
+
+    * `mod`: module name
+    """
+
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+    logger.info(
+        "Testsuite end time: {}".format(time.asctime(time.localtime(time.time())))
+    )
+    logger.info("=" * 40)
+
+
+def red_static(dut, config=True):
+    """Local def for Redstribute static routes inside ospf."""
+    global topo
+    tgen = get_topogen()
+    if config:
+        ospf_red = {dut: {"ospf6": {"redistribute": [{"redist_type": "static"}]}}}
+    else:
+        ospf_red = {
+            dut: {
+                "ospf6": {"redistribute": [{"redist_type": "static", "delete": True}]}
+            }
+        }
+    result = create_router_ospf(tgen, topo, ospf_red)
+    assert result is True, "Testcase : Failed \n Error: {}".format(result)
+
+
+def red_connected(dut, config=True):
+    """Local def for Redstribute connected routes inside ospf."""
+    global topo
+    tgen = get_topogen()
+    if config:
+        ospf_red = {dut: {"ospf6": {"redistribute": [{"redist_type": "connected"}]}}}
+    else:
+        ospf_red = {
+            dut: {
+                "ospf6": {
+                    "redistribute": [{"redist_type": "connected", "del_action": True}]
+                }
+            }
+        }
+    result = create_router_ospf(tgen, topo, ospf_red)
+    assert result is True, "Testcase: Failed \n Error: {}".format(result)
+
+
+def get_llip(onrouter, intf):
+    """
+    API to get the link local ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `fromnode`: Source node
+    * `tonode` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_llip('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) link local ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    tgen = get_topogen()
+    intf = topo["routers"][onrouter]["links"][intf]["interface"]
+    llip = get_frr_ipv6_linklocal(tgen, onrouter, intf)
+    if llip:
+        logger.info("llip ipv6 address to be set as NH is %s", llip)
+        return llip
+    return None
+
+
+def get_glipv6(onrouter, intf):
+    """
+    API to get the global ipv6 address of a perticular interface
+
+    Parameters
+    ----------
+    * `onrouter`: Source node
+    * `intf` : interface for which link local ip needs to be returned.
+
+    Usage
+    -----
+    result = get_glipv6('r1', 'r2-link0')
+
+    Returns
+    -------
+    1) global ipv6 address from the interface.
+    2) errormsg - when link local ip not found.
+    """
+    glipv6 = (topo["routers"][onrouter]["links"][intf]["ipv6"]).split("/")[0]
+    if glipv6:
+        logger.info("Global ipv6 address to be set as NH is %s", glipv6)
+        return glipv6
+    return None
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+
+
+def test_ospfv3_ecmp_tc16_p0(request):
+    """
+    Verify OSPF ECMP.
+
+    Verify OSPF ECMP with max path configured as 8 (ECMP
+    configured at FRR level)
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config as per the topology")
+    step("Configure 8 interfaces between R1 and R2 and enable ospf in area 0.")
+
+    reset_config_on_routers(tgen)
+
+    step("Verify that OSPF is up with 8 neighborship sessions.")
+    dut = "r1"
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    step("Configure a static route in R0 and redistribute in OSPF.")
+
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"][0],
+                    "no_of_ip": 5,
+                    "next_hop": "Null0",
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r0"
+    red_static(dut)
+
+    llip = get_llip("r0", "r1-link1")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that route in R2 in stalled with 8 next hops.")
+    nh = []
+    for item in range(1, 7):
+        nh.append(llip)
+
+    llip = get_llip("r0", "r1")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    nh2 = llip
+
+    nh.append(nh2)
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("shut no shut all the interfaces on the remote router - R2")
+    dut = "r1"
+    for intfr in range(1, 7):
+        intf = topo["routers"]["r1"]["links"]["r0-link{}".format(intfr)]["interface"]
+        shutdown_bringup_interface(tgen, dut, intf, False)
+
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route present in OSPF RIB.  Error: {}".format(
+        tc_name, result
+    )
+
+    protocol = "ospf"
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route present in RIB. Error: {}".format(tc_name, result)
+
+    for intfr in range(1, 7):
+        intf = topo["routers"]["r1"]["links"]["r0-link{}".format(intfr)]["interface"]
+        shutdown_bringup_interface(tgen, dut, intf, True)
+
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("shut no shut on all the interfaces on DUT (r1)")
+    for intfr in range(1, 7):
+        intf = topo["routers"]["r1"]["links"]["r0-link{}".format(intfr)]["interface"]
+        shutdown_bringup_interface(tgen, dut, intf, False)
+
+    for intfr in range(1, 7):
+        intf = topo["routers"]["r1"]["links"]["r0-link{}".format(intfr)]["interface"]
+        shutdown_bringup_interface(tgen, dut, intf, True)
+
+    step(
+        "Verify that all the neighbours are up and routes are installed"
+        " with 8 next hop in ospf and ip route tables on R1."
+    )
+
+    step("Verify that OSPF is up with 8 neighborship sessions.")
+    dut = "r1"
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_ecmp_tc17_p0(request):
+    """
+    Verify OSPF ECMP.
+
+    Verify OSPF ECMP with max path configured as 2 (Edge having 2 uplink ports)
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config as per the topology")
+    step("Configure 2 interfaces between R1 and R2 & enable ospf in area 0.")
+
+    reset_config_on_routers(tgen)
+
+    step("Verify that OSPF is up with 2 neighborship sessions.")
+    dut = "r1"
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo, dut=dut)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    step("Configure a static route in R0 and redistribute in OSPF.")
+
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"][0],
+                    "no_of_ip": 5,
+                    "next_hop": "Null0",
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r0"
+    red_static(dut)
+
+    step("Verify that route in R2 in stalled with 2 next hops.")
+
+    llip = get_llip("r0", "r1-link1")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    nh1 = llip
+
+    llip = get_llip("r0", "r1")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    nh2 = llip
+
+    nh = [nh1, nh2]
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Configure ECMP value as 1.")
+    max_path = {"r1": {"ospf6": {"maximum-paths": 1}}}
+    result = create_router_ospf(tgen, topo, max_path)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r1"
+    max_path = {"r1": {"ospf6": {"maximum-paths": 2}}}
+    result = create_router_ospf(tgen, topo, max_path)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Configure cost on R0 as 100")
+    r0_ospf_cost = {"r0": {"links": {"r1": {"ospf6": {"cost": 100}}}}}
+    result = config_ospf6_interface(tgen, topo, r0_ospf_cost)
+    assert result is True, "Testcase {} :Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
diff --git a/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py b/tests/topotests/ospfv3_basic_functionality/test_ospfv3_routemaps.py
new file mode 100644 (file)
index 0000000..d8cf3bd
--- /dev/null
@@ -0,0 +1,875 @@
+#!/usr/bin/python
+
+#
+# Copyright (c) 2021 by VMware, Inc. ("VMware")
+# Used Copyright (c) 2018 by Network Device Education Foundation, Inc.
+# ("NetDEF") in this file.
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND VMWARE DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL VMWARE BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+
+"""OSPF Basic Functionality Automation."""
+import os
+import sys
+import time
+import pytest
+import json
+from copy import deepcopy
+from ipaddress import IPv4Address
+from lib.topotest import frr_unicode
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+sys.path.append(os.path.join(CWD, "../lib/"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from mininet.topo import Topo
+from lib.topogen import Topogen, get_topogen
+import ipaddress
+
+# Import topoJson from lib, to create topology and initial configuration
+from lib.common_config import (
+    start_topology,
+    write_test_header,
+    write_test_footer,
+    reset_config_on_routers,
+    create_prefix_lists,
+    verify_rib,
+    create_static_routes,
+    step,
+    create_route_maps,
+    verify_prefix_lists,
+    get_frr_ipv6_linklocal,
+    topo_daemons,
+)
+from lib.topolog import logger
+from lib.topojson import build_topo_from_json, build_config_from_json
+
+from lib.ospf import (
+    verify_ospf6_neighbor,
+    config_ospf_interface,
+    clear_ospf,
+    verify_ospf6_rib,
+    create_router_ospf,
+    verify_ospf6_interface,
+    verify_ospf6_database,
+    config_ospf6_interface,
+)
+
+from ipaddress import IPv6Address
+
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
+# Global variables
+topo = None
+
+# Reading the data from JSON File for topology creation
+jsonFile = "{}/ospfv3_routemaps.json".format(CWD)
+try:
+    with open(jsonFile, "r") as topoJson:
+        topo = json.load(topoJson)
+except IOError:
+    assert False, "Could not read file {}".format(jsonFile)
+
+NETWORK = {
+    "ipv4": [
+        "11.0.20.1/32",
+        "11.0.20.2/32",
+        "11.0.20.3/32",
+        "11.0.20.4/32",
+        "11.0.20.5/32",
+    ],
+    "ipv6": ["2::1/128", "2::2/128", "2::3/128", "2::4/128", "2::5/128"],
+}
+
+routerids = ["100.1.1.0", "100.1.1.1", "100.1.1.2", "100.1.1.3"]
+
+"""
+TOPOOLOGY =
+      Please view in a fixed-width font such as Courier.
+      +---+  A1       +---+
+      +R1 +------------+R2 |
+      +-+-+-           +--++
+        |  --        --  |
+        |    -- A0 --    |
+      A0|      ----      |
+        |      ----      | A2
+        |    --    --    |
+        |  --        --  |
+      +-+-+-            +-+-+
+      +R0 +-------------+R3 |
+      +---+     A3     +---+
+
+TESTCASES =
+2. Verify OSPF route map support functionality when route map is not
+    configured at system level but configured in OSPF
+4. Verify OSPF route map support functionality
+    when route map actions are toggled.
+5. Verify OSPF route map support  functionality with multiple sequence
+    numbers in a single  route-map for different match/set clauses.
+6. Verify OSPF route map support functionality when we add/remove route-maps
+    with multiple set clauses and without any match statement.(Set only)
+7.  Verify OSPF route map support functionality when we
+    add/remove route-maps with multiple match clauses and without
+    any set statement.(Match only)
+8. Verify OSPF route map applied to ospf redistribution with  ipv6 prefix list
+ """
+
+
+class CreateTopo(Topo):
+    """
+    Test topology builder.
+
+    * `Topo`: Topology object
+    """
+
+    def build(self, *_args, **_opts):
+        """Build function."""
+        tgen = get_topogen(self)
+
+        # Building topology from json file
+        build_topo_from_json(tgen, topo)
+
+
+def setup_module(mod):
+    """
+    Sets up the pytest environment
+
+    * `mod`: module name
+    """
+    global topo
+    testsuite_run_time = time.asctime(time.localtime(time.time()))
+    logger.info("Testsuite start time: {}".format(testsuite_run_time))
+    logger.info("=" * 40)
+
+    logger.info("Running setup_module to create topology")
+
+    # This function initiates the topology build with Topogen...
+    tgen = Topogen(CreateTopo, mod.__name__)
+    # ... and here it calls Mininet initialization functions.
+
+    # get list of daemons needs to be started for this suite.
+    daemons = topo_daemons(tgen, topo)
+
+    # Starting topology, create tmp files which are loaded to routers
+    #  to start deamons and then start routers
+    start_topology(tgen, daemons)
+
+    # Creating configuration from JSON
+    build_config_from_json(tgen, topo)
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    logger.info("Running setup_module() done")
+
+
+def teardown_module(mod):
+    """
+    Teardown the pytest environment.
+
+    * `mod`: module name
+    """
+
+    logger.info("Running teardown_module to delete topology")
+
+    tgen = get_topogen()
+
+    # Stop toplogy and Remove tmp files
+    tgen.stop_topology()
+
+    logger.info(
+        "Testsuite end time: {}".format(time.asctime(time.localtime(time.time())))
+    )
+    logger.info("=" * 40)
+
+
+# ##################################
+# Test cases start here.
+# ##################################
+
+
+def test_ospfv3_routemaps_functionality_tc20_p0(request):
+    """
+    OSPF route map support functionality.
+
+    Verify OSPF route map support functionality when route map is not
+    configured at system level but configured in OSPF
+
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    global topo
+    step("Bring up the base config as per the topology")
+
+    reset_config_on_routers(tgen)
+
+    step("Create static routes(10.0.20.1/32 and 10.0.20.2/32) in R0")
+    # Create Static routes
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"][0],
+                    "no_of_ip": 5,
+                    "next_hop": "Null0",
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Redistribute to ospf using route map ( non existent route map)")
+    ospf_red_r1 = {
+        "r0": {
+            "ospf6": {
+                "redistribute": [{"redist_type": "static", "route_map": "rmap_ipv6"}]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_red_r1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "Verify that routes are not allowed in OSPF even tough no "
+        "matching routing map is configured."
+    )
+
+    dut = "r1"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    step(
+        "configure the route map with the same name that is used "
+        "in the ospf with deny rule."
+    )
+
+    # Create route map
+    routemaps = {"r0": {"route_maps": {"rmap_ipv6": [{"action": "deny"}]}}}
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("verify that now route map is activated & routes are denied in OSPF.")
+    dut = "r1"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    # Create route map
+    routemaps = {"r0": {"route_maps": {"rmap_ipv6": [{"action": "deny"}]}}}
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("verify that now route map is activated & routes are denied in OSPF.")
+    dut = "r1"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    step("Delete the route map.")
+    # Create route map
+    routemaps = {
+        "r0": {"route_maps": {"rmap_ipv6": [{"action": "deny", "delete": True}]}}
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "Verify that routes are allowed in OSPF even tough "
+        "no matching routing map is configured."
+    )
+    dut = "r1"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_routemaps_functionality_tc25_p0(request):
+    """
+    OSPF route map support functionality.
+
+    Verify OSPF route map support functionality
+    when route map actions are toggled.
+
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    global topo
+    step("Bring up the base config as per the topology")
+
+    reset_config_on_routers(tgen)
+
+    step(
+        "Create static routes(10.0.20.1/32) in R1 and redistribute "
+        "to OSPF using route map."
+    )
+
+    # Create Static routes
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"][0],
+                    "no_of_ip": 5,
+                    "next_hop": "Null0",
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_red_r0 = {
+        "r0": {
+            "ospf6": {
+                "redistribute": [{"redist_type": "static", "route_map": "rmap_ipv6"}]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_red_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step("Configure route map with permit rule")
+    # Create route map
+    routemaps = {"r0": {"route_maps": {"rmap_ipv6": [{"action": "permit"}]}}}
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that route is advertised to R1.")
+    dut = "r1"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+    step("Configure route map with deny rule")
+    # Create route map
+    routemaps = {
+        "r0": {"route_maps": {"rmap_ipv6": [{"seq_id": 10, "action": "deny"}]}}
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # Api call verify whether OSPF is converged
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    step("Verify that route is not advertised to R1.")
+    dut = "r1"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_routemaps_functionality_tc22_p0(request):
+    """
+    OSPF Route map - Multiple sequence numbers.
+
+    Verify OSPF route map support  functionality with multiple sequence
+    numbers in a single  route-map for different match/set clauses.
+
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    global topo
+    step("Bring up the base config as per the topology")
+
+    reset_config_on_routers(tgen)
+
+    step(
+        "Configure route map with seq number 10 to with ip prefix"
+        " permitting route 10.0.20.1/32 in R1"
+    )
+    step(
+        "Configure route map with seq number 20 to with  ip prefix"
+        "  permitting route 10.0.20.2/32 in R1"
+    )
+
+    # Create route map
+    input_dict_3 = {
+        "r0": {
+            "route_maps": {
+                "rmap_ipv6": [
+                    {
+                        "action": "permit",
+                        "seq_id": "10",
+                        "match": {"ipv6": {"prefix_lists": "pf_list_1_ipv6"}},
+                    },
+                    {
+                        "action": "permit",
+                        "seq_id": "20",
+                        "match": {"ipv6": {"prefix_lists": "pf_list_2_ipv4"}},
+                    },
+                ]
+            }
+        }
+    }
+    result = create_route_maps(tgen, input_dict_3)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # Create ip prefix list
+    input_dict_2 = {
+        "r0": {
+            "prefix_lists": {
+                "ipv4": {
+                    "pf_list_1_ipv6": [
+                        {"seqid": 10, "network": NETWORK["ipv6"][0], "action": "permit"}
+                    ]
+                }
+            }
+        }
+    }
+    result = create_prefix_lists(tgen, input_dict_2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # Create ip prefix list
+    input_dict_2 = {
+        "r0": {
+            "prefix_lists": {
+                "ipv4": {
+                    "pf_list_2_ipv4": [
+                        {"seqid": 10, "network": NETWORK["ipv6"][1], "action": "permit"}
+                    ]
+                }
+            }
+        }
+    }
+    result = create_prefix_lists(tgen, input_dict_2)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Configure static routes 10.0.20.1/32 and 10.0.20.2 in R1")
+    # Create Static routes
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"][0],
+                    "no_of_ip": 5,
+                    "next_hop": "Null0",
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Configure redistribute static route with route map.")
+    ospf_red_r0 = {
+        "r0": {
+            "ospf6": {
+                "redistribute": [{"redist_type": "static", "route_map": "rmap_ipv6"}]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_red_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"][0],
+                    "no_of_ip": 2,
+                    "next_hop": "Null0",
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that both routes are learned in R1 and R2")
+    dut = "r1"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r2"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Change route map with seq number 20 to deny.")
+    # Create route map
+    input_dict_3 = {
+        "r0": {
+            "route_maps": {
+                "rmap_ipv6": [
+                    {
+                        "action": "deny",
+                        "seq_id": "20",
+                        "match": {"ipv6": {"prefix_lists": "pf_list_2_ipv4"}},
+                    }
+                ]
+            }
+        }
+    }
+    result = create_route_maps(tgen, input_dict_3)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "Verify the route 10.0.20.2/32 is withdrawn and not present "
+        "in the routing table of R0 and R1."
+    )
+
+    input_dict = {
+        "r0": {"static_routes": [{"network": NETWORK["ipv6"][1], "next_hop": "Null0"}]}
+    }
+
+    dut = "r1"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    dut = "r2"
+    protocol = "ospf"
+    result = verify_ospf6_rib(tgen, dut, input_dict, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route found in the RIB, Error: {}".format(
+        tc_name, result
+    )
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_routemaps_functionality_tc24_p0(request):
+    """
+    OSPF Route map - Multiple set clauses.
+
+    Verify OSPF route map support functionality when we
+    add/remove route-maps with multiple match clauses and without
+    any set statement.(Match only)
+
+    """
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+    global topo
+    step("Bring up the base config as per the topology")
+
+    reset_config_on_routers(tgen)
+
+    step(
+        "Create static routes(10.0.20.1/32) in R1 and redistribute to "
+        "OSPF using route map."
+    )
+    # Create Static routes
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"][0],
+                    "no_of_ip": 1,
+                    "next_hop": "Null0",
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    ospf_red_r0 = {
+        "r0": {
+            "ospf6": {
+                "redistribute": [{"redist_type": "static", "route_map": "rmap_ipv6"}]
+            }
+        }
+    }
+    result = create_router_ospf(tgen, topo, ospf_red_r0)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # Create ip prefix list
+    pfx_list = {
+        "r0": {
+            "prefix_lists": {
+                "ipv6": {
+                    "pf_list_1_ipv6": [
+                        {"seqid": 10, "network": "any", "action": "permit"}
+                    ]
+                }
+            }
+        }
+    }
+    result = create_prefix_lists(tgen, pfx_list)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("verify that prefix-list is created in R0.")
+    result = verify_prefix_lists(tgen, pfx_list)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Prefix list not " "present. Error: {}".format(
+        tc_name, result
+    )
+
+    # Create route map
+    routemaps = {
+        "r0": {
+            "route_maps": {
+                "rmap_ipv6": [
+                    {
+                        "action": "permit",
+                        "match": {"ipv6": {"prefix_lists": "pf_list_1_ipv6"}},
+                    }
+                ]
+            }
+        }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that metric falls back to original metric for ospf routes.")
+    dut = "r1"
+    protocol = "ospf"
+
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step(
+        "Create static routes(10.0.20.1/32) in R1 and redistribute to "
+        "OSPF using route map."
+    )
+    # Create Static routes
+    input_dict = {
+        "r0": {
+            "static_routes": [
+                {
+                    "network": NETWORK["ipv6"][1],
+                    "no_of_ip": 1,
+                    "next_hop": "Null0",
+                    "tag": 1000,
+                }
+            ]
+        }
+    }
+    result = create_static_routes(tgen, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    # Create ip prefix list
+    pfx_list = {
+        "r0": {
+            "prefix_lists": {
+                "ipv6": {
+                    "pf_list_1_ipv6": [
+                        {"seqid": 10, "network": "any", "action": "permit"}
+                    ]
+                }
+            }
+        }
+    }
+    result = create_prefix_lists(tgen, pfx_list)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("verify that prefix-list is created in R0.")
+    result = verify_prefix_lists(tgen, pfx_list)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Prefix list not " "present. Error: {}".format(
+        tc_name, result
+    )
+
+    # Create route map
+    routemaps = {
+        "r0": {
+            "route_maps": {
+                "rmap_ipv6": [{"action": "permit", "match": {"ipv6": {"tag": "1000"}}}]
+            }
+        }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that metric falls back to original metric for ospf routes.")
+    dut = "r1"
+    protocol = "ospf"
+
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Delete the match clause with tag in route map")
+    # Create route map
+    routemaps = {
+        "r0": {
+            "route_maps": {
+                "rmap_ipv6": [
+                    {
+                        "action": "permit",
+                        "match": {"ipv6": {"tag": "1000", "delete": True}},
+                    }
+                ]
+            }
+        }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Verify that metric falls back to original metric for ospf routes.")
+    dut = "r1"
+    protocol = "ospf"
+
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Delete the match clause with metric in route map.")
+
+    # Create route map
+    routemaps = {
+        "r0": {
+            "route_maps": {
+                "rmap_ipv6": [
+                    {
+                        "action": "permit",
+                        "match": {"ipv6": {"prefix_lists": "pf_list_1_ipv6"}},
+                    }
+                ]
+            }
+        }
+    }
+    result = create_route_maps(tgen, routemaps)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index 4aa71bfb16c9cdc83a75de6411b71eebb53a9bbc..860f17ba674e7f96f246d8245d41435f4a7dffe2 100644 (file)
@@ -74,6 +74,9 @@ from lib.ospf import (
 
 from ipaddress import IPv6Address
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 
@@ -281,6 +284,233 @@ def red_connected(dut, config=True):
 # ##################################
 # Test cases start here.
 # ##################################
+def test_ospfv3_redistribution_tc5_p0(request):
+    """Test OSPF intra area route calculations."""
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config.")
+    reset_config_on_routers(tgen)
+
+    step("Verify that OSPF neighbors are FULL.")
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    step("verify intra area route is calculated for r0-r3 interface ip in R1")
+    ip = topo["routers"]["r0"]["links"]["r3"]["ipv6"]
+    ip_net = str(ipaddress.ip_interface(u"{}".format(ip)).network)
+
+    llip = get_llip("r0", "r1")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, llip)
+
+    nh = llip
+    input_dict = {
+        "r1": {"static_routes": [{"network": ip_net, "no_of_ip": 1, "routeType": "N"}]}
+    }
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Delete the ip address on newly configured loopback of R0")
+    topo1 = {
+        "r0": {
+            "links": {
+                "r3": {
+                    "ipv6": topo["routers"]["r0"]["links"]["r3"]["ipv6"],
+                    "interface": topo["routers"]["r0"]["links"]["r3"]["interface"],
+                    "delete": True,
+                }
+            }
+        }
+    }
+
+    result = create_interfaces_cfg(tgen, topo1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route present in RIB. Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route present in RIB. Error: {}".format(tc_name, result)
+
+    step("Add back the deleted ip address on newly configured interface of R0")
+    topo1 = {
+        "r0": {
+            "links": {
+                "r3": {
+                    "ipv6": topo["routers"]["r0"]["links"]["r3"]["ipv6"],
+                    "interface": topo["routers"]["r0"]["links"]["r3"]["interface"],
+                }
+            }
+        }
+    }
+
+    result = create_interfaces_cfg(tgen, topo1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Shut no shut interface on R0")
+    dut = "r0"
+    intf = topo["routers"]["r0"]["links"]["r3"]["interface"]
+    shutdown_bringup_interface(tgen, dut, intf, False)
+
+    step("un shut the OSPF interface on R0")
+    dut = "r0"
+    shutdown_bringup_interface(tgen, dut, intf, True)
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
+def test_ospfv3_redistribution_tc6_p0(request):
+    """Test OSPF inter area route calculations."""
+    tc_name = request.node.name
+    write_test_header(tc_name)
+    tgen = get_topogen()
+
+    # Don't run this test if we have any failure.
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    global topo
+    step("Bring up the base config.")
+    reset_config_on_routers(tgen)
+
+    step("Verify that OSPF neighbors are FULL.")
+    ospf_covergence = verify_ospf6_neighbor(tgen, topo)
+    assert ospf_covergence is True, "setup_module :Failed \n Error:" " {}".format(
+        ospf_covergence
+    )
+
+    step("verify intra area route is calculated for r0-r3 interface ip in R1")
+    ip = topo["routers"]["r0"]["links"]["r3"]["ipv6"]
+    ip_net = str(ipaddress.ip_interface(u"{}".format(ip)).network)
+    llip = get_llip("r0", "r1")
+    assert llip is not None, "Testcase {} : Failed \n Error: {}".format(tc_name, llip)
+    nh = llip
+    input_dict = {
+        "r1": {"static_routes": [{"network": ip_net, "no_of_ip": 1, "routeType": "N"}]}
+    }
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Delete the ip address on newly configured loopback of R0")
+    topo1 = {
+        "r0": {
+            "links": {
+                "r3": {
+                    "ipv6": topo["routers"]["r0"]["links"]["r3"]["ipv6"],
+                    "interface": topo["routers"]["r0"]["links"]["r3"]["interface"],
+                    "delete": True,
+                }
+            }
+        }
+    }
+
+    result = create_interfaces_cfg(tgen, topo1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh, expected=False)
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route present in RIB. Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(
+        tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh, expected=False
+    )
+    assert (
+        result is not True
+    ), "Testcase {} : Failed \n Route present in RIB. Error: {}".format(tc_name, result)
+
+    step("Add back the deleted ip address on newly configured interface of R0")
+    topo1 = {
+        "r0": {
+            "links": {
+                "r3": {
+                    "ipv6": topo["routers"]["r0"]["links"]["r3"]["ipv6"],
+                    "interface": topo["routers"]["r0"]["links"]["r3"]["interface"],
+                }
+            }
+        }
+    }
+
+    result = create_interfaces_cfg(tgen, topo1)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    step("Shut no shut interface on R0")
+    dut = "r0"
+    intf = topo["routers"]["r0"]["links"]["r3"]["interface"]
+    shutdown_bringup_interface(tgen, dut, intf, False)
+
+    step("Verify that intraroute calculated for R1 intf on R0 is deleted.")
+    dut = "r1"
+
+    step("un shut the OSPF interface on R0")
+    dut = "r0"
+    shutdown_bringup_interface(tgen, dut, intf, True)
+
+    dut = "r1"
+    result = verify_ospf6_rib(tgen, dut, input_dict)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    protocol = "ospf"
+    result = verify_rib(tgen, "ipv6", dut, input_dict, protocol=protocol, next_hop=nh)
+    assert result is True, "Testcase {} : Failed \n Error: {}".format(tc_name, result)
+
+    write_test_footer(tc_name)
+
+
 def test_ospfv3_cost_tc52_p0(request):
     """OSPF Cost - verifying ospf interface cost functionality"""
     tc_name = request.node.name
@@ -368,7 +598,6 @@ def test_ospfv3_cost_tc52_p0(request):
     write_test_footer(tc_name)
 
 
-
 if __name__ == "__main__":
     args = ["-s"] + sys.argv[1:]
     sys.exit(pytest.main(args))
index a84f1a1eb6e9aed8f392d871518b3c93775fbb8b..0c1c51c78a803747cb62330c86e257d88f572786 100644 (file)
@@ -54,7 +54,7 @@ from lib.common_config import (
     create_route_maps,
     shutdown_bringup_interface,
     create_interfaces_cfg,
-    topo_daemons,
+    topo_daemons
 )
 from lib.topolog import logger
 from lib.topojson import build_topo_from_json, build_config_from_json
@@ -72,6 +72,9 @@ from lib.ospf import (
 
 from ipaddress import IPv6Address
 
+pytestmark = [pytest.mark.ospfd, pytest.mark.staticd]
+
+
 # Global variables
 topo = None
 
diff --git a/tests/topotests/pim_acl/h1/zebra.conf b/tests/topotests/pim_acl/h1/zebra.conf
new file mode 100644 (file)
index 0000000..3d6540d
--- /dev/null
@@ -0,0 +1,10 @@
+!
+hostname h1
+log file zebra.log
+!
+interface h1-eth0
+ description connection to r1 via sw1
+ ip address 192.168.100.10/24
+!
+ip route 0.0.0.0/0 192.168.100.1
+!
diff --git a/tests/topotests/pim_acl/h2/zebra.conf b/tests/topotests/pim_acl/h2/zebra.conf
new file mode 100644 (file)
index 0000000..95342f9
--- /dev/null
@@ -0,0 +1,8 @@
+hostname h2
+!
+interface h2-eth0
+ description connection to r1 via sw2
+ ip address 192.168.101.2/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_acl/r1/acl_1_pim_join.json b/tests/topotests/pim_acl/r1/acl_1_pim_join.json
new file mode 100644 (file)
index 0000000..1b44b2b
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "r1-eth0":{
+    "name":"r1-eth0",
+    "state":"up",
+    "address":"192.168.100.1",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.1":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.1",
+        "upTime":"--:--:--",
+        "expire":"--:--",
+        "prune":"--:--",
+        "channelJoinName":"NOINFO",
+        "protocolIgmp":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r1/acl_2_pim_join.json b/tests/topotests/pim_acl/r1/acl_2_pim_join.json
new file mode 100644 (file)
index 0000000..c020a48
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "r1-eth0":{
+    "name":"r1-eth0",
+    "state":"up",
+    "address":"192.168.100.1",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.17":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.17",
+        "upTime":"--:--:--",
+        "expire":"--:--",
+        "prune":"--:--",
+        "channelJoinName":"NOINFO",
+        "protocolIgmp":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r1/acl_3_pim_join.json b/tests/topotests/pim_acl/r1/acl_3_pim_join.json
new file mode 100644 (file)
index 0000000..6122f73
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "r1-eth0":{
+    "name":"r1-eth0",
+    "state":"up",
+    "address":"192.168.100.1",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.32":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.32",
+        "upTime":"--:--:--",
+        "expire":"--:--",
+        "prune":"--:--",
+        "channelJoinName":"NOINFO",
+        "protocolIgmp":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r1/acl_4_pim_join.json b/tests/topotests/pim_acl/r1/acl_4_pim_join.json
new file mode 100644 (file)
index 0000000..5f72256
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "r1-eth0":{
+    "name":"r1-eth0",
+    "state":"up",
+    "address":"192.168.100.1",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.255":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.255",
+        "upTime":"--:--:--",
+        "expire":"--:--",
+        "prune":"--:--",
+        "channelJoinName":"NOINFO",
+        "protocolIgmp":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r1/acl_5_pim_join.json b/tests/topotests/pim_acl/r1/acl_5_pim_join.json
new file mode 100644 (file)
index 0000000..70021bd
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "r1-eth0":{
+    "name":"r1-eth0",
+    "state":"up",
+    "address":"192.168.100.1",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.97":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.97",
+        "upTime":"--:--:--",
+        "expire":"--:--",
+        "prune":"--:--",
+        "channelJoinName":"NOINFO",
+        "protocolIgmp":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r1/acl_6_pim_join.json b/tests/topotests/pim_acl/r1/acl_6_pim_join.json
new file mode 100644 (file)
index 0000000..2baac6c
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "r1-eth0":{
+    "name":"r1-eth0",
+    "state":"up",
+    "address":"192.168.100.1",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.70":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.70",
+        "upTime":"--:--:--",
+        "expire":"--:--",
+        "prune":"--:--",
+        "channelJoinName":"NOINFO",
+        "protocolIgmp":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r1/ospf_neighbor.json b/tests/topotests/pim_acl/r1/ospf_neighbor.json
new file mode 100644 (file)
index 0000000..a8fc093
--- /dev/null
@@ -0,0 +1,59 @@
+{
+  "neighbors":{
+    "192.168.0.11":[
+      {
+        "priority":10,
+        "state":"Full\/Backup",
+        "address":"192.168.101.11",
+        "ifaceName":"r1-eth1:192.168.101.1",
+        "retransmitCounter":0,
+        "requestCounter":0,
+        "dbSummaryCounter":0
+      }
+    ],
+    "192.168.0.12":[
+      {
+        "priority":0,
+        "state":"Full\/DROther",
+        "address":"192.168.101.12",
+        "ifaceName":"r1-eth1:192.168.101.1",
+        "retransmitCounter":0,
+        "requestCounter":0,
+        "dbSummaryCounter":0
+      }
+    ],
+    "192.168.0.13":[
+      {
+        "priority":0,
+        "state":"Full\/DROther",
+        "address":"192.168.101.13",
+        "ifaceName":"r1-eth1:192.168.101.1",
+        "retransmitCounter":0,
+        "requestCounter":0,
+        "dbSummaryCounter":0
+      }
+    ],
+    "192.168.0.14":[
+      {
+        "priority":0,
+        "state":"Full\/DROther",
+        "address":"192.168.101.14",
+        "ifaceName":"r1-eth1:192.168.101.1",
+        "retransmitCounter":0,
+        "requestCounter":0,
+        "dbSummaryCounter":0
+      }
+    ],
+    "192.168.0.15":[
+      {
+        "priority":0,
+        "state":"Full\/DROther",
+        "address":"192.168.101.15",
+        "ifaceName":"r1-eth1:192.168.101.1",
+        "retransmitCounter":0,
+        "requestCounter":0,
+        "dbSummaryCounter":0
+      }
+    ]
+  }
+}
diff --git a/tests/topotests/pim_acl/r1/ospfd.conf b/tests/topotests/pim_acl/r1/ospfd.conf
new file mode 100644 (file)
index 0000000..e1f47fb
--- /dev/null
@@ -0,0 +1,16 @@
+hostname r1
+!
+debug ospf event
+!
+interface r1-eth1
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 20
+!
+router ospf
+ ospf router-id 192.168.0.1
+ passive-interface r1-eth0
+ network 192.168.0.1/32 area 0
+ network 192.168.100.0/24 area 0
+ network 192.168.101.0/24 area 0
+
diff --git a/tests/topotests/pim_acl/r1/pim_neighbor.json b/tests/topotests/pim_acl/r1/pim_neighbor.json
new file mode 100644 (file)
index 0000000..ae95e8d
--- /dev/null
@@ -0,0 +1,31 @@
+{
+  "r1-eth0":{
+  },
+  "r1-eth1":{
+    "192.168.101.12":{
+      "interface":"r1-eth1",
+      "neighbor":"192.168.101.12",
+      "drPriority":1
+    },
+    "192.168.101.15":{
+      "interface":"r1-eth1",
+      "neighbor":"192.168.101.15",
+      "drPriority":1
+    },
+    "192.168.101.14":{
+      "interface":"r1-eth1",
+      "neighbor":"192.168.101.14",
+      "drPriority":1
+    },
+    "192.168.101.11":{
+      "interface":"r1-eth1",
+      "neighbor":"192.168.101.11",
+      "drPriority":1
+    },
+    "192.168.101.13":{
+      "interface":"r1-eth1",
+      "neighbor":"192.168.101.13",
+      "drPriority":1
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r1/pimd.conf b/tests/topotests/pim_acl/r1/pimd.conf
new file mode 100644 (file)
index 0000000..a148c73
--- /dev/null
@@ -0,0 +1,31 @@
+hostname r1
+!
+debug igmp events
+debug igmp packets
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+ip pim rp 192.168.0.11 prefix-list rp-pl-1
+ip pim rp 192.168.0.12 prefix-list rp-pl-2
+ip pim rp 192.168.0.13 prefix-list rp-pl-3
+ip pim rp 192.168.0.14 prefix-list rp-pl-4
+ip pim rp 192.168.0.15 prefix-list rp-pl-5
+ip pim join-prune-interval 5
+!
+interface r1-eth0
+ ip igmp
+ ip igmp version 2
+ ip pim
+!
+interface r1-eth1
+ ip pim
+!
+ip prefix-list rp-pl-1 seq 10 permit 239.100.0.0/28
+ip prefix-list rp-pl-2 seq 10 permit 239.100.0.17/32
+ip prefix-list rp-pl-3 seq 10 permit 239.100.0.32/27
+ip prefix-list rp-pl-4 seq 10 permit 239.100.0.128/25
+ip prefix-list rp-pl-4 seq 20 permit 239.100.0.96/28
+ip prefix-list rp-pl-5 seq 10 permit 239.100.0.64/28
diff --git a/tests/topotests/pim_acl/r1/zebra.conf b/tests/topotests/pim_acl/r1/zebra.conf
new file mode 100644 (file)
index 0000000..74feb8f
--- /dev/null
@@ -0,0 +1,18 @@
+!
+hostname r1
+log file zebra.log
+!
+ip forwarding
+ipv6 forwarding
+!
+interface lo
+ ip address 192.168.0.1/32
+!
+interface r1-eth0
+ description connection to h1 via sw1
+ ip address 192.168.100.1/24
+!
+interface r1-eth1
+ description connection to r11/12/13/14/15 via sw2
+ ip address 192.168.101.1/24
+!
diff --git a/tests/topotests/pim_acl/r11/acl_1_pim_join.json b/tests/topotests/pim_acl/r11/acl_1_pim_join.json
new file mode 100644 (file)
index 0000000..289bf51
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "r11-eth0":{
+    "name":"r11-eth0",
+    "state":"up",
+    "address":"192.168.101.11",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.1":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.1",
+        "prune":"--:--",
+        "channelJoinName":"JOIN",
+        "protocolPim":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r11/ospfd.conf b/tests/topotests/pim_acl/r11/ospfd.conf
new file mode 100644 (file)
index 0000000..e107220
--- /dev/null
@@ -0,0 +1,14 @@
+hostname r11
+!
+debug ospf event
+!
+interface r11-eth0
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 10
+!
+router ospf
+ ospf router-id 192.168.0.11
+ network 192.168.0.11/32 area 0
+ network 192.168.101.0/24 area 0
+!
diff --git a/tests/topotests/pim_acl/r11/pimd.conf b/tests/topotests/pim_acl/r11/pimd.conf
new file mode 100644 (file)
index 0000000..b1d4520
--- /dev/null
@@ -0,0 +1,17 @@
+hostname r11
+!
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+ip pim rp 192.168.0.11 239.100.0.0/28
+ip pim join-prune-interval 5
+!
+interface lo
+ ip pim
+!
+interface r11-eth0
+ ip pim
+!
diff --git a/tests/topotests/pim_acl/r11/zebra.conf b/tests/topotests/pim_acl/r11/zebra.conf
new file mode 100644 (file)
index 0000000..137706d
--- /dev/null
@@ -0,0 +1,13 @@
+!
+hostname r11
+log file zebra.log
+!
+interface lo
+ ip address 192.168.0.11/32
+!
+interface r11-eth0
+ description connection to r1 via sw1
+ ip address 192.168.101.11/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_acl/r12/acl_2_pim_join.json b/tests/topotests/pim_acl/r12/acl_2_pim_join.json
new file mode 100644 (file)
index 0000000..76ab7ee
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "r12-eth0":{
+    "name":"r12-eth0",
+    "state":"up",
+    "address":"192.168.101.12",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.17":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.17",
+        "prune":"--:--",
+        "channelJoinName":"JOIN",
+        "protocolPim":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r12/ospfd.conf b/tests/topotests/pim_acl/r12/ospfd.conf
new file mode 100644 (file)
index 0000000..f9203c7
--- /dev/null
@@ -0,0 +1,14 @@
+hostname r12
+!
+debug ospf event
+!
+interface r12-eth0
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 0
+!
+router ospf
+ ospf router-id 192.168.0.12
+ network 192.168.0.12/32 area 0
+ network 192.168.101.0/24 area 0
+!
diff --git a/tests/topotests/pim_acl/r12/pimd.conf b/tests/topotests/pim_acl/r12/pimd.conf
new file mode 100644 (file)
index 0000000..ba9e7d9
--- /dev/null
@@ -0,0 +1,17 @@
+hostname r12
+!
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+ip pim rp 192.168.0.12 239.100.0.17/32
+ip pim join-prune-interval 5
+!
+interface lo
+ ip pim
+!
+interface r12-eth0
+ ip pim
+!
diff --git a/tests/topotests/pim_acl/r12/zebra.conf b/tests/topotests/pim_acl/r12/zebra.conf
new file mode 100644 (file)
index 0000000..bede104
--- /dev/null
@@ -0,0 +1,13 @@
+!
+hostname r12
+log file zebra.log
+!
+interface lo
+ ip address 192.168.0.12/32
+!
+interface r12-eth0
+ description connection to r1 via sw1
+ ip address 192.168.101.12/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_acl/r13/acl_3_pim_join.json b/tests/topotests/pim_acl/r13/acl_3_pim_join.json
new file mode 100644 (file)
index 0000000..48ad72c
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "r13-eth0":{
+    "name":"r13-eth0",
+    "state":"up",
+    "address":"192.168.101.13",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.32":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.32",
+        "prune":"--:--",
+        "channelJoinName":"JOIN",
+        "protocolPim":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r13/ospfd.conf b/tests/topotests/pim_acl/r13/ospfd.conf
new file mode 100644 (file)
index 0000000..830c5a1
--- /dev/null
@@ -0,0 +1,14 @@
+hostname r13
+!
+debug ospf event
+!
+interface r13-eth0
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 0
+!
+router ospf
+ ospf router-id 192.168.0.13
+ network 192.168.0.13/32 area 0
+ network 192.168.101.0/24 area 0
+!
diff --git a/tests/topotests/pim_acl/r13/pimd.conf b/tests/topotests/pim_acl/r13/pimd.conf
new file mode 100644 (file)
index 0000000..2ff1743
--- /dev/null
@@ -0,0 +1,17 @@
+hostname r13
+!
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+ip pim rp 192.168.0.13 239.100.0.32/27
+ip pim join-prune-interval 5
+!
+interface lo
+ ip pim
+!
+interface r13-eth0
+ ip pim
+!
diff --git a/tests/topotests/pim_acl/r13/zebra.conf b/tests/topotests/pim_acl/r13/zebra.conf
new file mode 100644 (file)
index 0000000..f9ff27a
--- /dev/null
@@ -0,0 +1,13 @@
+!
+hostname r13
+log file zebra.log
+!
+interface lo
+ ip address 192.168.0.13/32
+!
+interface r13-eth0
+ description connection to r1 via sw1
+ ip address 192.168.101.13/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_acl/r14/acl_4_pim_join.json b/tests/topotests/pim_acl/r14/acl_4_pim_join.json
new file mode 100644 (file)
index 0000000..46d86dd
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "r14-eth0":{
+    "name":"r14-eth0",
+    "state":"up",
+    "address":"192.168.101.14",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.255":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.255",
+        "prune":"--:--",
+        "channelJoinName":"JOIN",
+        "protocolPim":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r14/acl_5_pim_join.json b/tests/topotests/pim_acl/r14/acl_5_pim_join.json
new file mode 100644 (file)
index 0000000..2b291a8
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "r14-eth0":{
+    "name":"r14-eth0",
+    "state":"up",
+    "address":"192.168.101.14",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.97":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.97",
+        "prune":"--:--",
+        "channelJoinName":"JOIN",
+        "protocolPim":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r14/ospfd.conf b/tests/topotests/pim_acl/r14/ospfd.conf
new file mode 100644 (file)
index 0000000..422e4c0
--- /dev/null
@@ -0,0 +1,14 @@
+hostname r14
+!
+debug ospf event
+!
+interface r14-eth0
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 0
+!
+router ospf
+ ospf router-id 192.168.0.14
+ network 192.168.0.14/32 area 0
+ network 192.168.101.0/24 area 0
+!
diff --git a/tests/topotests/pim_acl/r14/pimd.conf b/tests/topotests/pim_acl/r14/pimd.conf
new file mode 100644 (file)
index 0000000..1324a9e
--- /dev/null
@@ -0,0 +1,18 @@
+hostname r14
+!
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+ip pim rp 192.168.0.14 239.100.0.96/28
+ip pim rp 192.168.0.14 239.100.0.128/25
+ip pim join-prune-interval 5
+!
+interface lo
+ ip pim
+!
+interface r14-eth0
+ ip pim
+!
diff --git a/tests/topotests/pim_acl/r14/zebra.conf b/tests/topotests/pim_acl/r14/zebra.conf
new file mode 100644 (file)
index 0000000..8761b46
--- /dev/null
@@ -0,0 +1,13 @@
+!
+hostname r14
+log file zebra.log
+!
+interface lo
+ ip address 192.168.0.14/32
+!
+interface r14-eth0
+ description connection to r1 via sw1
+ ip address 192.168.101.14/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_acl/r15/acl_6_pim_join.json b/tests/topotests/pim_acl/r15/acl_6_pim_join.json
new file mode 100644 (file)
index 0000000..05fed4e
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "r15-eth0":{
+    "name":"r15-eth0",
+    "state":"up",
+    "address":"192.168.101.15",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.70":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.70",
+        "prune":"--:--",
+        "channelJoinName":"JOIN",
+        "protocolPim":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_acl/r15/ospfd.conf b/tests/topotests/pim_acl/r15/ospfd.conf
new file mode 100644 (file)
index 0000000..cd4d7b3
--- /dev/null
@@ -0,0 +1,14 @@
+hostname r15
+!
+debug ospf event
+!
+interface r15-eth0
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 0
+!
+router ospf
+ ospf router-id 192.168.0.15
+ network 192.168.0.15/32 area 0
+ network 192.168.101.0/24 area 0
+!
diff --git a/tests/topotests/pim_acl/r15/pimd.conf b/tests/topotests/pim_acl/r15/pimd.conf
new file mode 100644 (file)
index 0000000..f47e78c
--- /dev/null
@@ -0,0 +1,17 @@
+hostname r15
+!
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+ip pim rp 192.168.0.15 239.100.0.64/28
+ip pim join-prune-interval 5
+!
+interface lo
+ ip pim
+!
+interface r15-eth0
+ ip pim
+!
diff --git a/tests/topotests/pim_acl/r15/zebra.conf b/tests/topotests/pim_acl/r15/zebra.conf
new file mode 100644 (file)
index 0000000..f6909dd
--- /dev/null
@@ -0,0 +1,13 @@
+!
+hostname r15
+log file zebra.log
+!
+interface lo
+ ip address 192.168.0.15/32
+!
+interface r15-eth0
+ description connection to r1 via sw1
+ ip address 192.168.101.15/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_acl/test_pim_acl.py b/tests/topotests/pim_acl/test_pim_acl.py
new file mode 100755 (executable)
index 0000000..77917a0
--- /dev/null
@@ -0,0 +1,418 @@
+#!/usr/bin/env python
+
+#
+# test_pim_acl.py
+# Part of NetDEF Topology Tests
+#
+# Copyright (c) 2020 by
+# Network Device Education Foundation, Inc. ("NetDEF")
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+"""
+test_pim_acl.py: Test PIM with RP selection using ACLs
+"""
+
+# Test PIM RP selection with ACLs
+#
+# Testing RP selection with ACLs. R1 uses multiple ACLs
+# to select desired RPs (R11 to R15)
+#
+# Test steps:
+# - setup_module()
+#     Create topology. Hosts are only using zebra/staticd,
+#     no PIM, no OSPF (using IGMPv2 for multicast)
+# - test_ospf_convergence()
+#     Wait for OSPF convergence in each VRF. OSPF is run on
+#     R1 and R11 - R15.
+# - test_pim_convergence()
+#     Wait for PIM convergence on all routers. PIM is run on
+#     R1 and R11 - R15. 
+# - test_mcast_acl_1():
+#     Test 1st ACL entry 239.100.0.0/28 with 239.100.0.1 which
+#     should use R11 as RP
+#     Stop multicast after verification
+# - test_mcast_acl_2():
+#     Test 2nd ACL entry 239.100.0.17/32 with 239.100.0.17 which
+#     should use R12 as RP
+#     Stop multicast after verification
+# - test_mcast_acl_3():
+#     Test 3rd ACL entry 239.100.0.32/27 with 239.100.0.32 which
+#     should use R13 as RP
+#     Stop multicast after verification
+# - test_mcast_acl_4():
+#     Test 4th ACL entry 239.100.0.128/25 with 239.100.0.255 which
+#     should use R14 as RP
+#     Stop multicast after verification
+# - test_mcast_acl_5():
+#     Test 5th ACL entry 239.100.0.96/28 with 239.100.0.97 which
+#     should use R14 as RP
+#     Stop multicast after verification
+# - test_mcast_acl_6():
+#     Test 6th ACL entry 239.100.0.64/28 with 239.100.0.70 which
+#     should use R15 as RP
+#     Stop multicast after verification
+# - teardown_module()
+#     shutdown topology
+#
+
+
+TOPOLOGY = """
+                                             +----------+
+                                             |  Host H2 |
+                                             |  Source  |
+                                             +----------+
+                                                .2 |
+                             +-----------+         |        +----------+
+                             |           | .1      |    .11 | Host R11 |
++---------+                  |    R1     |---------+--------| PIM RP   |
+| Host H1 | 192.168.100.0/24 |           | 192.168.101.0/24 +----------+
+| receive |------------------| uses ACLs |         |        +----------+
+|IGMP JOIN| .10           .1 |  to pick  |         |    .12 | Host R12 |
++---------+                  |    RP     |         +--------| PIM RP   |
+                             |           |         |        +----------+
+                             +-----------+         |        +----------+
+                                                   |    .13 | Host R13 |
+                                                   +--------| PIM RP   |
+                                                   |        +----------+
+                                                   |        +----------+
+                                                   |    .14 | Host R14 |
+                                                   +--------| PIM RP   |
+                                                   |        +----------+
+                                                   |        +----------+
+                                                   |    .15 | Host R15 |
+                                                   +--------| PIM RP   |
+                                                            +----------+
+"""
+
+import json
+import functools
+import os
+import sys
+import pytest
+import re
+import time
+from time import sleep
+import socket
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib import topotest
+from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.topolog import logger
+
+# Required to instantiate the topology builder class.
+from mininet.topo import Topo
+
+pytestmark = [pytest.mark.pimd, pytest.mark.ospfd]
+
+
+#
+# Test global variables:
+# They are used to handle communicating with external application.
+#
+APP_SOCK_PATH = '/tmp/topotests/apps.sock'
+HELPER_APP_PATH = os.path.join(CWD, "../lib/mcast-tester.py")
+app_listener = None
+app_clients = {}
+
+def listen_to_applications():
+    "Start listening socket to connect with applications."
+    # Remove old socket.
+    try:
+        os.unlink(APP_SOCK_PATH)
+    except OSError:
+        pass
+
+    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
+    sock.bind(APP_SOCK_PATH)
+    sock.listen(10)
+    global app_listener
+    app_listener = sock
+
+def accept_host(host):
+    "Accept connection from application running in hosts."
+    global app_listener, app_clients
+    conn = app_listener.accept()
+    app_clients[host] = {
+        'fd': conn[0],
+        'address': conn[1]
+    }
+
+def close_applications():
+    "Signal applications to stop and close all sockets."
+    global app_listener, app_clients
+
+    if app_listener:
+        # Close listening socket.
+        app_listener.close()
+
+        # Remove old socket.
+        try:
+            os.unlink(APP_SOCK_PATH)
+        except OSError:
+            pass
+
+    # Close all host connections.
+    for host in ["h1", "h2"]:
+        if app_clients.get(host) is None:
+            continue
+        app_clients[host]["fd"].close()
+
+    # Reset listener and clients data struct
+    app_listener = None
+    app_clients = {}
+
+
+class PIMACLTopo(Topo):
+    "PIM ACL Test Topology"
+
+    def build(self):
+        tgen = get_topogen(self)
+
+        # Create the hosts
+        for hostNum in range(1,3):
+            tgen.add_router("h{}".format(hostNum))
+
+        # Create the main router
+        tgen.add_router("r1")
+
+        # Create the PIM RP routers
+        for rtrNum in range(11, 16):
+            tgen.add_router("r{}".format(rtrNum))
+
+        # Setup Switches and connections
+        for swNum in range(1, 3):
+            tgen.add_switch("sw{}".format(swNum))
+
+        # Add connections H1 to R1 switch sw1
+        tgen.gears["h1"].add_link(tgen.gears["sw1"])
+        tgen.gears["r1"].add_link(tgen.gears["sw1"])
+
+        # Add connections R1 to R1x switch sw2
+        tgen.gears["r1"].add_link(tgen.gears["sw2"])
+        tgen.gears["h2"].add_link(tgen.gears["sw2"])
+        tgen.gears["r11"].add_link(tgen.gears["sw2"])
+        tgen.gears["r12"].add_link(tgen.gears["sw2"])
+        tgen.gears["r13"].add_link(tgen.gears["sw2"])
+        tgen.gears["r14"].add_link(tgen.gears["sw2"])
+        tgen.gears["r15"].add_link(tgen.gears["sw2"])
+
+
+#####################################################
+#
+#   Tests starting
+#
+#####################################################
+
+def setup_module(module):
+    logger.info("PIM RP ACL Topology: \n {}".format(TOPOLOGY))
+
+    tgen = Topogen(PIMACLTopo, module.__name__)
+    tgen.start_topology()
+
+    # Starting Routers
+    router_list = tgen.routers()
+
+    for rname, router in router_list.items():
+        logger.info("Loading router %s" % rname)
+        router.load_config(
+            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
+        )
+        if rname[0] != 'h':
+            # Only load ospf on routers, not on end hosts
+            router.load_config(
+                TopoRouter.RD_OSPF, os.path.join(CWD, "{}/ospfd.conf".format(rname))
+            )
+            router.load_config(
+                TopoRouter.RD_PIM, os.path.join(CWD, "{}/pimd.conf".format(rname))
+            )
+    tgen.start_router()
+
+
+def teardown_module(module):
+    tgen = get_topogen()
+    tgen.stop_topology()
+    close_applications()
+
+
+def test_ospf_convergence():
+    "Test for OSPFv2 convergence"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    logger.info("Checking OSPFv2 convergence on router r1")
+
+    router = tgen.gears["r1"]
+    reffile = os.path.join(CWD, "r1/ospf_neighbor.json")
+    expected = json.loads(open(reffile).read())
+
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip ospf neighbor json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=60, wait=2)
+    assertmsg = "OSPF router R1 did not converge"
+    assert res is None, assertmsg
+
+
+def test_pim_convergence():
+    "Test for PIM convergence"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    logger.info("Checking PIM convergence on router r1")
+
+    router = tgen.gears["r1"]
+    reffile = os.path.join(CWD, "r1/pim_neighbor.json")
+    expected = json.loads(open(reffile).read())
+
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip pim neighbor json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=60, wait=2)
+    assertmsg = "PIM router R1 did not converge"
+    assert res is None, assertmsg
+
+
+
+def check_mcast_entry(entry, mcastaddr, pimrp):
+    "Helper function to check RP"
+    tgen = get_topogen()
+
+    logger.info("Testing PIM RP selection for ACL {} entry using {}".format(entry, mcastaddr));
+
+    # Start applications socket.
+    listen_to_applications()
+
+    tgen.gears["h2"].run("{} --send='0.7' '{}' '{}' '{}' &".format(
+        HELPER_APP_PATH, APP_SOCK_PATH, mcastaddr, 'h2-eth0'))
+    accept_host("h2")
+
+    tgen.gears["h1"].run("{} '{}' '{}' '{}' &".format(
+        HELPER_APP_PATH, APP_SOCK_PATH, mcastaddr, 'h1-eth0'))
+    accept_host("h1")
+
+    logger.info("mcast join and source for {} started".format(mcastaddr))
+
+    # tgen.mininet_cli()
+
+    router = tgen.gears["r1"]
+    reffile = os.path.join(CWD, "r1/acl_{}_pim_join.json".format(entry))
+    expected = json.loads(open(reffile).read())
+
+    logger.info("verifying pim join on r1 for {}".format(mcastaddr))
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip pim join json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=60, wait=2)
+    assertmsg = "PIM router r1 did not show join status"
+    assert res is None, assertmsg
+
+    logger.info("verifying pim join on PIM RP {} for {}".format(pimrp, mcastaddr))
+    router = tgen.gears[pimrp]
+    reffile = os.path.join(CWD, "{}/acl_{}_pim_join.json".format(pimrp, entry))
+    expected = json.loads(open(reffile).read())
+
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip pim join json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=60, wait=2)
+    assertmsg = "PIM router {} did not get selected as the PIM RP".format(pimrp)
+    assert res is None, assertmsg
+
+    close_applications()
+    return
+
+
+def test_mcast_acl_1():
+    "Test 1st ACL entry 239.100.0.0/28 with 239.100.0.1"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    check_mcast_entry(1, '239.100.0.1', 'r11')
+
+
+def test_mcast_acl_2():
+    "Test 2nd ACL entry 239.100.0.17/32 with 239.100.0.17"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    check_mcast_entry(2, '239.100.0.17', 'r12')
+
+
+def test_mcast_acl_3():
+    "Test 3rd ACL entry 239.100.0.32/27 with 239.100.0.32"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    check_mcast_entry(3, '239.100.0.32', 'r13')
+
+
+def test_mcast_acl_4():
+    "Test 4th ACL entry 239.100.0.128/25 with 239.100.0.255"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    check_mcast_entry(4, '239.100.0.255', 'r14')
+
+
+def test_mcast_acl_5():
+    "Test 5th ACL entry 239.100.0.96/28 with 239.100.0.97"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    check_mcast_entry(5, '239.100.0.97', 'r14')
+
+
+def test_mcast_acl_6():
+    "Test 6th ACL entry 239.100.0.64/28 with 239.100.0.70"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    check_mcast_entry(6, '239.100.0.70', 'r15')
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index f64a46deb38b24b160d9b91d53577eb0f5d6dce1..737019fa51470b367451f567ee9a77dc8c60b707 100644 (file)
@@ -15,3 +15,4 @@ interface lo
   ip pim
 !
 ip pim rp 10.254.0.3
+ip pim join-prune-interval 5
index 6e35c97971cd2a145cd0018716b32fa915d11c2c..fd26bc4d712d62263e987a7cc15947e924786349 100644 (file)
@@ -6,6 +6,7 @@ interface rp-eth0
 interface lo
   ip pim
 !
+ip pim join-prune-interval 5
 ip pim rp 10.254.0.3
 ip pim register-accept-list ACCEPT
 
index 0b32ded19aa1a9b02021e005bd73d96d5f7ab459..9f389deb11aeb3b785ac259ea4c944824ddf7f99 100644 (file)
@@ -10,3 +10,4 @@ interface r2-eth2
  ip pim
  ip pim bfd
 !
+ip pim join-prune-interval 5
diff --git a/tests/topotests/pim_igmp_vrf/h1/zebra.conf b/tests/topotests/pim_igmp_vrf/h1/zebra.conf
new file mode 100644 (file)
index 0000000..3d6540d
--- /dev/null
@@ -0,0 +1,10 @@
+!
+hostname h1
+log file zebra.log
+!
+interface h1-eth0
+ description connection to r1 via sw1
+ ip address 192.168.100.10/24
+!
+ip route 0.0.0.0/0 192.168.100.1
+!
diff --git a/tests/topotests/pim_igmp_vrf/h2/zebra.conf b/tests/topotests/pim_igmp_vrf/h2/zebra.conf
new file mode 100644 (file)
index 0000000..95342f9
--- /dev/null
@@ -0,0 +1,8 @@
+hostname h2
+!
+interface h2-eth0
+ description connection to r1 via sw2
+ ip address 192.168.101.2/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_igmp_vrf/h3/zebra.conf b/tests/topotests/pim_igmp_vrf/h3/zebra.conf
new file mode 100644 (file)
index 0000000..ef99b1c
--- /dev/null
@@ -0,0 +1,10 @@
+!
+hostname h3
+log file zebra.log
+!
+interface h3-eth0
+ description connection to r1 via sw3
+ ip address 192.168.100.20/24
+!
+ip route 0.0.0.0/0 192.168.100.1
+!
diff --git a/tests/topotests/pim_igmp_vrf/h4/zebra.conf b/tests/topotests/pim_igmp_vrf/h4/zebra.conf
new file mode 100644 (file)
index 0000000..6a2e466
--- /dev/null
@@ -0,0 +1,8 @@
+hostname h4
+!
+interface h4-eth0
+ description connection to r1 via sw4
+ ip address 192.168.101.4/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_igmp_vrf/r1/ospf_blue_neighbor.json b/tests/topotests/pim_igmp_vrf/r1/ospf_blue_neighbor.json
new file mode 100644 (file)
index 0000000..604d25f
--- /dev/null
@@ -0,0 +1,15 @@
+{
+  "blue":{
+    "vrfName":"blue",
+    "neighbors":{
+      "192.168.0.11":[
+        {
+          "priority":10,
+          "state":"Full\/Backup",
+          "address":"192.168.101.11",
+          "ifaceName":"r1-eth1:192.168.101.1"
+        }
+      ]
+    }
+  }
+}
diff --git a/tests/topotests/pim_igmp_vrf/r1/ospf_red_neighbor.json b/tests/topotests/pim_igmp_vrf/r1/ospf_red_neighbor.json
new file mode 100644 (file)
index 0000000..456bb87
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "red":{
+    "vrfName":"red",
+    "neighbors":{
+      "192.168.0.12":[
+        {
+          "priority":10,
+          "state":"Full\/Backup",
+          "address":"192.168.101.12",
+          "ifaceName":"r1-eth3:192.168.101.1"
+        }
+      ]
+    }
+  }
+}
+
diff --git a/tests/topotests/pim_igmp_vrf/r1/ospfd.conf b/tests/topotests/pim_igmp_vrf/r1/ospfd.conf
new file mode 100644 (file)
index 0000000..263b586
--- /dev/null
@@ -0,0 +1,26 @@
+hostname r1
+!
+debug ospf event
+!
+!
+interface r1-eth1
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 20
+!
+interface r1-eth3
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 20
+!
+router ospf vrf blue
+ ospf router-id 192.168.0.1
+ network 192.168.0.1/32 area 0
+ network 192.168.100.0/24 area 0
+ network 192.168.101.0/24 area 0
+router ospf vrf red
+ ospf router-id 192.168.0.1
+ network 192.168.0.1/32 area 0
+ network 192.168.100.0/24 area 0
+ network 192.168.101.0/24 area 0
+!
diff --git a/tests/topotests/pim_igmp_vrf/r1/pim_blue_join.json b/tests/topotests/pim_igmp_vrf/r1/pim_blue_join.json
new file mode 100644 (file)
index 0000000..8568bae
--- /dev/null
@@ -0,0 +1,22 @@
+{
+  "r1-eth0":{
+    "name":"r1-eth0",
+    "state":"up",
+    "address":"192.168.100.1",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.1":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.1",
+        "upTime":"--:--:--",
+        "expire":"--:--",
+        "prune":"--:--",
+        "channelJoinName":"NOINFO",
+        "protocolIgmp":1
+      }
+    }
+  }
+}
+
diff --git a/tests/topotests/pim_igmp_vrf/r1/pim_blue_neighbor.json b/tests/topotests/pim_igmp_vrf/r1/pim_blue_neighbor.json
new file mode 100644 (file)
index 0000000..ea7d4ac
--- /dev/null
@@ -0,0 +1,13 @@
+{
+  "blue":{
+  },
+  "r1-eth0":{
+  },
+  "r1-eth1":{
+    "192.168.101.11":{
+      "interface":"r1-eth1",
+      "neighbor":"192.168.101.11",
+      "drPriority":1
+    }
+  }
+}
diff --git a/tests/topotests/pim_igmp_vrf/r1/pim_blue_pimreg11.json b/tests/topotests/pim_igmp_vrf/r1/pim_blue_pimreg11.json
new file mode 100644 (file)
index 0000000..d3642f8
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "pimreg11":{
+    "name":"pimreg11",
+    "state":"up",
+    "address":"0.0.0.0",
+    "flagAllMulticast":true,
+    "lanDelayEnabled":true,
+    "drAddress":"*",
+    "drPriority":1,
+    "drUptime":"--:--:--",
+    "drElections":0,
+    "drChanges":0
+  }
+}
diff --git a/tests/topotests/pim_igmp_vrf/r1/pim_red_join.json b/tests/topotests/pim_igmp_vrf/r1/pim_red_join.json
new file mode 100644 (file)
index 0000000..d0037ca
--- /dev/null
@@ -0,0 +1,21 @@
+{
+  "r1-eth2":{
+    "name":"r1-eth2",
+    "state":"up",
+    "address":"192.168.100.1",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.1":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.1",
+        "upTime":"--:--:--",
+        "expire":"--:--",
+        "prune":"--:--",
+        "channelJoinName":"NOINFO",
+        "protocolIgmp":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_igmp_vrf/r1/pim_red_neighbor.json b/tests/topotests/pim_igmp_vrf/r1/pim_red_neighbor.json
new file mode 100644 (file)
index 0000000..e17b408
--- /dev/null
@@ -0,0 +1,13 @@
+{
+  "r1-eth2":{
+  },
+  "r1-eth3":{
+    "192.168.101.12":{
+      "interface":"r1-eth3",
+      "neighbor":"192.168.101.12",
+      "drPriority":1
+    }
+  },
+  "red":{
+  }
+}
diff --git a/tests/topotests/pim_igmp_vrf/r1/pim_red_pimreg12.json b/tests/topotests/pim_igmp_vrf/r1/pim_red_pimreg12.json
new file mode 100644 (file)
index 0000000..45b6cd9
--- /dev/null
@@ -0,0 +1,14 @@
+{
+  "pimreg12":{
+    "name":"pimreg12",
+    "state":"up",
+    "address":"0.0.0.0",
+    "flagAllMulticast":true,
+    "lanDelayEnabled":true,
+    "drAddress":"*",
+    "drPriority":1,
+    "drUptime":"--:--:--",
+    "drElections":0,
+    "drChanges":0
+  }
+}
diff --git a/tests/topotests/pim_igmp_vrf/r1/pimd.conf b/tests/topotests/pim_igmp_vrf/r1/pimd.conf
new file mode 100644 (file)
index 0000000..f04c255
--- /dev/null
@@ -0,0 +1,27 @@
+hostname r1
+!
+debug igmp events
+debug igmp packets
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+interface r1-eth0
+ ip igmp
+ ip igmp version 2
+ ip pim
+!
+interface r1-eth1
+ ip pim
+!
+interface r1-eth2
+ ip igmp
+ ip igmp version 2
+ ip pim
+!
+interface r1-eth3
+ ip pim
+!
+ip pim join-prune-interval 5
diff --git a/tests/topotests/pim_igmp_vrf/r1/zebra.conf b/tests/topotests/pim_igmp_vrf/r1/zebra.conf
new file mode 100644 (file)
index 0000000..9da9280
--- /dev/null
@@ -0,0 +1,30 @@
+!
+hostname r1
+log file zebra.log
+!
+ip forwarding
+ipv6 forwarding
+!
+interface blue vrf blue
+ ip address 192.168.0.1/32
+!
+interface red vrf red
+ ip address 192.168.0.1/32
+!
+interface r1-eth0 vrf blue
+ description connection to h1 via sw1
+ ip address 192.168.100.1/24
+!
+interface r1-eth1 vrf blue
+ description connection to r11 via sw2
+ ip address 192.168.101.1/24
+!
+interface r1-eth2 vrf red
+ description connection to h1 via sw3
+ ip address 192.168.100.1/24
+!
+interface r1-eth3 vrf red
+ description connection to r12 via sw4
+ ip address 192.168.101.1/24
+!
+
diff --git a/tests/topotests/pim_igmp_vrf/r11/ospfd.conf b/tests/topotests/pim_igmp_vrf/r11/ospfd.conf
new file mode 100644 (file)
index 0000000..e107220
--- /dev/null
@@ -0,0 +1,14 @@
+hostname r11
+!
+debug ospf event
+!
+interface r11-eth0
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 10
+!
+router ospf
+ ospf router-id 192.168.0.11
+ network 192.168.0.11/32 area 0
+ network 192.168.101.0/24 area 0
+!
diff --git a/tests/topotests/pim_igmp_vrf/r11/pim_blue_join.json b/tests/topotests/pim_igmp_vrf/r11/pim_blue_join.json
new file mode 100644 (file)
index 0000000..289bf51
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "r11-eth0":{
+    "name":"r11-eth0",
+    "state":"up",
+    "address":"192.168.101.11",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.1":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.1",
+        "prune":"--:--",
+        "channelJoinName":"JOIN",
+        "protocolPim":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_igmp_vrf/r11/pimd.conf b/tests/topotests/pim_igmp_vrf/r11/pimd.conf
new file mode 100644 (file)
index 0000000..b1d4520
--- /dev/null
@@ -0,0 +1,17 @@
+hostname r11
+!
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+ip pim rp 192.168.0.11 239.100.0.0/28
+ip pim join-prune-interval 5
+!
+interface lo
+ ip pim
+!
+interface r11-eth0
+ ip pim
+!
diff --git a/tests/topotests/pim_igmp_vrf/r11/zebra.conf b/tests/topotests/pim_igmp_vrf/r11/zebra.conf
new file mode 100644 (file)
index 0000000..137706d
--- /dev/null
@@ -0,0 +1,13 @@
+!
+hostname r11
+log file zebra.log
+!
+interface lo
+ ip address 192.168.0.11/32
+!
+interface r11-eth0
+ description connection to r1 via sw1
+ ip address 192.168.101.11/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_igmp_vrf/r12/ospfd.conf b/tests/topotests/pim_igmp_vrf/r12/ospfd.conf
new file mode 100644 (file)
index 0000000..03acc82
--- /dev/null
@@ -0,0 +1,14 @@
+hostname r12
+!
+debug ospf event
+!
+interface r12-eth0
+ ip ospf hello-interval 2
+ ip ospf dead-interval 10
+ ip ospf priority 10
+!
+router ospf
+ ospf router-id 192.168.0.12
+ network 192.168.0.12/32 area 0
+ network 192.168.101.0/24 area 0
+!
diff --git a/tests/topotests/pim_igmp_vrf/r12/pim_red_join.json b/tests/topotests/pim_igmp_vrf/r12/pim_red_join.json
new file mode 100644 (file)
index 0000000..6926246
--- /dev/null
@@ -0,0 +1,19 @@
+{
+  "r12-eth0":{
+    "name":"r12-eth0",
+    "state":"up",
+    "address":"192.168.101.12",
+    "flagMulticast":true,
+    "flagBroadcast":true,
+    "lanDelayEnabled":true,
+    "239.100.0.1":{
+      "*":{
+        "source":"*",
+        "group":"239.100.0.1",
+        "prune":"--:--",
+        "channelJoinName":"JOIN",
+        "protocolPim":1
+      }
+    }
+  }
+}
diff --git a/tests/topotests/pim_igmp_vrf/r12/pimd.conf b/tests/topotests/pim_igmp_vrf/r12/pimd.conf
new file mode 100644 (file)
index 0000000..5cb76ef
--- /dev/null
@@ -0,0 +1,17 @@
+hostname r12
+!
+debug pim events
+debug pim packets
+debug pim trace
+debug pim zebra
+debug pim bsm
+!
+ip pim rp 192.168.0.12 239.100.0.0/28
+ip pim join-prune-interval 5
+!
+interface lo
+ ip pim
+!
+interface r12-eth0
+ ip pim
+!
diff --git a/tests/topotests/pim_igmp_vrf/r12/zebra.conf b/tests/topotests/pim_igmp_vrf/r12/zebra.conf
new file mode 100644 (file)
index 0000000..bede104
--- /dev/null
@@ -0,0 +1,13 @@
+!
+hostname r12
+log file zebra.log
+!
+interface lo
+ ip address 192.168.0.12/32
+!
+interface r12-eth0
+ description connection to r1 via sw1
+ ip address 192.168.101.12/24
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/pim_igmp_vrf/test_pim_vrf.py b/tests/topotests/pim_igmp_vrf/test_pim_vrf.py
new file mode 100755 (executable)
index 0000000..cb207cb
--- /dev/null
@@ -0,0 +1,462 @@
+#!/usr/bin/env python
+
+#
+# test_pim_vrf.py
+# Part of NetDEF Topology Tests
+#
+# Copyright (c) 2020 by
+# Network Device Education Foundation, Inc. ("NetDEF")
+#
+# Permission to use, copy, modify, and/or distribute this software
+# for any purpose with or without fee is hereby granted, provided
+# that the above copyright notice and this permission notice appear
+# in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND NETDEF DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NETDEF BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
+# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+# OF THIS SOFTWARE.
+#
+
+"""
+test_pim_vrf.py: Test PIM with VRFs.
+"""
+
+# Tests PIM with VRF
+#
+# R1 is split into 2 VRF: Blue and Red, the others are normal
+# routers and Hosts
+# There are 2 similar topologies with overlapping IPs in each
+# section. 
+#
+# Test steps:
+# - setup_module()
+#     Create topology. Hosts are only using zebra/staticd,
+#     no PIM, no OSPF (using IGMPv2 for multicast)
+# - test_ospf_convergence()
+#     Wait for OSPF convergence in each VRF. OSPF is run on
+#     R1, R11 and R12.
+# - test_pim_convergence()
+#     Wait for PIM convergence in each VRF. PIM is run on
+#     R1, R11 and R12. R11 is the RP for vrf blue, R12 is RP
+#     for vrf red.
+# - test_vrf_pimreg_interfaces()
+#     Adding PIM RP in VRF information and verify pimreg 
+#     interfaces in VRF blue and red
+# - test_mcast_vrf_blue()
+#     Start multicast stream for group 239.100.0.1 from Host 
+#     H2 and join from Host H1 on vrf blue
+#     Verify PIM JOIN status on R1 and R11
+#     Stop multicast after verification
+# - test_mcast_vrf_red()
+#     Start multicast stream for group 239.100.0.1 from Host 
+#     H4 and join from Host H3 on vrf blue
+#     Verify PIM JOIN status on R1 and R12
+#     Stop multicast after verification
+# - teardown_module(module)
+#     shutdown topology
+#
+
+TOPOLOGY = """
+                                               +----------+
+                                               |  Host H2 |
+                                               |  Source  |
+                                               +----------+
+                                                 .2 |
++---------+                  +------------+         |        +---------+
+| Host H1 | 192.168.100.0/24 |            | .1      |    .11 | Host H2 |
+| receive |------------------|  VRF Blue  |---------+--------| PIM RP  |
+|IGMP JOIN| .10           .1 |            | 192.168.101.0/24 |         |  
++---------+                  |            |                  +---------+
+                            =| = = R1 = = |=
++---------+                  |            |                  +---------+
+| Host H3 | 192.168.100.0/24 |            | 192.168.101.0/24 | Host H4 |
+| receive |------------------|  VRF Red   |---------+--------| PIM RP  |
+|IGMP JOIN| .20           .1 |            | .1      |    .12 |         |
++---------+                  +------------+         |        +---------+
+                                                 .4 | 
+                                               +----------+
+                                               |  Host H4 |
+                                               |  Source  |
+                                               +----------+
+"""
+
+import json
+import functools
+import os
+import sys
+import pytest
+import re
+import time
+from time import sleep
+import socket
+
+# Save the Current Working Directory to find configuration files.
+CWD = os.path.dirname(os.path.realpath(__file__))
+sys.path.append(os.path.join(CWD, "../"))
+
+# pylint: disable=C0413
+# Import topogen and topotest helpers
+from lib import topotest
+from lib.topogen import Topogen, TopoRouter, get_topogen
+from lib.topolog import logger
+from lib.topotest import iproute2_is_vrf_capable
+from lib.common_config import (
+    required_linux_kernel_version)
+
+# Required to instantiate the topology builder class.
+from mininet.topo import Topo
+
+pytestmark = [pytest.mark.ospfd, pytest.mark.pimd]
+
+
+#
+# Test global variables:
+# They are used to handle communicating with external application.
+#
+APP_SOCK_PATH = '/tmp/topotests/apps.sock'
+HELPER_APP_PATH = os.path.join(CWD, "../lib/mcast-tester.py")
+app_listener = None
+app_clients = {}
+
+def listen_to_applications():
+    "Start listening socket to connect with applications."
+    # Remove old socket.
+    try:
+        os.unlink(APP_SOCK_PATH)
+    except OSError:
+        pass
+
+    sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
+    sock.bind(APP_SOCK_PATH)
+    sock.listen(10)
+    global app_listener
+    app_listener = sock
+
+def accept_host(host):
+    "Accept connection from application running in hosts."
+    global app_listener, app_clients
+    conn = app_listener.accept()
+    app_clients[host] = {
+        'fd': conn[0],
+        'address': conn[1]
+    }
+
+def close_applications():
+    "Signal applications to stop and close all sockets."
+    global app_listener, app_clients
+
+    if app_listener:
+        # Close listening socket.
+        app_listener.close()
+
+        # Remove old socket.
+        try:
+            os.unlink(APP_SOCK_PATH)
+        except OSError:
+            pass
+
+    # Close all host connections.
+    for host in ["h1", "h2"]:
+        if app_clients.get(host) is None:
+            continue
+        app_clients[host]["fd"].close()
+
+    # Reset listener and clients data struct
+    app_listener = None
+    app_clients = {}
+
+
+class PIMVRFTopo(Topo):
+    "PIM VRF Test Topology"
+
+    def build(self):
+        tgen = get_topogen(self)
+
+        # Create the hosts
+        for hostNum in range(1,5):
+            tgen.add_router("h{}".format(hostNum))
+
+        # Create the main router
+        tgen.add_router("r1")
+
+        # Create the PIM RP routers
+        for rtrNum in range(11, 13):
+            tgen.add_router("r{}".format(rtrNum))
+
+        # Setup Switches and connections
+        for swNum in range(1, 5):
+            tgen.add_switch("sw{}".format(swNum))
+        
+        ################
+        # 1st set of connections to routers for VRF red
+        ################
+
+        # Add connections H1 to R1 switch sw1
+        tgen.gears["h1"].add_link(tgen.gears["sw1"])
+        tgen.gears["r1"].add_link(tgen.gears["sw1"])
+
+        # Add connections R1 to R1x switch sw2
+        tgen.gears["r1"].add_link(tgen.gears["sw2"])
+        tgen.gears["h2"].add_link(tgen.gears["sw2"])
+        tgen.gears["r11"].add_link(tgen.gears["sw2"])
+
+        ################
+        # 2nd set of connections to routers for vrf blue
+        ################
+
+        # Add connections H1 to R1 switch sw1
+        tgen.gears["h3"].add_link(tgen.gears["sw3"])
+        tgen.gears["r1"].add_link(tgen.gears["sw3"])
+
+        # Add connections R1 to R1x switch sw2
+        tgen.gears["r1"].add_link(tgen.gears["sw4"])
+        tgen.gears["h4"].add_link(tgen.gears["sw4"])
+        tgen.gears["r12"].add_link(tgen.gears["sw4"])
+
+#####################################################
+#
+#   Tests starting
+#
+#####################################################
+
+def setup_module(module):
+    logger.info("PIM IGMP VRF Topology: \n {}".format(TOPOLOGY))
+
+    tgen = Topogen(PIMVRFTopo, module.__name__)
+    tgen.start_topology()
+
+    vrf_setup_cmds = [
+        "ip link add name blue type vrf table 11",
+        "ip link add name red type vrf table 12",
+        "ip link set dev blue up",
+        "ip link set dev red up",
+        "ip link set dev r1-eth0 vrf blue up",
+        "ip link set dev r1-eth1 vrf blue up",
+        "ip link set dev r1-eth2 vrf red up",
+        "ip link set dev r1-eth3 vrf red up",
+    ]
+
+    # Starting Routers
+    router_list = tgen.routers()
+
+    # Create VRF on r2 first and add it's interfaces
+    for cmd in vrf_setup_cmds:
+        tgen.net["r1"].cmd(cmd)
+
+    for rname, router in router_list.items():
+        logger.info("Loading router %s" % rname)
+        router.load_config(
+            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
+        )
+        if rname[0] != 'h':
+            # Only load ospf on routers, not on end hosts
+            router.load_config(
+                TopoRouter.RD_OSPF, os.path.join(CWD, "{}/ospfd.conf".format(rname))
+            )
+            router.load_config(
+                TopoRouter.RD_PIM, os.path.join(CWD, "{}/pimd.conf".format(rname))
+            )
+    tgen.start_router()
+
+
+def teardown_module(module):
+    tgen = get_topogen()
+    tgen.stop_topology()
+    close_applications()
+
+
+def test_ospf_convergence():
+    "Test for OSPFv2 convergence"
+    tgen = get_topogen()
+
+    # Required linux kernel version for this suite to run.
+    result = required_linux_kernel_version("4.15")
+    if result is not True:
+        pytest.skip("Kernel requirements are not met")
+
+    # iproute2 needs to support VRFs for this suite to run.
+    if not iproute2_is_vrf_capable():
+        pytest.skip("Installed iproute2 version does not support VRFs")
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    logger.info("Checking OSPFv2 convergence on router r1 for VRF blue")
+
+    router = tgen.gears["r1"]
+    reffile = os.path.join(CWD, "r1/ospf_blue_neighbor.json")
+    expected = json.loads(open(reffile).read())
+
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip ospf vrf blue neighbor json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=60, wait=2)
+    assertmsg = "OSPF router R1 did not converge on VRF blue"
+    assert res is None, assertmsg
+
+    logger.info("Checking OSPFv2 convergence on router r1 for VRF red")
+
+    router = tgen.gears["r1"]
+    reffile = os.path.join(CWD, "r1/ospf_red_neighbor.json")
+    expected = json.loads(open(reffile).read())
+
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip ospf vrf red neighbor json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=60, wait=2)
+    assertmsg = "OSPF router R1 did not converge on VRF red"
+    assert res is None, assertmsg
+
+
+def test_pim_convergence():
+    "Test for PIM convergence"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    logger.info("Checking PIM convergence on router r1 for VRF red")
+
+    router = tgen.gears["r1"]
+    reffile = os.path.join(CWD, "r1/pim_red_neighbor.json")
+    expected = json.loads(open(reffile).read())
+
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip pim vrf red neighbor json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=30, wait=2)
+    assertmsg = "PIM router R1 did not converge for VRF red"
+    assert res is None, assertmsg
+
+    logger.info("Checking PIM convergence on router r1 for VRF blue")
+
+    router = tgen.gears["r1"]
+    reffile = os.path.join(CWD, "r1/pim_blue_neighbor.json")
+    expected = json.loads(open(reffile).read())
+
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip pim vrf blue neighbor json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=30, wait=2)
+    assertmsg = "PIM router R1 did not converge for VRF blue"
+    assert res is None, assertmsg
+
+
+def test_vrf_pimreg_interfaces():
+    "Adding PIM RP in VRF information and verify pimreg interfaces"
+    tgen = get_topogen()
+
+    r1 = tgen.gears["r1"]
+    r1.vtysh_cmd("conf\ninterface blue\nip pim")
+    r1.vtysh_cmd("conf\nvrf blue\nip pim rp 192.168.0.11 239.100.0.1/32\nexit-vrf")
+
+    # Check pimreg11 interface on R1, VRF blue
+    reffile = os.path.join(CWD, "r1/pim_blue_pimreg11.json")
+    expected = json.loads(open(reffile).read())
+    test_func = functools.partial(
+        topotest.router_json_cmp, r1, "show ip pim vrf blue inter pimreg11 json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=5, wait=2)
+    assertmsg = "PIM router R1, VRF blue (table 11) pimreg11 interface missing or incorrect status"
+    assert res is None, assertmsg
+
+    r1.vtysh_cmd("conf\ninterface red\nip pim")
+    r1.vtysh_cmd("conf\nvrf red\nip pim rp 192.168.0.12 239.100.0.1/32\nexit-vrf")
+
+    # Check pimreg12 interface on R1, VRF red
+    reffile = os.path.join(CWD, "r1/pim_red_pimreg12.json")
+    expected = json.loads(open(reffile).read())
+    test_func = functools.partial(
+        topotest.router_json_cmp, r1, "show ip pim vrf red inter pimreg12 json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=5, wait=2)
+    assertmsg = "PIM router R1, VRF red (table 12) pimreg12 interface missing or incorrect status"
+    assert res is None, assertmsg
+
+
+##################################
+###  Test PIM / IGMP with VRF
+##################################
+
+def check_mcast_entry(mcastaddr, pimrp, receiver, sender, vrf):
+    "Helper function to check RP"
+    tgen = get_topogen()
+
+    logger.info("Testing PIM for VRF {} entry using {}".format(vrf, mcastaddr));
+
+    # Start applications socket.
+    listen_to_applications()
+
+    tgen.gears[sender].run("{} --send='0.7' '{}' '{}' '{}' &".format(
+        HELPER_APP_PATH, APP_SOCK_PATH, mcastaddr, '{}-eth0'.format(sender)))
+    accept_host(sender)
+
+    tgen.gears[receiver].run("{} '{}' '{}' '{}' &".format(
+        HELPER_APP_PATH, APP_SOCK_PATH, mcastaddr, '{}-eth0'.format(receiver)))
+    accept_host(receiver)
+
+    logger.info("mcast join and source for {} started".format(mcastaddr))
+
+    # tgen.mininet_cli()
+
+    router = tgen.gears["r1"]
+    reffile = os.path.join(CWD, "r1/pim_{}_join.json".format(vrf))
+    expected = json.loads(open(reffile).read())
+
+    logger.info("verifying pim join on r1 for {} on VRF {}".format(mcastaddr, vrf))
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip pim vrf {} join json".format(vrf),
+        expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=10, wait=2)
+    assertmsg = "PIM router r1 did not show join status on VRF".format(vrf)
+    assert res is None, assertmsg
+
+    logger.info("verifying pim join on PIM RP {} for {}".format(pimrp, mcastaddr))
+    router = tgen.gears[pimrp]
+    reffile = os.path.join(CWD, "{}/pim_{}_join.json".format(pimrp, vrf))
+    expected = json.loads(open(reffile).read())
+
+    test_func = functools.partial(
+        topotest.router_json_cmp, router, "show ip pim join json", expected
+    )
+    _, res = topotest.run_and_expect(test_func, None, count=10, wait=2)
+    assertmsg = "PIM router {} did not get selected as the PIM RP for VRF {}".format(pimrp, vrf)
+    assert res is None, assertmsg
+
+    close_applications()
+    return
+
+
+def test_mcast_vrf_blue():
+    "Test vrf blue with 239.100.0.1"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    check_mcast_entry('239.100.0.1', 'r11', 'h1', 'h2', 'blue')
+
+
+def test_mcast_vrf_red():
+    "Test vrf red with 239.100.0.1"
+    tgen = get_topogen()
+
+    # Skip if previous fatal error condition is raised
+    if tgen.routers_have_failure():
+        pytest.skip(tgen.errors)
+
+    check_mcast_entry('239.100.0.1', 'r12', 'h3', 'h4', 'red')
+
+
+if __name__ == "__main__":
+    args = ["-s"] + sys.argv[1:]
+    sys.exit(pytest.main(args))
index bbd6ef8d60093cd010a46ca69f2411a3a1c5b51e..469ad42d640dd6cc6905231fb5e21227765bce9e 100644 (file)
@@ -48,6 +48,9 @@ from lib.common_config import shutdown_bringup_interface
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.sharpd]
+
+
 #####################################################
 ##
 ##   Network Topology Definition
index 5647e2b663ea26d4fa48ced4e505cdeefdb7720a..bdb44816b68cdff236efad3ce1c4efc158fd0d0f 100755 (executable)
@@ -90,6 +90,16 @@ def setup_module(mod):
 
     r1 = tgen.gears["r1"]
 
+    r1.run("ip addr add 192.168.12.12/24 dev r1-eth0")
+    r1.run("ip -6 addr add 2000:1:1:12::12/64 dev r1-eth0")
+    r1.run("ip addr add 192.168.13.13/24 dev r1-eth1")
+    r1.run("ip -6 addr add 2000:1:1:13::13/64 dev r1-eth1")
+    r1.run("ip addr add 192.168.14.14/24 dev r1-eth2")
+    r1.run("ip -6 addr add 2000:1:1:14::14/64 dev r1-eth2")
+    r1.run("ip addr add 1.1.1.1/32 dev lo")
+    r1.run("ip -6 addr add 2000:1:1:1::1/128 dev lo")
+    r1.run("ip addr show")
+
     router_list = tgen.routers()
 
     # For all registred routers, load the zebra configuration file
index a7416ce085f42d2fb01ad6d9bd0247ddb701c79b..04b0d8db97ac1c9bac66b326d7faae76d54b46e4 100755 (executable)
@@ -43,6 +43,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.sharpd]
+
 
 def open_json_file(filename):
     try:
index 812b39797fc843d57bc882163348fc2dee75062c..626de6b422f8a3b96b41f23f958fa9014c18f34c 100644 (file)
@@ -72,6 +72,9 @@ from lib.bgp import (
 )
 from lib.topojson import build_topo_from_json, build_config_from_json
 
+pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+
+
 # Reading the data from JSON File for topology creation
 jsonFile = "{}/static_routes_topo4_ebgp.json".format(CWD)
 try:
index 94baf8438f8898e528dd56686d59564e3d67416c..cf08ee9639b55b268f1e283b8f880be297448a2e 100644 (file)
@@ -47,6 +47,9 @@ from lib.common_config import shutdown_bringup_interface
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.sharpd]
+
+
 #####################################################
 ##
 ##   Network Topology Definition
index cc52fbd1a7e4ae24f815e8d3b45ec95acf64d6e7..2339b0f5b0bfaf65084f74e9401d7f40b2ce5a2e 100644 (file)
@@ -38,6 +38,8 @@ from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.bgpd]
+
 
 class TemplateTopo(Topo):
     def build(self, *_args, **_opts):
index 9fcf7b6820a9417555b7a7d651884cee4f2ed147..778a710ee3f9ad741cdb16f5dfe8d4ad50003ac9 100644 (file)
@@ -46,6 +46,8 @@ from time import sleep
 # Required to instantiate the topology builder class.
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.sharpd]
+
 
 class ZebraTopo(Topo):
     "Test topology builder"
@@ -102,13 +104,19 @@ def test_zebra_kernel_admin_distance():
     r1 = tgen.gears["r1"]
 
     # Route with 255/8192 metric
-    r1.run("ip route add 4.5.1.0/24 via 192.168.210.2 dev r1-eth0 metric 4278198272")
+
+    distance = 255
+    metric = 8192
+    def makekmetric(dist, metric):
+        return (dist << 24) + metric
+
+    r1.run("ip route add 4.5.1.0/24 via 192.168.210.2 dev r1-eth0 metric " + str(makekmetric(255, 8192)))
     # Route with 1/1 metric
-    r1.run("ip route add 4.5.2.0/24 via 192.168.211.2 dev r1-eth1 metric 16777217")
+    r1.run("ip route add 4.5.2.0/24 via 192.168.211.2 dev r1-eth1 metric " + str(makekmetric(1, 1)))
     # Route with 10/1 metric
-    r1.run("ip route add 4.5.3.0/24 via 192.168.212.2 dev r1-eth2 metric 167772161")
+    r1.run("ip route add 4.5.3.0/24 via 192.168.212.2 dev r1-eth2 metric " + str(makekmetric(10, 1)))
     # Same route with a 160/1 metric
-    r1.run("ip route add 4.5.3.0/24 via 192.168.213.2 dev r1-eth3 metric 2684354561")
+    r1.run("ip route add 4.5.3.0/24 via 192.168.213.2 dev r1-eth3 metric " + str(makekmetric(160, 1)))
 
     # Currently I believe we have a bug here with the same route and different
     # metric.  That needs to be properly resolved.  Making a note for
@@ -124,7 +132,7 @@ def test_zebra_kernel_admin_distance():
             "show ip route 4.5.{}.0 json".format(i),
             expected,
         )
-        _, result = topotest.run_and_expect(test_func, None, count=2, wait=0.5)
+        _, result = topotest.run_and_expect(test_func, None, count=20, wait=0.5)
         assertmsg = '"r1" JSON output mismatches'
         assert result is None, assertmsg
     # tgen.mininet_cli()
@@ -145,7 +153,7 @@ def test_zebra_kernel_override():
     test_func = partial(
         topotest.router_json_cmp, r1, "show ip route 4.5.1.0 json", expected
     )
-    _, result = topotest.run_and_expect(test_func, None, count=2, wait=0.5)
+    _, result = topotest.run_and_expect(test_func, None, count=20, wait=0.5)
     assert result is None, '"r1" JSON output mismatches'
 
     logger.info(
@@ -158,7 +166,7 @@ def test_zebra_kernel_override():
     test_func = partial(
         topotest.router_json_cmp, r1, "show ip route 4.5.1.0 json", expected
     )
-    _, result = topotest.run_and_expect(test_func, None, count=2, wait=0.5)
+    _, result = topotest.run_and_expect(test_func, None, count=20, wait=0.5)
     assert result is None, '"r1" JSON output mismatches'
 
 
@@ -192,93 +200,69 @@ def test_route_map_usage():
     static_rmapfile = "%s/r1/static_rmap.ref" % (thisDir)
     expected = open(static_rmapfile).read().rstrip()
     expected = ("\n".join(expected.splitlines()) + "\n").rstrip()
-    actual = r1.vtysh_cmd("show route-map static")
-    actual = ("\n".join(actual.splitlines()) + "\n").rstrip()
     logger.info(
         "Does the show route-map static command run the correct number of times"
     )
-
-    diff = topotest.get_textdiff(
-        actual,
-        expected,
-        title1="Actual Route-map output",
-        title2="Expected Route-map output",
-    )
-    if diff:
-        logger.info("Actual:")
-        logger.info(actual)
-        logger.info("Expected:")
-        logger.info(expected)
-        srun = r1.vtysh_cmd("show run")
-        srun = ("\n".join(srun.splitlines()) + "\n").rstrip()
-        logger.info("Show run")
-        logger.info(srun)
-        assert 0, "r1 static route processing:\n"
+    def check_static_map_correct_runs():
+        actual = r1.vtysh_cmd("show route-map static")
+        actual = ("\n".join(actual.splitlines()) + "\n").rstrip()
+        return topotest.get_textdiff(
+            actual,
+            expected,
+            title1="Actual Route-map output",
+            title2="Expected Route-map output",
+        )
+    ok, result = topotest.run_and_expect(check_static_map_correct_runs, "", count=5, wait=1)
+    assert ok, result
 
     sharp_rmapfile = "%s/r1/sharp_rmap.ref" % (thisDir)
     expected = open(sharp_rmapfile).read().rstrip()
     expected = ("\n".join(expected.splitlines()) + "\n").rstrip()
-    actual = r1.vtysh_cmd("show route-map sharp")
-    actual = ("\n".join(actual.splitlines()) + "\n").rstrip()
     logger.info("Does the show route-map sharp command run the correct number of times")
-
-    diff = topotest.get_textdiff(
-        actual,
-        expected,
-        title1="Actual Route-map output",
-        title2="Expected Route-map output",
-    )
-    if diff:
-        logger.info("Actual:")
-        logger.info(actual)
-        logger.info("Expected:")
-        logger.info(expected)
-        srun = r1.vtysh_cmd("show run")
-        srun = ("\n".join(srun.splitlines()) + "\n").rstrip()
-        logger.info("Show run:")
-        logger.info(srun)
-        assert 0, "r1 sharp route-map processing:\n"
+    def check_sharp_map_correct_runs():
+        actual = r1.vtysh_cmd("show route-map sharp")
+        actual = ("\n".join(actual.splitlines()) + "\n").rstrip()
+        return topotest.get_textdiff(
+            actual,
+            expected,
+            title1="Actual Route-map output",
+            title2="Expected Route-map output",
+        )
+    ok, result = topotest.run_and_expect(check_sharp_map_correct_runs, "", count=5, wait=1)
+    assert ok, result
 
     logger.info(
         "Add a extension to the static route-map to see the static route go away"
+        " and test that the routes installed are correct"
     )
+
     r1.vtysh_cmd("conf\nroute-map sharp deny 5\nmatch ip address 5")
-    sleep(2)
     # we are only checking the kernel here as that this will give us the implied
     # testing of both the route-map and staticd withdrawing the route
     # let's spot check that the routes were installed correctly
     # in the kernel
-    logger.info("Test that the routes installed are correct")
     sharp_ipfile = "%s/r1/iproute.ref" % (thisDir)
     expected = open(sharp_ipfile).read().rstrip()
     expected = ("\n".join(expected.splitlines()) + "\n").rstrip()
-    actual = r1.run("ip route show")
-    actual = ("\n".join(actual.splitlines()) + "\n").rstrip()
-    actual = re.sub(r" nhid [0-9][0-9]", "", actual)
-    actual = re.sub(r" proto sharp", " proto XXXX", actual)
-    actual = re.sub(r" proto static", " proto XXXX", actual)
-    actual = re.sub(r" proto 194", " proto XXXX", actual)
-    actual = re.sub(r" proto 196", " proto XXXX", actual)
-    actual = re.sub(r" proto kernel", " proto XXXX", actual)
-    actual = re.sub(r" proto 2", " proto XXXX", actual)
-    # Some platforms have double spaces?  Why??????
-    actual = re.sub(r"  proto XXXX  ", " proto XXXX ", actual)
-    actual = re.sub(r"  metric", " metric", actual)
-    actual = re.sub(r" link  ", " link ", actual)
-    diff = topotest.get_textdiff(
-        actual, expected, title1="Actual ip route show", title2="Expected ip route show"
-    )
-
-    if diff:
-        logger.info("Actual:")
-        logger.info(actual)
-        logger.info("Expected:")
-        logger.info(expected)
-        srun = r1.vtysh_cmd("show run")
-        srun = ("\n".join(srun.splitlines()) + "\n").rstrip()
-        logger.info("Show run:")
-        logger.info(srun)
-        assert 0, "r1 ip route show is not correct:"
+    def check_routes_installed():
+        actual = r1.run("ip route show")
+        actual = ("\n".join(actual.splitlines()) + "\n").rstrip()
+        actual = re.sub(r" nhid [0-9][0-9]", "", actual)
+        actual = re.sub(r" proto sharp", " proto XXXX", actual)
+        actual = re.sub(r" proto static", " proto XXXX", actual)
+        actual = re.sub(r" proto 194", " proto XXXX", actual)
+        actual = re.sub(r" proto 196", " proto XXXX", actual)
+        actual = re.sub(r" proto kernel", " proto XXXX", actual)
+        actual = re.sub(r" proto 2", " proto XXXX", actual)
+        # Some platforms have double spaces?  Why??????
+        actual = re.sub(r"  proto XXXX  ", " proto XXXX ", actual)
+        actual = re.sub(r"  metric", " metric", actual)
+        actual = re.sub(r" link  ", " link ", actual)
+        return topotest.get_textdiff(
+            actual, expected, title1="Actual ip route show", title2="Expected ip route show"
+        )
+    ok, result = topotest.run_and_expect(check_routes_installed, "", count=5, wait=1)
+    assert ok, result
 
 
 def test_memory_leak():
index e83b2c1007d659ef93f278fa171406934c824c6d..a83c6d6ec0ec760fb7e97ab3a23855b63e0a4a87 100755 (executable)
@@ -43,6 +43,8 @@ from lib.topolog import logger
 from lib.common_config import shutdown_bringup_interface
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.sharpd]
+
 
 def open_json_file(filename):
     try:
index 1c9d208fef4695071c5c3c7f46a54db0cd9de7dd..6cdb77b94b6fa8f6f56280d17493a0e0acda4c8e 100755 (executable)
@@ -43,6 +43,8 @@ from lib.topolog import logger
 from lib.common_config import shutdown_bringup_interface
 from mininet.topo import Topo
 
+pytestmark = [pytest.mark.sharpd]
+
 
 def open_json_file(filename):
     try:
index 732470f828441c0fc6f4c98e9a9b8c3f35a3f6cb..e223eb27439111d2166821b765158c35ff0f1a95 100644 (file)
@@ -83,9 +83,45 @@ show version
 CMD_LIST_END
 
 # OSPF Support Bundle Command List
-# PROC_NAME:ospf
-# CMD_LIST_START
-# CMD_LIST_END
+PROC_NAME:ospf
+CMD_LIST_START
+show ip ospf vrf all
+show ip ospf vrfs
+
+show ip ospf vrf all interface
+show ip ospf vrf all interface traffic
+show ip ospf vrf all neighbor
+show ip ospf vrf all neighbor detail all
+show ip ospf vrf all graceful-restart helper detail
+
+show ip ospf vrf all border-routers
+show ip ospf vrf all summary-address detail
+
+show ip ospf vrf all database
+show ip ospf vrf all database router
+show ip ospf vrf all database network
+show ip ospf vrf all database summary
+show ip ospf vrf all database asbr-summary
+show ip ospf vrf all database external
+show ip ospf vrf all database opaque-area
+show ip ospf vrf all database opaque-as
+show ip ospf vrf all database opaque-link
+show ip ospf vrf all database nssa-external
+show ip ospf database segment-routing
+show ip ospf vrf all database max-age
+show ip ospf vrf all database self-originate
+show ip ospf vrf all route
+
+show ip ospf mpls ldp-sync
+show ip ospf mpls ldp-sync interface all
+
+show ip ospf vrf all mpls-te interface
+show ip ospf mpls-te database verbose
+show ip ospf mpls-te router
+
+show ip ospf router-info
+show ip ospf router-info pce
+CMD_LIST_END
 
 # RIP Support Bundle Command List
 # PROC_NAME:rip
@@ -130,3 +166,43 @@ show ip pim state
 show ip pim statistics
 show ip pim rpf
 CMD_LIST_END
+
+# OSPFv3 Support Bundle Command List
+PROC_NAME:ospf6
+CMD_LIST_START
+show ipv6 ospf6 vrf all
+show ipv6 ospf6 vrfs 
+show ipv6 ospf6 vrf all border-routers
+show ipv6 ospf6 vrf all border-routers detail
+show ipv6 ospf6 vrf all database
+show ipv6 ospf6 vrf all database detail
+show ipv6 ospf6 vrf all database dump
+show ipv6 ospf6 vrf all database internal
+show ipv6 ospf6 vrf all database router detail
+show ipv6 ospf6 vrf all database network detail
+show ipv6 ospf6 vrf all database inter-prefix detail
+show ipv6 ospf6 vrf all database inter-router detail
+show ipv6 ospf6 vrf all database intra-prefix detail
+show ipv6 ospf6 vrf all database link detail
+show ipv6 ospf6 vrf all database as-external detail
+show ipv6 ospf6 vrf all database self-originate detail
+show ipv6 ospf6 vrf all database type-7 detail
+show ipv6 ospf6 vrf all interface
+show ipv6 ospf6 vrf all interface prefix
+show ipv6 ospf6 vrf all interface traffic
+show ipv6 ospf6 vrf all linkstate detail
+show ipv6 ospf6 vrf all neighbor
+show ipv6 ospf6 vrf all neighbor drchoice
+show ipv6 ospf6 vrf all neighbor detail
+show ipv6 ospf6 vrf all redistribute
+show ipv6 ospf6 vrf all route
+show ipv6 ospf6 vrf all route external-1
+show ipv6 ospf6 vrf all route external-2
+show ipv6 ospf6 vrf all route inter-area
+show ipv6 ospf6 vrf all route intra-area
+show ipv6 ospf6 vrf all route detail
+show ipv6 ospf6 vrf all route summary
+show ipv6 ospf6 vrf all spf tree
+show ipv6 ospf6 vrf all summary-address detail
+show ipv6 ospf6 zebra
+CMD_LIST_END
index 9d41305ec30ce540ed163616ed3e9c520862dd9a..7c6a83a51de4d85487864a0cbbcc141021e535d1 100755 (executable)
@@ -513,9 +513,6 @@ class Config(object):
         Parse the configuration and create contexts for each appropriate block
         """
 
-        current_context_lines = []
-        ctx_keys = []
-
         """
         The end of a context is flagged via the 'end' keyword:
 
@@ -574,42 +571,80 @@ end
         # key of the context. So "router bgp 10" is the key for the non-address
         # family part of bgp, "router bgp 10, address-family ipv6 unicast" is
         # the key for the subcontext and so on.
+
+        # This dictionary contains a tree of all commands that we know start a
+        # new multi-line context. All other commands are treated either as
+        # commands inside a multi-line context or as single-line contexts. This
+        # dictionary should be updated whenever a new node is added to FRR.
+        ctx_keywords = {
+            "router bgp ": {
+                "address-family ": {
+                    "vni ": {},
+                },
+                "vnc ": {},
+                "vrf-policy ": {},
+                "bmp ": {},
+                "segment-routing srv6": {},
+            },
+            "router rip": {},
+            "router ripng": {},
+            "router isis ": {},
+            "router openfabric ": {},
+            "router ospf": {},
+            "router ospf6": {},
+            "router eigrp ": {},
+            "router babel": {},
+            "mpls ldp": {
+                "address-family ": {
+                    "interface ": {}
+                }
+            },
+            "l2vpn ": {
+                "member pseudowire ": {}
+            },
+            "key chain ": {
+                "key ": {}
+            },
+            "vrf ": {},
+            "interface ": {
+                "link-params": {}
+            },
+            "pseudowire ": {},
+            "segment-routing": {
+                "traffic-eng": {
+                    "segment-list ": {},
+                    "policy ": {
+                        "candidate-path ": {}
+                    },
+                    "pcep": {
+                        "pcc": {},
+                        "pce ": {},
+                        "pce-config ": {}
+                    }
+                },
+                "srv6": {
+                    "locators": {
+                        "locator ": {}
+                    }
+                }
+            },
+            "nexthop-group ": {},
+            "route-map ": {},
+            "pbr-map ": {},
+            "rpki": {},
+            "bfd": {
+                "peer ": {},
+                "profile ": {}
+            },
+            "line vty": {}
+        }
+
+        # stack of context keys
         ctx_keys = []
-        main_ctx_key = []
-        new_ctx = True
-
-        # the keywords that we know are single line contexts. bgp in this case
-        # is not the main router bgp block, but enabling multi-instance
-        oneline_ctx_keywords = (
-            "access-list ",
-            "agentx",
-            "allow-external-route-update",
-            "bgp ",
-            "debug ",
-            "domainname ",
-            "dump ",
-            "enable ",
-            "frr ",
-            "fpm ",
-            "hostname ",
-            "ip ",
-            "ipv6 ",
-            "log ",
-            "mac access-list ",
-            "mpls lsp",
-            "mpls label",
-            "no ",
-            "password ",
-            "pbr ",
-            "ptm-enable",
-            "router-id ",
-            "service ",
-            "table ",
-            "username ",
-            "zebra ",
-            "vrrp autoconfigure",
-            "evpn mh",
-        )
+        # stack of context keywords
+        cur_ctx_keywords = [ctx_keywords]
+        # list of stored commands
+        cur_ctx_lines = []
 
         for line in self.lines:
 
@@ -619,357 +654,77 @@ end
             if line.startswith("!") or line.startswith("#"):
                 continue
 
-            if (
-                len(ctx_keys) == 2
-                and ctx_keys[0].startswith("bfd")
-                and ctx_keys[1].startswith("profile ")
-                and line == "end"
-            ):
-                log.debug("LINE %-50s: popping from sub context, %-50s", line, ctx_keys)
-
-                if main_ctx_key:
-                    self.save_contexts(ctx_keys, current_context_lines)
-                    ctx_keys = copy.deepcopy(main_ctx_key)
-                    current_context_lines = []
+            if line.startswith("exit"):
+                # ignore on top level
+                if len(ctx_keys) == 0:
                     continue
 
-            # one line contexts
-            # there is one exception though: ldpd accepts a 'router-id' clause
-            # as part of its 'mpls ldp' config context. If we are processing
-            # ldp configuration and encounter a router-id we should NOT switch
-            # to a new context
-            if (
-                new_ctx is True
-                and any(line.startswith(keyword) for keyword in oneline_ctx_keywords)
-                and not (
-                    ctx_keys
-                    and ctx_keys[0].startswith("mpls ldp")
-                    and line.startswith("router-id ")
-                )
-            ):
-                self.save_contexts(ctx_keys, current_context_lines)
-
-                # Start a new context
-                main_ctx_key = []
-                ctx_keys = [
-                    line,
-                ]
-                current_context_lines = []
-
-                log.debug("LINE %-50s: entering new context, %-50s", line, ctx_keys)
-                self.save_contexts(ctx_keys, current_context_lines)
-                new_ctx = True
-
-            elif line == "end":
-                self.save_contexts(ctx_keys, current_context_lines)
-                log.debug("LINE %-50s: exiting old context, %-50s", line, ctx_keys)
-
-                # Start a new context
-                new_ctx = True
-                main_ctx_key = []
-                ctx_keys = []
-                current_context_lines = []
-
-            elif line == "exit" and ctx_keys[0].startswith("rpki"):
-                self.save_contexts(ctx_keys, current_context_lines)
-                log.debug("LINE %-50s: exiting old context, %-50s", line, ctx_keys)
-
-                # Start a new context
-                new_ctx = True
-                main_ctx_key = []
-                ctx_keys = []
-                current_context_lines = []
-
-            elif line == "exit-vrf":
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines.append(line)
-                log.debug(
-                    "LINE %-50s: append to current_context_lines, %-50s", line, ctx_keys
-                )
+                # save current context
+                self.save_contexts(ctx_keys, cur_ctx_lines)
 
-                # Start a new context
-                new_ctx = True
-                main_ctx_key = []
-                ctx_keys = []
-                current_context_lines = []
+                # exit current context
+                log.debug("LINE %-50s: exit context %-50s", line, ctx_keys)
 
-            elif (
-                line == "exit"
-                and len(ctx_keys) > 1
-                and ctx_keys[0].startswith("segment-routing")
-            ):
-                self.save_contexts(ctx_keys, current_context_lines)
-
-                # Start a new context
-                ctx_keys = ctx_keys[:-1]
-                current_context_lines = []
-                log.debug(
-                    "LINE %-50s: popping segment routing sub-context to ctx%-50s",
-                    line,
-                    ctx_keys,
-                )
-
-            elif line in ["exit-address-family", "exit", "exit-vnc"]:
-                # if this exit is for address-family ipv4 unicast, ignore the pop
-                if main_ctx_key:
-                    self.save_contexts(ctx_keys, current_context_lines)
-
-                    # Start a new context
-                    ctx_keys = copy.deepcopy(main_ctx_key)
-                    current_context_lines = []
-                    log.debug(
-                        "LINE %-50s: popping from subcontext to ctx%-50s",
-                        line,
-                        ctx_keys,
-                    )
+                ctx_keys.pop()
+                cur_ctx_keywords.pop()
+                cur_ctx_lines = []
 
-            elif line in ["exit-vni", "exit-ldp-if"]:
-                if sub_main_ctx_key:
-                    self.save_contexts(ctx_keys, current_context_lines)
-
-                    # Start a new context
-                    ctx_keys = copy.deepcopy(sub_main_ctx_key)
-                    current_context_lines = []
-                    log.debug(
-                        "LINE %-50s: popping from sub-subcontext to ctx%-50s",
-                        line,
-                        ctx_keys,
-                    )
+                continue
 
-            elif new_ctx is True:
-                if not main_ctx_key:
-                    ctx_keys = [
-                        line,
-                    ]
-                else:
-                    ctx_keys = copy.deepcopy(main_ctx_key)
-                    main_ctx_key = []
+            if line.startswith("end"):
+                # exit all contexts
+                while len(ctx_keys) > 0:
+                    # save current context
+                    self.save_contexts(ctx_keys, cur_ctx_lines)
 
-                current_context_lines = []
-                new_ctx = False
-                log.debug("LINE %-50s: entering new context, %-50s", line, ctx_keys)
+                    # exit current context
+                    log.debug("LINE %-50s: exit context %-50s", line, ctx_keys)
 
-            elif (
-                line.startswith("address-family ")
-                or line.startswith("vnc defaults")
-                or line.startswith("vnc l2-group")
-                or line.startswith("vnc nve-group")
-                or line.startswith("peer")
-                or line.startswith("key ")
-                or line.startswith("member pseudowire")
-            ):
-                main_ctx_key = []
+                    ctx_keys.pop()
+                    cur_ctx_keywords.pop()
+                    cur_ctx_lines = []
 
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug("LINE %-50s: entering sub-context, append to ctx_keys", line)
+                continue
 
-                if line == "address-family ipv6" and not ctx_keys[0].startswith(
-                    "mpls ldp"
-                ):
-                    ctx_keys.append("address-family ipv6 unicast")
-                elif line == "address-family ipv4" and not ctx_keys[0].startswith(
-                    "mpls ldp"
-                ):
-                    ctx_keys.append("address-family ipv4 unicast")
-                elif line == "address-family evpn":
-                    ctx_keys.append("address-family l2vpn evpn")
-                else:
+            new_ctx = False
+
+            # check if the line is a context-entering keyword
+            for k, v in cur_ctx_keywords[-1].items():
+                if line.startswith(k):
+                    # candidate-path is a special case. It may be a node and
+                    # may be a single-line command. The distinguisher is the
+                    # word "dynamic" or "explicit" at the middle of the line.
+                    # It was perhaps not the best choice by the pathd authors
+                    # but we have what we have.
+                    if k == "candidate-path " and "explicit" in line:
+                        # this is a single-line command
+                        break
+
+                    # save current context
+                    self.save_contexts(ctx_keys, cur_ctx_lines)
+
+                    # enter new context
+                    new_ctx = True
                     ctx_keys.append(line)
+                    cur_ctx_keywords.append(v)
+                    cur_ctx_lines = []
 
-            elif (
-                line.startswith("vni ")
-                and len(ctx_keys) == 2
-                and ctx_keys[0].startswith("router bgp")
-                and ctx_keys[1] == "address-family l2vpn evpn"
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                sub_main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug(
-                    "LINE %-50s: entering sub-sub-context, append to ctx_keys", line
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("interface ")
-                and len(ctx_keys) == 2
-                and ctx_keys[0].startswith("mpls ldp")
-                and ctx_keys[1].startswith("address-family")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                sub_main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug(
-                    "LINE %-50s: entering sub-sub-context, append to ctx_keys", line
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("traffic-eng")
-                and len(ctx_keys) == 1
-                and ctx_keys[0].startswith("segment-routing")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                log.debug(
-                    "LINE %-50s: entering segment routing sub-context, append to ctx_keys",
-                    line,
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("segment-list ")
-                and len(ctx_keys) == 2
-                and ctx_keys[0].startswith("segment-routing")
-                and ctx_keys[1].startswith("traffic-eng")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                log.debug(
-                    "LINE %-50s: entering segment routing sub-context, append to ctx_keys",
-                    line,
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("policy ")
-                and len(ctx_keys) == 2
-                and ctx_keys[0].startswith("segment-routing")
-                and ctx_keys[1].startswith("traffic-eng")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                log.debug(
-                    "LINE %-50s: entering segment routing sub-context, append to ctx_keys",
-                    line,
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("candidate-path ")
-                and line.endswith(" dynamic")
-                and len(ctx_keys) == 3
-                and ctx_keys[0].startswith("segment-routing")
-                and ctx_keys[1].startswith("traffic-eng")
-                and ctx_keys[2].startswith("policy")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug(
-                    "LINE %-50s: entering candidate-path sub-context, append to ctx_keys",
-                    line,
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("pcep")
-                and len(ctx_keys) == 2
-                and ctx_keys[0].startswith("segment-routing")
-                and ctx_keys[1].startswith("traffic-eng")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug(
-                    "LINE %-50s: entering pcep sub-context, append to ctx_keys", line
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("pce-config ")
-                and len(ctx_keys) == 3
-                and ctx_keys[0].startswith("segment-routing")
-                and ctx_keys[1].startswith("traffic-eng")
-                and ctx_keys[2].startswith("pcep")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug(
-                    "LINE %-50s: entering pce-config sub-context, append to ctx_keys",
-                    line,
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("pce ")
-                and len(ctx_keys) == 3
-                and ctx_keys[0].startswith("segment-routing")
-                and ctx_keys[1].startswith("traffic-eng")
-                and ctx_keys[2].startswith("pcep")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug(
-                    "LINE %-50s: entering pce sub-context, append to ctx_keys", line
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("pcc")
-                and len(ctx_keys) == 3
-                and ctx_keys[0].startswith("segment-routing")
-                and ctx_keys[1].startswith("traffic-eng")
-                and ctx_keys[2].startswith("pcep")
-            ):
-
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug(
-                    "LINE %-50s: entering pcc sub-context, append to ctx_keys", line
-                )
-                ctx_keys.append(line)
-
-            elif (
-                line.startswith("profile ")
-                and len(ctx_keys) == 1
-                and ctx_keys[0].startswith("bfd")
-            ):
+                    log.debug("LINE %-50s: enter context %-50s", line, ctx_keys)
+                    break
 
-                # Save old context first
-                self.save_contexts(ctx_keys, current_context_lines)
-                current_context_lines = []
-                main_ctx_key = copy.deepcopy(ctx_keys)
-                log.debug(
-                    "LINE %-50s: entering BFD profile sub-context, append to ctx_keys",
-                    line,
-                )
-                ctx_keys.append(line)
+            if new_ctx:
+                continue
 
+            if len(ctx_keys) == 0:
+                log.debug("LINE %-50s: single-line context", line)
+                self.save_contexts([line], [])
             else:
-                # Continuing in an existing context, add non-commented lines to it
-                current_context_lines.append(line)
-                log.debug(
-                    "LINE %-50s: append to current_context_lines, %-50s", line, ctx_keys
-                )
+                log.debug("LINE %-50s: add to current context %-50s", line, ctx_keys)
+                cur_ctx_lines.append(line)
 
         # Save the context of the last one
-        self.save_contexts(ctx_keys, current_context_lines)
+        if len(ctx_keys) > 0:
+            self.save_contexts(ctx_keys, cur_ctx_lines)
 
 
 def lines_to_config(ctx_keys, line, delete):
index 475e56cf7258648626ba3c54d2c367f66a0d00e3..7cde7a119e663e47865e0ebc3cee0f1d3bc97401 100644 (file)
@@ -60,7 +60,7 @@ chownfrr() {
        [ -n "$FRR_GROUP" ] && chgrp "$FRR_GROUP" "$1"
        [ -n "$FRR_CONFIG_MODE" ] && chmod "$FRR_CONFIG_MODE" "$1"
        if [ -d "$1" ]; then
-               chmod u+x "$1"
+               chmod gu+x "$1"
        fi
 }
 
diff --git a/tools/releasedate.py b/tools/releasedate.py
new file mode 100644 (file)
index 0000000..3778050
--- /dev/null
@@ -0,0 +1,59 @@
+#!/usr/bin/python3
+#
+# print FRR release schedule dates
+
+from datetime import datetime, date, timedelta
+
+w2 = timedelta(days=14)
+
+
+def year_gen(year):
+    for month in [3, 7, 11]:
+        d = date(year, month, 1)
+        if d.weekday() == 0:
+            d += timedelta(days=1)
+        elif d.weekday() >= 2:
+            d += timedelta(days=8 - d.weekday())
+        yield d
+
+
+def calc(refdate):
+    year = refdate.year
+
+    prev = list(year_gen(year - 1))[-1]
+    releases = list(year_gen(year)) + list(year_gen(year + 1))
+
+    while refdate > releases[0]:
+        prev = releases.pop(0)
+
+    return (prev, releases)
+
+
+if __name__ == "__main__":
+    now = datetime.now().date()
+    last, upcoming = calc(now)
+
+    print("Last release was (scheduled) on %s" % last.isoformat())
+
+    rel = upcoming.pop(0)
+    freeze, rc1, rc2 = rel - w2 * 3, rel - w2 * 2, rel - w2
+
+    if now == rel:
+        print("It's release day! 🎉")
+    elif now >= rc2:
+        print(
+            "%d days until release! (rc2 since %s)"
+            % ((rel - now).days, rc2.isoformat())
+        )
+    elif now >= rc1:
+        print("%d days until rc2. (rc1 since %s)" % ((rc2 - now).days, rc1.isoformat()))
+    elif now >= freeze:
+        print(
+            "%d days until rc1, master is frozen since %s"
+            % ((rc1 - now).days, freeze.isoformat())
+        )
+    else:
+        print(
+            "%d days of hacking time left! (Freeze on %s)"
+            % ((freeze - now).days, freeze.isoformat())
+        )
index a5ad37aa0c3ba2d3ab345e1af5cc154646a395e3..990fa9e3821026c8e4d556b520984f122497034a 100644 (file)
@@ -148,7 +148,6 @@ int main(int argc, char **argv, char **envp)
                        break;
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index 7af9148a8e39f4d7d2ba8b88551b04011052fa38..91ff6fe28ef24b2350526aacebdbf5e50eb0b60d 100644 (file)
@@ -744,14 +744,6 @@ static int vrrp_config_write_interface(struct vty *vty)
        return write;
 }
 
-static struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = vrrp_config_write_interface,
-};
-
 static struct cmd_node debug_node = {
        .name = "debug",
        .node = DEBUG_NODE,
@@ -769,10 +761,9 @@ static struct cmd_node vrrp_node = {
 void vrrp_vty_init(void)
 {
        install_node(&debug_node);
-       install_node(&interface_node);
        install_node(&vrrp_node);
-       vrf_cmd_init(NULL, &vrrp_privs);
-       if_cmd_init();
+       vrf_cmd_init(NULL);
+       if_cmd_init(vrrp_config_write_interface);
 
        install_element(VIEW_NODE, &vrrp_vrid_show_cmd);
        install_element(VIEW_NODE, &vrrp_vrid_show_summary_cmd);
index dd3f44867406e8a2f3a1608cd3b99a03d30f28ba..b47cca76f58d55cdcf35fa6e4e8ed0654df8675f 100644 (file)
@@ -40,7 +40,6 @@
 #include "vtysh/vtysh.h"
 #include "vtysh/vtysh_daemons.h"
 #include "log.h"
-#include "ns.h"
 #include "vrf.h"
 #include "libfrr.h"
 #include "command_graph.h"
@@ -478,14 +477,6 @@ static int vtysh_execute_func(const char *line, int pager)
        if (vline == NULL)
                return CMD_SUCCESS;
 
-       if (user_mode) {
-               if (strncmp("en", vector_slot(vline, 0), 2) == 0) {
-                       cmd_free_strvec(vline);
-                       vty_out(vty, "%% Command not allowed: enable\n");
-                       return CMD_WARNING;
-               }
-       }
-
        if (vtysh_add_timestamp && strncmp(line, "exit", 4)) {
                char ts[48];
 
@@ -518,51 +509,8 @@ static int vtysh_execute_func(const char *line, int pager)
         */
        if (ret == CMD_SUCCESS || ret == CMD_SUCCESS_DAEMON
            || ret == CMD_WARNING) {
-               if ((saved_node == BGP_VPNV4_NODE
-                    || saved_node == BGP_VPNV6_NODE
-                    || saved_node == BGP_IPV4_NODE
-                    || saved_node == BGP_IPV6_NODE
-                    || saved_node == BGP_FLOWSPECV4_NODE
-                    || saved_node == BGP_FLOWSPECV6_NODE
-                    || saved_node == BGP_IPV4M_NODE
-                    || saved_node == BGP_IPV4L_NODE
-                    || saved_node == BGP_IPV6L_NODE
-                    || saved_node == BGP_IPV6M_NODE
-                    || saved_node == BGP_EVPN_NODE
-                    || saved_node == LDP_IPV4_NODE
-                    || saved_node == LDP_IPV6_NODE)
-                   && (tried == 1)) {
-                       vtysh_execute("exit-address-family");
-               } else if ((saved_node == BGP_EVPN_VNI_NODE) && (tried == 1)) {
-                       vtysh_execute("exit-vni");
-               } else if (saved_node == BGP_VRF_POLICY_NODE && (tried == 1)) {
-                       vtysh_execute("exit-vrf-policy");
-               } else if ((saved_node == BGP_VNC_DEFAULTS_NODE
-                           || saved_node == BGP_VNC_NVE_GROUP_NODE
-                           || saved_node == BGP_VNC_L2_GROUP_NODE)
-                          && (tried == 1)) {
-                       vtysh_execute("exit-vnc");
-               } else if (saved_node == VRF_NODE && (tried == 1)) {
-                       vtysh_execute("exit-vrf");
-               } else if ((saved_node == KEYCHAIN_KEY_NODE
-                           || saved_node == LDP_PSEUDOWIRE_NODE
-                           || saved_node == LDP_IPV4_IFACE_NODE
-                           || saved_node == LDP_IPV6_IFACE_NODE)
-                          && (tried == 1)) {
-                       vtysh_execute("exit");
-               } else if ((saved_node == SR_SEGMENT_LIST_NODE
-                           || saved_node == SR_POLICY_NODE
-                           || saved_node == SR_CANDIDATE_DYN_NODE
-                           || saved_node == PCEP_NODE
-                           || saved_node == PCEP_PCE_CONFIG_NODE
-                           || saved_node == PCEP_PCE_NODE
-                           || saved_node == PCEP_PCC_NODE)
-                          && (tried > 0)) {
+               while (tried-- > 0)
                        vtysh_execute("exit");
-               } else if (tried) {
-                       vtysh_execute("end");
-                       vtysh_execute("configure");
-               }
        }
        /*
         * If command didn't succeed in any node, continue with return value
@@ -710,7 +658,6 @@ int vtysh_mark_file(const char *filename)
        int ret;
        vector vline;
        int tried = 0;
-       bool ending;
        const struct cmd_element *cmd;
        int saved_ret, prev_node;
        int lineno = 0;
@@ -743,35 +690,6 @@ int vtysh_mark_file(const char *filename)
                strlcpy(vty_buf_copy, vty->buf, VTY_BUFSIZ);
                vty_buf_trimmed = trim(vty_buf_copy);
 
-               switch (vty->node) {
-               case LDP_IPV4_IFACE_NODE:
-                       if (strncmp(vty_buf_copy, "   ", 3)) {
-                               vty_out(vty, " exit-ldp-if\n");
-                               vty->node = LDP_IPV4_NODE;
-                       }
-                       break;
-               case LDP_IPV6_IFACE_NODE:
-                       if (strncmp(vty_buf_copy, "   ", 3)) {
-                               vty_out(vty, " exit-ldp-if\n");
-                               vty->node = LDP_IPV6_NODE;
-                       }
-                       break;
-               case LDP_PSEUDOWIRE_NODE:
-                       if (strncmp(vty_buf_copy, "  ", 2)) {
-                               vty_out(vty, " exit\n");
-                               vty->node = LDP_L2VPN_NODE;
-                       }
-                       break;
-               case SR_CANDIDATE_DYN_NODE:
-                       if (strncmp(vty_buf_copy, "  ", 2)) {
-                               vty_out(vty, " exit\n");
-                               vty->node = SR_POLICY_NODE;
-                       }
-                       break;
-               default:
-                       break;
-               }
-
                if (vty_buf_trimmed[0] == '!' || vty_buf_trimmed[0] == '#') {
                        vty_out(vty, "%s", vty->buf);
                        continue;
@@ -819,56 +737,8 @@ int vtysh_mark_file(const char *filename)
                 */
                if (ret == CMD_SUCCESS || ret == CMD_SUCCESS_DAEMON
                    || ret == CMD_WARNING) {
-                       if ((prev_node == BGP_VPNV4_NODE
-                            || prev_node == BGP_VPNV6_NODE
-                            || prev_node == BGP_IPV4_NODE
-                            || prev_node == BGP_IPV6_NODE
-                            || prev_node == BGP_FLOWSPECV4_NODE
-                            || prev_node == BGP_FLOWSPECV6_NODE
-                            || prev_node == BGP_IPV4L_NODE
-                            || prev_node == BGP_IPV6L_NODE
-                            || prev_node == BGP_IPV4M_NODE
-                            || prev_node == BGP_IPV6M_NODE
-                            || prev_node == BGP_EVPN_NODE)
-                           && (tried == 1)) {
-                               vty_out(vty, "exit-address-family\n");
-                       } else if ((prev_node == BGP_EVPN_VNI_NODE)
-                                  && (tried == 1)) {
-                               vty_out(vty, "exit-vni\n");
-                       } else if ((prev_node == KEYCHAIN_KEY_NODE)
-                                  && (tried == 1)) {
-                               vty_out(vty, "exit\n");
-                       } else if ((prev_node == BFD_PEER_NODE)
-                                  && (tried == 1)) {
+                       while (tried-- > 0)
                                vty_out(vty, "exit\n");
-                       } else if (((prev_node == SEGMENT_ROUTING_NODE)
-                                   || (prev_node == SR_TRAFFIC_ENG_NODE)
-                                   || (prev_node == SR_SEGMENT_LIST_NODE)
-                                   || (prev_node == SR_POLICY_NODE)
-                                   || (prev_node == SR_CANDIDATE_DYN_NODE)
-                                   || (prev_node == PCEP_NODE)
-                                   || (prev_node == PCEP_PCE_CONFIG_NODE)
-                                   || (prev_node == PCEP_PCE_NODE)
-                                   || (prev_node == PCEP_PCC_NODE))
-                                  && (tried > 0)) {
-                               ending = (vty->node != SEGMENT_ROUTING_NODE)
-                                        && (vty->node != SR_TRAFFIC_ENG_NODE)
-                                        && (vty->node != SR_SEGMENT_LIST_NODE)
-                                        && (vty->node != SR_POLICY_NODE)
-                                        && (vty->node != SR_CANDIDATE_DYN_NODE)
-                                        && (vty->node != PCEP_NODE)
-                                        && (vty->node != PCEP_PCE_CONFIG_NODE)
-                                        && (vty->node != PCEP_PCE_NODE)
-                                        && (vty->node != PCEP_PCC_NODE);
-                               if (ending)
-                                       tried--;
-                               while (tried-- > 0)
-                                       vty_out(vty, "exit\n");
-                               if (ending)
-                                       vty_out(vty, "end\n");
-                       } else if (tried) {
-                               vty_out(vty, "end\n");
-                       }
                }
                /*
                 * If command didn't succeed in any node, continue with return
@@ -1699,7 +1569,7 @@ DEFUNSH(VTYSH_REALLYALL, vtysh_end_all, vtysh_end_all_cmd, "end",
        return vtysh_end();
 }
 
-DEFUNSH(VTYSH_SR, srv6, srv6_cmd,
+DEFUNSH(VTYSH_ZEBRA, srv6, srv6_cmd,
        "srv6",
        "Segment-Routing SRv6 configration\n")
 {
@@ -1707,7 +1577,7 @@ DEFUNSH(VTYSH_SR, srv6, srv6_cmd,
        return CMD_SUCCESS;
 }
 
-DEFUNSH(VTYSH_SR, srv6_locators, srv6_locators_cmd,
+DEFUNSH(VTYSH_ZEBRA, srv6_locators, srv6_locators_cmd,
        "locators",
        "Segment-Routing SRv6 locators configration\n")
 {
@@ -1715,7 +1585,7 @@ DEFUNSH(VTYSH_SR, srv6_locators, srv6_locators_cmd,
        return CMD_SUCCESS;
 }
 
-DEFUNSH(VTYSH_SR, srv6_locator, srv6_locator_cmd,
+DEFUNSH(VTYSH_ZEBRA, srv6_locator, srv6_locator_cmd,
        "locator WORD",
        "Segment Routing SRv6 locator\n"
        "Specify locator-name\n")
@@ -2245,8 +2115,7 @@ DEFUNSH(VTYSH_PATHD, pcep, pcep_cmd,
 }
 
 DEFUNSH(VTYSH_PATHD, pcep_cli_pcc, pcep_cli_pcc_cmd,
-       "[no] pcc",
-       NO_STR
+       "pcc",
        "PCC configuration\n")
 {
        vty->node = PCEP_PCC_NODE;
@@ -2254,8 +2123,7 @@ DEFUNSH(VTYSH_PATHD, pcep_cli_pcc, pcep_cli_pcc_cmd,
 }
 
 DEFUNSH(VTYSH_PATHD, pcep_cli_pce, pcep_cli_pce_cmd,
-       "[no] pce WORD",
-       NO_STR
+       "pce WORD",
        "PCE configuration\n"
        "Peer name\n")
 {
@@ -2264,8 +2132,7 @@ DEFUNSH(VTYSH_PATHD, pcep_cli_pce, pcep_cli_pce_cmd,
 }
 
 DEFUNSH(VTYSH_PATHD, pcep_cli_pcep_pce_config, pcep_cli_pcep_pce_config_cmd,
-       "[no] pce-config WORD",
-       NO_STR
+       "pce-config WORD",
        "PCEP peer Configuration Group\n"
        "PCEP peer Configuration Group name\n")
 {
@@ -2464,7 +2331,7 @@ DEFUNSH(VTYSH_VRF, exit_vrf_config, exit_vrf_config_cmd, "exit-vrf",
        return CMD_SUCCESS;
 }
 
-DEFUNSH(VTYSH_SR, exit_srv6_config, exit_srv6_config_cmd, "exit",
+DEFUNSH(VTYSH_ZEBRA, exit_srv6_config, exit_srv6_config_cmd, "exit",
        "Exit from SRv6 configuration mode\n")
 {
        if (vty->node == SRV6_NODE)
@@ -2472,7 +2339,7 @@ DEFUNSH(VTYSH_SR, exit_srv6_config, exit_srv6_config_cmd, "exit",
        return CMD_SUCCESS;
 }
 
-DEFUNSH(VTYSH_SR, exit_srv6_locs_config, exit_srv6_locs_config_cmd, "exit",
+DEFUNSH(VTYSH_ZEBRA, exit_srv6_locs_config, exit_srv6_locs_config_cmd, "exit",
        "Exit from SRv6-locator configuration mode\n")
 {
        if (vty->node == SRV6_LOCS_NODE)
@@ -2480,7 +2347,7 @@ DEFUNSH(VTYSH_SR, exit_srv6_locs_config, exit_srv6_locs_config_cmd, "exit",
        return CMD_SUCCESS;
 }
 
-DEFUNSH(VTYSH_SR, exit_srv6_loc_config, exit_srv6_loc_config_cmd, "exit",
+DEFUNSH(VTYSH_ZEBRA, exit_srv6_loc_config, exit_srv6_loc_config_cmd, "exit",
        "Exit from SRv6-locators configuration mode\n")
 {
        if (vty->node == SRV6_LOC_NODE)
@@ -2754,17 +2621,6 @@ DEFUNSH(VTYSH_VRF, vtysh_vrf, vtysh_vrf_cmd, "vrf NAME",
        return CMD_SUCCESS;
 }
 
-DEFSH(VTYSH_ZEBRA, vtysh_vrf_netns_cmd,
-      "netns NAME",
-      "Attach VRF to a Namespace\n"
-      "The file name in " NS_RUN_DIR ", or a full pathname\n")
-
-DEFSH(VTYSH_ZEBRA, vtysh_no_vrf_netns_cmd,
-      "no netns [NAME]",
-      NO_STR
-      "Detach VRF from a Namespace\n"
-      "The file name in " NS_RUN_DIR ", or a full pathname\n")
-
 DEFUNSH(VTYSH_VRF, vtysh_exit_vrf, vtysh_exit_vrf_cmd, "exit",
        "Exit current mode and down to previous mode\n")
 {
@@ -2803,6 +2659,18 @@ DEFUNSH(VTYSH_INTERFACE, vtysh_quit_interface, vtysh_quit_interface_cmd, "quit",
        return vtysh_exit_interface(self, vty, argc, argv);
 }
 
+DEFUNSH(VTYSH_ZEBRA, vtysh_exit_pseudowire, vtysh_exit_pseudowire_cmd, "exit",
+       "Exit current mode and down to previous mode\n")
+{
+       return vtysh_exit(vty);
+}
+
+DEFUNSH(VTYSH_ZEBRA, vtysh_quit_pseudowire, vtysh_quit_pseudowire_cmd, "quit",
+       "Exit current mode and down to previous mode\n")
+{
+       return vtysh_exit_pseudowire(self, vty, argc, argv);
+}
+
 static char *do_prepend(struct vty *vty, struct cmd_token **argv, int argc)
 {
        const char *argstr[argc + 1];
@@ -2907,6 +2775,20 @@ DEFUNSH(VTYSH_ZEBRA, exit_link_params, exit_link_params_cmd, "exit-link-params",
        return CMD_SUCCESS;
 }
 
+DEFUNSH(VTYSH_ZEBRA, vtysh_exit_link_params, vtysh_exit_link_params_cmd, "exit",
+       "Exit current mode and down to previous mode\n")
+{
+       if (vty->node == LINK_PARAMS_NODE)
+               vty->node = INTERFACE_NODE;
+       return CMD_SUCCESS;
+}
+
+DEFUNSH(VTYSH_ZEBRA, vtysh_quit_link_params, vtysh_quit_link_params_cmd, "quit",
+       "Exit current mode and down to previous mode\n")
+{
+       return vtysh_exit_link_params(self, vty, argc, argv);
+}
+
 DEFUNSH_HIDDEN (0x00,
                 vtysh_debug_all,
                 vtysh_debug_all_cmd,
@@ -4445,18 +4327,17 @@ void vtysh_init_vty(void)
        install_element(INTERFACE_NODE, &vtysh_link_params_cmd);
        install_element(LINK_PARAMS_NODE, &exit_link_params_cmd);
        install_element(LINK_PARAMS_NODE, &vtysh_end_all_cmd);
-       install_element(LINK_PARAMS_NODE, &vtysh_exit_interface_cmd);
+       install_element(LINK_PARAMS_NODE, &vtysh_exit_link_params_cmd);
+       install_element(LINK_PARAMS_NODE, &vtysh_quit_link_params_cmd);
 
        install_node(&pw_node);
        install_element(CONFIG_NODE, &vtysh_pseudowire_cmd);
        install_element(PW_NODE, &vtysh_end_all_cmd);
-       install_element(PW_NODE, &vtysh_exit_interface_cmd);
-       install_element(PW_NODE, &vtysh_quit_interface_cmd);
+       install_element(PW_NODE, &vtysh_exit_pseudowire_cmd);
+       install_element(PW_NODE, &vtysh_quit_pseudowire_cmd);
 
        install_node(&vrf_node);
        install_element(CONFIG_NODE, &vtysh_vrf_cmd);
-       install_element(VRF_NODE, &vtysh_vrf_netns_cmd);
-       install_element(VRF_NODE, &vtysh_no_vrf_netns_cmd);
        install_element(VRF_NODE, &exit_vrf_config_cmd);
        install_element(VRF_NODE, &vtysh_end_all_cmd);
        install_element(VRF_NODE, &vtysh_exit_vrf_cmd);
@@ -4485,7 +4366,8 @@ void vtysh_init_vty(void)
 
        /* vtysh */
 
-       install_element(VIEW_NODE, &vtysh_enable_cmd);
+       if (!user_mode)
+               install_element(VIEW_NODE, &vtysh_enable_cmd);
        install_element(ENABLE_NODE, &vtysh_config_terminal_cmd);
        install_element(ENABLE_NODE, &vtysh_disable_cmd);
 
index d22ec3113f010f4a159ef92bd6070febf47f5058..2e1d7c5bad828fdf34dcb6b3d55f697d03e1a46a 100644 (file)
@@ -272,16 +272,11 @@ void vtysh_config_parse_line(void *arg, const char *line)
                                           strlen(" ip igmp query-interval")) == 0) {
                                config_add_line_uniq_end(config->line, line);
                        } else if (config->index == LINK_PARAMS_NODE
-                                  && strncmp(line, "  exit-link-params",
-                                             strlen("  exit"))
+                                  && strncmp(line, " exit-link-params",
+                                             strlen(" exit"))
                                              == 0) {
                                config_add_line(config->line, line);
                                config->index = INTERFACE_NODE;
-                       } else if (config->index == VRF_NODE
-                                  && strncmp(line, " exit-vrf",
-                                             strlen(" exit-vrf"))
-                                             == 0) {
-                               config_add_line_uniq_end(config->line, line);
                        } else if (!strncmp(line, " vrrp", strlen(" vrrp"))
                                   || !strncmp(line, " no vrrp",
                                               strlen(" no vrrp"))) {
@@ -300,7 +295,10 @@ void vtysh_config_parse_line(void *arg, const char *line)
                        config_add_line(config_top, line);
                break;
        default:
-               if (strncmp(line, "interface", strlen("interface")) == 0)
+               if (strncmp(line, "exit", strlen("exit")) == 0) {
+                       if (config)
+                               config_add_line_uniq_end(config->line, line);
+               } else if (strncmp(line, "interface", strlen("interface")) == 0)
                        config = config_get(INTERFACE_NODE, line);
                else if (strncmp(line, "pseudowire", strlen("pseudowire")) == 0)
                        config = config_get(PW_NODE, line);
@@ -496,7 +494,9 @@ void vtysh_config_dump(void)
                                 * are not under the VRF node.
                                 */
                                if (config->index == INTERFACE_NODE
-                                   && list_isempty(config->line)) {
+                                   && (listcount(config->line) == 1)
+                                   && (line = listnode_head(config->line))
+                                   && strmatch(line, "exit")) {
                                        config_del(config);
                                        continue;
                                }
index 1c990b5ed9e01845e9c8c4f884e8e24e70dc3880..9bd26043a7e95b4951758731d67df69bd710d60f 100644 (file)
@@ -36,6 +36,12 @@ module frr-bgp-route-map {
       "Initial revision";
   }
 
+  identity match-alias {
+    base frr-route-map:rmap-match-type;
+    description
+      "Match BGP community alias name";
+  }
+
   identity match-local-preference {
     base frr-route-map:rmap-match-type;
     description
@@ -162,6 +168,12 @@ module frr-bgp-route-map {
       "Set BGP administrative distance to use";
   }
 
+  identity set-extcommunity-none {
+    base frr-route-map:rmap-set-type;
+    description
+      "Set BGP extended community attribute";
+  }
+
   identity set-extcommunity-rt {
     base frr-route-map:rmap-set-type;
     description
@@ -352,7 +364,14 @@ module frr-bgp-route-map {
       }
     }
 
-    case script { 
+    case alias {
+      when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-alias')";
+      leaf alias {
+        type string;
+      }
+    }
+
+    case script {
       when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:match-script')";
       leaf script {
         type string;
@@ -572,6 +591,16 @@ module frr-bgp-route-map {
       }
     }
 
+    case extcommunity-none {
+      when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-none')";
+      description
+        "Value of the BGP extended community attribute";
+      leaf extcommunity-none {
+        type boolean;
+        description "No extended community attribute";
+      }
+    }
+
     case extcommunity-rt {
       when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:action, 'frr-bgp-route-map:set-extcommunity-rt')";
       description
index 9a864213ee9befada9ece98ff8aae82110e06593..46a9100ab2cb92972a56e5e57c7dde54e746833b 100644 (file)
@@ -145,6 +145,7 @@ module frr-filter {
                 leaf ipv4-prefix {
                   description "Configure IPv4 prefix to match";
                   type inet:ipv4-prefix;
+                  mandatory true;
                 }
 
                 leaf ipv4-exact-match {
@@ -216,6 +217,7 @@ module frr-filter {
             leaf ipv6-prefix {
               description "Configure IPv6 prefix to match";
               type inet:ipv6-prefix;
+              mandatory true;
             }
 
             leaf ipv6-exact-match {
@@ -277,7 +279,7 @@ module frr-filter {
         key "sequence";
 
         leaf sequence {
-          description "Access list sequence value";
+          description "Prefix list sequence value";
           type access-list-sequence;
         }
 
@@ -295,6 +297,7 @@ module frr-filter {
             leaf ipv4-prefix {
               description "Configure IPv4 prefix to match";
               type inet:ipv4-prefix;
+              mandatory true;
             }
 
             leaf ipv4-prefix-length-greater-or-equal {
@@ -319,6 +322,7 @@ module frr-filter {
             leaf ipv6-prefix {
               description "Configure IPv6 prefix to match";
               type inet:ipv6-prefix;
+              mandatory true;
             }
 
             leaf ipv6-prefix-length-greater-or-equal {
index e2971dc5cfe0bdaa78fac2dd65fdf726e76a8caa..8d151e430d61b460650ca5e1532eada6efbda2ec 100644 (file)
@@ -84,9 +84,10 @@ module frr-igmp {
 
     leaf query-interval {
       type uint16 {
-        range "1..1800";
+        range "1..max";
       }
       units seconds;
+      must ". * 10 >= ../query-max-response-time";
       default "125";
       description
         "The Query Interval is the interval between General Queries
@@ -94,10 +95,11 @@ module frr-igmp {
     }
 
     leaf query-max-response-time {
-      type uint8 {
-        range "10..250";
+      type uint16 {
+        range "1..max";
       }
       units deciseconds;
+      must ". <= ../query-interval * 10";
       default "100";
       description
         "Query maximum response time specifies the maximum time
@@ -105,8 +107,8 @@ module frr-igmp {
     }
 
     leaf last-member-query-interval {
-      type uint8 {
-        range "1..255";
+      type uint16 {
+        range "1..max";
       }
       units deciseconds;
       default "10";
@@ -117,7 +119,7 @@ module frr-igmp {
 
     leaf robustness-variable {
       type uint8 {
-        range "1..7";
+        range "1..max";
       }
       default "2";
       description
index 6329e45588990849249e144d74eafba4b7c1a156..109ce22309583217dcea0290fe7c4a6622d75a1c 100644 (file)
@@ -97,7 +97,7 @@ module frr-pim {
 
     leaf keep-alive-timer {
       type uint16 {
-        range "31..60000";
+        range "1..max";
       }
       default "210";
       description
@@ -106,7 +106,7 @@ module frr-pim {
 
     leaf rp-keep-alive-timer {
       type uint16 {
-        range "31..60000";
+        range "1..max";
       }
       default "210";
       description
@@ -116,36 +116,34 @@ module frr-pim {
 
   grouping msdp-timers {
     leaf hold-time {
-      type uint32 {
-        range 3..600;
+      type uint16 {
+        range "1..max";
       }
       units seconds;
       default 75;
       description
         "Hold period is started at the MSDP peer connection establishment
          and is reset every new message. When the period expires the
-         connection is closed.
-
-         This value needs to be greater than `keep-alive-period`.";
+         connection is closed. This value should be greater than the
+         remote keep-alive time.";
     }
 
     leaf keep-alive {
-      type uint32 {
-        range 2..600;
+      type uint16 {
+        range "1..max";
       }
       units seconds;
       default 60;
       description
         "To maintain a connection established it is necessary to send
          keep alive messages in a certain frequency and this allows its
-         configuration.
-
-         This value needs to be lesser than `hold-time-period`.";
+         configuration. This value should be less than the remote
+         hold time.";
     }
 
     leaf connection-retry {
-      type uint32 {
-        range 1..600;
+      type uint16 {
+        range "1..max";
       }
       units seconds;
       default 30;
@@ -343,7 +341,7 @@ module frr-pim {
 
     leaf hello-interval {
       type uint8 {
-        range "1..180";
+        range "1..max";
       }
       default "30";
       description
@@ -351,8 +349,8 @@ module frr-pim {
     }
 
     leaf hello-holdtime {
-      type uint8 {
-        range "1..180";
+      type uint16 {
+        range "1..max";
       }
       must ". > ./../hello-interval" {
       error-message "HoldTime must be greater than Hello";
@@ -367,7 +365,7 @@ module frr-pim {
 
       leaf min-rx-interval {
         type uint16 {
-          range "50..60000";
+          range "1..max";
         }
         default "300";
           description
@@ -376,7 +374,7 @@ module frr-pim {
 
       leaf min-tx-interval {
         type uint16 {
-          range "50..60000";
+          range "1..max";
         }
         default "300";
         description
@@ -422,7 +420,7 @@ module frr-pim {
 
     leaf dr-priority {
       type uint32 {
-        range "1..4294967295";
+        range "1..max";
       }
       default 1;
       description
@@ -521,7 +519,7 @@ module frr-pim {
       "PIM router parameters.";
     leaf packets {
       type uint8 {
-        range "1..100";
+        range "1..max";
       }
       default "3";
       description
@@ -529,7 +527,7 @@ module frr-pim {
     }
     leaf join-prune-interval {
       type uint16 {
-        range "60..600";
+        range "1..max";
       }
       default "60";
       description
@@ -537,7 +535,7 @@ module frr-pim {
     }
     leaf register-suppress-time {
       type uint16 {
-        range "5..60000";
+        range "1..max";
       }
       default "60";
       description
index 88a3d98815e8225a16f50cd0e8b708531ff0b97b..525180d4eecf4ffd4c6a773d93c545c881c350fc 100644 (file)
@@ -244,6 +244,7 @@ DEFUN (debug_zebra_kernel,
        return CMD_SUCCESS;
 }
 
+#if defined(HAVE_NETLINK)
 DEFUN (debug_zebra_kernel_msgdump,
        debug_zebra_kernel_msgdump_cmd,
        "debug zebra kernel msgdump [<recv|send>]",
@@ -267,6 +268,7 @@ DEFUN (debug_zebra_kernel_msgdump,
 
        return CMD_SUCCESS;
 }
+#endif
 
 DEFUN (debug_zebra_rib,
        debug_zebra_rib_cmd,
@@ -465,6 +467,7 @@ DEFUN (no_debug_zebra_kernel,
        return CMD_SUCCESS;
 }
 
+#if defined(HAVE_NETLINK)
 DEFUN (no_debug_zebra_kernel_msgdump,
        no_debug_zebra_kernel_msgdump_cmd,
        "no debug zebra kernel msgdump [<recv|send>]",
@@ -489,6 +492,7 @@ DEFUN (no_debug_zebra_kernel_msgdump,
 
        return CMD_SUCCESS;
 }
+#endif
 
 DEFUN (no_debug_zebra_rib,
        no_debug_zebra_rib_cmd,
@@ -721,7 +725,9 @@ void zebra_debug_init(void)
        install_element(ENABLE_NODE, &debug_zebra_pw_cmd);
        install_element(ENABLE_NODE, &debug_zebra_packet_cmd);
        install_element(ENABLE_NODE, &debug_zebra_kernel_cmd);
+#if defined(HAVE_NETLINK)
        install_element(ENABLE_NODE, &debug_zebra_kernel_msgdump_cmd);
+#endif
        install_element(ENABLE_NODE, &debug_zebra_rib_cmd);
        install_element(ENABLE_NODE, &debug_zebra_fpm_cmd);
        install_element(ENABLE_NODE, &debug_zebra_dplane_cmd);
@@ -734,7 +740,9 @@ void zebra_debug_init(void)
        install_element(ENABLE_NODE, &no_debug_zebra_vxlan_cmd);
        install_element(ENABLE_NODE, &no_debug_zebra_packet_cmd);
        install_element(ENABLE_NODE, &no_debug_zebra_kernel_cmd);
+#if defined(HAVE_NETLINK)
        install_element(ENABLE_NODE, &no_debug_zebra_kernel_msgdump_cmd);
+#endif
        install_element(ENABLE_NODE, &no_debug_zebra_rib_cmd);
        install_element(ENABLE_NODE, &no_debug_zebra_fpm_cmd);
        install_element(ENABLE_NODE, &no_debug_zebra_dplane_cmd);
@@ -748,7 +756,9 @@ void zebra_debug_init(void)
        install_element(CONFIG_NODE, &debug_zebra_pw_cmd);
        install_element(CONFIG_NODE, &debug_zebra_packet_cmd);
        install_element(CONFIG_NODE, &debug_zebra_kernel_cmd);
+#if defined(HAVE_NETLINK)
        install_element(CONFIG_NODE, &debug_zebra_kernel_msgdump_cmd);
+#endif
        install_element(CONFIG_NODE, &debug_zebra_rib_cmd);
        install_element(CONFIG_NODE, &debug_zebra_fpm_cmd);
        install_element(CONFIG_NODE, &debug_zebra_dplane_cmd);
@@ -761,7 +771,9 @@ void zebra_debug_init(void)
        install_element(CONFIG_NODE, &no_debug_zebra_vxlan_cmd);
        install_element(CONFIG_NODE, &no_debug_zebra_packet_cmd);
        install_element(CONFIG_NODE, &no_debug_zebra_kernel_cmd);
+#if defined(HAVE_NETLINK)
        install_element(CONFIG_NODE, &no_debug_zebra_kernel_msgdump_cmd);
+#endif
        install_element(CONFIG_NODE, &no_debug_zebra_rib_cmd);
        install_element(CONFIG_NODE, &no_debug_zebra_fpm_cmd);
        install_element(CONFIG_NODE, &no_debug_zebra_dplane_cmd);
index c2b4dcc52f8fa2c0aa8b12644d2ae17b1fb5996b..2a9fff26661c80f79bd34ec6c05717506a60ef62 100644 (file)
@@ -706,6 +706,9 @@ static int netlink_bridge_vxlan_update(struct interface *ifp,
        struct bridge_vlan_info *vinfo;
        vlanid_t access_vlan;
 
+       if (!af_spec)
+               return 0;
+
        /* There is a 1-to-1 mapping of VLAN to VxLAN - hence
         * only 1 access VLAN is accepted.
         */
@@ -742,23 +745,26 @@ static void netlink_bridge_vlan_update(struct interface *ifp,
        /* create a new bitmap space for re-eval */
        bf_init(zif->vlan_bitmap, IF_VLAN_BITMAP_MAX);
 
-       for (i = RTA_DATA(af_spec), rem = RTA_PAYLOAD(af_spec);
-                       RTA_OK(i, rem); i = RTA_NEXT(i, rem)) {
+       if (af_spec) {
+               for (i = RTA_DATA(af_spec), rem = RTA_PAYLOAD(af_spec);
+                    RTA_OK(i, rem); i = RTA_NEXT(i, rem)) {
 
-               if (i->rta_type != IFLA_BRIDGE_VLAN_INFO)
-                       continue;
+                       if (i->rta_type != IFLA_BRIDGE_VLAN_INFO)
+                               continue;
 
-               vinfo = RTA_DATA(i);
+                       vinfo = RTA_DATA(i);
 
-               if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_BEGIN) {
-                       vid_range_start = vinfo->vid;
-                       continue;
-               }
+                       if (vinfo->flags & BRIDGE_VLAN_INFO_RANGE_BEGIN) {
+                               vid_range_start = vinfo->vid;
+                               continue;
+                       }
 
-               if (!(vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END))
-                       vid_range_start = vinfo->vid;
+                       if (!(vinfo->flags & BRIDGE_VLAN_INFO_RANGE_END))
+                               vid_range_start = vinfo->vid;
 
-               zebra_vlan_bitmap_compute(ifp, vid_range_start, vinfo->vid);
+                       zebra_vlan_bitmap_compute(ifp, vid_range_start,
+                                                 vinfo->vid);
+               }
        }
 
        zebra_vlan_mbr_re_eval(ifp, old_vlan_bitmap);
@@ -794,8 +800,6 @@ static int netlink_bridge_interface(struct nlmsghdr *h, int len, ns_id_t ns_id,
 
        /* We are only interested in the access VLAN i.e., AF_SPEC */
        af_spec = tb[IFLA_AF_SPEC];
-       if (!af_spec)
-               return 0;
 
        if (IS_ZEBRA_IF_VXLAN(ifp))
                return netlink_bridge_vxlan_update(ifp, af_spec);
@@ -1523,6 +1527,14 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                return -1;
        name = (char *)RTA_DATA(tb[IFLA_IFNAME]);
 
+       /* Must be valid string. */
+       len = RTA_PAYLOAD(tb[IFLA_IFNAME]);
+       if (len < 2 || name[len - 1] != '\0') {
+               if (IS_ZEBRA_DEBUG_KERNEL)
+                       zlog_debug("%s: invalid intf name", __func__);
+               return -1;
+       }
+
        if (tb[IFLA_LINKINFO]) {
                netlink_parse_rtattr_nested(linkinfo, IFLA_INFO_MAX,
                                            tb[IFLA_LINKINFO]);
index 408c016494d2039c4e422e3b211fab987e10483c..18f7503f82fa26d266f209f285cf3a244c8cae78 100644 (file)
@@ -1205,59 +1205,77 @@ void zebra_if_set_protodown(struct interface *ifp, bool down)
 #endif
 }
 
-/* Output prefix string to vty. */
-static int prefix_vty_out(struct vty *vty, struct prefix *p)
-{
-       char str[INET6_ADDRSTRLEN];
-
-       inet_ntop(p->family, &p->u.prefix, str, sizeof(str));
-       vty_out(vty, "%s", str);
-       return strlen(str);
-}
-
 /* Dump if address information to vty. */
-static void connected_dump_vty(struct vty *vty, struct connected *connected)
+static void connected_dump_vty(struct vty *vty, json_object *json,
+                              struct connected *connected)
 {
        struct prefix *p;
+       json_object *json_addr = NULL;
+       char buf[PREFIX2STR_BUFFER];
 
        /* Print interface address. */
        p = connected->address;
-       vty_out(vty, "  %s ", prefix_family_str(p));
-       prefix_vty_out(vty, p);
-       vty_out(vty, "/%d", p->prefixlen);
+
+       if (json) {
+               json_addr = json_object_new_object();
+               json_object_array_add(json, json_addr);
+               json_object_string_add(json_addr, "address",
+                                      prefix2str(p, buf, sizeof(buf)));
+       } else {
+               vty_out(vty, "  %s %pFX", prefix_family_str(p), p);
+       }
 
        /* If there is destination address, print it. */
        if (CONNECTED_PEER(connected) && connected->destination) {
-               vty_out(vty, " peer ");
-               prefix_vty_out(vty, connected->destination);
-               vty_out(vty, "/%d", connected->destination->prefixlen);
+               if (json) {
+                       json_object_string_add(
+                               json_addr, "peer",
+                               prefix2str(connected->destination, buf,
+                                          sizeof(buf)));
+               } else {
+                       vty_out(vty, " peer %pFX", connected->destination);
+               }
        }
 
-       if (CHECK_FLAG(connected->flags, ZEBRA_IFA_SECONDARY))
+       if (json)
+               json_object_boolean_add(
+                       json_addr, "secondary",
+                       CHECK_FLAG(connected->flags, ZEBRA_IFA_SECONDARY));
+       else if (CHECK_FLAG(connected->flags, ZEBRA_IFA_SECONDARY))
                vty_out(vty, " secondary");
 
-       if (CHECK_FLAG(connected->flags, ZEBRA_IFA_UNNUMBERED))
+       if (json)
+               json_object_boolean_add(
+                       json_addr, "unnumbered",
+                       CHECK_FLAG(connected->flags, ZEBRA_IFA_UNNUMBERED));
+       else if (CHECK_FLAG(connected->flags, ZEBRA_IFA_UNNUMBERED))
                vty_out(vty, " unnumbered");
 
-       if (connected->label)
-               vty_out(vty, " %s", connected->label);
+       if (connected->label) {
+               if (json)
+                       json_object_string_add(json_addr, "label",
+                                              connected->label);
+               else
+                       vty_out(vty, " %s", connected->label);
+       }
 
-       vty_out(vty, "\n");
+       if (!json)
+               vty_out(vty, "\n");
 }
 
 /* Dump interface neighbor address information to vty. */
-static void nbr_connected_dump_vty(struct vty *vty,
+static void nbr_connected_dump_vty(struct vty *vty, json_object *json,
                                   struct nbr_connected *connected)
 {
        struct prefix *p;
+       char buf[PREFIX2STR_BUFFER];
 
        /* Print interface address. */
        p = connected->address;
-       vty_out(vty, "  %s ", prefix_family_str(p));
-       prefix_vty_out(vty, p);
-       vty_out(vty, "/%d", p->prefixlen);
-
-       vty_out(vty, "\n");
+       if (json)
+               json_array_string_add(json, prefix2str(p, buf, sizeof(buf)));
+       else
+               vty_out(vty, "  %s %pFX\n", prefix_family_str(p), p);
 }
 
 static const char *zebra_zifslavetype_2str(zebra_slave_iftype_t zif_slave_type)
@@ -1413,6 +1431,43 @@ static void ifs_dump_brief_vty(struct vty *vty, struct vrf *vrf)
        vty_out(vty, "\n");
 }
 
+static void ifs_dump_brief_vty_json(json_object *json, struct vrf *vrf)
+{
+       struct connected *connected;
+       struct listnode *node;
+       struct interface *ifp;
+
+       FOR_ALL_INTERFACES (vrf, ifp) {
+               json_object *json_if;
+               json_object *json_addrs;
+
+               json_if = json_object_new_object();
+               json_object_object_add(json, ifp->name, json_if);
+
+               json_object_string_add(json_if, "status",
+                                      if_is_up(ifp) ? "up" : "down");
+               json_object_string_add(json_if, "vrfName", vrf->name);
+
+               json_addrs = json_object_new_array();
+               json_object_object_add(json_if, "addresses", json_addrs);
+               for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
+                       if (CHECK_FLAG(connected->conf, ZEBRA_IFC_REAL)
+                           && !CHECK_FLAG(connected->flags,
+                                          ZEBRA_IFA_SECONDARY)
+                           && !(connected->address->family == AF_INET6
+                                && IN6_IS_ADDR_LINKLOCAL(
+                                        &connected->address->u.prefix6))) {
+                               char buf[PREFIX2STR_BUFFER];
+
+                               json_array_string_add(
+                                       json_addrs,
+                                       prefix2str(connected->address, buf,
+                                                  sizeof(buf)));
+                       }
+               }
+       }
+}
+
 const char *zebra_protodown_rc_str(enum protodown_reasons protodown_rc,
                                   char *pd_buf, uint32_t pd_buf_len)
 {
@@ -1483,7 +1538,7 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
        vty_out(vty, "  Link downs: %5u    last: %s\n", zebra_if->down_count,
                zebra_if->down_last[0] ? zebra_if->down_last : "(never)");
 
-       zebra_ptm_show_status(vty, ifp);
+       zebra_ptm_show_status(vty, NULL, ifp);
 
        vrf = vrf_lookup_by_id(ifp->vrf_id);
        vty_out(vty, "  vrf: %s\n", vrf->name);
@@ -1531,13 +1586,13 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
 
                for (ALL_LIST_ELEMENTS_RO((struct list *)rn->info, node,
                                          connected))
-                       connected_dump_vty(vty, connected);
+                       connected_dump_vty(vty, NULL, connected);
        }
 
        for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
                if (CHECK_FLAG(connected->conf, ZEBRA_IFC_REAL)
                    && (connected->address->family == AF_INET6))
-                       connected_dump_vty(vty, connected);
+                       connected_dump_vty(vty, NULL, connected);
        }
 
        vty_out(vty, "  Interface Type %s\n",
@@ -1637,7 +1692,7 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
        if (zebra_if->flags & ZIF_FLAG_LACP_BYPASS)
                vty_out(vty, "  LACP bypass: on\n");
 
-       zebra_evpn_if_es_print(vty, zebra_if);
+       zebra_evpn_if_es_print(vty, NULL, zebra_if);
        vty_out(vty, "  protodown: %s %s\n",
                (zebra_if->flags & ZIF_FLAG_PROTODOWN) ? "on" : "off",
                if_is_protodown_applicable(ifp) ? "" : "(n/a)");
@@ -1716,7 +1771,7 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
        if (listhead(ifp->nbr_connected))
                vty_out(vty, "  Neighbor address(s):\n");
        for (ALL_LIST_ELEMENTS_RO(ifp->nbr_connected, node, nbr_connected))
-               nbr_connected_dump_vty(vty, nbr_connected);
+               nbr_connected_dump_vty(vty, NULL, nbr_connected);
 
 #ifdef HAVE_PROC_NET_DEV
        /* Statistics print out using proc file system. */
@@ -1774,6 +1829,382 @@ static void if_dump_vty(struct vty *vty, struct interface *ifp)
 #endif /* HAVE_NET_RT_IFLIST */
 }
 
+static void if_dump_vty_json(struct vty *vty, struct interface *ifp,
+                            json_object *json)
+{
+       struct connected *connected;
+       struct nbr_connected *nbr_connected;
+       struct listnode *node;
+       struct route_node *rn;
+       struct zebra_if *zebra_if;
+       struct vrf *vrf;
+       char pd_buf[ZEBRA_PROTODOWN_RC_STR_LEN];
+       char buf[BUFSIZ];
+       json_object *json_if;
+       json_object *json_addrs;
+
+       json_if = json_object_new_object();
+       json_object_object_add(json, ifp->name, json_if);
+
+       if (if_is_up(ifp)) {
+               json_object_string_add(json_if, "administrativeStatus", "up");
+
+               if (CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_LINKDETECTION)) {
+                       json_object_string_add(json_if, "operationalStatus",
+                                              if_is_running(ifp) ? "up"
+                                                                 : "down");
+                       json_object_boolean_add(json_if, "linkDetection", true);
+               } else {
+                       json_object_boolean_add(json_if, "linkDetection",
+                                               false);
+               }
+       } else {
+               json_object_string_add(json_if, "administrativeStatus", "down");
+       }
+
+       zebra_if = ifp->info;
+
+       json_object_int_add(json_if, "linkUps", zebra_if->up_count);
+       json_object_int_add(json_if, "linkDowns", zebra_if->down_count);
+       if (zebra_if->up_last[0])
+               json_object_string_add(json_if, "lastLinkUp",
+                                      zebra_if->up_last);
+       if (zebra_if->down_last[0])
+               json_object_string_add(json_if, "lastLinkDown",
+                                      zebra_if->down_last);
+
+       zebra_ptm_show_status(vty, json, ifp);
+
+       vrf = vrf_lookup_by_id(ifp->vrf_id);
+       json_object_string_add(json_if, "vrfName", vrf->name);
+
+       if (ifp->desc)
+               json_object_string_add(json_if, "description", ifp->desc);
+       if (zebra_if->desc)
+               json_object_string_add(json_if, "OsDescription",
+                                      zebra_if->desc);
+
+       if (ifp->ifindex == IFINDEX_INTERNAL) {
+               json_object_boolean_add(json_if, "pseudoInterface", true);
+               return;
+       } else if (!CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_ACTIVE)) {
+               json_object_int_add(json_if, "index", ifp->ifindex);
+               return;
+       }
+
+       json_object_boolean_add(json_if, "pseudoInterface", false);
+       json_object_int_add(json_if, "index", ifp->ifindex);
+       json_object_int_add(json_if, "metric", ifp->metric);
+       json_object_int_add(json_if, "mtu", ifp->mtu);
+       if (ifp->mtu6 != ifp->mtu)
+               json_object_int_add(json_if, "mtu6", ifp->mtu6);
+       json_object_int_add(json_if, "speed", ifp->speed);
+       json_object_string_add(json_if, "flags", if_flag_dump(ifp->flags));
+
+       /* Hardware address. */
+       json_object_string_add(json_if, "type", if_link_type_str(ifp->ll_type));
+       if (ifp->hw_addr_len != 0) {
+               char hwbuf[BUFSIZ];
+
+               hwbuf[0] = '\0';
+               for (int i = 0; i < ifp->hw_addr_len; i++) {
+                       snprintf(buf, sizeof(buf), "%s%02x", i == 0 ? "" : ":",
+                                ifp->hw_addr[i]);
+                       strlcat(hwbuf, buf, sizeof(hwbuf));
+               }
+               json_object_string_add(json_if, "hardwareAddress", hwbuf);
+       }
+
+       /* Bandwidth in Mbps */
+       if (ifp->bandwidth != 0)
+               json_object_int_add(json_if, "bandwidth", ifp->bandwidth);
+
+
+       /* IP addresses. */
+       json_addrs = json_object_new_array();
+       json_object_object_add(json_if, "ipAddresses", json_addrs);
+
+       for (rn = route_top(zebra_if->ipv4_subnets); rn; rn = route_next(rn)) {
+               if (!rn->info)
+                       continue;
+
+               for (ALL_LIST_ELEMENTS_RO((struct list *)rn->info, node,
+                                         connected))
+                       connected_dump_vty(vty, json_addrs, connected);
+       }
+
+       for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, connected)) {
+               if (CHECK_FLAG(connected->conf, ZEBRA_IFC_REAL)
+                   && (connected->address->family == AF_INET6))
+                       connected_dump_vty(vty, json_addrs, connected);
+       }
+
+       json_object_string_add(json_if, "interfaceType",
+                              zebra_ziftype_2str(zebra_if->zif_type));
+       json_object_string_add(
+               json_if, "interfaceSlaveType",
+               zebra_zifslavetype_2str(zebra_if->zif_slave_type));
+
+       if (IS_ZEBRA_IF_BRIDGE(ifp)) {
+               struct zebra_l2info_bridge *bridge_info;
+
+               bridge_info = &zebra_if->l2info.br;
+               json_object_boolean_add(json_if, "bridgeVlanAware",
+                                       bridge_info->vlan_aware);
+       } else if (IS_ZEBRA_IF_VLAN(ifp)) {
+               struct zebra_l2info_vlan *vlan_info;
+
+               vlan_info = &zebra_if->l2info.vl;
+               json_object_int_add(json_if, "vlanId", vlan_info->vid);
+       } else if (IS_ZEBRA_IF_VXLAN(ifp)) {
+               struct zebra_l2info_vxlan *vxlan_info;
+
+               vxlan_info = &zebra_if->l2info.vxl;
+               json_object_int_add(json_if, "vxlanId", vxlan_info->vni);
+               if (vxlan_info->vtep_ip.s_addr != INADDR_ANY)
+                       json_object_string_add(json_if, "vtepIp",
+                                              inet_ntop(AF_INET,
+                                                        &vxlan_info->vtep_ip,
+                                                        buf, sizeof(buf)));
+               if (vxlan_info->access_vlan)
+                       json_object_int_add(json_if, "accessVlanId",
+                                           vxlan_info->access_vlan);
+               if (vxlan_info->mcast_grp.s_addr != INADDR_ANY)
+                       json_object_string_add(json_if, "mcastGroup",
+                                              inet_ntop(AF_INET,
+                                                        &vxlan_info->mcast_grp,
+                                                        buf, sizeof(buf)));
+               if (vxlan_info->ifindex_link
+                   && (vxlan_info->link_nsid != NS_UNKNOWN)) {
+                       struct interface *ifp;
+
+                       ifp = if_lookup_by_index_per_ns(
+                               zebra_ns_lookup(vxlan_info->link_nsid),
+                               vxlan_info->ifindex_link);
+                       json_object_string_add(json_if, "linkInterface",
+                                              ifp == NULL ? "Unknown"
+                                                          : ifp->name);
+               }
+       } else if (IS_ZEBRA_IF_GRE(ifp)) {
+               struct zebra_l2info_gre *gre_info;
+
+               gre_info = &zebra_if->l2info.gre;
+               if (gre_info->vtep_ip.s_addr != INADDR_ANY) {
+                       json_object_string_add(json_if, "vtepIp",
+                                              inet_ntop(AF_INET,
+                                                        &gre_info->vtep_ip,
+                                                        buf, sizeof(buf)));
+                       if (gre_info->vtep_ip_remote.s_addr != INADDR_ANY)
+                               json_object_string_add(
+                                       json_if, "vtepRemoteIp",
+                                       inet_ntop(AF_INET,
+                                                 &gre_info->vtep_ip_remote,
+                                                 buf, sizeof(buf)));
+               }
+               if (gre_info->ifindex_link
+                   && (gre_info->link_nsid != NS_UNKNOWN)) {
+                       struct interface *ifp;
+
+                       ifp = if_lookup_by_index_per_ns(
+                               zebra_ns_lookup(gre_info->link_nsid),
+                               gre_info->ifindex_link);
+                       json_object_string_add(json_if, "linkInterface",
+                                              ifp == NULL ? "Unknown"
+                                                          : ifp->name);
+               }
+       }
+
+       if (IS_ZEBRA_IF_BRIDGE_SLAVE(ifp)) {
+               struct zebra_l2info_brslave *br_slave;
+
+               br_slave = &zebra_if->brslave_info;
+               if (br_slave->bridge_ifindex != IFINDEX_INTERNAL) {
+                       if (br_slave->br_if)
+                               json_object_string_add(json_if,
+                                                      "masterInterface",
+                                                      br_slave->br_if->name);
+                       else
+                               json_object_int_add(json_if, "masterIfindex",
+                                                   br_slave->bridge_ifindex);
+               }
+       }
+
+       if (IS_ZEBRA_IF_BOND_SLAVE(ifp)) {
+               struct zebra_l2info_bondslave *bond_slave;
+
+               bond_slave = &zebra_if->bondslave_info;
+               if (bond_slave->bond_ifindex != IFINDEX_INTERNAL) {
+                       if (bond_slave->bond_if)
+                               json_object_string_add(
+                                       json_if, "masterInterface",
+                                       bond_slave->bond_if->name);
+                       else
+                               json_object_int_add(json_if, "masterIfindex",
+                                                   bond_slave->bond_ifindex);
+               }
+       }
+
+       json_object_boolean_add(
+               json_if, "lacpBypass",
+               CHECK_FLAG(zebra_if->flags, ZIF_FLAG_LACP_BYPASS));
+
+       zebra_evpn_if_es_print(vty, json_if, zebra_if);
+
+       if (if_is_protodown_applicable(ifp)) {
+               json_object_string_add(
+                       json_if, "protodown",
+                       (zebra_if->flags & ZIF_FLAG_PROTODOWN) ? "on" : "off");
+               if (zebra_if->protodown_rc)
+                       json_object_string_add(
+                               json_if, "protodownReason",
+                               zebra_protodown_rc_str(zebra_if->protodown_rc,
+                                                      pd_buf, sizeof(pd_buf)));
+       }
+
+       if (zebra_if->link_ifindex != IFINDEX_INTERNAL) {
+               if (zebra_if->link)
+                       json_object_string_add(json_if, "parentInterface",
+                                              zebra_if->link->name);
+               else
+                       json_object_int_add(json_if, "parentIfindex",
+                                           zebra_if->link_ifindex);
+       }
+
+       if (HAS_LINK_PARAMS(ifp)) {
+               struct if_link_params *iflp = ifp->link_params;
+               json_object *json_te;
+
+               json_te = json_object_new_object();
+               json_object_object_add(
+                       json_if, "trafficEngineeringLinkParameters", json_te);
+
+               if (IS_PARAM_SET(iflp, LP_TE_METRIC))
+                       json_object_int_add(json_te, "teMetric",
+                                           iflp->te_metric);
+               if (IS_PARAM_SET(iflp, LP_MAX_BW))
+                       json_object_double_add(json_te, "maximumBandwidth",
+                                              iflp->max_bw);
+               if (IS_PARAM_SET(iflp, LP_MAX_RSV_BW))
+                       json_object_double_add(json_te,
+                                              "maximumReservableBandwidth",
+                                              iflp->max_rsv_bw);
+               if (IS_PARAM_SET(iflp, LP_UNRSV_BW)) {
+                       json_object *json_bws;
+
+                       json_bws = json_object_new_object();
+                       json_object_object_add(json_te, "unreservedBandwidth",
+                                              json_bws);
+                       for (unsigned int i = 0; i < MAX_CLASS_TYPE; ++i) {
+                               char buf_ct[64];
+
+                               snprintf(buf_ct, sizeof(buf_ct), "classType%u",
+                                        i);
+                               json_object_double_add(json_bws, buf_ct,
+                                                      iflp->unrsv_bw[i]);
+                       }
+               }
+
+               if (IS_PARAM_SET(iflp, LP_ADM_GRP))
+                       json_object_int_add(json_te, "administrativeGroup",
+                                           iflp->admin_grp);
+               if (IS_PARAM_SET(iflp, LP_DELAY)) {
+                       json_object_int_add(json_te, "linkDelayAverage",
+                                           iflp->av_delay);
+                       if (IS_PARAM_SET(iflp, LP_MM_DELAY)) {
+                               json_object_int_add(json_te, "linkDelayMinimum",
+                                                   iflp->min_delay);
+                               json_object_int_add(json_te, "linkDelayMaximum",
+                                                   iflp->max_delay);
+                       }
+               }
+               if (IS_PARAM_SET(iflp, LP_DELAY_VAR))
+                       json_object_int_add(json_te, "linkDelayVariation",
+                                           iflp->delay_var);
+               if (IS_PARAM_SET(iflp, LP_PKT_LOSS))
+                       json_object_double_add(json_te, "linkPacketLoss",
+                                              iflp->pkt_loss);
+               if (IS_PARAM_SET(iflp, LP_AVA_BW))
+                       json_object_double_add(json_te, "availableBandwidth",
+                                              iflp->ava_bw);
+               if (IS_PARAM_SET(iflp, LP_RES_BW))
+                       json_object_double_add(json_te, "residualBandwidth",
+                                              iflp->res_bw);
+               if (IS_PARAM_SET(iflp, LP_USE_BW))
+                       json_object_double_add(json_te, "utilizedBandwidth",
+                                              iflp->use_bw);
+               if (IS_PARAM_SET(iflp, LP_RMT_AS))
+                       json_object_string_add(json_te, "neighborAsbrIp",
+                                              inet_ntop(AF_INET, &iflp->rmt_ip,
+                                                        buf, sizeof(buf)));
+               json_object_int_add(json_te, "neighborAsbrAs", iflp->rmt_as);
+       }
+
+       if (listhead(ifp->nbr_connected)) {
+               json_object *json_nbr_addrs;
+
+               json_nbr_addrs = json_object_new_array();
+               json_object_object_add(json_if, "neighborIpAddresses",
+                                      json_nbr_addrs);
+
+               for (ALL_LIST_ELEMENTS_RO(ifp->nbr_connected, node,
+                                         nbr_connected))
+                       nbr_connected_dump_vty(vty, json_nbr_addrs,
+                                              nbr_connected);
+       }
+
+#ifdef HAVE_PROC_NET_DEV
+       json_object_int_add(json_if, "inputPackets", stats.rx_packets);
+       json_object_int_add(json_if, "inputBytes", ifp->stats.rx_bytes);
+       json_object_int_add(json_if, "inputDropped", ifp->stats.rx_dropped);
+       json_object_int_add(json_if, "inputMulticastPackets",
+                           ifp->stats.rx_multicast);
+       json_object_int_add(json_if, "inputErrors", ifp->stats.rx_errors);
+       json_object_int_add(json_if, "inputLengthErrors",
+                           ifp->stats.rx_length_errors);
+       json_object_int_add(json_if, "inputOverrunErrors",
+                           ifp->stats.rx_over_errors);
+       json_object_int_add(json_if, "inputCrcErrors",
+                           ifp->stats.rx_crc_errors);
+       json_object_int_add(json_if, "inputFrameErrors",
+                           ifp->stats.rx_frame_errors);
+       json_object_int_add(json_if, "inputFifoErrors",
+                           ifp->stats.rx_fifo_errors);
+       json_object_int_add(json_if, "inputMissedErrors",
+                           ifp->stats.rx_missed_errors);
+       json_object_int_add(json_if, "outputPackets", ifp->stats.tx_packets);
+       json_object_int_add(json_if, "outputBytes", ifp->stats.tx_bytes);
+       json_object_int_add(json_if, "outputDroppedPackets",
+                           ifp->stats.tx_dropped);
+       json_object_int_add(json_if, "outputErrors", ifp->stats.tx_errors);
+       json_object_int_add(json_if, "outputAbortedErrors",
+                           ifp->stats.tx_aborted_errors);
+       json_object_int_add(json_if, "outputCarrierErrors",
+                           ifp->stats.tx_carrier_errors);
+       json_object_int_add(json_if, "outputFifoErrors",
+                           ifp->stats.tx_fifo_errors);
+       json_object_int_add(json_if, "outputHeartbeatErrors",
+                           ifp->stats.tx_heartbeat_errors);
+       json_object_int_add(json_if, "outputWindowErrors",
+                           ifp->stats.tx_window_errors);
+       json_object_int_add(json_if, "collisions", ifp->stats.collisions);
+#endif /* HAVE_PROC_NET_DEV */
+
+#ifdef HAVE_NET_RT_IFLIST
+       json_object_int_add(json_if, "inputPackets", ifp->stats.ifi_ipackets);
+       json_object_int_add(json_if, "inputBytes", ifp->stats.ifi_ibytes);
+       json_object_int_add(json_if, "inputDropd", ifp->stats.ifi_iqdrops);
+       json_object_int_add(json_if, "inputMulticastPackets",
+                           ifp->stats.ifi_imcasts);
+       json_object_int_add(json_if, "inputErrors", ifp->stats.ifi_ierrors);
+       json_object_int_add(json_if, "outputPackets", ifp->stats.ifi_opackets);
+       json_object_int_add(json_if, "outputBytes", ifp->stats.ifi_obytes);
+       json_object_int_add(json_if, "outputMulticastPackets",
+                           ifp->stats.ifi_omcasts);
+       json_object_int_add(json_if, "outputErrors", ifp->stats.ifi_oerrors);
+       json_object_int_add(json_if, "collisions", ifp->stats.ifi_collisions);
+#endif /* HAVE_NET_RT_IFLIST */
+}
+
 static void interface_update_stats(void)
 {
 #ifdef HAVE_PROC_NET_DEV
@@ -1786,45 +2217,57 @@ static void interface_update_stats(void)
 #endif /* HAVE_NET_RT_IFLIST */
 }
 
-static int if_config_write(struct vty *vty);
-struct cmd_node interface_node = {
-       .name = "interface",
-       .node = INTERFACE_NODE,
-       .parent_node = CONFIG_NODE,
-       .prompt = "%s(config-if)# ",
-       .config_write = if_config_write,
-};
-
 #ifndef VTYSH_EXTRACT_PL
 #include "zebra/interface_clippy.c"
 #endif
 /* Show all interfaces to vty. */
 DEFPY(show_interface, show_interface_cmd,
-      "show interface vrf NAME$vrf_name [brief$brief]",
+      "show interface vrf NAME$vrf_name [brief$brief] [json$uj]",
       SHOW_STR
       "Interface status and configuration\n"
       VRF_CMD_HELP_STR
-      "Interface status and configuration summary\n")
+      "Interface status and configuration summary\n"
+      JSON_STR)
 {
        struct vrf *vrf;
        struct interface *ifp;
+       json_object *json = NULL;
 
        interface_update_stats();
 
        vrf = vrf_lookup_by_name(vrf_name);
        if (!vrf) {
-               vty_out(vty, "%% VRF %s not found\n", vrf_name);
+               if (uj)
+                       vty_out(vty, "{}\n");
+               else
+                       vty_out(vty, "%% VRF %s not found\n", vrf_name);
                return CMD_WARNING;
        }
 
+       if (uj)
+               json = json_object_new_object();
+
        if (brief) {
-               ifs_dump_brief_vty(vty, vrf);
+               if (json)
+                       ifs_dump_brief_vty_json(json, vrf);
+               else
+                       ifs_dump_brief_vty(vty, vrf);
        } else {
                FOR_ALL_INTERFACES (vrf, ifp) {
-                       if_dump_vty(vty, ifp);
+                       if (json)
+                               if_dump_vty_json(vty, ifp, json);
+                       else
+                               if_dump_vty(vty, ifp);
                }
        }
 
+       if (json) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
+
        return CMD_SUCCESS;
 }
 
@@ -1832,85 +2275,140 @@ DEFPY(show_interface, show_interface_cmd,
 /* Show all interfaces to vty. */
 DEFPY (show_interface_vrf_all,
        show_interface_vrf_all_cmd,
-       "show interface [vrf all] [brief$brief]",
+       "show interface [vrf all] [brief$brief] [json$uj]",
        SHOW_STR
        "Interface status and configuration\n"
        VRF_ALL_CMD_HELP_STR
-       "Interface status and configuration summary\n")
+       "Interface status and configuration summary\n"
+       JSON_STR)
 {
        struct vrf *vrf;
        struct interface *ifp;
+       json_object *json = NULL;
 
        interface_update_stats();
 
+       if (uj)
+               json = json_object_new_object();
+
        /* All interface print. */
        RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) {
                if (brief) {
-                       ifs_dump_brief_vty(vty, vrf);
+                       if (json)
+                               ifs_dump_brief_vty_json(json, vrf);
+                       else
+                               ifs_dump_brief_vty(vty, vrf);
                } else {
-                       FOR_ALL_INTERFACES (vrf, ifp)
-                               if_dump_vty(vty, ifp);
+                       FOR_ALL_INTERFACES (vrf, ifp) {
+                               if (json)
+                                       if_dump_vty_json(vty, ifp, json);
+                               else
+                                       if_dump_vty(vty, ifp);
+                       }
                }
        }
 
+       if (json) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
+
        return CMD_SUCCESS;
 }
 
 /* Show specified interface to vty. */
 
-DEFUN (show_interface_name_vrf,
+DEFPY (show_interface_name_vrf,
        show_interface_name_vrf_cmd,
-       "show interface IFNAME vrf NAME",
+       "show interface IFNAME$ifname vrf NAME$vrf_name [json$uj]",
        SHOW_STR
        "Interface status and configuration\n"
        "Interface name\n"
-       VRF_CMD_HELP_STR)
+       VRF_CMD_HELP_STR
+       JSON_STR)
 {
-       int idx_ifname = 2;
-       int idx_name = 4;
        struct interface *ifp;
        struct vrf *vrf;
+       json_object *json = NULL;
 
        interface_update_stats();
 
-       vrf = vrf_lookup_by_name(argv[idx_name]->arg);
+       vrf = vrf_lookup_by_name(vrf_name);
        if (!vrf) {
-               vty_out(vty, "%% VRF %s not found\n", argv[idx_name]->arg);
+               if (uj)
+                       vty_out(vty, "{}\n");
+               else
+                       vty_out(vty, "%% VRF %s not found\n", vrf_name);
                return CMD_WARNING;
        }
 
-       ifp = if_lookup_by_name_vrf(argv[idx_ifname]->arg, vrf);
+       ifp = if_lookup_by_name_vrf(ifname, vrf);
        if (ifp == NULL) {
-               vty_out(vty, "%% Can't find interface %s\n",
-                       argv[idx_ifname]->arg);
+               if (uj)
+                       vty_out(vty, "{}\n");
+               else
+                       vty_out(vty, "%% Can't find interface %s\n", ifname);
                return CMD_WARNING;
        }
-       if_dump_vty(vty, ifp);
+
+       if (uj)
+               json = json_object_new_object();
+
+       if (json)
+               if_dump_vty_json(vty, ifp, json);
+       else
+               if_dump_vty(vty, ifp);
+
+       if (json) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
 
        return CMD_SUCCESS;
 }
 
 /* Show specified interface to vty. */
-DEFUN (show_interface_name_vrf_all,
+DEFPY (show_interface_name_vrf_all,
        show_interface_name_vrf_all_cmd,
-       "show interface IFNAME [vrf all]",
+       "show interface IFNAME$ifname [vrf all] [json$uj]",
        SHOW_STR
        "Interface status and configuration\n"
        "Interface name\n"
-       VRF_ALL_CMD_HELP_STR)
+       VRF_ALL_CMD_HELP_STR
+       JSON_STR)
 {
-       int idx_ifname = 2;
        struct interface *ifp;
+       json_object *json = NULL;
 
        interface_update_stats();
 
-       ifp = if_lookup_by_name_all_vrf(argv[idx_ifname]->arg);
+       ifp = if_lookup_by_name_all_vrf(ifname);
        if (ifp == NULL) {
-               vty_out(vty, "%% Can't find interface %s\n",
-                       argv[idx_ifname]->arg);
+               if (uj)
+                       vty_out(vty, "{}\n");
+               else
+                       vty_out(vty, "%% Can't find interface %s\n", ifname);
                return CMD_WARNING;
        }
-       if_dump_vty(vty, ifp);
+
+       if (uj)
+               json = json_object_new_object();
+
+       if (json)
+               if_dump_vty_json(vty, ifp, json);
+       else
+               if_dump_vty(vty, ifp);
+
+       if (json) {
+               vty_out(vty, "%s\n",
+                       json_object_to_json_string_ext(
+                               json, JSON_C_TO_STRING_PRETTY));
+               json_object_free(json);
+       }
 
        return CMD_SUCCESS;
 }
@@ -3598,7 +4096,7 @@ static int link_params_config_write(struct vty *vty, struct interface *ifp)
        if (IS_PARAM_SET(iflp, LP_RMT_AS))
                vty_out(vty, "  neighbor %pI4 as %u\n", &iflp->rmt_ip,
                        iflp->rmt_as);
-       vty_out(vty, "  exit-link-params\n");
+       vty_out(vty, " exit-link-params\n");
        return 0;
 }
 
@@ -3690,7 +4188,7 @@ static int if_config_write(struct vty *vty)
                        zebra_evpn_mh_if_write(vty, ifp);
                        link_params_config_write(vty, ifp);
 
-                       vty_endframe(vty, "!\n");
+                       vty_endframe(vty, "exit\n!\n");
                }
        return 0;
 }
@@ -3703,9 +4201,8 @@ void zebra_if_init(void)
        hook_register_prio(if_del, 0, if_zebra_delete_hook);
 
        /* Install configuration write function. */
-       install_node(&interface_node);
+       if_cmd_init(if_config_write);
        install_node(&link_params_node);
-       if_cmd_init();
        /*
         * This is *intentionally* setting this to NULL, signaling
         * that interface creation for zebra acts differently
index 8b631a37266864f8088d2b1575c86682454ecdd1..effec24c1f3e0813fc67a6e6e0881e91c91cb9f7 100644 (file)
@@ -350,21 +350,9 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
        case RTM_DELADDR:
                return netlink_interface_addr(h, ns_id, startup);
        case RTM_NEWNEIGH:
-               return netlink_neigh_change(h, ns_id);
        case RTM_DELNEIGH:
-               return netlink_neigh_change(h, ns_id);
        case RTM_GETNEIGH:
-               /*
-                * Kernel in some situations when it expects
-                * user space to resolve arp entries, we will
-                * receive this notification.  As we don't
-                * need this notification and as that
-                * we don't want to spam the log file with
-                * below messages, just ignore.
-                */
-               if (IS_ZEBRA_DEBUG_KERNEL)
-                       zlog_debug("Received RTM_GETNEIGH, ignoring");
-               break;
+               return netlink_neigh_change(h, ns_id);
        case RTM_NEWRULE:
                return netlink_rule_change(h, ns_id, startup);
        case RTM_DELRULE:
@@ -550,6 +538,12 @@ bool nl_attr_put(struct nlmsghdr *n, unsigned int maxlen, int type,
        return true;
 }
 
+bool nl_attr_put8(struct nlmsghdr *n, unsigned int maxlen, int type,
+                 uint8_t data)
+{
+       return nl_attr_put(n, maxlen, type, &data, sizeof(uint8_t));
+}
+
 bool nl_attr_put16(struct nlmsghdr *n, unsigned int maxlen, int type,
                   uint16_t data)
 {
index a7b152b31bda7e20af98ebe26c4327f9327f2c09..d8e5671b72ddc69f60864ac3b21b6c7cf4c5486d 100644 (file)
@@ -38,6 +38,8 @@ extern "C" {
  */
 extern bool nl_attr_put(struct nlmsghdr *n, unsigned int maxlen, int type,
                        const void *data, unsigned int alen);
+extern bool nl_attr_put8(struct nlmsghdr *n, unsigned int maxlen, int type,
+                        uint8_t data);
 extern bool nl_attr_put16(struct nlmsghdr *n, unsigned int maxlen, int type,
                          uint16_t data);
 extern bool nl_attr_put32(struct nlmsghdr *n, unsigned int maxlen, int type,
index 252bf04782b294796b3db6b13ffc24dfc8e88aa6..5c060ac6f86015a4445a7049bd03925abdb9069b 100644 (file)
@@ -849,8 +849,8 @@ int ifam_read(struct ifa_msghdr *ifam)
        bool dest_same = false;
        char ifname[INTERFACE_NAMSIZ];
        short ifnlen = 0;
-       char isalias = 0;
-       int flags = 0;
+       bool isalias = false;
+       uint32_t flags = 0;
 
        ifname[0] = ifname[INTERFACE_NAMSIZ - 1] = '\0';
 
@@ -865,7 +865,13 @@ int ifam_read(struct ifa_msghdr *ifam)
        }
 
        if (ifnlen && strncmp(ifp->name, ifname, INTERFACE_NAMSIZ))
-               isalias = 1;
+               isalias = true;
+
+       /*
+        * Mark the alias prefixes as secondary
+        */
+       if (isalias)
+               SET_FLAG(flags, ZEBRA_IFA_SECONDARY);
 
        /* N.B. The info in ifa_msghdr does not tell us whether the RTA_BRD
           field contains a broadcast address or a peer address, so we are
index bded50149f14069d120a8e38ff83869270bf075b..6162d36b4358df8855a1ecefbfdf005c345a56fd 100644 (file)
@@ -384,7 +384,6 @@ int main(int argc, char **argv)
 #endif /* HAVE_NETLINK */
                default:
                        frr_help_exit(1);
-                       break;
                }
        }
 
index 89f46f9c97a030d61ea0bd43c8b253cc19775594..26f6d404e95f4a2bd6de375ab5e3ab334709aa97 100644 (file)
@@ -153,10 +153,16 @@ static bool zebra_redistribute_check(const struct route_entry *re,
                                     struct zserv *client,
                                     const struct prefix *p, int afi)
 {
+       struct zebra_vrf *zvrf;
+
        /* Process only if there is valid re */
        if (!re)
                return false;
 
+       zvrf = vrf_info_lookup(re->vrf_id);
+       if (re->vrf_id == VRF_DEFAULT && zvrf->table_id != re->table)
+               return false;
+
        /* If default route and redistributed */
        if (is_default_prefix(p)
            && vrf_bitmap_check(client->redist_default[afi], re->vrf_id))
index b7ffb9ce8da558e80094e576e99f56bee9010922..8887053a4c8041091c92b961acc39b7ebd154c5b 100644 (file)
@@ -177,15 +177,16 @@ struct route_entry {
 
 /* meta-queue structure:
  * sub-queue 0: nexthop group objects
- * sub-queue 1: connected
- * sub-queue 2: kernel
- * sub-queue 3: static
- * sub-queue 4: RIP, RIPng, OSPF, OSPF6, IS-IS, EIGRP, NHRP
- * sub-queue 5: iBGP, eBGP
- * sub-queue 6: any other origin (if any) typically those that
+ * sub-queue 1: EVPN/VxLAN objects
+ * sub-queue 2: connected
+ * sub-queue 3: kernel
+ * sub-queue 4: static
+ * sub-queue 5: RIP, RIPng, OSPF, OSPF6, IS-IS, EIGRP, NHRP
+ * sub-queue 6: iBGP, eBGP
+ * sub-queue 7: any other origin (if any) typically those that
  *              don't generate routes
  */
-#define MQ_SIZE 7
+#define MQ_SIZE 8
 struct meta_queue {
        struct list *subq[MQ_SIZE];
        uint32_t size; /* sum of lengths of all subqueues */
@@ -370,9 +371,6 @@ extern void _route_entry_dump(const char *func, union prefixconstptr pp,
                              union prefixconstptr src_pp,
                              const struct route_entry *re);
 
-extern void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id);
-extern void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id);
-
 #define ZEBRA_RIB_LOOKUP_ERROR -1
 #define ZEBRA_RIB_FOUND_EXACT 0
 #define ZEBRA_RIB_FOUND_NOGATE 1
@@ -402,6 +400,11 @@ extern int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
 extern int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
                             struct prefix_ipv6 *src_p, struct route_entry *re,
                             struct nexthop_group *ng);
+/*
+ * -1 -> some sort of error
+ *  0 -> an add
+ *  1 -> an update
+ */
 extern int rib_add_multipath_nhe(afi_t afi, safi_t safi, struct prefix *p,
                                 struct prefix_ipv6 *src_p,
                                 struct route_entry *re,
@@ -446,6 +449,36 @@ extern int rib_queue_nhg_ctx_add(struct nhg_ctx *ctx);
 /* Enqueue incoming nhg from proto daemon for processing */
 extern int rib_queue_nhe_add(struct nhg_hash_entry *nhe);
 
+/* Enqueue evpn route for processing */
+int zebra_rib_queue_evpn_route_add(vrf_id_t vrf_id, const struct ethaddr *rmac,
+                                  const struct ipaddr *vtep_ip,
+                                  const struct prefix *host_prefix);
+int zebra_rib_queue_evpn_route_del(vrf_id_t vrf_id,
+                                  const struct ipaddr *vtep_ip,
+                                  const struct prefix *host_prefix);
+/* Enqueue EVPN remote ES for processing */
+int zebra_rib_queue_evpn_rem_es_add(const esi_t *esi,
+                                   const struct in_addr *vtep_ip,
+                                   bool esr_rxed, uint8_t df_alg,
+                                   uint16_t df_pref);
+int zebra_rib_queue_evpn_rem_es_del(const esi_t *esi,
+                                   const struct in_addr *vtep_ip);
+/* Enqueue EVPN remote macip update for processing */
+int zebra_rib_queue_evpn_rem_macip_del(vni_t vni, const struct ethaddr *macaddr,
+                                      const struct ipaddr *ip,
+                                      struct in_addr vtep_ip);
+int zebra_rib_queue_evpn_rem_macip_add(vni_t vni, const struct ethaddr *macaddr,
+                                      const struct ipaddr *ipaddr,
+                                      uint8_t flags, uint32_t seq,
+                                      struct in_addr vtep_ip,
+                                      const esi_t *esi);
+/* Enqueue VXLAN remote vtep update for processing */
+int zebra_rib_queue_evpn_rem_vtep_add(vrf_id_t vrf_id, vni_t vni,
+                                     struct in_addr vtep_ip,
+                                     int flood_control);
+int zebra_rib_queue_evpn_rem_vtep_del(vrf_id_t vrf_id, vni_t vni,
+                                     struct in_addr vtep_ip);
+
 extern void meta_queue_free(struct meta_queue *mq);
 extern int zebra_rib_labeled_unicast(struct route_entry *re);
 extern struct route_table *rib_table_ipv6;
index f79ddbe95837f969b48a6c299aceb24357b9c883..929a44ade721d0ed26036d3ce9da7e17f721c57c 100644 (file)
@@ -93,10 +93,10 @@ extern void macfdb_read_for_bridge(struct zebra_ns *zns, struct interface *ifp,
                                   struct interface *br_if);
 extern void macfdb_read_specific_mac(struct zebra_ns *zns,
                                     struct interface *br_if,
-                                    struct ethaddr *mac, vlanid_t vid);
+                                    const struct ethaddr *mac, vlanid_t vid);
 extern void neigh_read(struct zebra_ns *zns);
 extern void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *ifp);
-extern void neigh_read_specific_ip(struct ipaddr *ip,
+extern void neigh_read_specific_ip(const struct ipaddr *ip,
                                   struct interface *vlan_if);
 extern void route_read(struct zebra_ns *zns);
 extern int kernel_upd_mac_nh(uint32_t nh_id, struct in_addr vtep_ip);
index 38f8140db2a714642a17565f361f8823abab270e..a8b4b54d290eb8b8a3bc89d13261d6bb16ae3758 100644 (file)
@@ -861,6 +861,12 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id,
                }
                memcpy(&src_p.prefix, src, 16);
                src_p.prefixlen = rtm->rtm_src_len;
+       } else {
+               /* We only handle the AFs we handle... */
+               if (IS_ZEBRA_DEBUG_KERNEL)
+                       zlog_debug("%s: unknown address-family %u", __func__,
+                                  rtm->rtm_family);
+               return 0;
        }
 
        /*
@@ -3466,10 +3472,9 @@ int netlink_macfdb_read_for_bridge(struct zebra_ns *zns, struct interface *ifp,
 
 /* Request for MAC FDB for a specific MAC address in VLAN from the kernel */
 static int netlink_request_specific_mac_in_bridge(struct zebra_ns *zns,
-                                                 int family,
-                                                 int type,
+                                                 int family, int type,
                                                  struct interface *br_if,
-                                                 struct ethaddr *mac,
+                                                 const struct ethaddr *mac,
                                                  vlanid_t vid)
 {
        struct {
@@ -3506,7 +3511,7 @@ static int netlink_request_specific_mac_in_bridge(struct zebra_ns *zns,
 
 int netlink_macfdb_read_specific_mac(struct zebra_ns *zns,
                                     struct interface *br_if,
-                                    struct ethaddr *mac, vlanid_t vid)
+                                    const struct ethaddr *mac, vlanid_t vid)
 {
        int ret = 0;
        struct zebra_dplane_info dp_info;
@@ -3653,6 +3658,15 @@ static void netlink_handle_5549(struct ndmsg *ndm, struct zebra_if *zif,
 #define NUD_LOCAL_ACTIVE                                                 \
        (NUD_PERMANENT | NUD_NOARP | NUD_REACHABLE)
 
+static int netlink_nbr_entry_state_to_zclient(int nbr_state)
+{
+       /* an exact match is done between
+        * - netlink neighbor state values: NDM_XXX (see in linux/neighbour.h)
+        * - zclient neighbor state values: ZEBRA_NEIGH_STATE_XXX
+        *  (see in lib/zclient.h)
+        */
+       return nbr_state;
+}
 static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
 {
        struct ndmsg *ndm;
@@ -3742,8 +3756,10 @@ static int netlink_ipneigh_change(struct nlmsghdr *h, int len, ns_id_t ns_id)
                               &mac, l2_len);
                } else
                        sockunion_family(&link_layer_ipv4) = AF_UNSPEC;
-               zsend_nhrp_neighbor_notify(cmd, ifp, &ip, ndm->ndm_state,
-                                          &link_layer_ipv4);
+               zsend_nhrp_neighbor_notify(
+                       cmd, ifp, &ip,
+                       netlink_nbr_entry_state_to_zclient(ndm->ndm_state),
+                       &link_layer_ipv4);
        }
 
        if (h->nlmsg_type == RTM_GETNEIGH)
@@ -3946,7 +3962,8 @@ int netlink_neigh_read_for_vlan(struct zebra_ns *zns, struct interface *vlan_if)
  * read using netlink interface.
  */
 static int netlink_request_specific_neigh_in_vlan(struct zebra_ns *zns,
-                                                 int type, struct ipaddr *ip,
+                                                 int type,
+                                                 const struct ipaddr *ip,
                                                  ifindex_t ifindex)
 {
        struct {
@@ -3983,8 +4000,8 @@ static int netlink_request_specific_neigh_in_vlan(struct zebra_ns *zns,
        return netlink_request(&zns->netlink_cmd, &req);
 }
 
-int netlink_neigh_read_specific_ip(struct ipaddr *ip,
-                                 struct interface *vlan_if)
+int netlink_neigh_read_specific_ip(const struct ipaddr *ip,
+                                  struct interface *vlan_if)
 {
        int ret = 0;
        struct zebra_ns *zns;
index 4e41ff984bb4bf94528d0716826fdb2115e4c93d..93c06e555b02daddf1c3fda228e29e0c9f0ed212 100644 (file)
@@ -99,8 +99,9 @@ extern int netlink_neigh_read_for_vlan(struct zebra_ns *zns,
                                       struct interface *vlan_if);
 extern int netlink_macfdb_read_specific_mac(struct zebra_ns *zns,
                                            struct interface *br_if,
-                                           struct ethaddr *mac, uint16_t vid);
-extern int netlink_neigh_read_specific_ip(struct ipaddr *ip,
+                                           const struct ethaddr *mac,
+                                           uint16_t vid);
+extern int netlink_neigh_read_specific_ip(const struct ipaddr *ip,
                                          struct interface *vlan_if);
 extern vrf_id_t vrf_lookup_by_table(uint32_t table_id, ns_id_t ns_id);
 
index fbca47351dca4582e8dad00b8a5268b47e3ee056..f70b006acd3cf77741388ca2bb7ec2fbe43245e8 100644 (file)
@@ -46,9 +46,9 @@ void macfdb_read_for_bridge(struct zebra_ns *zns, struct interface *ifp,
 }
 
 void macfdb_read_specific_mac(struct zebra_ns *zns, struct interface *br_if,
-                             struct ethaddr *mac, vlanid_t vid)
+                             const struct ethaddr *mac, vlanid_t vid)
 {
-netlink_macfdb_read_specific_mac(zns, br_if, mac, vid);
+       netlink_macfdb_read_specific_mac(zns, br_if, mac, vid);
 }
 
 void neigh_read(struct zebra_ns *zns)
@@ -61,7 +61,7 @@ void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *vlan_if)
        netlink_neigh_read_for_vlan(zns, vlan_if);
 }
 
-void neigh_read_specific_ip(struct ipaddr *ip, struct interface *vlan_if)
+void neigh_read_specific_ip(const struct ipaddr *ip, struct interface *vlan_if)
 {
        netlink_neigh_read_specific_ip(ip, vlan_if);
 }
index 74c6825ba1225bb4d3dafcc6edc6d9b3e914c55b..594f7c2dd910df89ec89cf3befe811d9a299b0e2 100644 (file)
@@ -88,7 +88,7 @@ void macfdb_read_for_bridge(struct zebra_ns *zns, struct interface *ifp,
 }
 
 void macfdb_read_specific_mac(struct zebra_ns *zns, struct interface *br_if,
-                             struct ethaddr *mac, vlanid_t vid)
+                             const struct ethaddr *mac, vlanid_t vid)
 {
 }
 
@@ -100,7 +100,7 @@ void neigh_read_for_vlan(struct zebra_ns *zns, struct interface *vlan_if)
 {
 }
 
-void neigh_read_specific_ip(struct ipaddr *ip, struct interface *vlan_if)
+void neigh_read_specific_ip(const struct ipaddr *ip, struct interface *vlan_if)
 {
 }
 
index 08a675ef3a108331ab6d4d962dfd4bac07e0df91..b651edd8f99f3e5a6fd09c6e5dbfc554195ccf82 100644 (file)
  * Returns -1 on failure, 0 when the msg doesn't fit entirely in the buffer
  * or the number of bytes written to buf.
  */
-static ssize_t
-netlink_rule_msg_encode(int cmd, const struct zebra_dplane_ctx *ctx,
-                       uint32_t filter_bm, uint32_t priority, uint32_t table,
-                       const struct prefix *src_ip,
-                       const struct prefix *dst_ip, uint32_t fwmark,
-                       uint8_t dsfield, void *buf, size_t buflen)
+static ssize_t netlink_rule_msg_encode(
+       int cmd, const struct zebra_dplane_ctx *ctx, uint32_t filter_bm,
+       uint32_t priority, uint32_t table, const struct prefix *src_ip,
+       const struct prefix *dst_ip, uint32_t fwmark, uint8_t dsfield,
+       uint8_t ip_protocol, void *buf, size_t buflen)
 {
        uint8_t protocol = RTPROT_ZEBRA;
        int family;
@@ -136,6 +135,10 @@ netlink_rule_msg_encode(int cmd, const struct zebra_dplane_ctx *ctx,
        if (filter_bm & PBR_FILTER_DSFIELD)
                req->frh.tos = dsfield;
 
+       /* protocol to match on */
+       if (filter_bm & PBR_FILTER_IP_PROTOCOL)
+               nl_attr_put8(&req->n, buflen, FRA_IP_PROTO, ip_protocol);
+
        /* Route table to use to forward, if filter criteria matches. */
        if (table < 256)
                req->frh.table = table;
@@ -168,7 +171,8 @@ static ssize_t netlink_rule_msg_encoder(struct zebra_dplane_ctx *ctx, void *buf,
                dplane_ctx_rule_get_table(ctx), dplane_ctx_rule_get_src_ip(ctx),
                dplane_ctx_rule_get_dst_ip(ctx),
                dplane_ctx_rule_get_fwmark(ctx),
-               dplane_ctx_rule_get_dsfield(ctx), buf, buflen);
+               dplane_ctx_rule_get_dsfield(ctx),
+               dplane_ctx_rule_get_ipproto(ctx), buf, buflen);
 }
 
 static ssize_t netlink_oldrule_msg_encoder(struct zebra_dplane_ctx *ctx,
@@ -181,7 +185,8 @@ static ssize_t netlink_oldrule_msg_encoder(struct zebra_dplane_ctx *ctx,
                dplane_ctx_rule_get_old_src_ip(ctx),
                dplane_ctx_rule_get_old_dst_ip(ctx),
                dplane_ctx_rule_get_old_fwmark(ctx),
-               dplane_ctx_rule_get_old_dsfield(ctx), buf, buflen);
+               dplane_ctx_rule_get_old_dsfield(ctx),
+               dplane_ctx_rule_get_old_ipproto(ctx), buf, buflen);
 }
 
 /* Public functions */
@@ -236,6 +241,7 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
        char *ifname;
        struct zebra_pbr_rule rule = {};
        uint8_t proto = 0;
+       uint8_t ip_proto = 0;
 
        /* Basic validation followed by extracting attributes. */
        if (h->nlmsg_type != RTM_NEWRULE && h->nlmsg_type != RTM_DELRULE)
@@ -312,6 +318,9 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
        if (tb[FRA_PROTOCOL])
                proto = *(uint8_t *)RTA_DATA(tb[FRA_PROTOCOL]);
 
+       if (tb[FRA_IP_PROTO])
+               ip_proto = *(uint8_t *)RTA_DATA(tb[FRA_IP_PROTO]);
+
        ifname = (char *)RTA_DATA(tb[FRA_IFNAME]);
        strlcpy(rule.ifname, ifname, sizeof(rule.ifname));
 
@@ -326,7 +335,7 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                        ret = dplane_pbr_rule_delete(&rule);
 
                        zlog_debug(
-                               "%s: %s leftover rule: family %s IF %s Pref %u Src %pFX Dst %pFX Table %u",
+                               "%s: %s leftover rule: family %s IF %s Pref %u Src %pFX Dst %pFX Table %u ip-proto: %u",
                                __func__,
                                ((ret == ZEBRA_DPLANE_REQUEST_FAILURE)
                                         ? "Failed to remove"
@@ -334,7 +343,7 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
                                nl_family_to_str(frh->family), rule.ifname,
                                rule.rule.priority, &rule.rule.filter.src_ip,
                                &rule.rule.filter.dst_ip,
-                               rule.rule.action.table);
+                               rule.rule.action.table, ip_proto);
                }
 
                /* TBD */
@@ -349,11 +358,12 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
 
        if (IS_ZEBRA_DEBUG_KERNEL)
                zlog_debug(
-                       "Rx %s family %s IF %s Pref %u Src %pFX Dst %pFX Table %u",
+                       "Rx %s family %s IF %s Pref %u Src %pFX Dst %pFX Table %u ip-proto: %u",
                        nl_msg_type_to_str(h->nlmsg_type),
                        nl_family_to_str(frh->family), rule.ifname,
                        rule.rule.priority, &rule.rule.filter.src_ip,
-                       &rule.rule.filter.dst_ip, rule.rule.action.table);
+                       &rule.rule.filter.dst_ip, rule.rule.action.table,
+                       ip_proto);
 
        return kernel_pbr_rule_del(&rule);
 }
index 70d8c4005d94b0f79ac9532253d556b160aeefa7..c3d8a73aaac52a03f6ad6abf047882441b0f65ec 100644 (file)
@@ -19,6 +19,7 @@ vtysh_scan += \
        zebra/zebra_routemap.c \
        zebra/zebra_vty.c \
        zebra/zserv.c \
+       zebra/zebra_vrf.c \
        # end
 
 # can be loaded as DSO - always include for vtysh
@@ -132,6 +133,7 @@ clippy_scan += \
        zebra/zebra_routemap.c \
        zebra/zebra_vty.c \
        zebra/zebra_srv6_vty.c \
+       zebra/zebra_vrf.c \
        # end
 
 noinst_HEADERS += \
@@ -196,14 +198,14 @@ zebra_zebra_irdp_la_SOURCES = \
        zebra/irdp_main.c \
        zebra/irdp_packet.c \
        # end
-zebra_zebra_irdp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+zebra_zebra_irdp_la_LDFLAGS = $(MODULE_LDFLAGS)
 
 zebra_zebra_snmp_la_SOURCES = zebra/zebra_snmp.c
 zebra_zebra_snmp_la_CFLAGS = $(AM_CFLAGS) $(SNMP_CFLAGS) -std=gnu11
-zebra_zebra_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+zebra_zebra_snmp_la_LDFLAGS = $(MODULE_LDFLAGS)
 zebra_zebra_snmp_la_LIBADD = lib/libfrrsnmp.la
 
-zebra_zebra_fpm_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+zebra_zebra_fpm_la_LDFLAGS = $(MODULE_LDFLAGS)
 zebra_zebra_fpm_la_LIBADD =
 zebra_zebra_fpm_la_SOURCES = zebra/zebra_fpm.c
 zebra_zebra_fpm_la_SOURCES += zebra/zebra_fpm_netlink.c
@@ -220,7 +222,7 @@ endif
 # Sample dataplane plugin
 if DEV_BUILD
 zebra_dplane_sample_plugin_la_SOURCES = zebra/sample_plugin.c
-zebra_dplane_sample_plugin_la_LDFLAGS = -module -shared -avoid-version -export-dynamic
+zebra_dplane_sample_plugin_la_LDFLAGS = $(MODULE_LDFLAGS)
 endif
 
 nodist_zebra_zebra_SOURCES = \
@@ -229,13 +231,13 @@ nodist_zebra_zebra_SOURCES = \
        # end
 
 zebra_zebra_cumulus_mlag_la_SOURCES = zebra/zebra_mlag_private.c
-zebra_zebra_cumulus_mlag_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+zebra_zebra_cumulus_mlag_la_LDFLAGS = $(MODULE_LDFLAGS)
 
 if LINUX
 module_LTLIBRARIES += zebra/dplane_fpm_nl.la
 
 zebra_dplane_fpm_nl_la_SOURCES = zebra/dplane_fpm_nl.c
-zebra_dplane_fpm_nl_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
+zebra_dplane_fpm_nl_la_LDFLAGS = $(MODULE_LDFLAGS)
 zebra_dplane_fpm_nl_la_LIBADD  =
 
 vtysh_scan += zebra/dplane_fpm_nl.c
index 4ef4bc67225b97921ca2e7e287c1dd30d2af93c9..6666b3525ec1a742ad8bc447ecd8eba0801b72af 100644 (file)
@@ -867,7 +867,7 @@ void zsend_rule_notify_owner(const struct zebra_dplane_ctx *ctx,
 }
 
 void zsend_iptable_notify_owner(const struct zebra_dplane_ctx *ctx,
-                               uint16_t note)
+                               enum zapi_iptable_notify_owner note)
 {
        struct listnode *node;
        struct zserv *client;
@@ -901,7 +901,8 @@ void zsend_iptable_notify_owner(const struct zebra_dplane_ctx *ctx,
        zserv_send_message(client, s);
 }
 
-void zsend_ipset_notify_owner(const struct zebra_dplane_ctx *ctx, uint16_t note)
+void zsend_ipset_notify_owner(const struct zebra_dplane_ctx *ctx,
+                             enum zapi_ipset_notify_owner note)
 {
        struct listnode *node;
        struct zserv *client;
@@ -936,7 +937,7 @@ void zsend_ipset_notify_owner(const struct zebra_dplane_ctx *ctx, uint16_t note)
 }
 
 void zsend_ipset_entry_notify_owner(const struct zebra_dplane_ctx *ctx,
-                                   uint16_t note)
+                                   enum zapi_ipset_entry_notify_owner note)
 {
        struct listnode *node;
        struct zserv *client;
@@ -996,7 +997,8 @@ void zsend_nhrp_neighbor_notify(int cmd, struct interface *ifp,
                        continue;
 
                s = stream_new(ZEBRA_MAX_PACKET_SIZ);
-               zclient_neigh_ip_encode(s, cmd, &ip, link_layer_ipv4, ifp);
+               zclient_neigh_ip_encode(s, cmd, &ip, link_layer_ipv4, ifp,
+                                       ndm_state);
                stream_putw_at(s, 0, stream_get_endp(s));
                zserv_send_message(client, s);
        }
@@ -1937,6 +1939,11 @@ static void zread_nhg_add(ZAPI_HANDLER_ARGS)
 
                flog_warn(EC_ZEBRA_NEXTHOP_CREATION_FAILED,
                          "%s: Nexthop Group Creation failed", __func__);
+
+               /* Free any local allocations */
+               nexthop_group_delete(&nhg);
+               zebra_nhg_backup_free(&bnhg);
+
                return;
        }
 
@@ -2110,6 +2117,15 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
        ret = rib_add_multipath_nhe(afi, api.safi, &api.prefix, src_p,
                                    re, &nhe);
 
+       /*
+        * rib_add_multipath_nhe only fails in a couple spots
+        * and in those spots we have not freed memory
+        */
+       if (ret == -1) {
+               client->error_cnt++;
+               XFREE(MTYPE_RE, re);
+       }
+
        /* At this point, these allocations are not needed: 're' has been
         * retained or freed, and if 're' still exists, it is using
         * a reference to a shared group object.
@@ -2121,15 +2137,15 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
        /* Stats */
        switch (api.prefix.family) {
        case AF_INET:
-               if (ret > 0)
+               if (ret == 0)
                        client->v4_route_add_cnt++;
-               else if (ret < 0)
+               else if (ret == 1)
                        client->v4_route_upd8_cnt++;
                break;
        case AF_INET6:
-               if (ret > 0)
+               if (ret == 0)
                        client->v6_route_add_cnt++;
-               else if (ret < 0)
+               else if (ret == 1)
                        client->v6_route_upd8_cnt++;
                break;
        }
@@ -3107,6 +3123,8 @@ static void zread_vrf_label(ZAPI_HANDLER_ARGS)
        }
 
        zvrf->label[afi] = nlabel;
+       zvrf->label_proto[afi] = client->proto;
+
 stream_failure:
        return;
 }
@@ -3129,6 +3147,7 @@ static inline void zread_rule(ZAPI_HANDLER_ARGS)
                STREAM_GETL(s, zpr.rule.seq);
                STREAM_GETL(s, zpr.rule.priority);
                STREAM_GETL(s, zpr.rule.unique);
+               STREAM_GETC(s, zpr.rule.filter.ip_proto);
                STREAM_GETC(s, zpr.rule.filter.src_ip.family);
                STREAM_GETC(s, zpr.rule.filter.src_ip.prefixlen);
                STREAM_GET(&zpr.rule.filter.src_ip.u.prefix, s,
@@ -3162,6 +3181,9 @@ static inline void zread_rule(ZAPI_HANDLER_ARGS)
                if (zpr.rule.filter.dsfield)
                        zpr.rule.filter.filter_bm |= PBR_FILTER_DSFIELD;
 
+               if (zpr.rule.filter.ip_proto)
+                       zpr.rule.filter.filter_bm |= PBR_FILTER_IP_PROTOCOL;
+
                if (zpr.rule.filter.fwmark)
                        zpr.rule.filter.filter_bm |= PBR_FILTER_FWMARK;
 
@@ -3653,8 +3675,8 @@ void (*const zserv_handlers[])(ZAPI_HANDLER_ARGS) = {
        [ZEBRA_ADVERTISE_ALL_VNI] = zebra_vxlan_advertise_all_vni,
        [ZEBRA_REMOTE_ES_VTEP_ADD] = zebra_evpn_proc_remote_es,
        [ZEBRA_REMOTE_ES_VTEP_DEL] = zebra_evpn_proc_remote_es,
-       [ZEBRA_REMOTE_VTEP_ADD] = zebra_vxlan_remote_vtep_add,
-       [ZEBRA_REMOTE_VTEP_DEL] = zebra_vxlan_remote_vtep_del,
+       [ZEBRA_REMOTE_VTEP_ADD] = zebra_vxlan_remote_vtep_add_zapi,
+       [ZEBRA_REMOTE_VTEP_DEL] = zebra_vxlan_remote_vtep_del_zapi,
        [ZEBRA_REMOTE_MACIP_ADD] = zebra_vxlan_remote_macip_add,
        [ZEBRA_REMOTE_MACIP_DEL] = zebra_vxlan_remote_macip_del,
        [ZEBRA_DUPLICATE_ADDR_DETECTION] = zebra_vxlan_dup_addr_detection,
index e991dca4f32bef1f17ddc560a4ac3e4ea95710fd..dad40c200df58647f0f284acf778cf7ba7663f6a 100644 (file)
@@ -87,11 +87,12 @@ extern void zsend_rule_notify_owner(const struct zebra_dplane_ctx *ctx,
                                    enum zapi_rule_notify_owner note);
 
 extern void zsend_iptable_notify_owner(const struct zebra_dplane_ctx *ctx,
-                                      uint16_t note);
+                                      enum zapi_iptable_notify_owner note);
 extern void zsend_ipset_notify_owner(const struct zebra_dplane_ctx *ctx,
-                                    uint16_t note);
-extern void zsend_ipset_entry_notify_owner(const struct zebra_dplane_ctx *ctx,
-                                          uint16_t note);
+                                    enum zapi_ipset_notify_owner note);
+extern void
+zsend_ipset_entry_notify_owner(const struct zebra_dplane_ctx *ctx,
+                              enum zapi_ipset_entry_notify_owner note);
 extern bool zserv_nexthop_num_warn(const char *caller, const struct prefix *p,
                                   const unsigned int nexthop_num);
 
index 04411fa0d208b1c77781cda0d8eda5a6734e6e36..a547a97c247b6a762ff25aaa61a81c8bfcf4c7aa 100644 (file)
@@ -259,6 +259,7 @@ struct dplane_ctx_rule {
        uint8_t dsfield;
        struct prefix src_ip;
        struct prefix dst_ip;
+       uint8_t ip_proto;
        char ifname[INTERFACE_NAMSIZ + 1];
 };
 
@@ -1929,6 +1930,20 @@ uint32_t dplane_ctx_rule_get_old_fwmark(const struct zebra_dplane_ctx *ctx)
        return ctx->u.rule.old.fwmark;
 }
 
+uint8_t dplane_ctx_rule_get_ipproto(const struct zebra_dplane_ctx *ctx)
+{
+       DPLANE_CTX_VALID(ctx);
+
+       return ctx->u.rule.new.ip_proto;
+}
+
+uint8_t dplane_ctx_rule_get_old_ipproto(const struct zebra_dplane_ctx *ctx)
+{
+       DPLANE_CTX_VALID(ctx);
+
+       return ctx->u.rule.old.ip_proto;
+}
+
 uint8_t dplane_ctx_rule_get_dsfield(const struct zebra_dplane_ctx *ctx)
 {
        DPLANE_CTX_VALID(ctx);
@@ -2636,6 +2651,7 @@ static void dplane_ctx_rule_init_single(struct dplane_ctx_rule *dplane_rule,
        dplane_rule->filter_bm = rule->rule.filter.filter_bm;
        dplane_rule->fwmark = rule->rule.filter.fwmark;
        dplane_rule->dsfield = rule->rule.filter.dsfield;
+       dplane_rule->ip_proto = rule->rule.filter.ip_proto;
        prefix_copy(&(dplane_rule->dst_ip), &rule->rule.filter.dst_ip);
        prefix_copy(&(dplane_rule->src_ip), &rule->rule.filter.src_ip);
        strlcpy(dplane_rule->ifname, rule->ifname, INTERFACE_NAMSIZ);
@@ -2672,7 +2688,7 @@ static int dplane_ctx_rule_init(struct zebra_dplane_ctx *ctx,
        ctx->zd_is_update = (op == DPLANE_OP_RULE_UPDATE);
 
        ctx->zd_vrf_id = new_rule->vrf_id;
-       memcpy(ctx->zd_ifname, new_rule->ifname, sizeof(new_rule->ifname));
+       strlcpy(ctx->zd_ifname, new_rule->ifname, sizeof(ctx->zd_ifname));
 
        ctx->u.rule.sock = new_rule->sock;
        ctx->u.rule.unique = new_rule->rule.unique;
@@ -3479,18 +3495,6 @@ enum zebra_dplane_result dplane_intf_addr_set(const struct interface *ifp,
 
                return ZEBRA_DPLANE_REQUEST_FAILURE;
        }
-
-       /* Ensure that no existing installed v4 route conflicts with
-        * the new interface prefix. This check must be done in the
-        * zebra pthread context, and any route delete (if needed)
-        * is enqueued before the interface address programming attempt.
-        */
-       if (ifc->address->family == AF_INET) {
-               struct prefix_ipv4 *p;
-
-               p = (struct prefix_ipv4 *)ifc->address;
-               rib_lookup_and_pushup(p, ifp->vrf_id);
-       }
 #endif
 
        return intf_addr_update_internal(ifp, ifc, DPLANE_OP_ADDR_INSTALL);
@@ -3640,14 +3644,10 @@ enum zebra_dplane_result dplane_neigh_ip_update(enum dplane_op_e op,
        uint16_t state = 0;
        uint32_t update_flags;
 
-       if (IS_ZEBRA_DEBUG_DPLANE_DETAIL) {
-               char buf1[PREFIX_STRLEN], buf2[PREFIX_STRLEN];
+       if (IS_ZEBRA_DEBUG_DPLANE_DETAIL)
+               zlog_debug("%s: init link ctx %s: ifp %s, link_ip %pIA ip %pIA",
+                          __func__, dplane_op2str(op), ifp->name, link_ip, ip);
 
-               ipaddr2str(link_ip, buf1, sizeof(buf1));
-               ipaddr2str(ip, buf2, sizeof(buf2));
-               zlog_debug("init link ctx %s: ifp %s, ip %s link %s",
-                          dplane_op2str(op), ifp->name, buf1, buf2);
-       }
        if (ndm_state == ZEBRA_NEIGH_STATE_REACHABLE)
                state = DPLANE_NUD_REACHABLE;
        else if (ndm_state == ZEBRA_NEIGH_STATE_FAILED)
index e091655a48ebe1335c01f229d77a6f77bfb84383..5ec1bd5807cf5158bea2e1207a3b1d0ca4921de5 100644 (file)
@@ -493,6 +493,8 @@ uint32_t dplane_ctx_rule_get_fwmark(const struct zebra_dplane_ctx *ctx);
 uint32_t dplane_ctx_rule_get_old_fwmark(const struct zebra_dplane_ctx *ctx);
 uint8_t dplane_ctx_rule_get_dsfield(const struct zebra_dplane_ctx *ctx);
 uint8_t dplane_ctx_rule_get_old_dsfield(const struct zebra_dplane_ctx *ctx);
+uint8_t dplane_ctx_rule_get_ipproto(const struct zebra_dplane_ctx *ctx);
+uint8_t dplane_ctx_rule_get_old_ipproto(const struct zebra_dplane_ctx *ctx);
 const struct prefix *
 dplane_ctx_rule_get_src_ip(const struct zebra_dplane_ctx *ctx);
 const struct prefix *
index 816f46bac91c12feae1c2960cbe42994ce3bea1c..2c9f1dca59ec0e169cc5d14f8417ad9b83e1b41e 100644 (file)
@@ -1330,10 +1330,12 @@ void zebra_evpn_cleanup_all(struct hash_bucket *bucket, void *arg)
        zebra_evpn_del(zevpn);
 }
 
-static void
-zebra_evpn_process_sync_macip_add(zebra_evpn_t *zevpn, struct ethaddr *macaddr,
-                                 uint16_t ipa_len, struct ipaddr *ipaddr,
-                                 uint8_t flags, uint32_t seq, esi_t *esi)
+static void zebra_evpn_process_sync_macip_add(zebra_evpn_t *zevpn,
+                                             const struct ethaddr *macaddr,
+                                             uint16_t ipa_len,
+                                             const struct ipaddr *ipaddr,
+                                             uint8_t flags, uint32_t seq,
+                                             const esi_t *esi)
 {
        struct sync_mac_ip_ctx ctx;
        char ipbuf[INET6_ADDRSTRLEN];
@@ -1380,10 +1382,10 @@ zebra_evpn_process_sync_macip_add(zebra_evpn_t *zevpn, struct ethaddr *macaddr,
 
 /************************** remote mac-ip handling **************************/
 /* Process a remote MACIP add from BGP. */
-void process_remote_macip_add(vni_t vni, struct ethaddr *macaddr,
-                             uint16_t ipa_len, struct ipaddr *ipaddr,
+void zebra_evpn_rem_macip_add(vni_t vni, const struct ethaddr *macaddr,
+                             uint16_t ipa_len, const struct ipaddr *ipaddr,
                              uint8_t flags, uint32_t seq,
-                             struct in_addr vtep_ip, esi_t *esi)
+                             struct in_addr vtep_ip, const esi_t *esi)
 {
        zebra_evpn_t *zevpn;
        zebra_vtep_t *zvtep;
@@ -1447,18 +1449,19 @@ void process_remote_macip_add(vni_t vni, struct ethaddr *macaddr,
                return;
 
 
-       if (process_mac_remote_macip_add(zevpn, zvrf, macaddr, ipa_len, ipaddr,
-                                        &mac, vtep_ip, flags, seq, esi)
+       if (zebra_evpn_mac_remote_macip_add(zevpn, zvrf, macaddr, ipa_len,
+                                           ipaddr, &mac, vtep_ip, flags, seq,
+                                           esi)
            != 0)
                return;
 
-       process_neigh_remote_macip_add(zevpn, zvrf, ipaddr, mac, vtep_ip, flags,
-                                      seq);
+       zebra_evpn_neigh_remote_macip_add(zevpn, zvrf, ipaddr, mac, vtep_ip,
+                                         flags, seq);
 }
 
 /* Process a remote MACIP delete from BGP. */
-void process_remote_macip_del(vni_t vni, struct ethaddr *macaddr,
-                             uint16_t ipa_len, struct ipaddr *ipaddr,
+void zebra_evpn_rem_macip_del(vni_t vni, const struct ethaddr *macaddr,
+                             uint16_t ipa_len, const struct ipaddr *ipaddr,
                              struct in_addr vtep_ip)
 {
        zebra_evpn_t *zevpn;
index ee9e1406e40cb97771b9d88645fe007647a0e9de..774627a15d80d15acce2ca7c70dd042b1bfda914 100644 (file)
@@ -204,12 +204,12 @@ int zebra_evpn_vtep_uninstall(zebra_evpn_t *zevpn, struct in_addr *vtep_ip);
 void zebra_evpn_handle_flooding_remote_vteps(struct hash_bucket *bucket,
                                             void *zvrf);
 void zebra_evpn_cleanup_all(struct hash_bucket *bucket, void *arg);
-void process_remote_macip_add(vni_t vni, struct ethaddr *macaddr,
-                             uint16_t ipa_len, struct ipaddr *ipaddr,
+void zebra_evpn_rem_macip_add(vni_t vni, const struct ethaddr *macaddr,
+                             uint16_t ipa_len, const struct ipaddr *ipaddr,
                              uint8_t flags, uint32_t seq,
-                             struct in_addr vtep_ip, esi_t *esi);
-void process_remote_macip_del(vni_t vni, struct ethaddr *macaddr,
-                             uint16_t ipa_len, struct ipaddr *ipaddr,
+                             struct in_addr vtep_ip, const esi_t *esi);
+void zebra_evpn_rem_macip_del(vni_t vni, const struct ethaddr *macaddr,
+                             uint16_t ipa_len, const struct ipaddr *ipaddr,
                              struct in_addr vtep_ip);
 void zebra_evpn_cfg_cleanup(struct hash_bucket *bucket, void *ctxt);
 
index fe3167dc29b4f5cb6243cb3d8c827c2e629ca289..cf2aa67269bcc83b1391b845ee9b4809763d7e0f 100644 (file)
@@ -986,8 +986,9 @@ void zebra_evpn_print_mac_hash_detail(struct hash_bucket *bucket, void *ctxt)
 /*
  * Inform BGP about local MACIP.
  */
-int zebra_evpn_macip_send_msg_to_client(vni_t vni, struct ethaddr *macaddr,
-                                       struct ipaddr *ip, uint8_t flags,
+int zebra_evpn_macip_send_msg_to_client(vni_t vni,
+                                       const struct ethaddr *macaddr,
+                                       const struct ipaddr *ip, uint8_t flags,
                                        uint32_t seq, int state,
                                        struct zebra_evpn_es *es, uint16_t cmd)
 {
@@ -1095,7 +1096,8 @@ static void *zebra_evpn_mac_alloc(void *p)
 /*
  * Add MAC entry.
  */
-zebra_mac_t *zebra_evpn_mac_add(zebra_evpn_t *zevpn, struct ethaddr *macaddr)
+zebra_mac_t *zebra_evpn_mac_add(zebra_evpn_t *zevpn,
+                               const struct ethaddr *macaddr)
 {
        zebra_mac_t tmp_mac;
        zebra_mac_t *mac = NULL;
@@ -1254,7 +1256,8 @@ void zebra_evpn_mac_del_all(zebra_evpn_t *zevpn, int uninstall, int upd_client,
 /*
  * Look up MAC hash entry.
  */
-zebra_mac_t *zebra_evpn_mac_lookup(zebra_evpn_t *zevpn, struct ethaddr *mac)
+zebra_mac_t *zebra_evpn_mac_lookup(zebra_evpn_t *zevpn,
+                                  const struct ethaddr *mac)
 {
        zebra_mac_t tmp;
        zebra_mac_t *pmac;
@@ -1269,7 +1272,7 @@ zebra_mac_t *zebra_evpn_mac_lookup(zebra_evpn_t *zevpn, struct ethaddr *mac)
 /*
  * Inform BGP about local MAC addition.
  */
-int zebra_evpn_mac_send_add_to_client(vni_t vni, struct ethaddr *macaddr,
+int zebra_evpn_mac_send_add_to_client(vni_t vni, const struct ethaddr *macaddr,
                                      uint32_t mac_flags, uint32_t seq,
                                      struct zebra_evpn_es *es)
 {
@@ -1303,7 +1306,7 @@ int zebra_evpn_mac_send_add_to_client(vni_t vni, struct ethaddr *macaddr,
 /*
  * Inform BGP about local MAC deletion.
  */
-int zebra_evpn_mac_send_del_to_client(vni_t vni, struct ethaddr *macaddr,
+int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
                                      uint32_t flags, bool force)
 {
        if (!force) {
@@ -1563,7 +1566,7 @@ void zebra_evpn_sync_mac_del(zebra_mac_t *mac)
 static inline bool zebra_evpn_mac_is_bgp_seq_ok(zebra_evpn_t *zevpn,
                                                zebra_mac_t *mac, uint32_t seq,
                                                uint16_t ipa_len,
-                                               struct ipaddr *ipaddr,
+                                               const struct ipaddr *ipaddr,
                                                bool sync)
 {
        char ipbuf[INET6_ADDRSTRLEN];
@@ -1627,11 +1630,10 @@ static inline bool zebra_evpn_mac_is_bgp_seq_ok(zebra_evpn_t *zevpn,
        return true;
 }
 
-zebra_mac_t *
-zebra_evpn_proc_sync_mac_update(zebra_evpn_t *zevpn, struct ethaddr *macaddr,
-                               uint16_t ipa_len, struct ipaddr *ipaddr,
-                               uint8_t flags, uint32_t seq, esi_t *esi,
-                               struct sync_mac_ip_ctx *ctx)
+zebra_mac_t *zebra_evpn_proc_sync_mac_update(
+       zebra_evpn_t *zevpn, const struct ethaddr *macaddr, uint16_t ipa_len,
+       const struct ipaddr *ipaddr, uint8_t flags, uint32_t seq,
+       const esi_t *esi, struct sync_mac_ip_ctx *ctx)
 {
        zebra_mac_t *mac;
        bool inform_bgp = false;
@@ -1958,11 +1960,13 @@ void zebra_evpn_print_dad_mac_hash_detail(struct hash_bucket *bucket,
                zebra_evpn_print_mac_hash_detail(bucket, ctxt);
 }
 
-int process_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
-                                struct ethaddr *macaddr, uint16_t ipa_len,
-                                struct ipaddr *ipaddr, zebra_mac_t **macp,
-                                struct in_addr vtep_ip, uint8_t flags,
-                                uint32_t seq, esi_t *esi)
+int zebra_evpn_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
+                                   const struct ethaddr *macaddr,
+                                   uint16_t ipa_len,
+                                   const struct ipaddr *ipaddr,
+                                   zebra_mac_t **macp, struct in_addr vtep_ip,
+                                   uint8_t flags, uint32_t seq,
+                                   const esi_t *esi)
 {
        char buf1[INET6_ADDRSTRLEN];
        bool sticky;
@@ -2127,7 +2131,7 @@ int process_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
 
 int zebra_evpn_add_update_local_mac(struct zebra_vrf *zvrf, zebra_evpn_t *zevpn,
                                    struct interface *ifp,
-                                   struct ethaddr *macaddr, vlanid_t vid,
+                                   const struct ethaddr *macaddr, vlanid_t vid,
                                    bool sticky, bool local_inactive,
                                    bool dp_static, zebra_mac_t *mac)
 {
@@ -2447,8 +2451,8 @@ int zebra_evpn_del_local_mac(zebra_evpn_t *zevpn, zebra_mac_t *mac,
 }
 
 int zebra_evpn_mac_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
-                               struct ipaddr *ip, zebra_mac_t **macp,
-                               struct ethaddr *macaddr, vlanid_t vlan_id,
+                               const struct ipaddr *ip, zebra_mac_t **macp,
+                               const struct ethaddr *macaddr, vlanid_t vlan_id,
                                bool def_gw)
 {
        zebra_mac_t *mac;
index fb162f1a93da524c80653b678570f5738b22d693..e90082e50bcfd23fb12f54f91505bbe2bda686b5 100644 (file)
@@ -229,11 +229,14 @@ int zebra_evpn_rem_mac_uninstall(zebra_evpn_t *zevi, zebra_mac_t *mac,
 int zebra_evpn_rem_mac_install(zebra_evpn_t *zevi, zebra_mac_t *mac,
                               bool was_static);
 void zebra_evpn_deref_ip2mac(zebra_evpn_t *zevi, zebra_mac_t *mac);
-zebra_mac_t *zebra_evpn_mac_lookup(zebra_evpn_t *zevi, struct ethaddr *mac);
-zebra_mac_t *zebra_evpn_mac_add(zebra_evpn_t *zevi, struct ethaddr *macaddr);
+zebra_mac_t *zebra_evpn_mac_lookup(zebra_evpn_t *zevi,
+                                  const struct ethaddr *mac);
+zebra_mac_t *zebra_evpn_mac_add(zebra_evpn_t *zevi,
+                               const struct ethaddr *macaddr);
 int zebra_evpn_mac_del(zebra_evpn_t *zevi, zebra_mac_t *mac);
-int zebra_evpn_macip_send_msg_to_client(uint32_t id, struct ethaddr *macaddr,
-                                       struct ipaddr *ip, uint8_t flags,
+int zebra_evpn_macip_send_msg_to_client(uint32_t id,
+                                       const struct ethaddr *macaddr,
+                                       const struct ipaddr *ip, uint8_t flags,
                                        uint32_t seq, int state,
                                        struct zebra_evpn_es *es, uint16_t cmd);
 void zebra_evpn_print_mac(zebra_mac_t *mac, void *ctxt, json_object *json);
@@ -246,38 +249,39 @@ void zebra_evpn_mac_send_add_del_to_client(zebra_mac_t *mac, bool old_bgp_ready,
 
 void zebra_evpn_mac_del_all(zebra_evpn_t *zevi, int uninstall, int upd_client,
                            uint32_t flags);
-int zebra_evpn_mac_send_add_to_client(vni_t vni, struct ethaddr *macaddr,
+int zebra_evpn_mac_send_add_to_client(vni_t vni, const struct ethaddr *macaddr,
                                      uint32_t mac_flags, uint32_t seq,
                                      struct zebra_evpn_es *es);
-int zebra_evpn_mac_send_del_to_client(vni_t vni, struct ethaddr *macaddr,
+int zebra_evpn_mac_send_del_to_client(vni_t vni, const struct ethaddr *macaddr,
                                      uint32_t flags, bool force);
 void zebra_evpn_send_mac_list_to_client(zebra_evpn_t *zevi);
-zebra_mac_t *
-zebra_evpn_proc_sync_mac_update(zebra_evpn_t *zevi, struct ethaddr *macaddr,
-                               uint16_t ipa_len, struct ipaddr *ipaddr,
-                               uint8_t flags, uint32_t seq, esi_t *esi,
-                               struct sync_mac_ip_ctx *ctx);
+zebra_mac_t *zebra_evpn_proc_sync_mac_update(
+       zebra_evpn_t *zevi, const struct ethaddr *macaddr, uint16_t ipa_len,
+       const struct ipaddr *ipaddr, uint8_t flags, uint32_t seq,
+       const esi_t *esi, struct sync_mac_ip_ctx *ctx);
 void zebra_evpn_sync_mac_del(zebra_mac_t *mac);
 void zebra_evpn_rem_mac_del(zebra_evpn_t *zevi, zebra_mac_t *mac);
 void zebra_evpn_print_dad_mac_hash(struct hash_bucket *bucket, void *ctxt);
 void zebra_evpn_print_dad_mac_hash_detail(struct hash_bucket *bucket,
                                          void *ctxt);
-int process_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
-                                struct ethaddr *macaddr, uint16_t ipa_len,
-                                struct ipaddr *ipaddr, zebra_mac_t **macp,
-                                struct in_addr vtep_ip, uint8_t flags,
-                                uint32_t seq, esi_t *esi);
+int zebra_evpn_mac_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
+                                   const struct ethaddr *macaddr,
+                                   uint16_t ipa_len,
+                                   const struct ipaddr *ipaddr,
+                                   zebra_mac_t **macp, struct in_addr vtep_ip,
+                                   uint8_t flags, uint32_t seq,
+                                   const esi_t *esi);
 
 int zebra_evpn_add_update_local_mac(struct zebra_vrf *zvrf, zebra_evpn_t *zevpn,
                                    struct interface *ifp,
-                                   struct ethaddr *macaddr, vlanid_t vid,
+                                   const struct ethaddr *macaddr, vlanid_t vid,
                                    bool sticky, bool local_inactive,
                                    bool dp_static, zebra_mac_t *mac);
 int zebra_evpn_del_local_mac(zebra_evpn_t *zevpn, zebra_mac_t *mac,
                             bool clear_static);
 int zebra_evpn_mac_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
-                               struct ipaddr *ip, zebra_mac_t **macp,
-                               struct ethaddr *macaddr, vlanid_t vlan_id,
+                               const struct ipaddr *ip, zebra_mac_t **macp,
+                               const struct ethaddr *macaddr, vlanid_t vlan_id,
                                bool def_gw);
 void zebra_evpn_mac_svi_add(struct interface *ifp, zebra_evpn_t *zevpn);
 void zebra_evpn_mac_svi_del(struct interface *ifp, zebra_evpn_t *zevpn);
index d6ae92a03d2bedab0dd67209174e48870d4f72fc..c0cc57fc69eb0ada572b3e41aa852013bddad166 100644 (file)
@@ -1747,7 +1747,7 @@ static int zebra_es_rb_cmp(const struct zebra_evpn_es *es1,
 RB_GENERATE(zebra_es_rb_head, zebra_evpn_es, rb_node, zebra_es_rb_cmp);
 
 /* Lookup ES */
-struct zebra_evpn_es *zebra_evpn_es_find(esi_t *esi)
+struct zebra_evpn_es *zebra_evpn_es_find(const esi_t *esi)
 {
        struct zebra_evpn_es tmp;
 
@@ -1758,7 +1758,7 @@ struct zebra_evpn_es *zebra_evpn_es_find(esi_t *esi)
 /* A new local es is created when a local-es-id and sysmac is configured
  * against an interface.
  */
-static struct zebra_evpn_es *zebra_evpn_es_new(esi_t *esi)
+static struct zebra_evpn_es *zebra_evpn_es_new(const esi_t *esi)
 {
        struct zebra_evpn_es *es;
 
@@ -2392,7 +2392,7 @@ static int zebra_evpn_type3_esi_update(struct zebra_if *zif, uint32_t lid,
        return zebra_evpn_local_es_update(zif, &esi);
 }
 
-static int zebra_evpn_remote_es_del(esi_t *esi, struct in_addr vtep_ip)
+int zebra_evpn_remote_es_del(const esi_t *esi, struct in_addr vtep_ip)
 {
        char buf[ESI_STR_LEN];
        struct zebra_evpn_es *es;
@@ -2432,9 +2432,8 @@ static void zebra_evpn_remote_es_flush(struct zebra_evpn_es **esp)
        zebra_evpn_es_remote_info_re_eval(esp);
 }
 
-static int zebra_evpn_remote_es_add(esi_t *esi, struct in_addr vtep_ip,
-                                   bool esr_rxed, uint8_t df_alg,
-                                   uint16_t df_pref)
+int zebra_evpn_remote_es_add(const esi_t *esi, struct in_addr vtep_ip,
+                            bool esr_rxed, uint8_t df_alg, uint16_t df_pref)
 {
        char buf[ESI_STR_LEN];
        struct zebra_evpn_es *es;
@@ -2498,10 +2497,10 @@ void zebra_evpn_proc_remote_es(ZAPI_HANDLER_ARGS)
                                                                     : false;
                STREAM_GETC(s, df_alg);
                STREAM_GETW(s, df_pref);
-               zebra_evpn_remote_es_add(&esi, vtep_ip, esr_rxed, df_alg,
-                                        df_pref);
+               zebra_rib_queue_evpn_rem_es_add(&esi, &vtep_ip, esr_rxed,
+                                               df_alg, df_pref);
        } else {
-               zebra_evpn_remote_es_del(&esi, vtep_ip);
+               zebra_rib_queue_evpn_rem_es_del(&esi, &vtep_ip);
        }
 
 stream_failure:
@@ -2542,7 +2541,7 @@ bool zebra_evpn_es_mac_ref_entry(zebra_mac_t *mac, struct zebra_evpn_es *es)
        return true;
 }
 
-bool zebra_evpn_es_mac_ref(zebra_mac_t *mac, esi_t *esi)
+bool zebra_evpn_es_mac_ref(zebra_mac_t *mac, const esi_t *esi)
 {
        struct zebra_evpn_es *es;
 
@@ -2782,41 +2781,76 @@ bool zebra_evpn_is_if_es_capable(struct zebra_if *zif)
        return false;
 }
 
-void zebra_evpn_if_es_print(struct vty *vty, struct zebra_if *zif)
+void zebra_evpn_if_es_print(struct vty *vty, json_object *json,
+                           struct zebra_if *zif)
 {
        char buf[ETHER_ADDR_STRLEN];
-       char mh_buf[80];
-       bool vty_print = false;
        char esi_buf[ESI_STR_LEN];
 
-       mh_buf[0] = '\0';
-       strlcat(mh_buf, "  EVPN-MH:", sizeof(mh_buf));
-       if (zif->es_info.lid || !is_zero_mac(&zif->es_info.sysmac)) {
-               vty_print = true;
-               snprintf(
-                       mh_buf + strlen(mh_buf),
-                       sizeof(mh_buf) - strlen(mh_buf),
-                       " ES id %u ES sysmac %s", zif->es_info.lid,
-                       prefix_mac2str(&zif->es_info.sysmac, buf, sizeof(buf)));
-       } else if (memcmp(&zif->es_info.esi, zero_esi, sizeof(*zero_esi))) {
-               vty_print = true;
-               snprintf(mh_buf + strnlen(mh_buf, sizeof(mh_buf)),
-                        sizeof(mh_buf) - strnlen(mh_buf, sizeof(mh_buf)),
-                        " ES id %s",
-                        esi_to_str(&zif->es_info.esi, esi_buf,
-                                   sizeof(esi_buf)));
-       }
-
-       if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK) {
-               vty_print = true;
-               if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP)
-                       strlcat(mh_buf, " uplink (up)", sizeof(mh_buf));
-               else
-                       strlcat(mh_buf, " uplink (down)", sizeof(mh_buf));
-       }
+       if (json) {
+               json_object *json_evpn;
+
+               json_evpn = json_object_new_object();
+               json_object_object_add(json, "evpnMh", json_evpn);
+
+               if (zif->es_info.lid || !is_zero_mac(&zif->es_info.sysmac)) {
+                       json_object_int_add(json_evpn, "esId",
+                                           zif->es_info.lid);
+                       json_object_string_add(
+                               json_evpn, "esSysmac",
+                               prefix_mac2str(&zif->es_info.sysmac, buf,
+                                              sizeof(buf)));
+               } else if (memcmp(&zif->es_info.esi, zero_esi,
+                                 sizeof(*zero_esi))) {
+                       json_object_string_add(json_evpn, "esId",
+                                              esi_to_str(&zif->es_info.esi,
+                                                         esi_buf,
+                                                         sizeof(esi_buf)));
+               }
+
+               if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK)
+                       json_object_string_add(
+                               json_evpn, "uplink",
+                               CHECK_FLAG(zif->flags,
+                                          ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP)
+                                       ? "up"
+                                       : "down");
+       } else {
+               char mh_buf[80];
+               bool vty_print = false;
+
+               mh_buf[0] = '\0';
+               strlcat(mh_buf, "  EVPN-MH:", sizeof(mh_buf));
+               if (zif->es_info.lid || !is_zero_mac(&zif->es_info.sysmac)) {
+                       vty_print = true;
+                       snprintf(mh_buf + strlen(mh_buf),
+                                sizeof(mh_buf) - strlen(mh_buf),
+                                " ES id %u ES sysmac %s", zif->es_info.lid,
+                                prefix_mac2str(&zif->es_info.sysmac, buf,
+                                               sizeof(buf)));
+               } else if (memcmp(&zif->es_info.esi, zero_esi,
+                                 sizeof(*zero_esi))) {
+                       vty_print = true;
+                       snprintf(mh_buf + strnlen(mh_buf, sizeof(mh_buf)),
+                                sizeof(mh_buf)
+                                        - strnlen(mh_buf, sizeof(mh_buf)),
+                                " ES id %s",
+                                esi_to_str(&zif->es_info.esi, esi_buf,
+                                           sizeof(esi_buf)));
+               }
 
-       if (vty_print)
-               vty_out(vty, "%s\n", mh_buf);
+               if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK) {
+                       vty_print = true;
+                       if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP)
+                               strlcat(mh_buf, " uplink (up)", sizeof(mh_buf));
+                       else
+                               strlcat(mh_buf, " uplink (down)",
+                                       sizeof(mh_buf));
+               }
+
+               if (vty_print)
+                       vty_out(vty, "%s\n", mh_buf);
+       }
 }
 
 static void zebra_evpn_local_mac_oper_state_change(struct zebra_evpn_es *es)
@@ -3886,8 +3920,18 @@ void zebra_evpn_proc_remote_nh(ZAPI_HANDLER_ARGS)
        struct ipaddr nh;
        struct ethaddr rmac;
        struct prefix_evpn dummy_prefix;
+       size_t min_len = 4 + sizeof(nh);
 
        s = msg;
+
+       /*
+        * Ensure that the stream sent to us is long enough
+        */
+       if (hdr->command == ZEBRA_EVPN_REMOTE_NH_ADD)
+               min_len += sizeof(rmac);
+       if (hdr->length < min_len)
+               return;
+
        vrf_id = stream_getl(s);
        stream_get(&nh, s, sizeof(nh));
 
@@ -3895,18 +3939,21 @@ void zebra_evpn_proc_remote_nh(ZAPI_HANDLER_ARGS)
        dummy_prefix.family = AF_EVPN;
        dummy_prefix.prefixlen = (sizeof(struct evpn_addr) * 8);
        dummy_prefix.prefix.route_type = 1; /* XXX - fixup to type-1 def */
+       dummy_prefix.prefix.ead_addr.ip.ipa_type = nh.ipa_type;
 
        if (hdr->command == ZEBRA_EVPN_REMOTE_NH_ADD) {
                stream_get(&rmac, s, sizeof(rmac));
                if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
-                       zlog_debug("evpn remote nh %d %pIA rmac %pEA add",
-                                  vrf_id, &nh, &rmac);
-               zebra_vxlan_evpn_vrf_route_add(vrf_id, &rmac, &nh,
+                       zlog_debug(
+                               "evpn remote nh %d %pIA rmac %pEA add pfx %pFX",
+                               vrf_id, &nh, &rmac, &dummy_prefix);
+               zebra_rib_queue_evpn_route_add(vrf_id, &rmac, &nh,
                                               (struct prefix *)&dummy_prefix);
        } else {
                if (IS_ZEBRA_DEBUG_EVPN_MH_ES)
-                       zlog_debug("evpn remote nh %d %pIA del", vrf_id, &nh);
-               zebra_vxlan_evpn_vrf_route_del(vrf_id, &nh,
+                       zlog_debug("evpn remote nh %d %pIA del pfx %pFX",
+                                  vrf_id, &nh, &dummy_prefix);
+               zebra_rib_queue_evpn_route_del(vrf_id, &nh,
                                               (struct prefix *)&dummy_prefix);
        }
 }
index 8861e80cee4542e692f2e8bfce8800cf38e5c780..cba536ea89515077bc19467afbc357630445378e 100644 (file)
@@ -330,20 +330,24 @@ extern void zebra_evpn_es_show_detail(struct vty *vty, bool uj);
 extern void zebra_evpn_es_show_esi(struct vty *vty, bool uj, esi_t *esi);
 extern void zebra_evpn_update_all_es(zebra_evpn_t *zevpn);
 extern void zebra_evpn_proc_remote_es(ZAPI_HANDLER_ARGS);
+int zebra_evpn_remote_es_add(const esi_t *esi, struct in_addr vtep_ip,
+                            bool esr_rxed, uint8_t df_alg, uint16_t df_pref);
+int zebra_evpn_remote_es_del(const esi_t *esi, struct in_addr vtep_ip);
 extern void zebra_evpn_es_evi_show(struct vty *vty, bool uj, int detail);
 extern void zebra_evpn_es_evi_show_vni(struct vty *vty, bool uj,
                vni_t vni, int detail);
 extern void zebra_evpn_es_mac_deref_entry(zebra_mac_t *mac);
 extern bool zebra_evpn_es_mac_ref_entry(zebra_mac_t *mac,
-               struct zebra_evpn_es *es);
-extern bool zebra_evpn_es_mac_ref(zebra_mac_t *mac, esi_t *esi);
-extern struct zebra_evpn_es *zebra_evpn_es_find(esi_t *esi);
+                                       struct zebra_evpn_es *es);
+extern bool zebra_evpn_es_mac_ref(zebra_mac_t *mac, const esi_t *esi);
+extern struct zebra_evpn_es *zebra_evpn_es_find(const esi_t *esi);
 extern void zebra_evpn_interface_init(void);
 extern int zebra_evpn_mh_if_write(struct vty *vty, struct interface *ifp);
 extern void zebra_evpn_acc_vl_show(struct vty *vty, bool uj);
 extern void zebra_evpn_acc_vl_show_detail(struct vty *vty, bool uj);
 extern void zebra_evpn_acc_vl_show_vid(struct vty *vty, bool uj, vlanid_t vid);
-extern void zebra_evpn_if_es_print(struct vty *vty, struct zebra_if *zif);
+extern void zebra_evpn_if_es_print(struct vty *vty, json_object *json,
+                                  struct zebra_if *zif);
 extern void zebra_evpn_es_cleanup(void);
 extern int zebra_evpn_mh_mac_holdtime_update(struct vty *vty,
                uint32_t duration, bool set_default);
index 4c7a1542fc174540c5fca4778ce12d2fa0f27a54..839e8d9ebce61e50f425b773dce6862655fc6558 100644 (file)
@@ -204,7 +204,7 @@ static void *zebra_evpn_neigh_alloc(void *p)
 }
 
 static void zebra_evpn_local_neigh_ref_mac(zebra_neigh_t *n,
-                                          struct ethaddr *macaddr,
+                                          const struct ethaddr *macaddr,
                                           zebra_mac_t *mac,
                                           bool send_mac_update)
 {
@@ -284,8 +284,8 @@ static void zebra_evpn_sync_neigh_dp_install(zebra_neigh_t *n,
 /*
  * Inform BGP about local neighbor addition.
  */
-int zebra_evpn_neigh_send_add_to_client(vni_t vni, struct ipaddr *ip,
-                                       struct ethaddr *macaddr,
+int zebra_evpn_neigh_send_add_to_client(vni_t vni, const struct ipaddr *ip,
+                                       const struct ethaddr *macaddr,
                                        zebra_mac_t *zmac, uint32_t neigh_flags,
                                        uint32_t seq)
 {
@@ -497,7 +497,7 @@ static void zebra_evpn_local_neigh_deref_mac(zebra_neigh_t *n,
 }
 
 bool zebra_evpn_neigh_is_bgp_seq_ok(zebra_evpn_t *zevpn, zebra_neigh_t *n,
-                                   struct ethaddr *macaddr, uint32_t seq,
+                                   const struct ethaddr *macaddr, uint32_t seq,
                                    bool sync)
 {
        uint32_t tmp_seq;
@@ -543,8 +543,8 @@ bool zebra_evpn_neigh_is_bgp_seq_ok(zebra_evpn_t *zevpn, zebra_neigh_t *n,
  * Add neighbor entry.
  */
 static zebra_neigh_t *zebra_evpn_neigh_add(zebra_evpn_t *zevpn,
-                                          struct ipaddr *ip,
-                                          struct ethaddr *mac,
+                                          const struct ipaddr *ip,
+                                          const struct ethaddr *mac,
                                           zebra_mac_t *zmac, uint32_t n_flags)
 {
        zebra_neigh_t tmp_n;
@@ -615,8 +615,8 @@ void zebra_evpn_sync_neigh_del(zebra_neigh_t *n)
 
 zebra_neigh_t *
 zebra_evpn_proc_sync_neigh_update(zebra_evpn_t *zevpn, zebra_neigh_t *n,
-                                 uint16_t ipa_len, struct ipaddr *ipaddr,
-                                 uint8_t flags, uint32_t seq, esi_t *esi,
+                                 uint16_t ipa_len, const struct ipaddr *ipaddr,
+                                 uint8_t flags, uint32_t seq, const esi_t *esi,
                                  struct sync_mac_ip_ctx *ctx)
 {
        struct interface *ifp = NULL;
@@ -895,7 +895,8 @@ void zebra_evpn_neigh_del_all(zebra_evpn_t *zevpn, int uninstall,
 /*
  * Look up neighbor hash entry.
  */
-zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn, struct ipaddr *ip)
+zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn,
+                                      const struct ipaddr *ip)
 {
        zebra_neigh_t tmp;
        zebra_neigh_t *n;
@@ -1254,9 +1255,9 @@ zebra_evpn_dup_addr_detect_for_neigh(struct zebra_vrf *zvrf, zebra_neigh_t *nbr,
 }
 
 int zebra_evpn_local_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
-                                 struct ipaddr *ip, struct ethaddr *macaddr,
-                                 bool is_router, bool local_inactive,
-                                 bool dp_static)
+                                 const struct ipaddr *ip,
+                                 const struct ethaddr *macaddr, bool is_router,
+                                 bool local_inactive, bool dp_static)
 {
        struct zebra_vrf *zvrf;
        zebra_neigh_t *n = NULL;
@@ -1596,7 +1597,8 @@ int zebra_evpn_local_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
 }
 
 int zebra_evpn_remote_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
-                                  struct ipaddr *ip, struct ethaddr *macaddr,
+                                  const struct ipaddr *ip,
+                                  const struct ethaddr *macaddr,
                                   uint16_t state)
 {
        zebra_neigh_t *n = NULL;
@@ -2046,10 +2048,11 @@ void zebra_evpn_print_dad_neigh_hash_detail(struct hash_bucket *bucket,
                zebra_evpn_print_neigh_hash_detail(bucket, ctxt);
 }
 
-void process_neigh_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
-                                   struct ipaddr *ipaddr, zebra_mac_t *mac,
-                                   struct in_addr vtep_ip, uint8_t flags,
-                                   uint32_t seq)
+void zebra_evpn_neigh_remote_macip_add(zebra_evpn_t *zevpn,
+                                      struct zebra_vrf *zvrf,
+                                      const struct ipaddr *ipaddr,
+                                      zebra_mac_t *mac, struct in_addr vtep_ip,
+                                      uint8_t flags, uint32_t seq)
 {
        zebra_neigh_t *n;
        int update_neigh = 0;
@@ -2240,7 +2243,8 @@ int zebra_evpn_neigh_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
 
 void zebra_evpn_neigh_remote_uninstall(zebra_evpn_t *zevpn,
                                       struct zebra_vrf *zvrf, zebra_neigh_t *n,
-                                      zebra_mac_t *mac, struct ipaddr *ipaddr)
+                                      zebra_mac_t *mac,
+                                      const struct ipaddr *ipaddr)
 {
        if (zvrf->dad_freeze && CHECK_FLAG(n->flags, ZEBRA_NEIGH_DUPLICATE)
            && CHECK_FLAG(n->flags, ZEBRA_NEIGH_REMOTE)
@@ -2273,7 +2277,7 @@ void zebra_evpn_neigh_remote_uninstall(zebra_evpn_t *zevpn,
        }
 }
 
-int zebra_evpn_neigh_del_ip(zebra_evpn_t *zevpn, struct ipaddr *ip)
+int zebra_evpn_neigh_del_ip(zebra_evpn_t *zevpn, const struct ipaddr *ip)
 {
        zebra_neigh_t *n;
        zebra_mac_t *zmac;
@@ -2298,7 +2302,7 @@ int zebra_evpn_neigh_del_ip(zebra_evpn_t *zevpn, struct ipaddr *ip)
        }
 
        /* If it is a remote entry, the kernel has aged this out or someone has
-        * deleted it, it needs to be re-installed as Quagga is the owner.
+        * deleted it, it needs to be re-installed as FRR is the owner.
         */
        if (CHECK_FLAG(n->flags, ZEBRA_NEIGH_REMOTE)) {
                zebra_evpn_rem_neigh_install(zevpn, n, false /*was_static*/);
index 05156c1255795e4adf673cfa232dba764cd32a51..3735a833fdbdbfc8d1cc78f24c8aec5d5fb4ca1b 100644 (file)
@@ -217,26 +217,27 @@ int remote_neigh_count(zebra_mac_t *zmac);
 int zebra_evpn_rem_neigh_install(zebra_evpn_t *zevpn, zebra_neigh_t *n,
                                 bool was_static);
 void zebra_evpn_install_neigh_hash(struct hash_bucket *bucket, void *ctxt);
-int zebra_evpn_neigh_send_add_to_client(vni_t vni, struct ipaddr *ip,
-                                       struct ethaddr *macaddr,
+int zebra_evpn_neigh_send_add_to_client(vni_t vni, const struct ipaddr *ip,
+                                       const struct ethaddr *macaddr,
                                        zebra_mac_t *zmac, uint32_t neigh_flags,
                                        uint32_t seq);
 int zebra_evpn_neigh_send_del_to_client(vni_t vni, struct ipaddr *ip,
                                        struct ethaddr *macaddr, uint32_t flags,
                                        int state, bool force);
 bool zebra_evpn_neigh_is_bgp_seq_ok(zebra_evpn_t *zevpn, zebra_neigh_t *n,
-                                   struct ethaddr *macaddr, uint32_t seq,
+                                   const struct ethaddr *macaddr, uint32_t seq,
                                    bool sync);
 int zebra_evpn_neigh_del(zebra_evpn_t *zevpn, zebra_neigh_t *n);
 void zebra_evpn_sync_neigh_del(zebra_neigh_t *n);
 zebra_neigh_t *
 zebra_evpn_proc_sync_neigh_update(zebra_evpn_t *zevpn, zebra_neigh_t *n,
-                                 uint16_t ipa_len, struct ipaddr *ipaddr,
-                                 uint8_t flags, uint32_t seq, esi_t *esi,
+                                 uint16_t ipa_len, const struct ipaddr *ipaddr,
+                                 uint8_t flags, uint32_t seq, const esi_t *esi,
                                  struct sync_mac_ip_ctx *ctx);
 void zebra_evpn_neigh_del_all(zebra_evpn_t *zevpn, int uninstall,
                              int upd_client, uint32_t flags);
-zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn, struct ipaddr *ip);
+zebra_neigh_t *zebra_evpn_neigh_lookup(zebra_evpn_t *zevpn,
+                                      const struct ipaddr *ip);
 
 int zebra_evpn_rem_neigh_install(zebra_evpn_t *zevpn, zebra_neigh_t *n,
                                 bool was_static);
@@ -251,11 +252,12 @@ void zebra_evpn_process_neigh_on_local_mac_change(zebra_evpn_t *zevpn,
 void zebra_evpn_process_neigh_on_remote_mac_del(zebra_evpn_t *zevpn,
                                                zebra_mac_t *zmac);
 int zebra_evpn_local_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
-                                 struct ipaddr *ip, struct ethaddr *macaddr,
-                                 bool is_router, bool local_inactive,
-                                 bool dp_static);
+                                 const struct ipaddr *ip,
+                                 const struct ethaddr *macaddr, bool is_router,
+                                 bool local_inactive, bool dp_static);
 int zebra_evpn_remote_neigh_update(zebra_evpn_t *zevpn, struct interface *ifp,
-                                  struct ipaddr *ip, struct ethaddr *macaddr,
+                                  const struct ipaddr *ip,
+                                  const struct ethaddr *macaddr,
                                   uint16_t state);
 void zebra_evpn_send_neigh_to_client(zebra_evpn_t *zevpn);
 void zebra_evpn_clear_dup_neigh_hash(struct hash_bucket *bucket, void *ctxt);
@@ -266,16 +268,18 @@ void zebra_evpn_print_neigh_hash_detail(struct hash_bucket *bucket, void *ctxt);
 void zebra_evpn_print_dad_neigh_hash(struct hash_bucket *bucket, void *ctxt);
 void zebra_evpn_print_dad_neigh_hash_detail(struct hash_bucket *bucket,
                                            void *ctxt);
-void process_neigh_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf,
-                                   struct ipaddr *ipaddr, zebra_mac_t *mac,
-                                   struct in_addr vtep_ip, uint8_t flags,
-                                   uint32_t seq);
+void zebra_evpn_neigh_remote_macip_add(zebra_evpn_t *zevpn,
+                                      struct zebra_vrf *zvrf,
+                                      const struct ipaddr *ipaddr,
+                                      zebra_mac_t *mac, struct in_addr vtep_ip,
+                                      uint8_t flags, uint32_t seq);
 int zebra_evpn_neigh_gw_macip_add(struct interface *ifp, zebra_evpn_t *zevpn,
                                  struct ipaddr *ip, zebra_mac_t *mac);
 void zebra_evpn_neigh_remote_uninstall(zebra_evpn_t *zevpn,
                                       struct zebra_vrf *zvrf, zebra_neigh_t *n,
-                                      zebra_mac_t *mac, struct ipaddr *ipaddr);
-int zebra_evpn_neigh_del_ip(zebra_evpn_t *zevpn, struct ipaddr *ip);
+                                      zebra_mac_t *mac,
+                                      const struct ipaddr *ipaddr);
+int zebra_evpn_neigh_del_ip(zebra_evpn_t *zevpn, const struct ipaddr *ip);
 
 
 #ifdef __cplusplus
index 07a82886056b18c443ec5a2f06042f35752dba00..855e19dc453b6b30f93f7caf664cdb322f380da7 100644 (file)
@@ -1002,7 +1002,6 @@ static int zfpm_build_route_updates(void)
                        data_len = zfpm_encode_route(dest, re, (char *)data,
                                                     buf_end - data, &msg_type);
 
-                       assert(data_len);
                        if (data_len) {
                                hdr->msg_type = msg_type;
                                msg_len = fpm_data_len_to_msg_len(data_len);
@@ -1013,6 +1012,9 @@ static int zfpm_build_route_updates(void)
                                        zfpm_g->stats.route_adds++;
                                else
                                        zfpm_g->stats.route_dels++;
+                       } else {
+                               zlog_err("%s: Encoding Prefix: %pRN No valid nexthops",
+                                        __func__, dest->rnode);
                        }
                }
 
index a2d1513ce4874530b71676f10bec90bcd5c001d6..c9450541e84f21f7e1a800aa24ace3118e054c0d 100644 (file)
@@ -752,7 +752,7 @@ static int nhlfe_nexthop_active(zebra_nhlfe_t *nhlfe)
                }
                break;
 
-       default:
+       case NEXTHOP_TYPE_BLACKHOLE:
                break;
        }
 
@@ -1183,7 +1183,7 @@ static char *nhlfe2str(const zebra_nhlfe_t *nhlfe, char *buf, int size)
                break;
        case NEXTHOP_TYPE_IFINDEX:
                snprintf(buf, size, "Ifindex: %u", nexthop->ifindex);
-       default:
+       case NEXTHOP_TYPE_BLACKHOLE:
                break;
        }
 
@@ -1224,7 +1224,7 @@ static int nhlfe_nhop_match(zebra_nhlfe_t *nhlfe, enum nexthop_types_t gtype,
        case NEXTHOP_TYPE_IFINDEX:
                cmp = !(nhop->ifindex == ifindex);
                break;
-       default:
+       case NEXTHOP_TYPE_BLACKHOLE:
                break;
        }
 
@@ -1294,7 +1294,10 @@ static zebra_nhlfe_t *nhlfe_alloc(zebra_lsp_t *lsp, enum lsp_types_t lsp_type,
        case NEXTHOP_TYPE_IFINDEX:
                nexthop->ifindex = ifindex;
                break;
-       default:
+       case NEXTHOP_TYPE_BLACKHOLE:
+               if (IS_ZEBRA_DEBUG_MPLS)
+                       zlog_debug("%s: invalid: blackhole nexthop", __func__);
+
                nexthop_free(nexthop);
                XFREE(MTYPE_NHLFE, nhlfe);
                return NULL;
@@ -1319,10 +1322,21 @@ static zebra_nhlfe_t *nhlfe_add(zebra_lsp_t *lsp, enum lsp_types_t lsp_type,
        if (!lsp)
                return NULL;
 
+       /* Must have labels */
+       if (num_labels == 0 || labels == NULL) {
+               if (IS_ZEBRA_DEBUG_MPLS)
+                       zlog_debug("%s: invalid nexthop: no labels", __func__);
+
+               return NULL;
+       }
+
        /* Allocate new object */
        nhlfe = nhlfe_alloc(lsp, lsp_type, gtype, gate, ifindex, num_labels,
                            labels);
 
+       if (!nhlfe)
+               return NULL;
+
        /* Enqueue to LSP: primaries at head of list, backups at tail */
        if (is_backup) {
                SET_FLAG(nhlfe->flags, NHLFE_FLAG_IS_BACKUP);
@@ -1527,7 +1541,13 @@ static json_object *nhlfe_json(zebra_nhlfe_t *nhlfe)
                                               ifindex2ifname(nexthop->ifindex,
                                                              nexthop->vrf_id));
                break;
-       default:
+       case NEXTHOP_TYPE_IFINDEX:
+               if (nexthop->ifindex)
+                       json_object_string_add(json_nhlfe, "interface",
+                                              ifindex2ifname(nexthop->ifindex,
+                                                             nexthop->vrf_id));
+               break;
+       case NEXTHOP_TYPE_BLACKHOLE:
                break;
        }
 
@@ -1588,7 +1608,13 @@ static void nhlfe_print(zebra_nhlfe_t *nhlfe, struct vty *vty,
                                ifindex2ifname(nexthop->ifindex,
                                               nexthop->vrf_id));
                break;
-       default:
+       case NEXTHOP_TYPE_IFINDEX:
+               if (nexthop->ifindex)
+                       vty_out(vty, "  dev %s",
+                               ifindex2ifname(nexthop->ifindex,
+                                              nexthop->vrf_id));
+               break;
+       case NEXTHOP_TYPE_BLACKHOLE:
                break;
        }
        vty_out(vty, "%s",
@@ -2830,8 +2856,21 @@ static bool ftn_update_znh(bool add_p, enum lsp_types_t type,
                                break;
                        success = true;
                        break;
-               default:
+               case NEXTHOP_TYPE_IFINDEX:
+                       if (znh->type != NEXTHOP_TYPE_IFINDEX)
+                               continue;
+                       if (nexthop->ifindex != znh->ifindex)
+                               continue;
+
+                       found = true;
+
+                       if (!ftn_update_nexthop(add_p, nexthop, type, znh))
+                               break;
+                       success = true;
                        break;
+               case NEXTHOP_TYPE_BLACKHOLE:
+                       /* Not valid */
+                       continue;
                }
 
                if (found)
@@ -3752,7 +3791,7 @@ void zebra_mpls_print_lsp_table(struct vty *vty, struct zebra_vrf *zvrf,
                                        inet_ntop(AF_INET6, &nexthop->gate.ipv6,
                                                  nh_buf, sizeof(nh_buf));
                                        break;
-                               default:
+                               case NEXTHOP_TYPE_BLACKHOLE:
                                        break;
                                }
 
@@ -3795,7 +3834,11 @@ static char *nhlfe_config_str(const zebra_nhlfe_t *nhlfe, char *buf, int size)
        buf[0] = '\0';
        switch (nh->type) {
        case NEXTHOP_TYPE_IPV4:
+       case NEXTHOP_TYPE_IPV4_IFINDEX:
                inet_ntop(AF_INET, &nh->gate.ipv4, buf, size);
+               if (nh->ifindex)
+                       strlcat(buf, ifindex2ifname(nh->ifindex, VRF_DEFAULT),
+                               size);
                break;
        case NEXTHOP_TYPE_IPV6:
        case NEXTHOP_TYPE_IPV6_IFINDEX:
@@ -3805,7 +3848,13 @@ static char *nhlfe_config_str(const zebra_nhlfe_t *nhlfe, char *buf, int size)
                                ifindex2ifname(nh->ifindex, VRF_DEFAULT),
                                size);
                break;
-       default:
+       case NEXTHOP_TYPE_IFINDEX:
+               if (nh->ifindex)
+                       strlcat(buf,
+                               ifindex2ifname(nh->ifindex, VRF_DEFAULT),
+                               size);
+               break;
+       case NEXTHOP_TYPE_BLACKHOLE:
                break;
        }
 
@@ -3931,6 +3980,40 @@ void zebra_mpls_cleanup_tables(struct zebra_vrf *zvrf)
        }
 }
 
+/*
+ * When a vrf label is assigned and the client goes away
+ * we should cleanup the vrf labels associated with
+ * that zclient.
+ */
+void zebra_mpls_client_cleanup_vrf_label(uint8_t proto)
+{
+       struct vrf *vrf;
+       struct zebra_vrf *def_zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
+
+       if (def_zvrf == NULL)
+               return;
+
+       RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) {
+               struct zebra_vrf *zvrf = vrf->info;
+               afi_t afi;
+
+               if (!zvrf)
+                       continue;
+
+               for (afi = AFI_IP; afi < AFI_MAX; afi++) {
+                       if (zvrf->label_proto[afi] == proto
+                           && zvrf->label[afi] != MPLS_LABEL_NONE)
+                               lsp_uninstall(def_zvrf, zvrf->label[afi]);
+
+                       /*
+                        * Cleanup data structures by fiat
+                        */
+                       zvrf->label_proto[afi] = 0;
+                       zvrf->label[afi] = MPLS_LABEL_NONE;
+               }
+       }
+}
+
 /*
  * Called upon process exiting, need to delete LSP forwarding
  * entries from the kernel.
index 7059d393edf5af7cbbe907912cc78f4e5156198c..5195b2f14fed8ed76432ea5e8d05263fd8db431d 100644 (file)
@@ -416,6 +416,12 @@ void zebra_mpls_init(void);
  */
 void zebra_mpls_vty_init(void);
 
+/*
+ * When cleaning up a client connection ensure that there are no
+ * vrf labels that need cleaning up too
+ */
+void zebra_mpls_client_cleanup_vrf_label(uint8_t proto);
+
 /* Inline functions. */
 
 /*
index d789f200715462412b11a25050672092b6705dc1..fd9b1ae387a14b2855ae2b516ce8ecd8b5e30158 100644 (file)
@@ -91,11 +91,11 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
        if (gate_str) {
                /* Gateway is a IPv4 or IPv6 nexthop. */
                ret = inet_pton(AF_INET6, gate_str, &gate.ipv6);
-               if (ret)
+               if (ret == 1)
                        gtype = NEXTHOP_TYPE_IPV6;
                else {
                        ret = inet_pton(AF_INET, gate_str, &gate.ipv4);
-                       if (ret)
+                       if (ret == 1)
                                gtype = NEXTHOP_TYPE_IPV4;
                        else {
                                vty_out(vty, "%% Invalid nexthop\n");
@@ -131,7 +131,7 @@ static int zebra_mpls_transit_lsp(struct vty *vty, int add_cmd,
                ret = zebra_mpls_static_lsp_del(zvrf, in_label, gtype, &gate,
                                                0);
 
-       if (ret) {
+       if (ret != 0) {
                vty_out(vty, "%% LSP cannot be %s\n",
                        add_cmd ? "added" : "deleted");
                return CMD_WARNING_CONFIG_FAILED;
index 3e89df68fdc9d44a5cfe8073670d7966dcdb2370..054015846f478dadb460262cc4e3f65470cea34c 100644 (file)
@@ -149,8 +149,6 @@ static int zebra_ns_delete(char *name)
                          "NS notify : no VRF found using NS %s", name);
                return 0;
        }
-       /* Clear configured flag and invoke delete. */
-       UNSET_FLAG(vrf->status, VRF_CONFIGURED);
        ns = (struct ns *)vrf->ns_ctxt;
        /* the deletion order is the same
         * as the one used when siging signal is received
index 7bcd097371778c416bddb11c943d260761ce5f6a..3607110aa26f35dd1e54e88aca8267ab3b6568f2 100644 (file)
@@ -166,10 +166,8 @@ uint32_t zebra_pbr_rules_hash_key(const void *arg)
                           rule->rule.action.table,
                           prefix_hash_key(&rule->rule.filter.src_ip));
 
-       if (rule->rule.filter.fwmark)
-               key = jhash_2words(rule->rule.filter.fwmark, rule->vrf_id, key);
-       else
-               key = jhash_1word(rule->vrf_id, key);
+       key = jhash_3words(rule->rule.filter.fwmark, rule->vrf_id,
+                          rule->rule.filter.ip_proto, key);
 
        key = jhash(rule->ifname, strlen(rule->ifname), key);
 
@@ -207,6 +205,9 @@ bool zebra_pbr_rules_hash_equal(const void *arg1, const void *arg2)
        if (r1->rule.filter.fwmark != r2->rule.filter.fwmark)
                return false;
 
+       if (r1->rule.filter.ip_proto != r2->rule.filter.ip_proto)
+               return false;
+
        if (!prefix_same(&r1->rule.filter.src_ip, &r2->rule.filter.src_ip))
                return false;
 
index 37d9399054bee70ba7705a6dbe1b583691a06ac3..7e9382518f4b9d96246917c1eef9294b97d4a63e 100644 (file)
@@ -1092,14 +1092,20 @@ static const char *zebra_ptm_get_status_str(int status)
        }
 }
 
-void zebra_ptm_show_status(struct vty *vty, struct interface *ifp)
+void zebra_ptm_show_status(struct vty *vty, json_object *json,
+                          struct interface *ifp)
 {
-       vty_out(vty, "  PTM status: ");
-       if (ifp->ptm_enable) {
-               vty_out(vty, "%s\n", zebra_ptm_get_status_str(ifp->ptm_status));
-       } else {
-               vty_out(vty, "disabled\n");
-       }
+       const char *status;
+
+       if (ifp->ptm_enable)
+               status = zebra_ptm_get_status_str(ifp->ptm_status);
+       else
+               status = "disabled";
+
+       if (json)
+               json_object_string_add(json, "ptmStatus", status);
+       else
+               vty_out(vty, "  PTM status: %s\n", status);
 }
 
 void zebra_ptm_send_status_req(void)
@@ -1537,6 +1543,7 @@ int zebra_ptm_get_enable_state(void)
 }
 
 void zebra_ptm_show_status(struct vty *vty __attribute__((__unused__)),
+                          json_object *json __attribute__((__unused__)),
                           struct interface *ifp __attribute__((__unused__)))
 {
        /* NOTHING */
index e578a02a94a4581330147b1244f20fdb5760b831..88c9bccb44dee106a217f25f35b3b087bac0f68b 100644 (file)
@@ -86,7 +86,8 @@ void zebra_ptm_bfd_client_register(ZAPI_HANDLER_ARGS);
 void zebra_ptm_bfd_dst_replay(ZAPI_HANDLER_ARGS);
 #endif /* HAVE_BFDD */
 
-void zebra_ptm_show_status(struct vty *vty, struct interface *ifp);
+void zebra_ptm_show_status(struct vty *vty, json_object *json,
+                          struct interface *ifp);
 void zebra_ptm_if_init(struct zebra_if *zebra_ifp);
 void zebra_ptm_if_set_ptm_state(struct interface *ifp,
                                struct zebra_if *zebra_ifp);
index 6b4a815151c3b70389ea32dec6fca2622c4702c0..d5083d4cbef1b3c9a9d9294e600754d4e94b7173 100644 (file)
@@ -836,6 +836,7 @@ static int zebra_pw_config(struct vty *vty)
                if (!(pw->flags & F_PSEUDOWIRE_CWORD))
                        vty_out(vty, " control-word exclude\n");
 
+               vty_out(vty, "exit\n");
                vty_out(vty, "!\n");
                write = 1;
        }
index 12cc0b4e8a85663d57c67dc9df2010a978098acd..1fb4e5e6fc155637114fac442103f18459e27990 100644 (file)
 #include "zebra/zebra_vxlan.h"
 #include "zebra/zapi_msg.h"
 #include "zebra/zebra_dplane.h"
+#include "zebra/zebra_evpn_mh.h"
 
 DEFINE_MGROUP(ZEBRA, "zebra");
 
 DEFINE_MTYPE(ZEBRA, RE,       "Route Entry");
 DEFINE_MTYPE_STATIC(ZEBRA, RIB_DEST,       "RIB destination");
 DEFINE_MTYPE_STATIC(ZEBRA, RIB_UPDATE_CTX, "Rib update context object");
-DEFINE_MTYPE_STATIC(ZEBRA, WQ_NHG_WRAPPER, "WQ nhg wrapper");
+DEFINE_MTYPE_STATIC(ZEBRA, WQ_WRAPPER, "WQ wrapper");
 
 /*
  * Event, list, and mutex for delivery of dataplane results
@@ -74,7 +75,7 @@ static struct dplane_ctx_q rib_dplane_q;
 DEFINE_HOOK(rib_update, (struct route_node * rn, const char *reason),
            (rn, reason));
 
-/* Should we allow non Quagga processes to delete our routes */
+/* Should we allow non FRR processes to delete our routes */
 extern int allow_delete;
 
 /* Each route type's string and default distance value. */
@@ -83,41 +84,44 @@ static const struct {
        uint8_t distance;
        uint8_t meta_q_map;
 } route_info[ZEBRA_ROUTE_MAX] = {
-       [ZEBRA_ROUTE_NHG] = {ZEBRA_ROUTE_NHG, 255 /* Uneeded for nhg's */, 0},
-       [ZEBRA_ROUTE_SYSTEM] = {ZEBRA_ROUTE_SYSTEM, 0, 6},
-       [ZEBRA_ROUTE_KERNEL] = {ZEBRA_ROUTE_KERNEL, 0, 2},
-       [ZEBRA_ROUTE_CONNECT] = {ZEBRA_ROUTE_CONNECT, 0, 1},
-       [ZEBRA_ROUTE_STATIC] = {ZEBRA_ROUTE_STATIC, 1, 3},
-       [ZEBRA_ROUTE_RIP] = {ZEBRA_ROUTE_RIP, 120, 4},
-       [ZEBRA_ROUTE_RIPNG] = {ZEBRA_ROUTE_RIPNG, 120, 4},
-       [ZEBRA_ROUTE_OSPF] = {ZEBRA_ROUTE_OSPF, 110, 4},
-       [ZEBRA_ROUTE_OSPF6] = {ZEBRA_ROUTE_OSPF6, 110, 4},
-       [ZEBRA_ROUTE_ISIS] = {ZEBRA_ROUTE_ISIS, 115, 4},
-       [ZEBRA_ROUTE_BGP] = {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */, 5},
-       [ZEBRA_ROUTE_PIM] = {ZEBRA_ROUTE_PIM, 255, 6},
-       [ZEBRA_ROUTE_EIGRP] = {ZEBRA_ROUTE_EIGRP, 90, 4},
-       [ZEBRA_ROUTE_NHRP] = {ZEBRA_ROUTE_NHRP, 10, 4},
-       [ZEBRA_ROUTE_HSLS] = {ZEBRA_ROUTE_HSLS, 255, 6},
-       [ZEBRA_ROUTE_OLSR] = {ZEBRA_ROUTE_OLSR, 255, 6},
-       [ZEBRA_ROUTE_TABLE] = {ZEBRA_ROUTE_TABLE, 150, 3},
-       [ZEBRA_ROUTE_LDP] = {ZEBRA_ROUTE_LDP, 150, 6},
-       [ZEBRA_ROUTE_VNC] = {ZEBRA_ROUTE_VNC, 20, 5},
-       [ZEBRA_ROUTE_VNC_DIRECT] = {ZEBRA_ROUTE_VNC_DIRECT, 20, 5},
-       [ZEBRA_ROUTE_VNC_DIRECT_RH] = {ZEBRA_ROUTE_VNC_DIRECT_RH, 20, 5},
-       [ZEBRA_ROUTE_BGP_DIRECT] = {ZEBRA_ROUTE_BGP_DIRECT, 20, 5},
-       [ZEBRA_ROUTE_BGP_DIRECT_EXT] = {ZEBRA_ROUTE_BGP_DIRECT_EXT, 20, 5},
-       [ZEBRA_ROUTE_BABEL] = {ZEBRA_ROUTE_BABEL, 100, 4},
-       [ZEBRA_ROUTE_SHARP] = {ZEBRA_ROUTE_SHARP, 150, 6},
-       [ZEBRA_ROUTE_PBR] = {ZEBRA_ROUTE_PBR, 200, 6},
-       [ZEBRA_ROUTE_BFD] = {ZEBRA_ROUTE_BFD, 255, 6},
-       [ZEBRA_ROUTE_OPENFABRIC] = {ZEBRA_ROUTE_OPENFABRIC, 115, 4},
-       [ZEBRA_ROUTE_VRRP] = {ZEBRA_ROUTE_VRRP, 255, 6},
-       [ZEBRA_ROUTE_SRTE] = {ZEBRA_ROUTE_SRTE, 255, 6},
+       [ZEBRA_ROUTE_NHG] = {ZEBRA_ROUTE_NHG, 255 /* Unneeded for nhg's */, 0},
+       [ZEBRA_ROUTE_SYSTEM] = {ZEBRA_ROUTE_SYSTEM, 0, 7},
+       [ZEBRA_ROUTE_KERNEL] = {ZEBRA_ROUTE_KERNEL, 0, 3},
+       [ZEBRA_ROUTE_CONNECT] = {ZEBRA_ROUTE_CONNECT, 0, 2},
+       [ZEBRA_ROUTE_STATIC] = {ZEBRA_ROUTE_STATIC, 1, 4},
+       [ZEBRA_ROUTE_RIP] = {ZEBRA_ROUTE_RIP, 120, 5},
+       [ZEBRA_ROUTE_RIPNG] = {ZEBRA_ROUTE_RIPNG, 120, 5},
+       [ZEBRA_ROUTE_OSPF] = {ZEBRA_ROUTE_OSPF, 110, 5},
+       [ZEBRA_ROUTE_OSPF6] = {ZEBRA_ROUTE_OSPF6, 110, 5},
+       [ZEBRA_ROUTE_ISIS] = {ZEBRA_ROUTE_ISIS, 115, 5},
+       [ZEBRA_ROUTE_BGP] = {ZEBRA_ROUTE_BGP, 20 /* IBGP is 200. */, 6},
+       [ZEBRA_ROUTE_PIM] = {ZEBRA_ROUTE_PIM, 255, 7},
+       [ZEBRA_ROUTE_EIGRP] = {ZEBRA_ROUTE_EIGRP, 90, 5},
+       [ZEBRA_ROUTE_NHRP] = {ZEBRA_ROUTE_NHRP, 10, 5},
+       [ZEBRA_ROUTE_HSLS] = {ZEBRA_ROUTE_HSLS, 255, 7},
+       [ZEBRA_ROUTE_OLSR] = {ZEBRA_ROUTE_OLSR, 255, 7},
+       [ZEBRA_ROUTE_TABLE] = {ZEBRA_ROUTE_TABLE, 150, 4},
+       [ZEBRA_ROUTE_LDP] = {ZEBRA_ROUTE_LDP, 150, 7},
+       [ZEBRA_ROUTE_VNC] = {ZEBRA_ROUTE_VNC, 20, 6},
+       [ZEBRA_ROUTE_VNC_DIRECT] = {ZEBRA_ROUTE_VNC_DIRECT, 20, 6},
+       [ZEBRA_ROUTE_VNC_DIRECT_RH] = {ZEBRA_ROUTE_VNC_DIRECT_RH, 20, 6},
+       [ZEBRA_ROUTE_BGP_DIRECT] = {ZEBRA_ROUTE_BGP_DIRECT, 20, 6},
+       [ZEBRA_ROUTE_BGP_DIRECT_EXT] = {ZEBRA_ROUTE_BGP_DIRECT_EXT, 20, 6},
+       [ZEBRA_ROUTE_BABEL] = {ZEBRA_ROUTE_BABEL, 100, 5},
+       [ZEBRA_ROUTE_SHARP] = {ZEBRA_ROUTE_SHARP, 150, 7},
+       [ZEBRA_ROUTE_PBR] = {ZEBRA_ROUTE_PBR, 200, 7},
+       [ZEBRA_ROUTE_BFD] = {ZEBRA_ROUTE_BFD, 255, 7},
+       [ZEBRA_ROUTE_OPENFABRIC] = {ZEBRA_ROUTE_OPENFABRIC, 115, 5},
+       [ZEBRA_ROUTE_VRRP] = {ZEBRA_ROUTE_VRRP, 255, 7},
+       [ZEBRA_ROUTE_SRTE] = {ZEBRA_ROUTE_SRTE, 255, 7},
        /* Any new route type added to zebra, should be mirrored here */
 
        /* no entry/default: 150 */
 };
 
+/* EVPN/VXLAN subqueue is number 1 */
+#define META_QUEUE_EVPN 1
+
 /* Wrapper struct for nhg workqueue items; a 'ctx' is an incoming update
  * from the OS, and an 'nhe' is a nhe update.
  */
@@ -132,6 +136,29 @@ struct wq_nhg_wrapper {
 #define WQ_NHG_WRAPPER_TYPE_CTX  0x01
 #define WQ_NHG_WRAPPER_TYPE_NHG  0x02
 
+/* Wrapper structs for evpn/vxlan workqueue items. */
+struct wq_evpn_wrapper {
+       int type;
+       bool add_p;
+       vrf_id_t vrf_id;
+       bool esr_rxed;
+       uint8_t df_alg;
+       uint16_t df_pref;
+       uint32_t flags;
+       uint32_t seq;
+       esi_t esi;
+       vni_t vni;
+       struct ipaddr ip;
+       struct ethaddr macaddr;
+       struct prefix prefix;
+       struct in_addr vtep_ip;
+};
+
+#define WQ_EVPN_WRAPPER_TYPE_VRFROUTE     0x01
+#define WQ_EVPN_WRAPPER_TYPE_REM_ES       0x02
+#define WQ_EVPN_WRAPPER_TYPE_REM_MACIP    0x03
+#define WQ_EVPN_WRAPPER_TYPE_REM_VTEP     0x04
+
 /* %pRN is already a printer for route_nodes that just prints the prefix */
 #ifdef _FRR_ATTRIBUTE_PRINTFRR
 #pragma FRR printfrr_ext "%pZN" (struct route_node *)
@@ -578,12 +605,9 @@ void rib_install_kernel(struct route_node *rn, struct route_entry *re,
                break;
        case ZEBRA_DPLANE_REQUEST_FAILURE:
        {
-               char str[SRCDEST2STR_BUFFER];
-
-               srcdest_rnode2str(rn, str, sizeof(str));
                flog_err(EC_ZEBRA_DP_INSTALL_FAIL,
-                        "%u:%u:%s: Failed to enqueue dataplane install",
-                        re->vrf_id, re->table, str);
+                        "%u:%u:%pRN: Failed to enqueue dataplane install",
+                        re->vrf_id, re->table, rn);
                break;
        }
        case ZEBRA_DPLANE_REQUEST_SUCCESS:
@@ -621,15 +645,10 @@ void rib_uninstall_kernel(struct route_node *rn, struct route_entry *re)
                        zvrf->removals_queued++;
                break;
        case ZEBRA_DPLANE_REQUEST_FAILURE:
-       {
-               char str[SRCDEST2STR_BUFFER];
-
-               srcdest_rnode2str(rn, str, sizeof(str));
                flog_err(EC_ZEBRA_DP_INSTALL_FAIL,
-                        "%u:%s: Failed to enqueue dataplane uninstall",
-                        re->vrf_id, str);
+                        "%u:%pRN: Failed to enqueue dataplane uninstall",
+                        re->vrf_id, rn);
                break;
-       }
        case ZEBRA_DPLANE_REQUEST_SUCCESS:
                if (zvrf)
                        zvrf->removals++;
@@ -639,46 +658,6 @@ void rib_uninstall_kernel(struct route_node *rn, struct route_entry *re)
        return;
 }
 
-/* Uninstall the route from kernel. */
-static void rib_uninstall(struct route_node *rn, struct route_entry *re)
-{
-       struct rib_table_info *info = srcdest_rnode_table_info(rn);
-       rib_dest_t *dest = rib_dest_from_rnode(rn);
-       struct nexthop *nexthop;
-
-       if (dest && dest->selected_fib == re) {
-               if (info->safi == SAFI_UNICAST)
-                       hook_call(rib_update, rn, "rib_uninstall");
-
-               /* If labeled-unicast route, uninstall transit LSP. */
-               if (zebra_rib_labeled_unicast(re))
-                       zebra_mpls_lsp_uninstall(info->zvrf, rn, re);
-
-               rib_uninstall_kernel(rn, re);
-
-               dest->selected_fib = NULL;
-
-               /* Free FIB nexthop group, if present */
-               if (re->fib_ng.nexthop) {
-                       nexthops_free(re->fib_ng.nexthop);
-                       re->fib_ng.nexthop = NULL;
-               }
-               UNSET_FLAG(re->status, ROUTE_ENTRY_USE_FIB_NHG);
-
-               for (ALL_NEXTHOPS(re->nhe->nhg, nexthop))
-                       UNSET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
-       }
-
-       if (CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED)) {
-               const struct prefix *p, *src_p;
-
-               srcdest_rnode_prefixes(rn, &p, &src_p);
-
-               redistribute_delete(p, src_p, re, NULL);
-               UNSET_FLAG(re->flags, ZEBRA_FLAG_SELECTED);
-       }
-}
-
 /*
  * rib_can_delete_dest
  *
@@ -726,15 +705,12 @@ void zebra_rib_evaluate_rn_nexthops(struct route_node *rn, uint32_t seq)
         * would match a more specific route
         */
        while (rn) {
-               if (IS_ZEBRA_DEBUG_NHT_DETAILED) {
-                       char buf[PREFIX_STRLEN];
-
+               if (IS_ZEBRA_DEBUG_NHT_DETAILED)
                        zlog_debug(
-                               "%s: %s Being examined for Nexthop Tracking Count: %zd",
-                               __func__,
-                               srcdest_rnode2str(rn, buf, sizeof(buf)),
+                               "%s: %pRN Being examined for Nexthop Tracking Count: %zd",
+                               __func__, rn,
                                dest ? rnh_list_count(&dest->nht) : 0);
-               }
+
                if (!dest) {
                        rn = rn->parent;
                        if (rn)
@@ -752,17 +728,12 @@ void zebra_rib_evaluate_rn_nexthops(struct route_node *rn, uint32_t seq)
                                zebra_vrf_lookup_by_id(rnh->vrf_id);
                        struct prefix *p = &rnh->node->p;
 
-                       if (IS_ZEBRA_DEBUG_NHT_DETAILED) {
-                               char buf1[PREFIX_STRLEN];
-
+                       if (IS_ZEBRA_DEBUG_NHT_DETAILED)
                                zlog_debug(
-                                       "%s(%u):%s has Nexthop(%pFX) Type: %s depending on it, evaluating %u:%u",
+                                       "%s(%u):%pRN has Nexthop(%pFX) Type: %s depending on it, evaluating %u:%u",
                                        zvrf_name(zvrf), zvrf_id(zvrf),
-                                       srcdest_rnode2str(rn, buf1,
-                                                         sizeof(buf1)),
-                                       p, rnh_type2str(rnh->type), seq,
+                                       rn, p, rnh_type2str(rnh->type), seq,
                                        rnh->seqno);
-                       }
 
                        /*
                         * If we have evaluated this node on this pass
@@ -863,13 +834,10 @@ static void rib_process_add_fib(struct zebra_vrf *zvrf, struct route_node *rn,
                return;
        }
 
-       if (IS_ZEBRA_DEBUG_RIB) {
-               char buf[SRCDEST2STR_BUFFER];
-               srcdest_rnode2str(rn, buf, sizeof(buf));
-               zlog_debug("%s(%u:%u):%s: Adding route rn %p, re %p (%s)",
-                          zvrf_name(zvrf), zvrf_id(zvrf), new->table, buf, rn,
+       if (IS_ZEBRA_DEBUG_RIB)
+               zlog_debug("%s(%u:%u):%pRN: Adding route rn %p, re %p (%s)",
+                          zvrf_name(zvrf), zvrf_id(zvrf), new->table, rn, rn,
                           new, zebra_route_string(new->type));
-       }
 
        /* If labeled-unicast route, install transit LSP. */
        if (zebra_rib_labeled_unicast(new))
@@ -886,13 +854,10 @@ static void rib_process_del_fib(struct zebra_vrf *zvrf, struct route_node *rn,
        hook_call(rib_update, rn, "removing existing route");
 
        /* Uninstall from kernel. */
-       if (IS_ZEBRA_DEBUG_RIB) {
-               char buf[SRCDEST2STR_BUFFER];
-               srcdest_rnode2str(rn, buf, sizeof(buf));
-               zlog_debug("%s(%u:%u):%s: Deleting route rn %p, re %p (%s)",
-                          zvrf_name(zvrf), zvrf_id(zvrf), old->table, buf, rn,
+       if (IS_ZEBRA_DEBUG_RIB)
+               zlog_debug("%s(%u:%u):%pRN: Deleting route rn %p, re %p (%s)",
+                          zvrf_name(zvrf), zvrf_id(zvrf), old->table, rn, rn,
                           old, zebra_route_string(old->type));
-       }
 
        /* If labeled-unicast route, uninstall transit LSP. */
        if (zebra_rib_labeled_unicast(old))
@@ -938,22 +903,19 @@ static void rib_process_update_fib(struct zebra_vrf *zvrf,
                 */
                if (nh_active) {
                        if (IS_ZEBRA_DEBUG_RIB) {
-                               char buf[SRCDEST2STR_BUFFER];
-
-                               srcdest_rnode2str(rn, buf, sizeof(buf));
                                if (new != old)
                                        zlog_debug(
-                                               "%s(%u:%u):%s: Updating route rn %p, re %p (%s) old %p (%s)",
+                                               "%s(%u:%u):%pRN: Updating route rn %p, re %p (%s) old %p (%s)",
                                                zvrf_name(zvrf), zvrf_id(zvrf),
-                                               new->table, buf, rn, new,
+                                               new->table, rn, rn, new,
                                                zebra_route_string(new->type),
                                                old,
                                                zebra_route_string(old->type));
                                else
                                        zlog_debug(
-                                               "%s(%u:%u):%s: Updating route rn %p, re %p (%s)",
+                                               "%s(%u:%u):%pRN: Updating route rn %p, re %p (%s)",
                                                zvrf_name(zvrf), zvrf_id(zvrf),
-                                               new->table, buf, rn, new,
+                                               new->table, rn, rn, new,
                                                zebra_route_string(new->type));
                        }
 
@@ -979,21 +941,19 @@ static void rib_process_update_fib(struct zebra_vrf *zvrf,
                 */
                if (!nh_active) {
                        if (IS_ZEBRA_DEBUG_RIB) {
-                               char buf[SRCDEST2STR_BUFFER];
-                               srcdest_rnode2str(rn, buf, sizeof(buf));
                                if (new != old)
                                        zlog_debug(
-                                               "%s(%u:%u):%s: Deleting route rn %p, re %p (%s) old %p (%s) - nexthop inactive",
+                                               "%s(%u:%u):%pRN: Deleting route rn %p, re %p (%s) old %p (%s) - nexthop inactive",
                                                zvrf_name(zvrf), zvrf_id(zvrf),
-                                               new->table, buf, rn, new,
+                                               new->table, rn, rn, new,
                                                zebra_route_string(new->type),
                                                old,
                                                zebra_route_string(old->type));
                                else
                                        zlog_debug(
-                                               "%s(%u:%u):%s: Deleting route rn %p, re %p (%s) - nexthop inactive",
+                                               "%s(%u:%u):%pRN: Deleting route rn %p, re %p (%s) - nexthop inactive",
                                                zvrf_name(zvrf), zvrf_id(zvrf),
-                                               new->table, buf, rn, new,
+                                               new->table, rn, rn, new,
                                                zebra_route_string(new->type));
                        }
 
@@ -1110,7 +1070,6 @@ static void rib_process(struct route_node *rn)
        struct route_entry *old_fib = NULL;
        struct route_entry *new_fib = NULL;
        struct route_entry *best = NULL;
-       char buf[SRCDEST2STR_BUFFER];
        rib_dest_t *dest;
        struct zebra_vrf *zvrf = NULL;
        struct vrf *vrf;
@@ -1122,15 +1081,17 @@ static void rib_process(struct route_node *rn)
        assert(rn);
 
        dest = rib_dest_from_rnode(rn);
-       if (dest) {
-               zvrf = rib_dest_vrf(dest);
-               vrf_id = zvrf_id(zvrf);
-       }
+       /*
+        * We have an enqueued node with nothing to process here
+        * let's just finish up and return;
+        */
+       if (!dest)
+               return;
 
-       vrf = vrf_lookup_by_id(vrf_id);
+       zvrf = rib_dest_vrf(dest);
+       vrf_id = zvrf_id(zvrf);
 
-       if (IS_ZEBRA_DEBUG_RIB)
-               srcdest_rnode2str(rn, buf, sizeof(buf));
+       vrf = vrf_lookup_by_id(vrf_id);
 
        /*
         * we can have rn's that have a NULL info pointer
@@ -1138,26 +1099,24 @@ static void rib_process(struct route_node *rn)
         * additionally we know RNODE_FOREACH_RE_SAFE
         * will not iterate so we are ok.
         */
-       if (dest) {
-               if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
-                       struct route_entry *re = re_list_first(&dest->routes);
-
-                       zlog_debug("%s(%u:%u):%s: Processing rn %p",
-                                  VRF_LOGNAME(vrf), vrf_id, re->table, buf,
-                                  rn);
-               }
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
+               struct route_entry *re = re_list_first(&dest->routes);
 
-               old_fib = dest->selected_fib;
+               zlog_debug("%s(%u:%u):%pRN: Processing rn %p",
+                          VRF_LOGNAME(vrf), vrf_id, re->table, rn,
+                          rn);
        }
 
+       old_fib = dest->selected_fib;
+
        RNODE_FOREACH_RE_SAFE (rn, re, next) {
                if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
                        char flags_buf[128];
                        char status_buf[128];
 
                        zlog_debug(
-                               "%s(%u:%u):%s: Examine re %p (%s) status: %sflags: %sdist %d metric %d",
-                               VRF_LOGNAME(vrf), vrf_id, re->table, buf, re,
+                               "%s(%u:%u):%pRN: Examine re %p (%s) status: %sflags: %sdist %d metric %d",
+                               VRF_LOGNAME(vrf), vrf_id, re->table, rn, re,
                                zebra_route_string(re->type),
                                _dump_re_status(re, status_buf,
                                                sizeof(status_buf)),
@@ -1207,11 +1166,11 @@ static void rib_process(struct route_node *rn)
                                        if (re != old_selected) {
                                                if (IS_ZEBRA_DEBUG_RIB)
                                                        zlog_debug(
-                                                               "%s: %s(%u):%s: imported via import-table but denied by the ip protocol table route-map",
+                                                               "%s: %s(%u):%pRN: imported via import-table but denied by the ip protocol table route-map",
                                                                __func__,
                                                                VRF_LOGNAME(
                                                                        vrf),
-                                                               vrf_id, buf);
+                                                               vrf_id, rn);
                                                rib_unlink(rn, re);
                                        } else
                                                SET_FLAG(re->status,
@@ -1286,8 +1245,8 @@ static void rib_process(struct route_node *rn)
                                                    : new_fib ? new_fib : NULL;
 
                zlog_debug(
-                       "%s(%u:%u):%s: After processing: old_selected %p new_selected %p old_fib %p new_fib %p",
-                       VRF_LOGNAME(vrf), vrf_id, entry ? entry->table : 0, buf,
+                       "%s(%u:%u):%pRN: After processing: old_selected %p new_selected %p old_fib %p new_fib %p",
+                       VRF_LOGNAME(vrf), vrf_id, entry ? entry->table : 0, rn,
                        (void *)old_selected, (void *)new_selected,
                        (void *)old_fib, (void *)new_fib);
        }
@@ -2315,6 +2274,62 @@ done:
        dplane_ctx_fini(&ctx);
 }
 
+/*
+ * Process a node from the EVPN/VXLAN subqueue.
+ */
+static void process_subq_evpn(struct listnode *lnode)
+{
+       struct wq_evpn_wrapper *w;
+
+       /* In general, the list node points to a wrapper object
+        * holding the info necessary to make some update.
+        */
+       w = listgetdata(lnode);
+       if (!w)
+               return;
+
+       if (w->type == WQ_EVPN_WRAPPER_TYPE_VRFROUTE) {
+               if (w->add_p)
+                       zebra_vxlan_evpn_vrf_route_add(w->vrf_id, &w->macaddr,
+                                                      &w->ip, &w->prefix);
+               else
+                       zebra_vxlan_evpn_vrf_route_del(w->vrf_id, &w->ip,
+                                                      &w->prefix);
+       } else if (w->type == WQ_EVPN_WRAPPER_TYPE_REM_ES) {
+               if (w->add_p)
+                       zebra_evpn_remote_es_add(&w->esi, w->ip.ipaddr_v4,
+                                                w->esr_rxed, w->df_alg,
+                                                w->df_pref);
+               else
+                       zebra_evpn_remote_es_del(&w->esi, w->ip.ipaddr_v4);
+       } else if (w->type == WQ_EVPN_WRAPPER_TYPE_REM_MACIP) {
+               uint16_t ipa_len = 0;
+
+               if (w->ip.ipa_type == IPADDR_V4)
+                       ipa_len = IPV4_MAX_BYTELEN;
+               else if (w->ip.ipa_type == IPADDR_V6)
+                       ipa_len = IPV6_MAX_BYTELEN;
+
+               if (w->add_p)
+                       zebra_evpn_rem_macip_add(w->vni, &w->macaddr, ipa_len,
+                                                &w->ip, w->flags, w->seq,
+                                                w->vtep_ip, &w->esi);
+               else
+                       zebra_evpn_rem_macip_del(w->vni, &w->macaddr, ipa_len,
+                                                &w->ip, w->vtep_ip);
+       } else if (w->type == WQ_EVPN_WRAPPER_TYPE_REM_VTEP) {
+               if (w->add_p)
+                       zebra_vxlan_remote_vtep_add(w->vrf_id, w->vni,
+                                                   w->vtep_ip, w->flags);
+               else
+                       zebra_vxlan_remote_vtep_del(w->vrf_id, w->vni,
+                                                   w->vtep_ip);
+       }
+
+
+       XFREE(MTYPE_WQ_WRAPPER, w);
+}
+
 /*
  * Process the nexthop-group workqueue subqueue
  */
@@ -2355,8 +2370,7 @@ static void process_subq_nhg(struct listnode *lnode)
                /* Process incoming nhg update, probably from a proto daemon */
                newnhe = zebra_nhg_proto_add(nhe->id, nhe->type,
                                             nhe->zapi_instance,
-                                            nhe->zapi_session,
-                                            &nhe->nhg, 0);
+                                            nhe->zapi_session, &nhe->nhg, 0);
 
                /* Report error to daemon via ZAPI */
                if (newnhe == NULL)
@@ -2368,7 +2382,7 @@ static void process_subq_nhg(struct listnode *lnode)
                zebra_nhg_free(nhe);
        }
 
-       XFREE(MTYPE_WQ_NHG_WRAPPER, w);
+       XFREE(MTYPE_WQ_WRAPPER, w);
 }
 
 static void process_subq_route(struct listnode *lnode, uint8_t qindex)
@@ -2387,7 +2401,6 @@ static void process_subq_route(struct listnode *lnode, uint8_t qindex)
 
        if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
                struct route_entry *re = NULL;
-               char buf[SRCDEST2STR_BUFFER];
 
                /*
                 * rib_process may have freed the dest
@@ -2398,10 +2411,9 @@ static void process_subq_route(struct listnode *lnode, uint8_t qindex)
                if (dest)
                        re = re_list_first(&dest->routes);
 
-               srcdest_rnode2str(rnode, buf, sizeof(buf));
-               zlog_debug("%s(%u:%u):%s: rn %p dequeued from sub-queue %u",
+               zlog_debug("%s(%u:%u):%pRN rn %p dequeued from sub-queue %u",
                           zvrf_name(zvrf), zvrf_id(zvrf), re ? re->table : 0,
-                          buf, rnode, qindex);
+                          rnode, rnode, qindex);
        }
 
        if (rnode->info)
@@ -2411,9 +2423,9 @@ static void process_subq_route(struct listnode *lnode, uint8_t qindex)
        route_unlock_node(rnode);
 }
 
-/* Take a list of route_node structs and return 1, if there was a record
- * picked from it and processed by rib_process(). Don't process more,
- * than one RN record; operate only in the specified sub-queue.
+/*
+ * Examine the specified subqueue; process one entry and return 1 if
+ * there is a node, return 0 otherwise.
  */
 static unsigned int process_subq(struct list *subq, uint8_t qindex)
 {
@@ -2422,7 +2434,9 @@ static unsigned int process_subq(struct list *subq, uint8_t qindex)
        if (!lnode)
                return 0;
 
-       if (qindex == route_info[ZEBRA_ROUTE_NHG].meta_q_map)
+       if (qindex == META_QUEUE_EVPN)
+               process_subq_evpn(lnode);
+       else if (qindex == route_info[ZEBRA_ROUTE_NHG].meta_q_map)
                process_subq_nhg(lnode);
        else
                process_subq_route(lnode, qindex);
@@ -2432,7 +2446,7 @@ static unsigned int process_subq(struct list *subq, uint8_t qindex)
        return 1;
 }
 
-/* Dispatch the meta queue by picking, processing and unlocking the next RN from
+/* Dispatch the meta queue by picking and processing the next node from
  * a non-empty sub-queue with lowest priority. wq is equal to zebra->ribq and
  * data is pointed to the meta queue structure.
  */
@@ -2538,7 +2552,7 @@ static int rib_meta_queue_nhg_ctx_add(struct meta_queue *mq, void *data)
        if (!ctx)
                return -1;
 
-       w = XCALLOC(MTYPE_WQ_NHG_WRAPPER, sizeof(struct wq_nhg_wrapper));
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_nhg_wrapper));
 
        w->type = WQ_NHG_WRAPPER_TYPE_CTX;
        w->u.ctx = ctx;
@@ -2564,7 +2578,7 @@ static int rib_meta_queue_nhg_add(struct meta_queue *mq, void *data)
        if (!nhe)
                return -1;
 
-       w = XCALLOC(MTYPE_WQ_NHG_WRAPPER, sizeof(struct wq_nhg_wrapper));
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_nhg_wrapper));
 
        w->type = WQ_NHG_WRAPPER_TYPE_NHG;
        w->u.nhe = nhe;
@@ -2579,6 +2593,14 @@ static int rib_meta_queue_nhg_add(struct meta_queue *mq, void *data)
        return 0;
 }
 
+static int rib_meta_queue_evpn_add(struct meta_queue *mq, void *data)
+{
+       listnode_add(mq->subq[META_QUEUE_EVPN], data);
+       mq->size++;
+
+       return 0;
+}
+
 static int mq_add_handler(void *data,
                          int (*mq_add_func)(struct meta_queue *mq, void *data))
 {
@@ -2640,6 +2662,225 @@ int rib_queue_nhe_add(struct nhg_hash_entry *nhe)
        return mq_add_handler(nhe, rib_meta_queue_nhg_add);
 }
 
+/*
+ * Enqueue evpn route for processing
+ */
+int zebra_rib_queue_evpn_route_add(vrf_id_t vrf_id, const struct ethaddr *rmac,
+                                  const struct ipaddr *vtep_ip,
+                                  const struct prefix *host_prefix)
+{
+       struct wq_evpn_wrapper *w;
+
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_evpn_wrapper));
+
+       w->type = WQ_EVPN_WRAPPER_TYPE_VRFROUTE;
+       w->add_p = true;
+       w->vrf_id = vrf_id;
+       w->macaddr = *rmac;
+       w->ip = *vtep_ip;
+       w->prefix = *host_prefix;
+
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+               zlog_debug("%s: (%u)%pIA, host prefix %pFX enqueued", __func__,
+                          vrf_id, vtep_ip, host_prefix);
+
+       return mq_add_handler(w, rib_meta_queue_evpn_add);
+}
+
+int zebra_rib_queue_evpn_route_del(vrf_id_t vrf_id,
+                                  const struct ipaddr *vtep_ip,
+                                  const struct prefix *host_prefix)
+{
+       struct wq_evpn_wrapper *w;
+
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_evpn_wrapper));
+
+       w->type = WQ_EVPN_WRAPPER_TYPE_VRFROUTE;
+       w->add_p = false;
+       w->vrf_id = vrf_id;
+       w->ip = *vtep_ip;
+       w->prefix = *host_prefix;
+
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+               zlog_debug("%s: (%u)%pIA, host prefix %pFX enqueued", __func__,
+                          vrf_id, vtep_ip, host_prefix);
+
+       return mq_add_handler(w, rib_meta_queue_evpn_add);
+}
+
+/* Enqueue EVPN remote ES for processing */
+int zebra_rib_queue_evpn_rem_es_add(const esi_t *esi,
+                                   const struct in_addr *vtep_ip,
+                                   bool esr_rxed, uint8_t df_alg,
+                                   uint16_t df_pref)
+{
+       struct wq_evpn_wrapper *w;
+       char buf[ESI_STR_LEN];
+
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_evpn_wrapper));
+
+       w->type = WQ_EVPN_WRAPPER_TYPE_REM_ES;
+       w->add_p = true;
+       w->esi = *esi;
+       w->ip.ipa_type = IPADDR_V4;
+       w->ip.ipaddr_v4 = *vtep_ip;
+       w->esr_rxed = esr_rxed;
+       w->df_alg = df_alg;
+       w->df_pref = df_pref;
+
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+               zlog_debug("%s: vtep %pI4, esi %s enqueued", __func__, vtep_ip,
+                          esi_to_str(esi, buf, sizeof(buf)));
+
+       return mq_add_handler(w, rib_meta_queue_evpn_add);
+}
+
+int zebra_rib_queue_evpn_rem_es_del(const esi_t *esi,
+                                   const struct in_addr *vtep_ip)
+{
+       struct wq_evpn_wrapper *w;
+       char buf[ESI_STR_LEN];
+
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_evpn_wrapper));
+
+       w->type = WQ_EVPN_WRAPPER_TYPE_REM_ES;
+       w->add_p = false;
+       w->esi = *esi;
+       w->ip.ipa_type = IPADDR_V4;
+       w->ip.ipaddr_v4 = *vtep_ip;
+
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
+               if (memcmp(esi, zero_esi, sizeof(esi_t)) != 0)
+                       esi_to_str(esi, buf, sizeof(buf));
+               else
+                       strlcpy(buf, "-", sizeof(buf));
+
+               zlog_debug("%s: vtep %pI4, esi %s enqueued", __func__, vtep_ip,
+                          buf);
+       }
+
+       return mq_add_handler(w, rib_meta_queue_evpn_add);
+}
+
+/*
+ * Enqueue EVPN remote macip update for processing
+ */
+int zebra_rib_queue_evpn_rem_macip_add(vni_t vni, const struct ethaddr *macaddr,
+                                      const struct ipaddr *ipaddr,
+                                      uint8_t flags, uint32_t seq,
+                                      struct in_addr vtep_ip, const esi_t *esi)
+{
+       struct wq_evpn_wrapper *w;
+       char buf[ESI_STR_LEN];
+
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_evpn_wrapper));
+
+       w->type = WQ_EVPN_WRAPPER_TYPE_REM_MACIP;
+       w->add_p = true;
+       w->vni = vni;
+       w->macaddr = *macaddr;
+       w->ip = *ipaddr;
+       w->flags = flags;
+       w->seq = seq;
+       w->vtep_ip = vtep_ip;
+       w->esi = *esi;
+
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED) {
+               if (memcmp(esi, zero_esi, sizeof(esi_t)) != 0)
+                       esi_to_str(esi, buf, sizeof(buf));
+               else
+                       strlcpy(buf, "-", sizeof(buf));
+
+               zlog_debug("%s: mac %pEA, vtep %pI4, esi %s enqueued", __func__,
+                          macaddr, &vtep_ip, buf);
+       }
+
+       return mq_add_handler(w, rib_meta_queue_evpn_add);
+}
+
+int zebra_rib_queue_evpn_rem_macip_del(vni_t vni, const struct ethaddr *macaddr,
+                                      const struct ipaddr *ip,
+                                      struct in_addr vtep_ip)
+{
+       struct wq_evpn_wrapper *w;
+
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_evpn_wrapper));
+
+       w->type = WQ_EVPN_WRAPPER_TYPE_REM_MACIP;
+       w->add_p = false;
+       w->vni = vni;
+       w->macaddr = *macaddr;
+       w->ip = *ip;
+       w->vtep_ip = vtep_ip;
+
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+               zlog_debug("%s: mac %pEA, vtep %pI4 enqueued", __func__,
+                          macaddr, &vtep_ip);
+
+       return mq_add_handler(w, rib_meta_queue_evpn_add);
+}
+
+/*
+ * Enqueue remote VTEP address for processing
+ */
+int zebra_rib_queue_evpn_rem_vtep_add(vrf_id_t vrf_id, vni_t vni,
+                                     struct in_addr vtep_ip, int flood_control)
+{
+       struct wq_evpn_wrapper *w;
+
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_evpn_wrapper));
+
+       w->type = WQ_EVPN_WRAPPER_TYPE_REM_VTEP;
+       w->add_p = true;
+       w->vrf_id = vrf_id;
+       w->vni = vni;
+       w->vtep_ip = vtep_ip;
+       w->flags = flood_control;
+
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+               zlog_debug("%s: vrf %u, vtep %pI4 enqueued", __func__, vrf_id,
+                          &vtep_ip);
+
+       return mq_add_handler(w, rib_meta_queue_evpn_add);
+}
+
+int zebra_rib_queue_evpn_rem_vtep_del(vrf_id_t vrf_id, vni_t vni,
+                                     struct in_addr vtep_ip)
+{
+       struct wq_evpn_wrapper *w;
+
+       w = XCALLOC(MTYPE_WQ_WRAPPER, sizeof(struct wq_evpn_wrapper));
+
+       w->type = WQ_EVPN_WRAPPER_TYPE_REM_VTEP;
+       w->add_p = false;
+       w->vrf_id = vrf_id;
+       w->vni = vni;
+       w->vtep_ip = vtep_ip;
+
+       if (IS_ZEBRA_DEBUG_RIB_DETAILED)
+               zlog_debug("%s: vrf %u, vtep %pI4 enqueued", __func__, vrf_id,
+                          &vtep_ip);
+
+       return mq_add_handler(w, rib_meta_queue_evpn_add);
+}
+
+/* Clean up the EVPN meta-queue list */
+static void evpn_meta_queue_free(struct list *l)
+{
+       struct listnode *node;
+       struct wq_evpn_wrapper *w;
+
+       /* Free the node wrapper object, and the struct it wraps */
+       while ((node = listhead(l)) != NULL) {
+               w = node->data;
+               node->data = NULL;
+
+               XFREE(MTYPE_WQ_WRAPPER, w);
+
+               list_delete_node(l, node);
+       }
+}
+
 /* Clean up the nhg meta-queue list */
 static void nhg_meta_queue_free(struct list *l)
 {
@@ -2656,7 +2897,7 @@ static void nhg_meta_queue_free(struct list *l)
                else if (w->type == WQ_NHG_WRAPPER_TYPE_NHG)
                        zebra_nhg_free(w->u.nhe);
 
-               XFREE(MTYPE_WQ_NHG_WRAPPER, w);
+               XFREE(MTYPE_WQ_WRAPPER, w);
 
                list_delete_node(l, node);
        }
@@ -2688,6 +2929,8 @@ void meta_queue_free(struct meta_queue *mq)
                /* Some subqueues may need cleanup - nhgs for example */
                if (i == route_info[ZEBRA_ROUTE_NHG].meta_q_map)
                        nhg_meta_queue_free(mq->subq[i]);
+               else if (i == META_QUEUE_EVPN)
+                       evpn_meta_queue_free(mq->subq[i]);
 
                list_delete(&mq->subq[i]);
        }
@@ -2763,7 +3006,7 @@ rib_dest_t *zebra_rib_create_dest(struct route_node *rn)
  * dest is created on-demand by rib_link() and is kept around at least
  * as long as there are ribs hanging off it (@see rib_gc_dest()).
  *
- * Refcounting (aka "locking" throughout the GNU Zebra and Quagga code):
+ * Refcounting (aka "locking" throughout the Zebra and FRR code):
  *
  * - route_nodes: refcounted by:
  *   - dest attached to route_node:
@@ -2877,13 +3120,10 @@ void rib_delnode(struct route_node *rn, struct route_entry *re)
 
                zebra_del_import_table_entry(zvrf, rn, re);
                /* Just clean up if non main table */
-               if (IS_ZEBRA_DEBUG_RIB) {
-                       char buf[SRCDEST2STR_BUFFER];
-                       srcdest_rnode2str(rn, buf, sizeof(buf));
-                       zlog_debug("%s(%u):%s: Freeing route rn %p, re %p (%s)",
-                                  vrf_id_to_name(re->vrf_id), re->vrf_id, buf,
+               if (IS_ZEBRA_DEBUG_RIB)
+                       zlog_debug("%s(%u):%pRN: Freeing route rn %p, re %p (%s)",
+                                  vrf_id_to_name(re->vrf_id), re->vrf_id, rn,
                                   rn, re, zebra_route_string(re->type));
-               }
 
                rib_unlink(rn, re);
        } else {
@@ -3033,113 +3273,16 @@ void _route_entry_dump(const char *func, union prefixconstptr pp,
        zlog_debug("%s: dump complete", straddr);
 }
 
-/*
- * This is an exported helper to rtm_read() to dump the strange
- * RE entry found by rib_lookup_ipv4_route()
- */
-void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id)
-{
-       struct route_table *table;
-       struct route_node *rn;
-       struct route_entry *re;
-       struct vrf *vrf;
-
-       vrf = vrf_lookup_by_id(vrf_id);
-
-       /* Lookup table.  */
-       table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id);
-       if (!table) {
-               flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED,
-                        "%s:%s(%u) zebra_vrf_table() returned NULL", __func__,
-                        VRF_LOGNAME(vrf), vrf_id);
-               return;
-       }
-
-       /* Scan the RIB table for exactly matching RE entry. */
-       rn = route_node_lookup(table, (struct prefix *)p);
-
-       /* No route for this prefix. */
-       if (!rn) {
-               zlog_debug("%s:%s(%u) lookup failed for %pFX", __func__,
-                          VRF_LOGNAME(vrf), vrf_id, (struct prefix *)p);
-               return;
-       }
-
-       /* Unlock node. */
-       route_unlock_node(rn);
-
-       /* let's go */
-       RNODE_FOREACH_RE (rn, re) {
-               zlog_debug("%s:%s(%u) rn %p, re %p: %s, %s", __func__,
-                          VRF_LOGNAME(vrf), vrf_id, (void *)rn, (void *)re,
-                          (CHECK_FLAG(re->status, ROUTE_ENTRY_REMOVED)
-                                   ? "removed"
-                                   : "NOT removed"),
-                          (CHECK_FLAG(re->flags, ZEBRA_FLAG_SELECTED)
-                                   ? "selected"
-                                   : "NOT selected"));
-               route_entry_dump(p, NULL, re);
-       }
-}
-
-/* Check if requested address assignment will fail due to another
- * route being installed by zebra in FIB already. Take necessary
- * actions, if needed: remove such a route from FIB and deSELECT
- * corresponding RE entry. Then put affected RN into RIBQ head.
- */
-void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id)
-{
-       struct route_table *table;
-       struct route_node *rn;
-       rib_dest_t *dest;
-
-       if (NULL == (table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id))) {
-               struct vrf *vrf = vrf_lookup_by_id(vrf_id);
-
-               flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED,
-                        "%s:%s(%u) zebra_vrf_table() returned NULL", __func__,
-                        VRF_LOGNAME(vrf), vrf_id);
-               return;
-       }
-
-       /* No matches would be the simplest case. */
-       if (NULL == (rn = route_node_lookup(table, (struct prefix *)p)))
-               return;
-
-       /* Unlock node. */
-       route_unlock_node(rn);
-
-       dest = rib_dest_from_rnode(rn);
-       /* Check all RE entries. In case any changes have to be done, requeue
-        * the RN into RIBQ head. If the routing message about the new connected
-        * route (generated by the IP address we are going to assign very soon)
-        * comes before the RIBQ is processed, the new RE entry will join
-        * RIBQ record already on head. This is necessary for proper
-        * revalidation
-        * of the rest of the RE.
-        */
-       if (dest->selected_fib) {
-               if (IS_ZEBRA_DEBUG_RIB) {
-                       struct vrf *vrf =
-                               vrf_lookup_by_id(dest->selected_fib->vrf_id);
-
-                       zlog_debug(
-                               "%s(%u):%pFX: freeing way for connected prefix",
-                               VRF_LOGNAME(vrf), dest->selected_fib->vrf_id,
-                               &rn->p);
-                       route_entry_dump(&rn->p, NULL, dest->selected_fib);
-               }
-               rib_uninstall(rn, dest->selected_fib);
-               rib_queue_add(rn);
-       }
-}
-
 /*
  * Internal route-add implementation; there are a couple of different public
  * signatures. Callers in this path are responsible for the memory they
  * allocate: if they allocate a nexthop_group or backup nexthop info, they
  * must free those objects. If this returns < 0, an error has occurred and the
  * route_entry 're' has not been captured; the caller should free that also.
+ *
+ * -1 -> error
+ *  0 -> Add
+ *  1 -> update
  */
 int rib_add_multipath_nhe(afi_t afi, safi_t safi, struct prefix *p,
                          struct prefix_ipv6 *src_p, struct route_entry *re,
@@ -3254,11 +3397,12 @@ int rib_add_multipath_nhe(afi_t afi, safi_t safi, struct prefix *p,
 
        SET_FLAG(re->status, ROUTE_ENTRY_CHANGED);
        rib_addnode(rn, re, 1);
-       ret = 1;
 
        /* Free implicit route.*/
-       if (same)
+       if (same) {
+               ret = 1;
                rib_delnode(rn, same);
+       }
 
        /* See if we can remove some RE entries that are queued for
         * removal, but won't be considered in rib processing.
@@ -3518,7 +3662,7 @@ void rib_delete(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type,
                                               &(tmp_nh->gate.ipv6),
                                               sizeof(struct in6_addr));
                                }
-                               zebra_vxlan_evpn_vrf_route_del(re->vrf_id,
+                               zebra_rib_queue_evpn_route_del(re->vrf_id,
                                                               &vtep_ip, p);
                        }
                }
index 8f5660610f5f25f95fa45db6d265f6e99e9cd8f5..5bcfb720e17e2f00995c3bfc1462520a8b9ea970 100644 (file)
@@ -247,9 +247,7 @@ lib_route_map_entry_set_action_rmap_set_action_ipv4_src_address_modify(
        struct nb_cb_modify_args *args)
 {
        struct routemap_hook_context *rhc;
-       struct interface *pif = NULL;
        const char *source;
-       struct vrf *vrf;
        struct prefix p;
        int rv;
 
@@ -262,18 +260,6 @@ lib_route_map_entry_set_action_rmap_set_action_ipv4_src_address_modify(
                                  yang_dnode_get_string(args->dnode, NULL));
                        return NB_ERR_VALIDATION;
                }
-
-               RB_FOREACH(vrf, vrf_id_head, &vrfs_by_id) {
-                       pif = if_lookup_exact_address(&p.u.prefix4, AF_INET,
-                                                     vrf->vrf_id);
-                       if (pif != NULL)
-                               break;
-               }
-               if (pif == NULL) {
-                       zlog_warn("%s: is not a local address: %s", __func__,
-                                 yang_dnode_get_string(args->dnode, NULL));
-                       return NB_ERR_VALIDATION;
-               }
                return NB_OK;
        case NB_EV_PREPARE:
        case NB_EV_ABORT:
@@ -325,9 +311,7 @@ lib_route_map_entry_set_action_rmap_set_action_ipv6_src_address_modify(
        struct nb_cb_modify_args *args)
 {
        struct routemap_hook_context *rhc;
-       struct interface *pif = NULL;
        const char *source;
-       struct vrf *vrf;
        struct prefix p;
        int rv;
 
@@ -340,18 +324,6 @@ lib_route_map_entry_set_action_rmap_set_action_ipv6_src_address_modify(
                                  yang_dnode_get_string(args->dnode, NULL));
                        return NB_ERR_VALIDATION;
                }
-
-               RB_FOREACH(vrf, vrf_id_head, &vrfs_by_id) {
-                       pif = if_lookup_exact_address(&p.u.prefix6, AF_INET6,
-                                                     vrf->vrf_id);
-                       if (pif != NULL)
-                               break;
-               }
-               if (pif == NULL) {
-                       zlog_warn("%s: is not a local address: %s", __func__,
-                                 yang_dnode_get_string(args->dnode, NULL));
-                       return NB_ERR_VALIDATION;
-               }
                return NB_OK;
        case NB_EV_PREPARE:
        case NB_EV_ABORT:
index 97935f126e8399b9eb295a4e76f20166b800ed7f..d2b91b6c07e1e71d373f004c217db77ee445b78b 100644 (file)
@@ -320,10 +320,14 @@ static int zebra_sr_config(struct vty *vty)
                        vty_out(vty, "   locator %s\n", locator->name);
                        vty_out(vty, "    prefix %s/%u\n", str,
                                locator->prefix.prefixlen);
+                       vty_out(vty, "   exit\n");
                        vty_out(vty, "   !\n");
                }
+               vty_out(vty, "  exit\n");
                vty_out(vty, "  !\n");
+               vty_out(vty, " exit\n");
                vty_out(vty, " !\n");
+               vty_out(vty, "exit\n");
                vty_out(vty, "!\n");
        }
        return 0;
index 2430b519892b476128b62dbb81c285e34dd0001e..4fbcc6f596479de406eabcdf9fe86bf793cac1fb 100644 (file)
@@ -41,6 +41,9 @@
 #include "zebra/zebra_vxlan.h"
 #include "zebra/zebra_netns_notify.h"
 #include "zebra/zebra_routemap.h"
+#ifndef VTYSH_EXTRACT_PL
+#include "zebra/zebra_vrf_clippy.c"
+#endif
 
 static void zebra_vrf_table_create(struct zebra_vrf *zvrf, afi_t afi,
                                   safi_t safi);
@@ -521,18 +524,81 @@ static int vrf_config_write(struct vty *vty)
                router_id_write(vty, zvrf);
 
                if (zvrf_id(zvrf) != VRF_DEFAULT)
-                       vty_endframe(vty, " exit-vrf\n!\n");
+                       vty_endframe(vty, "exit-vrf\n!\n");
                else
                        vty_out(vty, "!\n");
        }
        return 0;
 }
 
+DEFPY (vrf_netns,
+       vrf_netns_cmd,
+       "netns NAME$netns_name",
+       "Attach VRF to a Namespace\n"
+       "The file name in " NS_RUN_DIR ", or a full pathname\n")
+{
+       char *pathname = ns_netns_pathname(vty, netns_name);
+       int ret;
+
+       VTY_DECLVAR_CONTEXT(vrf, vrf);
+
+       if (!pathname)
+               return CMD_WARNING_CONFIG_FAILED;
+
+       frr_with_privs(&zserv_privs) {
+               ret = vrf_netns_handler_create(vty, vrf, pathname,
+                                              NS_UNKNOWN,
+                                              NS_UNKNOWN,
+                                              NS_UNKNOWN);
+       }
+
+       return ret;
+}
+
+DEFUN (no_vrf_netns,
+       no_vrf_netns_cmd,
+       "no netns [NAME]",
+       NO_STR
+       "Detach VRF from a Namespace\n"
+       "The file name in " NS_RUN_DIR ", or a full pathname\n")
+{
+       struct ns *ns = NULL;
+
+       VTY_DECLVAR_CONTEXT(vrf, vrf);
+
+       if (!vrf_is_backend_netns()) {
+               vty_out(vty, "VRF backend is not Netns. Aborting\n");
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+       if (!vrf->ns_ctxt) {
+               vty_out(vty, "VRF %s(%u) is not configured with NetNS\n",
+                       vrf->name, vrf->vrf_id);
+               return CMD_WARNING_CONFIG_FAILED;
+       }
+
+       ns = (struct ns *)vrf->ns_ctxt;
+
+       ns->vrf_ctxt = NULL;
+       vrf_disable(vrf);
+       /* vrf ID from VRF is necessary for Zebra
+        * so that propagate to other clients is done
+        */
+       ns_delete(ns);
+       vrf->ns_ctxt = NULL;
+       return CMD_SUCCESS;
+}
+
 /* Zebra VRF initialization. */
 void zebra_vrf_init(void)
 {
        vrf_init(zebra_vrf_new, zebra_vrf_enable, zebra_vrf_disable,
                 zebra_vrf_delete, zebra_vrf_update);
 
-       vrf_cmd_init(vrf_config_write, &zserv_privs);
+       vrf_cmd_init(vrf_config_write);
+
+       if (vrf_is_backend_netns() && ns_have_netns()) {
+               /* Install NS commands. */
+               install_element(VRF_NODE, &vrf_netns_cmd);
+               install_element(VRF_NODE, &no_vrf_netns_cmd);
+       }
 }
index 57dd0c20ad7d37e5365f467ba8f68177f886f947..f32f09850b6a129e8379489d0a2b0abf7d9d5320 100644 (file)
@@ -105,6 +105,7 @@ struct zebra_vrf {
 
        /* MPLS Label to handle L3VPN <-> vrf popping */
        mpls_label_t label[AFI_MAX];
+       uint8_t label_proto[AFI_MAX];
 
        /* MPLS static LSP config table */
        struct hash *slsp_table;
index 2f3ea7475a008b49ca536b81c325a4c42d7809b0..2fcaefdfbf7d2eec8220dc09111595796ed57b19 100644 (file)
@@ -150,9 +150,28 @@ static int host_rb_entry_compare(const struct host_rb_entry *hle1,
                return memcmp(&hle1->p.u.prefix6, &hle2->p.u.prefix6,
                              IPV6_MAX_BYTELEN);
        } else if (hle1->p.family == AF_EVPN) {
-               /* a single dummy prefix of route_type BGP_EVPN_AD_ROUTE is
-                * used for all nexthops associated with a non-zero ESI
+               uint8_t family1;
+               uint8_t family2;
+
+               /* two (v4/v6) dummy prefixes of route_type BGP_EVPN_AD_ROUTE
+                * are used for all nexthops associated with a non-zero ESI
                 */
+               family1 = is_evpn_prefix_ipaddr_v4(
+                                 (const struct prefix_evpn *)&hle1->p)
+                                 ? AF_INET
+                                 : AF_INET6;
+               family2 = is_evpn_prefix_ipaddr_v4(
+                                 (const struct prefix_evpn *)&hle2->p)
+                                 ? AF_INET
+                                 : AF_INET6;
+
+
+               if (family1 < family2)
+                       return -1;
+
+               if (family1 > family2)
+                       return 1;
+
                return 0;
        } else {
                zlog_debug("%s: Unexpected family type: %d", __func__,
@@ -366,8 +385,6 @@ static void zl3vni_print_rmac(zebra_mac_t *zrmac, struct vty *vty,
                                                 buf1, sizeof(buf1)));
                json_object_int_add(json, "refCount",
                                    rb_host_count(&zrmac->host_rb));
-               json_object_int_add(json, "localSequence", zrmac->loc_seq);
-               json_object_int_add(json, "remoteSequence", zrmac->rem_seq);
                RB_FOREACH (hle, host_rb_tree_entry, &zrmac->host_rb)
                        json_object_array_add(
                                json_hosts,
@@ -3820,10 +3837,6 @@ void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS)
        uint16_t l = 0, ipa_len;
        char buf1[INET6_ADDRSTRLEN];
 
-       memset(&macaddr, 0, sizeof(struct ethaddr));
-       memset(&ip, 0, sizeof(struct ipaddr));
-       memset(&vtep_ip, 0, sizeof(struct in_addr));
-
        s = msg;
 
        while (l < hdr->length) {
@@ -3844,7 +3857,8 @@ void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS)
                                ipaddr2str(&ip, buf1, sizeof(buf1)) : "",
                                &vtep_ip, zebra_route_string(client->proto));
 
-               process_remote_macip_del(vni, &macaddr, ipa_len, &ip, vtep_ip);
+               /* Enqueue to workqueue for processing */
+               zebra_rib_queue_evpn_rem_macip_del(vni, &macaddr, &ip, vtep_ip);
        }
 
 stream_failure:
@@ -3870,10 +3884,6 @@ void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS)
        esi_t esi;
        char esi_buf[ESI_STR_LEN];
 
-       memset(&macaddr, 0, sizeof(struct ethaddr));
-       memset(&ip, 0, sizeof(struct ipaddr));
-       memset(&vtep_ip, 0, sizeof(struct in_addr));
-
        if (!EVPN_ENABLED(zvrf)) {
                zlog_debug("EVPN not enabled, ignoring remote MACIP ADD");
                return;
@@ -3882,6 +3892,7 @@ void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS)
        s = msg;
 
        while (l < hdr->length) {
+
                int res_length = zebra_vxlan_remote_macip_helper(
                        true, s, &vni, &macaddr, &ipa_len, &ip, &vtep_ip,
                        &flags, &seq, &esi);
@@ -3907,8 +3918,9 @@ void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS)
                                zebra_route_string(client->proto));
                }
 
-               process_remote_macip_add(vni, &macaddr, ipa_len, &ip,
-                                        flags, seq, vtep_ip, &esi);
+               /* Enqueue to workqueue for processing */
+               zebra_rib_queue_evpn_rem_macip_add(vni, &macaddr, &ip, flags,
+                                                  seq, vtep_ip, &esi);
        }
 
 stream_failure:
@@ -4204,27 +4216,23 @@ int zebra_vxlan_local_mac_add_update(struct interface *ifp,
 /*
  * Handle message from client to delete a remote VTEP for an EVPN.
  */
-void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS)
+void zebra_vxlan_remote_vtep_del_zapi(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        unsigned short l = 0;
        vni_t vni;
        struct in_addr vtep_ip;
-       zebra_evpn_t *zevpn;
-       zebra_vtep_t *zvtep;
-       struct interface *ifp;
-       struct zebra_if *zif;
 
        if (!is_evpn_enabled()) {
                zlog_debug(
-                       "%s: EVPN is not enabled yet we have received a vtep del command",
+                       "%s: EVPN is not enabled yet we have received a VTEP DEL msg",
                        __func__);
                return;
        }
 
        if (!EVPN_ENABLED(zvrf)) {
-               zlog_debug("Recv MACIP DEL for non-EVPN VRF %u",
-                         zvrf_id(zvrf));
+               zlog_debug("Recv VTEP DEL zapi for non-EVPN VRF %u",
+                          zvrf_id(zvrf));
                return;
        }
 
@@ -4244,76 +4252,182 @@ void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS)
                l += 4;
 
                if (IS_ZEBRA_DEBUG_VXLAN)
-                       zlog_debug("Recv VTEP_DEL %pI4 VNI %u from %s",
+                       zlog_debug("Recv VTEP DEL %pI4 VNI %u from %s",
                                   &vtep_ip, vni,
                                   zebra_route_string(client->proto));
 
-               /* Locate VNI hash entry - expected to exist. */
-               zevpn = zebra_evpn_lookup(vni);
-               if (!zevpn) {
-                       if (IS_ZEBRA_DEBUG_VXLAN)
-                               zlog_debug(
-                                       "Failed to locate VNI hash upon remote VTEP DEL, VNI %u",
-                                       vni);
-                       continue;
-               }
+               /* Enqueue for processing */
+               zebra_rib_queue_evpn_rem_vtep_del(zvrf_id(zvrf), vni, vtep_ip);
+       }
 
-               ifp = zevpn->vxlan_if;
-               if (!ifp) {
+stream_failure:
+       return;
+}
+
+/*
+ * Handle message from client to delete a remote VTEP for an EVPN.
+ */
+void zebra_vxlan_remote_vtep_del(vrf_id_t vrf_id, vni_t vni,
+                                struct in_addr vtep_ip)
+{
+       zebra_evpn_t *zevpn;
+       zebra_vtep_t *zvtep;
+       struct interface *ifp;
+       struct zebra_if *zif;
+       struct zebra_vrf *zvrf;
+
+       if (!is_evpn_enabled()) {
+               zlog_debug("%s: Can't process vtep del: EVPN is not enabled",
+                          __func__);
+               return;
+       }
+
+       zvrf = zebra_vrf_lookup_by_id(vrf_id);
+       if (!zvrf)
+               return;
+
+       if (!EVPN_ENABLED(zvrf)) {
+               zlog_debug("Can't process VTEP DEL for non-EVPN VRF %u",
+                          zvrf_id(zvrf));
+               return;
+       }
+
+       /* Locate VNI hash entry - expected to exist. */
+       zevpn = zebra_evpn_lookup(vni);
+       if (!zevpn) {
+               if (IS_ZEBRA_DEBUG_VXLAN)
                        zlog_debug(
-                               "VNI %u hash %p doesn't have intf upon remote VTEP DEL",
-                               zevpn->vni, zevpn);
-                       continue;
-               }
-               zif = ifp->info;
+                               "Failed to locate VNI hash for remote VTEP DEL, VNI %u",
+                               vni);
+               return;
+       }
 
-               /* If down or not mapped to a bridge, we're done. */
-               if (!if_is_operative(ifp) || !zif->brslave_info.br_if)
-                       continue;
+       ifp = zevpn->vxlan_if;
+       if (!ifp) {
+               zlog_debug(
+                       "VNI %u hash %p doesn't have intf upon remote VTEP DEL",
+                       zevpn->vni, zevpn);
+               return;
+       }
+       zif = ifp->info;
 
-               /* If the remote VTEP does not exist, there's nothing more to
-                * do.
-                * Otherwise, uninstall any remote MACs pointing to this VTEP
-                * and
-                * then, the VTEP entry itself and remove it.
-                */
-               zvtep = zebra_evpn_vtep_find(zevpn, &vtep_ip);
-               if (!zvtep)
-                       continue;
+       /* If down or not mapped to a bridge, we're done. */
+       if (!if_is_operative(ifp) || !zif->brslave_info.br_if)
+               return;
+
+       /* If the remote VTEP does not exist, there's nothing more to
+        * do.
+        * Otherwise, uninstall any remote MACs pointing to this VTEP
+        * and then, the VTEP entry itself and remove it.
+        */
+       zvtep = zebra_evpn_vtep_find(zevpn, &vtep_ip);
+       if (!zvtep)
+               return;
+
+       zebra_evpn_vtep_uninstall(zevpn, &vtep_ip);
+       zebra_evpn_vtep_del(zevpn, zvtep);
+}
 
-               zebra_evpn_vtep_uninstall(zevpn, &vtep_ip);
-               zebra_evpn_vtep_del(zevpn, zvtep);
+/*
+ * Handle message from client to add a remote VTEP for an EVPN.
+ */
+void zebra_vxlan_remote_vtep_add(vrf_id_t vrf_id, vni_t vni,
+                                struct in_addr vtep_ip, int flood_control)
+{
+       zebra_evpn_t *zevpn;
+       struct interface *ifp;
+       struct zebra_if *zif;
+       zebra_vtep_t *zvtep;
+       struct zebra_vrf *zvrf;
+
+       if (!is_evpn_enabled()) {
+               zlog_debug("%s: EVPN not enabled: can't process a VTEP ADD",
+                          __func__);
+               return;
        }
 
-stream_failure:
-       return;
+       zvrf = zebra_vrf_lookup_by_id(vrf_id);
+       if (!zvrf)
+               return;
+
+       if (!EVPN_ENABLED(zvrf)) {
+               zlog_debug("Can't process VTEP ADD for non-EVPN VRF %u",
+                          zvrf_id(zvrf));
+               return;
+       }
+
+       /* Locate VNI hash entry - expected to exist. */
+       zevpn = zebra_evpn_lookup(vni);
+       if (!zevpn) {
+               flog_err(
+                       EC_ZEBRA_VTEP_ADD_FAILED,
+                       "Failed to locate EVPN hash upon remote VTEP ADD, VNI %u",
+                       vni);
+               return;
+       }
+
+       ifp = zevpn->vxlan_if;
+       if (!ifp) {
+               flog_err(
+                       EC_ZEBRA_VTEP_ADD_FAILED,
+                       "VNI %u hash %p doesn't have intf upon remote VTEP ADD",
+                       zevpn->vni, zevpn);
+               return;
+       }
+
+       zif = ifp->info;
+
+       /* If down or not mapped to a bridge, we're done. */
+       if (!if_is_operative(ifp) || !zif->brslave_info.br_if)
+               return;
+
+       zvtep = zebra_evpn_vtep_find(zevpn, &vtep_ip);
+       if (zvtep) {
+               /* If the remote VTEP already exists check if
+                * the flood mode has changed
+                */
+               if (zvtep->flood_control != flood_control) {
+                       if (zvtep->flood_control == VXLAN_FLOOD_DISABLED)
+                               /* old mode was head-end-replication but
+                                * is no longer; get rid of the HER fdb
+                                * entry installed before
+                                */
+                               zebra_evpn_vtep_uninstall(zevpn, &vtep_ip);
+                       zvtep->flood_control = flood_control;
+                       zebra_evpn_vtep_install(zevpn, zvtep);
+               }
+       } else {
+               zvtep = zebra_evpn_vtep_add(zevpn, &vtep_ip, flood_control);
+               if (zvtep)
+                       zebra_evpn_vtep_install(zevpn, zvtep);
+               else
+                       flog_err(EC_ZEBRA_VTEP_ADD_FAILED,
+                                "Failed to add remote VTEP, VNI %u zevpn %p",
+                                vni, zevpn);
+       }
 }
 
 /*
  * Handle message from client to add a remote VTEP for an EVPN.
  */
-void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS)
+void zebra_vxlan_remote_vtep_add_zapi(ZAPI_HANDLER_ARGS)
 {
        struct stream *s;
        unsigned short l = 0;
        vni_t vni;
        struct in_addr vtep_ip;
-       zebra_evpn_t *zevpn;
-       struct interface *ifp;
-       struct zebra_if *zif;
        int flood_control;
-       zebra_vtep_t *zvtep;
 
        if (!is_evpn_enabled()) {
                zlog_debug(
-                       "%s: EVPN not enabled yet we received a vtep_add zapi call",
+                       "%s: EVPN not enabled yet we received a VTEP ADD zapi msg",
                        __func__);
                return;
        }
 
        if (!EVPN_ENABLED(zvrf)) {
-               zlog_debug("Recv MACIP ADD for non-EVPN VRF %u",
-                         zvrf_id(zvrf));
+               zlog_debug("Recv VTEP ADD zapi for non-EVPN VRF %u",
+                          zvrf_id(zvrf));
                return;
        }
 
@@ -4328,62 +4442,13 @@ void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS)
                l += IPV4_MAX_BYTELEN + 4;
 
                if (IS_ZEBRA_DEBUG_VXLAN)
-                       zlog_debug("Recv VTEP_ADD %pI4 VNI %u flood %d from %s",
-                                       &vtep_ip, vni, flood_control,
-                                       zebra_route_string(client->proto));
-
-               /* Locate VNI hash entry - expected to exist. */
-               zevpn = zebra_evpn_lookup(vni);
-               if (!zevpn) {
-                       flog_err(
-                               EC_ZEBRA_VTEP_ADD_FAILED,
-                               "Failed to locate EVPN hash upon remote VTEP ADD, VNI %u",
-                               vni);
-                       continue;
-               }
-
-               ifp = zevpn->vxlan_if;
-               if (!ifp) {
-                       flog_err(
-                               EC_ZEBRA_VTEP_ADD_FAILED,
-                               "VNI %u hash %p doesn't have intf upon remote VTEP ADD",
-                               zevpn->vni, zevpn);
-                       continue;
-               }
-
-               zif = ifp->info;
-
-               /* If down or not mapped to a bridge, we're done. */
-               if (!if_is_operative(ifp) || !zif->brslave_info.br_if)
-                       continue;
+                       zlog_debug("Recv VTEP ADD %pI4 VNI %u flood %d from %s",
+                                  &vtep_ip, vni, flood_control,
+                                  zebra_route_string(client->proto));
 
-               zvtep = zebra_evpn_vtep_find(zevpn, &vtep_ip);
-               if (zvtep) {
-                       /* If the remote VTEP already exists check if
-                        * the flood mode has changed
-                        */
-                       if (zvtep->flood_control != flood_control) {
-                               if (zvtep->flood_control
-                                               == VXLAN_FLOOD_DISABLED)
-                                       /* old mode was head-end-replication but
-                                        * is no longer; get rid of the HER fdb
-                                        * entry installed before
-                                        */
-                                       zebra_evpn_vtep_uninstall(zevpn,
-                                                                 &vtep_ip);
-                               zvtep->flood_control = flood_control;
-                               zebra_evpn_vtep_install(zevpn, zvtep);
-                       }
-               } else {
-                       zvtep = zebra_evpn_vtep_add(zevpn, &vtep_ip,
-                                                   flood_control);
-                       if (zvtep)
-                               zebra_evpn_vtep_install(zevpn, zvtep);
-                       else
-                               flog_err(EC_ZEBRA_VTEP_ADD_FAILED,
-                                       "Failed to add remote VTEP, VNI %u zevpn %p",
-                                       vni, zevpn);
-               }
+               /* Enqueue for processing */
+               zebra_rib_queue_evpn_rem_vtep_add(zvrf_id(zvrf), vni, vtep_ip,
+                                                 flood_control);
        }
 
 stream_failure:
@@ -4398,7 +4463,7 @@ stream_failure:
  *  3. vrr interface (MACVLAN) associated to a SVI
  * We advertise macip routes for an interface if it is associated to VxLan vlan
  */
-int zebra_vxlan_add_del_gw_macip(struct interface *ifp, struct prefix *p,
+int zebra_vxlan_add_del_gw_macip(struct interface *ifp, const struct prefix *p,
                                 int add)
 {
        struct ipaddr ip;
index 24de8ff04ee1f814de96979b20fcfdab8333e597..915e987b6bbd8b57d1c899b2e2d33e89575030a5 100644 (file)
@@ -72,8 +72,12 @@ is_vxlan_flooding_head_end(void)
 /* ZAPI message handlers */
 extern void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS);
 extern void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS);
-extern void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS);
-extern void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_remote_vtep_add_zapi(ZAPI_HANDLER_ARGS);
+extern void zebra_vxlan_remote_vtep_del_zapi(ZAPI_HANDLER_ARGS);
+void zebra_vxlan_remote_vtep_add(vrf_id_t vrf_id, vni_t vni,
+                                struct in_addr vtep_ip, int flood_control);
+extern void zebra_vxlan_remote_vtep_del(vrf_id_t vrf_id, vni_t vni,
+                                       struct in_addr vtep_ip);
 extern void zebra_vxlan_flood_control(ZAPI_HANDLER_ARGS);
 extern void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS);
 extern void zebra_vxlan_advertise_svi_macip(ZAPI_HANDLER_ARGS);
@@ -157,8 +161,8 @@ extern void zebra_vxlan_print_nh_all_l3vni(struct vty *vty, bool use_json);
 extern void zebra_vxlan_print_l3vni(struct vty *vty, vni_t vni, bool use_json);
 extern void zebra_vxlan_print_vrf_vni(struct vty *vty, struct zebra_vrf *zvrf,
                                      json_object *json_vrfs);
-extern int zebra_vxlan_add_del_gw_macip(struct interface *ifp, struct prefix *p,
-                                       int add);
+extern int zebra_vxlan_add_del_gw_macip(struct interface *ifp,
+                                       const struct prefix *p, int add);
 extern int zebra_vxlan_svi_up(struct interface *ifp, struct interface *link_if);
 extern int zebra_vxlan_svi_down(struct interface *ifp,
                                struct interface *link_if);
index 1d94fcae6bbd6e06312facb1c54eff355748a9c3..e4a48093f7cbb53cdfb89f1de7a88f83d5953793 100644 (file)
@@ -595,6 +595,8 @@ static void zserv_client_free(struct zserv *client)
                close(client->sock);
 
                if (DYNAMIC_CLIENT_GR_DISABLED(client)) {
+                       zebra_mpls_client_cleanup_vrf_label(client->proto);
+
                        nroutes = rib_score_proto(client->proto,
                                                  client->instance);
                        zlog_notice(