Use manufacturer from NocoDB to select correct Netmiko device type

Aruba/HP switches now connect with hp_procurve instead of cisco_ios,
fixing the 'terminal width 511' failure. Manufacturer is read from
NocoDB and mapped to the correct device type before SSH connect.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-13 17:38:22 +00:00
parent 93afa9192b
commit 237c45ddfc
2 changed files with 28 additions and 8 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
# scanner.py - Orchestrates the full scan pipeline
import logging
from nocodb_client import get_switch_ips
from nocodb_client import get_switches
from ssh_client import scan_all_switches
from db import (
upsert_switch, upsert_link, clear_links,
@@ -39,7 +39,7 @@ def run_scan(dept: str = None, workers: int = 5, login_delay: int = 3):
return
# Fetch switch list from NocoDB (or fallback)
switches = get_switch_ips(dept=dept)
switches = get_switches(dept=dept)
if not switches:
logger.error("NocoDB returned no switches — aborting scan.")