summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2020-04-06 14:20:43 -0700
committerSantosh P K <sapk@vmware.com>2020-04-16 08:58:09 -0700
commit7225e61cca4aea7f75d1625be46f161916d74f3d (patch)
tree808e7b4705817851d5127f3aae31ecfce2006b6a
parentd9d6232fb612a01e40cef93b8ff8d9ddfeffa538 (diff)
zebra: add weight to nb conversion
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
-rw-r--r--zebra/zebra_nb.c6
-rw-r--r--zebra/zebra_nb.h3
-rw-r--r--zebra/zebra_nb_state.c12
3 files changed, 21 insertions, 0 deletions
diff --git a/zebra/zebra_nb.c b/zebra/zebra_nb.c
index e64eaa2efc..1f3468d6dc 100644
--- a/zebra/zebra_nb.c
+++ b/zebra/zebra_nb.c
@@ -680,6 +680,12 @@ const struct frr_yang_module_info frr_zebra_info = {
}
},
{
+ .xpath = "/frr-vrf:lib/vrf/frr-zebra:ribs/rib/route/route-entry/nexthop-group/frr-nexthops/nexthop/weight",
+ .cbs = {
+ .get_elem = lib_vrf_ribs_rib_route_route_entry_nexthop_group_frr_nexthops_nexthop_weight_get_elem,
+ }
+ },
+ {
.xpath = NULL,
},
}
diff --git a/zebra/zebra_nb.h b/zebra/zebra_nb.h
index c83fb87f77..01a44e5525 100644
--- a/zebra/zebra_nb.h
+++ b/zebra/zebra_nb.h
@@ -481,5 +481,8 @@ lib_vrf_ribs_rib_route_route_entry_nexthop_group_frr_nexthops_nexthop_active_get
struct yang_data *
lib_vrf_ribs_rib_route_route_entry_nexthop_group_frr_nexthops_nexthop_fib_get_elem(
const char *xpath, const void *list_entry);
+struct yang_data *
+lib_vrf_ribs_rib_route_route_entry_nexthop_group_frr_nexthops_nexthop_weight_get_elem(
+ const char *xpath, const void *list_entry);
#endif
diff --git a/zebra/zebra_nb_state.c b/zebra/zebra_nb_state.c
index 788998106e..9036bdf0f6 100644
--- a/zebra/zebra_nb_state.c
+++ b/zebra/zebra_nb_state.c
@@ -623,3 +623,15 @@ lib_vrf_ribs_rib_route_route_entry_nexthop_group_frr_nexthops_nexthop_fib_get_el
/* TODO: implement me. */
return NULL;
}
+
+/*
+ * XPath:
+ * /frr-vrf:lib/vrf/frr-zebra:ribs/rib/route/route-entry/nexthop-group/frr-nexthops/nexthop/weight
+ */
+struct yang_data *
+lib_vrf_ribs_rib_route_route_entry_nexthop_group_frr_nexthops_nexthop_weight_get_elem(
+ const char *xpath, const void *list_entry)
+{
+ /* TODO: implement me. */
+ return NULL;
+}