Skip to content

zebra: Fix docstr mismatches in show ip route - #21865

Merged
ton31337 merged 1 commit into
FRRouting:masterfrom
mhrn83:fix-show-ip-route-docstr-mismatches
May 9, 2026
Merged

zebra: Fix docstr mismatches in show ip route#21865
ton31337 merged 1 commit into
FRRouting:masterfrom
mhrn83:fix-show-ip-route-docstr-mismatches

Conversation

@mhrn83

@mhrn83 mhrn83 commented May 6, 2026

Copy link
Copy Markdown
Contributor
  • Fix docstrings for show ip route options that didn't match.
  • Restrict the brief option to be used only with the json option.
  • Update related doc and tests

@greptile-apps

greptile-apps Bot commented May 6, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes two categories of CLI docstring mismatches in zebra's show [ip|ipv6] route command and enforces that brief can only be used as a sub-option of json.

  • Docstring fixes in zebra_vty.c: The IPv6 path's fib/route tokens were documented as "IP forwarding table" / "IP routing table" (should be "IPv6 …"); the nexthop-group docstring was displaced to after JSON_STR instead of appearing before the ECMP summary entries β€” both are corrected.
  • brief now nested under json: The two independent [brief] tokens (one each in the IPv4 and IPv6 command paths) are replaced by a single shared [json [brief]], so the CLI enforces json must be present before brief can be specified.
  • Tests and docs updated consistently to use json brief ordering everywhere.

Confidence Score: 5/5

Safe to merge β€” all three files change together consistently and no logic paths are modified.

The changes are narrowly scoped to docstring corrections and CLI token reordering; the runtime handler is untouched and all three files are updated consistently.

No files require special attention.

Important Files Changed

Filename Overview
zebra/zebra_vty.c Removes two independent [brief] tokens (one each in IPv4/IPv6 paths), adds a single [json [brief]] at the shared level, corrects the IPv6 "IP forwarding/routing table" docstrings to "IPv6 forwarding/routing table", and moves the "Nexthop Group Information\n" docstring to its correct position before the ECMP entries.
tests/topotests/static_route_blackhole/test_static_route_blackhole.py All vtysh commands updated from brief json to json brief to match the new CLI token ordering; error message strings updated to reflect the new syntax.
doc/user/zebra.rst Command synopsis updated from [failed] [brief] [json] to [failed] [json [brief]]; option list reordered (json before brief); example command strings updated to json brief ordering.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["show ip|ipv6 route"] --> B["[vrf NAME|all|table TABLENO]"]
    B --> C["[prefix / address options]"]
    C --> D["[redist type / ospf]"]
    D --> E["[nexthop-group [summary [ecmp-count ...]]]"]
    E --> F["[failed]"]
    F --> G["[json]"]
    G --> H["[brief]"]
    style G fill:#c8e6c9,stroke:#388e3c
    style H fill:#fff9c4,stroke:#f9a825
Loading

Reviews (1): Last reviewed commit: "zebra: Fix docstr mismatches in show ip ..." | Re-trigger Greptile

Comment thread zebra/zebra_vty.c Outdated
@mhrn83
mhrn83 force-pushed the fix-show-ip-route-docstr-mismatches branch from e7311e7 to e5f0554 Compare May 6, 2026 15:21
@github-actions github-actions Bot added the rebase PR needs rebase label May 6, 2026
- Fix docstrings for `show ip route` options that didn't match.
- Restrict the `brief` option to be used only with the `json` option.
- Update related doc and tests

Signed-off-by: mhrn83 <mehranstock1383@gmail.com>
@mhrn83
mhrn83 force-pushed the fix-show-ip-route-docstr-mismatches branch from e5f0554 to 27656b5 Compare May 6, 2026 15:31
@mhrn83
mhrn83 requested a review from ton31337 May 6, 2026 15:32

@ton31337 ton31337 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ton31337
ton31337 merged commit 9fb1c62 into FRRouting:master May 9, 2026
34 of 35 checks passed
@mhrn83
mhrn83 deleted the fix-show-ip-route-docstr-mismatches branch May 24, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants