schema(#228): SSH get_router ports pk bind + key_column 0 - #382
Merged
Merged
Conversation
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
2 tasks
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.
Rank1 soft —
get_router.portsempty on SSHRelated: #228
Leftover from the Test receipts (13th and 21st): ssh
ports/vrin=0 vs mops ports 35 / vri 7.routing_enabledis already fine. Bucket: overlay missing / close-format.Cause: the
portssub_table hasprimary_key: port_ifindex(wirehm2agentswitchipinterfaceifindex), which had no SSH read. With an empty pk, every row dropped. IP/mask reads also had nokey_column, so they came out keyed by row_num.Change (YAML only):
wire/ssh/platform-routing.yaml:hm2agentswitchipinterfaceifindex←show ip interfaceparser: table, key_column: 0, column: 0, withtype: string. InterfaceIndex's matrixto_port_namewould callint()on1/1; this is the same overlay pattern as thehm2agentstaticipsgbindingifindex/ipnettomediaifindexsiblings.key_column: 0on the ip address / netmask reads, so rows are keyed by interface name. The sub_tablekey_map: ifindexleaves SSH names unchanged.Offline
_parse_tableon 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 --errorsgives 46 | 45 | 0 errors | 1 warning, same as baseline.Honest leftovers:
vrihas 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