zebra: rename BondState to State in 'show evpn es' output - #20721
Merged
Conversation
Rename the column/field name from 'BondState' to 'State' for consistency with other FRR CLI commands that use 'State' to define an entity's current operational state. The following CLIs already use 'State' as the column name: - show vrf [NAME|all] vni [json]: VRF, VNI, VxLAN IF, L3-SVI, State, Rmac - show ip neigh: Neighbor, Type, Flags, State, MAC, Remote ES/VTEP, Seq #'s - show evpn arp-cache vni <vni> [json]: same header as above - show evpn arp-cache vni all [json]: same header - show evpn arp-cache vni <vni> duplicate [json]: IP, Type, State, MAC, ... Using consistent naming simplifies user parsing via object model - 'state' is easier than having 'bondState', 'vniState', etc. Changes: - Rename column header from 'BondState' to 'State' - Rename JSON field from 'bondState' to 'state' - Adjust format width from %-9s to %-5s to match column name length Before (PR FRRouting#20711): ESI Type ES-IF BondState VTEPs 03:44:38:39:ff:ff:01:00:00:01 LRN hostbond_1 down ... After: ESI Type ES-IF State VTEPs 03:44:38:39:ff:ff:01:00:00:01 LRN hostbond_1 down ... Signed-off-by: Shashanka K S <shashankaks@nvidia.com>
Greptile OverviewGreptile SummaryRenamed the column header from Changes made:
The changes align with the naming conventions used in other FRR commands like Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant VTY as VTY (CLI)
participant EVPN as zebra_evpn_es_show()
participant Entry as zebra_evpn_es_show_entry()
participant Output as vty_out/json
User->>VTY: show evpn es [json]
VTY->>EVPN: zebra_evpn_es_show(vty, uj)
alt JSON output
EVPN->>Output: Create json_array
else Plain text output
EVPN->>Output: Print header with "State" column (%-5s width)
Note over Output: Header: ESI, Type, ES-IF, State, VTEPs
end
loop For each ES entry
EVPN->>Entry: zebra_evpn_es_show_entry(vty, es, json_array)
alt JSON output
Entry->>Output: Add "state" field (up/down/-)
Note over Output: JSON field: "state": "up"|"down"
else Plain text output
Entry->>Output: Format with %-5s for state column
Note over Output: State shown as "up", "down", or "-"
end
end
alt JSON output
EVPN->>Output: vty_json(json_array)
end
Output->>User: Display formatted output
|
ton31337
reviewed
Feb 9, 2026
| /* Add bond state field for local ES */ | ||
| if (es->flags & ZEBRA_EVPNES_LOCAL) | ||
| json_object_string_add(json, "bondState", | ||
| json_object_string_add(json, "state", |
Member
There was a problem hiding this comment.
This is a breaking change, please put it under CONFDATE (6 months minimum) and add this as an additional field.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a follow-up to PR #20711 which added the State column to 'show evpn es' output.
Rename the column/field name from 'BondState' to 'State' for consistency with other FRR CLI commands that use 'State' to define an entity's current operational state.
The following CLIs already use 'State' as the column name:
Using consistent naming simplifies user parsing via object model - 'state' is easier than having 'bondState', 'vniState', etc.
Changes:
Before (PR #20711):
ESI Type ES-IF BondState VTEPs
03:44:38:39:ff:ff:01:00:00:01 LRN hostbond_1 down ...
After:
ESI Type ES-IF State VTEPs
03:44:38:39:ff:ff:01:00:00:01 LRN hostbond_1 down ...