frr icon indicating copy to clipboard operation
frr copied to clipboard

tests, zebra: rename nexthop-group depends dependends

Open louis-6wind opened this issue 1 year ago • 3 comments

The hierarchy between next-hop groups in the "show nexthop-group rib"
output can be challenging to understand. The terms "depends" and
"dependents" refer to child and parent next-hop groups, respectively.

r1# show nexthop-group rib 181818168
ID: 181818168 (sharp)
RefCnt: 1
Uptime: 00:06:42
VRF: default
Depends: (96) (97)
via 1.1.1.1 (vrf default) inactive, weight 1
via 1.1.1.2 (vrf default) inactive, weight 1
r1# show nexthop-group rib 96
ID: 96 (sharp)
RefCnt: 2
Uptime: 00:06:59
VRF: default
via 1.1.1.1 (vrf default) inactive, weight 1
Dependents: (181818168)

Rename "Depends" and "Dependents" to child and parent.

r1# show nexthop-group rib 181818168
ID: 181818168 (sharp)
RefCnt: 1
Uptime: 00:06:42
VRF: default
Child groups: (96) (97)
via 1.1.1.1 (vrf default) inactive, weight 1
via 1.1.1.2 (vrf default) inactive, weight 1
r1# show nexthop-group rib 96
ID: 96 (sharp)
RefCnt: 2
Uptime: 00:06:59
VRF: default
via 1.1.1.1 (vrf default) inactive, weight 1
Parent groups: (181818168)

Also rename the code

louis-6wind avatar Jun 19 '24 16:06 louis-6wind

umm - instead of hundreds of lines of change, maybe just offer a revision to the cli output strings?

IMO, the code is also confusing

louis-6wind avatar Jun 20 '24 13:06 louis-6wind

ci:rerun

louis-6wind avatar Jun 21 '24 08:06 louis-6wind

No, this just doesn't make sense to me. it's too bad that you find the code confusing - it is complicated. but renaming some things isn't going to make it any easier to understand. if we diverge from the existing released branches, we'll have ongoing trouble backporting. and frankly - "parent" and "child" aren't correct terms. you've decided that the "parent" is the thing that is composed of several "children" - but in fact the "children" form the "parent" - the parent only exists as a container for the "child" singleton nhgs, and consists of nothing other than a list of "children". the singleton "children" come first - then the parent is formed from them. that just ... doesn't help.

mjstapp avatar Jun 21 '24 12:06 mjstapp