diff options
Diffstat (limited to 'staticd/static_vrf.c')
| -rw-r--r-- | staticd/static_vrf.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/staticd/static_vrf.c b/staticd/static_vrf.c index 740d904690..4bea3075c9 100644 --- a/staticd/static_vrf.c +++ b/staticd/static_vrf.c @@ -23,11 +23,11 @@ #include "nexthop.h" #include "table.h" #include "srcdest_table.h" +#include "northbound_cli.h" #include "static_vrf.h" #include "static_routes.h" #include "static_zebra.h" -#include "static_vty.h" DEFINE_MTYPE_STATIC(STATIC, STATIC_RTABLE_INFO, "Static Route Table Info"); @@ -150,24 +150,16 @@ struct static_vrf *static_vrf_lookup_by_name(const char *name) static int static_vrf_config_write(struct vty *vty) { - struct vrf *vrf; - - RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) { - if (vrf->vrf_id != VRF_DEFAULT) - vty_frame(vty, "vrf %s\n", vrf->name); + struct lyd_node *dnode; + int written = 0; - static_config(vty, vrf->info, AFI_IP, - SAFI_UNICAST, "ip route"); - static_config(vty, vrf->info, AFI_IP, - SAFI_MULTICAST, "ip mroute"); - static_config(vty, vrf->info, AFI_IP6, - SAFI_UNICAST, "ipv6 route"); - - if (vrf->vrf_id != VRF_DEFAULT) - vty_endframe(vty, "exit-vrf\n!\n"); + dnode = yang_dnode_get(running_config->dnode, "/frr-routing:routing"); + if (dnode) { + nb_cli_show_dnode_cmds(vty, dnode, false); + written = 1; } - return 0; + return written; } void static_vrf_init(void) |
