Skip to content

schema(#228): SSH get_router ports pk bind + key_column 0 - #382

Merged
AdamRickards merged 1 commit into
mainfrom
schema/228-router-ports-pk
Sep 24, 2026
Merged

AdamRickards merged 1 commit into
mainfrom
schema/228-router-ports-pk

Conversation

@AdamRickards

Copy link
Copy Markdown
Owner

Rank1 soft — get_router.ports empty on SSH

Related: #228

Leftover from the Test receipts (13th and 21st): ssh ports/vri n=0 vs mops ports 35 / vri 7. routing_enabled is already fine. Bucket: overlay missing / close-format.

Cause: the ports sub_table has primary_key: port_ifindex (wire hm2agentswitchipinterfaceifindex), which had no SSH read. With an empty pk, every row dropped. IP/mask reads also had no key_column, so they came out keyed by row_num.

Change (YAML only): wire/ssh/platform-routing.yaml:

  • new SSH read hm2agentswitchipinterfaceifindex ← show ip interface parser: table, key_column: 0, column: 0, with type: string. InterfaceIndex's matrix to_port_name would call int() on 1/1; this is the same overlay pattern as the hm2agentstaticipsgbindingifindex / ipnettomediaifindex siblings.
  • key_column: 0 on the ip address / netmask reads, so rows are keyed by interface name. The sub_table key_map: ifindex leaves SSH names unchanged.

Offline _parse_table on the captured layout gives {'1/1': '1/1', 'vlan/1': 'vlan/1'} for the pk, and ip/mask keyed the same way. Same show (show ip interface), no fanout. No engine/driver change, no invented floors. validate_schemas.py --errors gives 46 | 45 | 0 errors | 1 warning, same as baseline.

Honest leftovers: vri has no SSH VRI table (vlan/* only appears as Interface rows, with no vlan_id/ifindex columns), so it's not invented. routing_mode, proxy_arp, mtu and icmp_* are write-only on SSH.

Proof: python3 tests/release_matrix.py --inspect --method get_router --protocol ssh --trace --device

Sub_table pk port_ifindex had no SSH read -> ports {}. Bind
hm2agentswitchipinterfaceifindex from show ip interface col 0 (type
string) and key_column 0 on ip/mask -> ifName row keys. VRI stays an
honest SSH gap (no VRI table in CLI raw).

Related: #228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant