zebra: Move max-multipath state value to state

The original max-multipath state value was
put down in the middle of the config section.
It really belongs in the state, so let's move
it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2025-03-04 17:18:27 -05:00
parent d05b45a414
commit 1fb9f129de
4 changed files with 14 additions and 15 deletions

View file

@ -48,13 +48,13 @@ def test_zebra_operationalr(tgen):
r1 = tgen.gears["r1"]
output = json.loads(r1.vtysh_cmd("show mgmt get-data /frr-zebra:zebra"))
output = json.loads(r1.vtysh_cmd("show mgmt get-data /frr-zebra:zebra/state"))
logger.info("Output")
logger.info(output)
logger.info("Ensuring that the max-multipath value is returned")
assert "max-multipath" in output["frr-zebra:zebra"].keys()
assert "max-multipath" in output["frr-zebra:zebra"]["state"].keys()
logger.info("Checking IP forwarding states")
state = output["frr-zebra:zebra"]["state"]

View file

@ -3080,17 +3080,6 @@ module frr-zebra {
container zebra {
description
"Data model for the Zebra daemon.";
leaf max-multipath {
type uint16 {
range "1..65535";
}
config false;
description
"The maximum number of nexthops for a route. At this point it
is unlikely that a multipath number will ever get larger then
1024 but to allow for future expansions, the yang returns a
16 bit number";
}
leaf ip-forwarding {
type boolean;
description
@ -3193,6 +3182,16 @@ module frr-zebra {
config false;
description
"Operational data.";
leaf max-multipath {
type uint16 {
range "1..65535";
}
description
"The maximum number of nexthops for a route. At this point it
is unlikely that a multipath number will ever get larger then
1024 but to allow for future expansions, the yang returns a
16 bit number";
}
leaf ip-forwarding {
type boolean;
description

View file

@ -26,7 +26,7 @@ const struct frr_yang_module_info frr_zebra_info = {
.features = features,
.nodes = {
{
.xpath = "/frr-zebra:zebra/max-multipath",
.xpath = "/frr-zebra:zebra/state/max-multipath",
.cbs = {
.get_elem = zebra_max_multipath_get_elem,
}

View file

@ -1165,7 +1165,7 @@ lib_vrf_zebra_ribs_rib_route_route_entry_nexthop_group_nexthop_weight_get_elem(
/*
* XPath:
* /frr-zebra:zebra/max-multipath
* /frr-zebra:zebra/state/max-multipath
*/
struct yang_data *zebra_max_multipath_get_elem(struct nb_cb_get_elem_args *args)
{