Commit d4b8f46
authored
Fix AS4625-54T port detection by using correct alias extraction (#1774)
The Accton-AS4625-54T uses alias format Eth1(Port1) instead of the
standard tenGigE1 format. The inline regex r"(\d+)$" failed to extract
port numbers from this format because the string ends with ")" not a digit,
causing NetBox interface mapping to fail and ports to appear disconnected.
Solution: Replace inline regex with existing _extract_port_number_from_alias()
helper function which correctly handles both formats:
- Standard format: tenGigE1 -> extracts 1
- AS4625-54T format: Eth1(Port1) -> extracts 1
This allows proper NetBox to SONiC interface mapping:
Eth1(Port1) -> generates expected_names ['Eth1/1', 'Eth1/1/1']
-> matches NetBox interface Eth1/1 -> returns Ethernet0
Result: AS4625-54T ports are now correctly detected as connected,
receive admin_status='up', and have BGP configurations generated.
AI-assisted: Claude Code
Signed-off-by: Christian Berendt <[email protected]>1 parent f28d786 commit d4b8f46
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
290 | | - | |
291 | | - | |
292 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
299 | | - | |
300 | 298 | | |
301 | 299 | | |
302 | 300 | | |
| |||
0 commit comments