Skip to content

Commit 2371561

Browse files
committed
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 <[email protected]>
1 parent 6d9873f commit 2371561

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

tests/topotests/zebra_operational_data/test_zebra_operational.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ def test_zebra_operationalr(tgen):
4848

4949
r1 = tgen.gears["r1"]
5050

51-
output = json.loads(r1.vtysh_cmd("show mgmt get-data /frr-zebra:zebra"))
51+
output = json.loads(r1.vtysh_cmd("show mgmt get-data /frr-zebra:zebra/state"))
5252

5353
logger.info("Output")
5454
logger.info(output)
5555

5656
logger.info("Ensuring that the max-multipath value is returned")
57-
assert "max-multipath" in output["frr-zebra:zebra"].keys()
57+
assert "max-multipath" in output["frr-zebra:zebra"]["state"].keys()
5858

5959
logger.info("Checking IP forwarding states")
6060
state = output["frr-zebra:zebra"]["state"]

yang/frr-zebra.yang

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3080,17 +3080,6 @@ module frr-zebra {
30803080
container zebra {
30813081
description
30823082
"Data model for the Zebra daemon.";
3083-
leaf max-multipath {
3084-
type uint16 {
3085-
range "1..65535";
3086-
}
3087-
config false;
3088-
description
3089-
"The maximum number of nexthops for a route. At this point it
3090-
is unlikely that a multipath number will ever get larger then
3091-
1024 but to allow for future expansions, the yang returns a
3092-
16 bit number";
3093-
}
30943083
leaf ip-forwarding {
30953084
type boolean;
30963085
description
@@ -3193,6 +3182,16 @@ module frr-zebra {
31933182
config false;
31943183
description
31953184
"Operational data.";
3185+
leaf max-multipath {
3186+
type uint16 {
3187+
range "1..65535";
3188+
}
3189+
description
3190+
"The maximum number of nexthops for a route. At this point it
3191+
is unlikely that a multipath number will ever get larger then
3192+
1024 but to allow for future expansions, the yang returns a
3193+
16 bit number";
3194+
}
31963195
leaf ip-forwarding {
31973196
type boolean;
31983197
description

zebra/zebra_nb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const struct frr_yang_module_info frr_zebra_info = {
2626
.features = features,
2727
.nodes = {
2828
{
29-
.xpath = "/frr-zebra:zebra/max-multipath",
29+
.xpath = "/frr-zebra:zebra/state/max-multipath",
3030
.cbs = {
3131
.get_elem = zebra_max_multipath_get_elem,
3232
}

zebra/zebra_nb_state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ lib_vrf_zebra_ribs_rib_route_route_entry_nexthop_group_nexthop_weight_get_elem(
11771177

11781178
/*
11791179
* XPath:
1180-
* /frr-zebra:zebra/max-multipath
1180+
* /frr-zebra:zebra/state/max-multipath
11811181
*/
11821182
struct yang_data *zebra_max_multipath_get_elem(struct nb_cb_get_elem_args *args)
11831183
{

0 commit comments

Comments
 (0)