Automate LLDP-based interface descriptions on Huawei VRP switches.
Automazione delle descrizioni interfacce basata su LLDP per switch Huawei VRP.
EN: LLDP Config Manager discovers LLDP neighbors on Huawei switches and automatically configures interface descriptions based on the discovered topology. It supports bulk operations across multiple switches, real-time progress monitoring via WebSocket, and integration with NeDi for device discovery.
IT: LLDP Config Manager scopre i neighbor LLDP sugli switch Huawei e configura automaticamente le descrizioni delle interfacce in base alla topologia scoperta. Supporta operazioni batch su piu' switch, monitoraggio in tempo reale via WebSocket e integrazione con NeDi per la discovery dei dispositivi.
- LLDP Discovery - Automatic neighbor detection via SSH (
display lldp neighbor brief) - Auto-Description - Generate and apply interface descriptions from LLDP data
- VRP Version Support - VRP 6.x, 7.x, 8.x with version-specific syntax
- Batch Operations - Process multiple switches with configurable concurrency
- Write + Verify - Write descriptions then verify readback (detects partial writes)
- SSH Session Management - Keepalive, heartbeat, auto-reconnect, TTL-based re-auth
- NeDi Integration - Import switches from NeDi network discovery database
- CSV/Excel Import - Bulk import switches and credentials from spreadsheets
- SNMP Discovery - Network-wide device discovery via SNMP
- Audit Logging - Full audit trail of all operations
- Kanban Board - Visual switch management workflow
- Real-time Updates - WebSocket-based progress monitoring
- Encrypted Credentials - Fernet encryption for stored passwords
lldp-config-manager/
backend/ # FastAPI (Python) - Core API, SSH, LLDP logic
services/ # SSH, LLDP, encryption, VRP syntax
models/ # SQLAlchemy models
routers/ # API endpoints
tests/ # Pytest test suite
src/ # Alternative API structure (v2)
static/ # Standalone HTML frontend
frontend/ # React + TypeScript + Vite + Tailwind CSS
src/components/ # UI components (Kanban, ApplyModal, etc.)
e2e/ # Playwright E2E tests
server/ # Node.js Express - NeDi bridge, CSV import
src/routes/ # API routes (nedi, csv, lldp, switches)
| Layer | Technology |
|---|---|
| Backend API | Python 3.10+, FastAPI, SQLAlchemy, Paramiko |
| Frontend | React, TypeScript, Vite, Tailwind CSS, Zustand |
| NeDi Bridge | Node.js, Express, ssh2, mysql2, better-sqlite3 |
| Database | SQLite (with WAL mode) |
| Encryption | cryptography (Fernet) |
| Testing | Pytest, Playwright |
- Python 3.10+
- Node.js 18+
- Network access to Huawei switches via SSH
cd backend
python -m venv venv
source venv/bin/activate # Linux/Mac
# venv\Scripts\activate # Windows
pip install -r requirements.txt
cp ../.env.example .env # Edit with your settings
uvicorn main:app --host 0.0.0.0 --port 8084cd frontend
npm install
npm run devcd server
npm install
cp ../.env.example .env # Edit with your NeDi credentials
node src/index.jscp .env.example .env # Edit with your settings
docker-compose up -dCopy .env.example to .env and configure:
| Variable | Description | Default |
|---|---|---|
ENCRYPTION_KEY |
Key for password encryption | (required) |
FERNET_KEY |
Fernet key for backend encryption | (required) |
DATABASE_URL |
SQLite database path | sqlite:///./lldp.db |
SSH_TIMEOUT |
SSH connection timeout (seconds) | 10 |
NEDI_HOST |
NeDi server IP address | - |
NEDI_SSH_USER |
NeDi SSH username | root |
NEDI_SSH_PASSWORD |
NeDi SSH password | - |
NEDI_USER |
NeDi MySQL username | nedi |
NEDI_PASSWORD |
NeDi MySQL password | - |
SNMP_DISCOVERY_URL |
SNMP discovery API endpoint | - |
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Health check |
| GET | /api/switches |
List all switches |
| POST | /api/switches |
Add a switch |
| POST | /api/jobs |
Start LLDP job |
| GET | /api/lldp/{switch_id}/neighbors |
Get LLDP neighbors |
| POST | /api/discovery/snmp |
SNMP network discovery |
| GET | /api/export |
Export data |
| GET | /ws |
WebSocket for real-time updates |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/nedi/status |
NeDi connectivity check |
| GET | /api/nedi/devices |
List Huawei devices from NeDi |
| POST | /api/nedi/import |
Import devices from NeDi |
| POST | /api/csv/upload |
Upload CSV/Excel file |
| POST | /api/csv/import |
Import parsed data |
| POST | /api/lldp/execute |
Execute LLDP on single switch |
| POST | /api/lldp/batch |
Start batch execution |
# Backend unit tests
cd backend
pytest
# Frontend E2E tests
cd frontend
npx playwright testMIT License - see LICENSE
Marco Mereu