diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-15 01:11:15 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-03-16 17:25:49 +0300 | 
| commit | 6c380957494506d3ef62c2244265a91dff5611dc (patch) | |
| tree | 416e49eafa5272e7169a9ca91446c7f8df08d9f1 /zebra/zebra_nb_state.c | |
| parent | 4ba756ed9cf95ba278e940e6c959f1987112e87b (diff) | |
zebra: make ribs config false
Zebra routing tables are not controlled by the user and can not be
created/deleted manually. Current NB create/destroy callbacks are
incorrectly implemented because instead of creating/deleting the RIB
they are only checking for it's existence. YANG model should reflect
the real situation.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/zebra_nb_state.c')
| -rw-r--r-- | zebra/zebra_nb_state.c | 23 | 
1 files changed, 23 insertions, 0 deletions
diff --git a/zebra/zebra_nb_state.c b/zebra/zebra_nb_state.c index 21c89f64ed..a9cb096aee 100644 --- a/zebra/zebra_nb_state.c +++ b/zebra/zebra_nb_state.c @@ -214,6 +214,29 @@ lib_vrf_zebra_ribs_rib_lookup_entry(struct nb_cb_lookup_entry_args *args)  }  /* + * XPath: /frr-vrf:lib/vrf/frr-zebra:zebra/ribs/rib/afi-safi-name + */ +struct yang_data * +lib_vrf_zebra_ribs_rib_afi_safi_name_get_elem(struct nb_cb_get_elem_args *args) +{ +	const struct zebra_router_table *zrt = args->list_entry; + +	return yang_data_new_string(args->xpath, +		yang_afi_safi_value2identity(zrt->afi, zrt->safi)); +} + +/* + * XPath: /frr-vrf:lib/vrf/frr-zebra:zebra/ribs/rib/table-id + */ +struct yang_data * +lib_vrf_zebra_ribs_rib_table_id_get_elem(struct nb_cb_get_elem_args *args) +{ +	const struct zebra_router_table *zrt = args->list_entry; + +	return yang_data_new_uint32(args->xpath, zrt->tableid); +} + +/*   * XPath: /frr-vrf:lib/vrf/frr-zebra:zebra/ribs/rib/route   */  const void *  | 
