From c5d7a7fb344a85df71e58d6112b56859a1c32389 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 25 Sep 2026 08:33:32 +1000 Subject: [PATCH] schema(#228): SSH get_router ports pk bind + key_column 0 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 --- crude_engine/wire/ssh/platform-routing.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crude_engine/wire/ssh/platform-routing.yaml b/crude_engine/wire/ssh/platform-routing.yaml index 53a739b..ea6f3a0 100644 --- a/crude_engine/wire/ssh/platform-routing.yaml +++ b/crude_engine/wire/ssh/platform-routing.yaml @@ -11,18 +11,27 @@ attributes: write: {command: "ip routing", level: config_interface} # Per-port table: show ip interface + # get_router.ports (#228 Rank1): sub_table pk port_ifindex had no SSH read → ports {}. + # Bind pk from col 0 (Interface name; type string — no to_port_name int()) and + # key_column: 0 on all cols → ifName row keys (sflow/ipsg pk-bind sibling). No fanout. + hm2agentswitchipinterfaceifindex: + type: string + sources: + ssh: + read: {command: "show ip interface", parser: table, key_column: 0, column: 0} + hm2agentswitchipinterfaceipaddress: type: string sources: ssh: - read: {command: "show ip interface", parser: table, column: 1} + read: {command: "show ip interface", parser: table, key_column: 0, column: 1} write: {command: "ip address primary {value} {netmask}", level: config_interface} hm2agentswitchipinterfacenetmask: type: string sources: ssh: - read: {command: "show ip interface", parser: table, column: 2} + read: {command: "show ip interface", parser: table, key_column: 0, column: 2} hm2agentswitchipinterfaceroutingmode: sources: