A modern, web-based interface for Cisco pyATS network automation framework. Transform complex CLI workflows into an intuitive web experience for network testing, validation, and state management.
- 📁 Testbed Management: Upload, validate, and generate PyATS testbed files with built-in validation
- 🔌 Device Connectivity Testing: Test connections to network devices with detailed status reporting and timing metrics
- ⚡ Command Execution: Run operational commands across devices with real-time output capture
- 📸 Network State Capture (Learn): Snapshot network state using Genie Learn - supports 15+ features including config, BGP, OSPF, interfaces, and more
- 🔍 Configuration Diff: Compare snapshots to detect changes, drift, and validate deployments
- 🎨 Modern Web UI: Clean, responsive React interface - no more CLI-only workflows
Capture operational state for comprehensive network analysis:
| Feature | Description |
|---|---|
config |
Complete device configuration |
interface |
Interface status, stats, and counters |
platform |
Hardware and software information |
routing |
Routing table and protocols |
bgp |
BGP neighbors, prefixes, and attributes |
ospf |
OSPF topology and neighbor relationships |
vrf |
VRF configurations and route targets |
vlan |
VLAN information and assignments |
arp |
ARP table entries |
mac |
MAC address table |
acl |
Access control lists |
Plus: static_routing, hsrp, vxlan, lisp, and more... |
- Pre/Post Change Validation: Capture before and after states to verify changes
- Configuration Drift Detection: Identify unauthorized or unexpected changes
- Visual Comparison: Color-coded diff output showing added (green), removed (red), and modified (yellow) items
- Device-by-Device Analysis: Compare states across individual devices or entire network
- Detailed Reporting: Export diff results for documentation and compliance
- Operating System: Ubuntu 20.04, 22.04, or 24.04 LTS
- Memory: Minimum 2GB RAM (4GB recommended)
- Storage: 5GB free disk space
- Network: Internet connection for package downloads
- Access: Root/sudo privileges
# Clone the repository
git clone https://github.com/YOUR_USERNAME/pyats-webapp.git
cd pyats-webapp
# Run the automated deployment script
chmod +x deploy.sh
sudo ./deploy.shInstallation time: 5-10 minutes (depending on internet speed)
The deployment script automatically:
- ✅ Installs all system dependencies (Python, Node.js, Nginx, SSH client)
- ✅ Creates dedicated application user
- ✅ Sets up Python virtual environment
- ✅ Installs PyATS, Genie, and all Python packages
- ✅ Builds React frontend
- ✅ Configures Nginx reverse proxy
- ✅ Creates systemd service (auto-start on boot)
- ✅ Initializes SQLite database with default user
After installation completes:
🌐 URL: http://YOUR_SERVER_IP
👤 Username: admin
🔑 Password: admin123
Navigate to: Dashboard → Testbeds → Generate Template
- Select your device type (Cisco IOS, IOS-XE, IOS-XR, NX-OS, JunOS, etc.)
- Enter device details (hostname, IP, username)
- Choose connection protocol (SSH/Telnet)
- Download the generated YAML template
Navigate to: Testbeds → Upload Testbed
- Select your testbed YAML file
- System automatically validates structure
- View validation results and any errors
- Testbed is stored and ready to use
Navigate to: Testbeds → [Select Testbed] → Devices
- Click Test Connectivity
- View real-time connection attempts
- See success/failure status per device
- Review connection timing and error messages
From the Device Manager:
- Select a device from your testbed
- Enter operational command (e.g.,
show version,show ip bgp summary) - Click Execute Command
- View formatted output in real-time
Navigate to: Devices → Learn & Diff
- Select feature to learn (config, bgp, ospf, interface, etc.)
- Click Learn State
- Wait for snapshot to complete
- Snapshot is stored with timestamp
Use cases:
- Daily configuration backups
- Pre-change baseline capture
- Network documentation
- Troubleshooting snapshots
From the Learn & Diff page:
- View your snapshot history
- Click Diff with Prev to compare with previous snapshot
- Review detailed comparison:
- Added items (new configurations/neighbors/routes)
- Removed items (deleted configurations/neighbors/routes)
- Modified items (changed values)
- Analyze per-device differences
Use cases:
- Validate deployment success
- Detect configuration drift
- Troubleshoot unexpected changes
- Compliance verification
1. Learn baseline → Select 'bgp' feature → Snapshot: bgp_baseline
2. Make changes → Add new BGP neighbor
3. Learn new state → Snapshot: bgp_after_change
4. Compare → View diff to verify only expected changes occurred
5. Document → Export diff for change record
1. Weekly baseline → Every Monday, learn 'config' feature
2. Compare snapshots → Diff current week vs. previous week
3. Identify changes → Review what changed and by whom
4. Remediate → Fix unauthorized changes
5. Report → Generate compliance report
1. Customer reports connectivity issue
2. Learn VRF state → Capture current VRF configuration
3. Learn routing → Capture routing table
4. Compare with working snapshot → Identify missing routes/neighbors
5. Fix and verify → Learn again, confirm resolution
1. Capture all features → config, platform, interface, routing
2. Store snapshots → Maintain historical records
3. Generate reports → Use for runbooks and documentation
4. Onboarding → New engineers review snapshots to understand network
┌─────────────────┐
│ React Frontend │ (Port 80 via Nginx)
└────────┬────────┘
│ HTTP/REST
┌────────▼────────┐
│ FastAPI Backend│ (Port 8000)
└────────┬────────┘
│
┌────┴────┬──────────┬──────────┐
│ │ │ │
┌───▼──┐ ┌───▼──┐ ┌───▼──┐ ┌───▼─────┐
│PyATS │ │Genie │ │SQLite│ │Unicon │
│Loader│ │Learn │ │ DB │ │(SSH/Tel)│
└──────┘ └──────┘ └──────┘ └─────────┘
│
┌──────────┴──────────┐
│ │
┌─────▼─────┐ ┌─────▼─────┐
│ Cisco │ │ Juniper │
│ Devices │ │ Devices │
└───────────┘ └───────────┘
Backend:
- FastAPI - Modern Python web framework
- PyATS/Genie - Network automation and testing
- Unicon - Multi-vendor device connectivity
- SQLAlchemy - Database ORM
- SQLite - Embedded database
- Uvicorn - ASGI server
Frontend:
- React 18 - UI library
- React Router - Navigation
- Axios - HTTP client
- Modern CSS3 - Styling
Infrastructure:
- Nginx - Reverse proxy and static file serving
- Systemd - Service management
- Ubuntu 20.04+ - Operating system
pyats-webapp/
├── backend/
│ ├── app/
│ │ ├── api/ # REST API endpoints
│ │ │ ├── auth.py # Authentication
│ │ │ ├── testbed.py # Testbed management
│ │ │ ├── devices.py # Device operations
│ │ │ ├── jobs.py # Job management
│ │ │ └── learn.py # Learn & Diff features
│ │ ├── core/ # Core configuration
│ │ │ ├── config.py # App settings
│ │ │ ├── database.py # DB connection
│ │ │ └── init_db.py # DB initialization
│ │ ├── models/ # Database models
│ │ │ └── database.py # SQLAlchemy models
│ │ ├── services/ # Business logic
│ │ │ └── testbed_validator.py
│ │ └── main.py # FastAPI application
│ └── requirements.txt # Python dependencies
├── frontend/
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Login.js
│ │ │ ├── Dashboard.js
│ │ │ ├── Testbeds.js
│ │ │ ├── TestbedUpload.js
│ │ │ ├── TestbedGenerator.js
│ │ │ ├── DeviceManager.js
│ │ │ ├── Learn.js
│ │ │ └── Diff.js
│ │ ├── App.js # Main app component
│ │ ├── App.css # Styling
│ │ └── index.js # Entry point
│ └── package.json # Node dependencies
├── deploy.sh # Automated deployment script
├── README.md # This file
├── LICENSE # MIT License
└── .gitignore # Git ignore rules
- JWT-based token authentication
- SHA256 password hashing
- Token expiration (24 hours default)
- Secure session management
-
Enable HTTPS:
sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d your-domain.com
-
Change Default Credentials: Immediately after first login
-
Update Secret Key: Generate strong secret in
.envfileopenssl rand -hex 32
-
Configure Firewall:
sudo ufw allow 22/tcp # SSH sudo ufw allow 80/tcp # HTTP sudo ufw allow 443/tcp # HTTPS sudo ufw enable
-
Secure Device Credentials: Use credential vaults (HashiCorp Vault, AWS Secrets Manager) in production
-
Regular Updates: Keep system packages and dependencies updated
- Cisco IOS - Routers and switches
- Cisco IOS-XE - ASR, ISR, Catalyst 9000 series
- Cisco IOS-XR - CRS, ASR 9000, NCS series
- Cisco NX-OS - Nexus switches (all series)
- Juniper JunOS - All JunOS devices
- Arista EOS - Basic operations supported
- Cisco ASA - Firewall operations
- HP/HPE - Limited parser coverage
- Custom Genie parsers can be added
- Multi-vendor support via Unicon
- Community contributions welcome
# Check status
sudo systemctl status pyats-webapp
# Start service
sudo systemctl start pyats-webapp
# Stop service
sudo systemctl stop pyats-webapp
# Restart service
sudo systemctl restart pyats-webapp
# View logs
sudo journalctl -u pyats-webapp -f
# Enable auto-start on boot (already configured)
sudo systemctl enable pyats-webappSymptom: "'ssh' command not available" error during connectivity tests
Solution:
sudo apt install -y openssh-client sshpass
sudo systemctl restart pyats-webappCheck logs:
sudo journalctl -u pyats-webapp -n 50Common issues:
- Port 8000 already in use
- Missing Python dependencies
- Database initialization failed
Reinitialize database:
cd /opt/pyats-webapp/backend
source venv/bin/activate
rm -f data/pyats.db
python -m app.core.init_dbVerify services:
systemctl status pyats-webapp
systemctl status nginxCheck ports:
sudo netstat -tlnp | grep -E '(80|8000)'- Multi-user Support & RBAC - Team collaboration with role-based access
- Scheduled Jobs - Automated snapshots and backups
- Configuration Backup & Versioning - Git integration for config tracking
- Advanced Dashboards - Network topology visualization and metrics
- MPLS VPN Management - VRF visualization and PE-CE monitoring
- Webhook Integrations - Slack, Teams, PagerDuty notifications
- Custom Parser Upload - Support for user-defined Genie parsers
- Change Management Workflow - Approval process and validation
- Reporting Engine - PDF/Excel report generation
- API Key Management - External integration support
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Backend:
cd backend
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Frontend:
cd frontend
npm install
npm startSee CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- Cisco PyATS - Network testing framework
- Genie - Network device parsing library
- FastAPI - Modern Python web framework
- React - Frontend UI library
- The network automation community for inspiration and support
Author: Kwame - Network Engineer, Ghana
- LinkedIn: Your LinkedIn Profile
- GitHub: @YourUsername
- Issues: Report bugs or request features
If you find this project useful, please consider:
- ⭐ Starring the repository
- 🍴 Forking for your own use
- 📢 Sharing with colleagues
- 🐛 Reporting issues
- 💡 Suggesting features
- 🤝 Contributing code
Coming soon - Add screenshots of your application in action
Built with ❤️ for the network automation community
Making network operations simpler, one automation at a time.