How scotteelp/netbox-automation works
This is a command-line NetBox automation script. A user selects a command; the script validates configuration, then retrieves device or rack data for reports, updates device ages, or fetches and displays a joke. Logging and terminal presentation support these workflows. The README documents the feature relationships; excerpts show configuration validation, API connectivity checks, device-age updates, and joke retrieval. Other internal feature boundaries are inferred from documented commands, not inspected source.
Main entry points: netbox_api.py Command dispatcher · config.py API configuration · ascii_art.py ASCII art · color_definitions.py Color definitions
Components 21
Command and setup
- Command dispatcher
netbox_api.py - API configuration
config.py - Config validation
netbox_api.py
NetBox inventory
- Device retrieval
netbox_api.py - Age calculation
netbox_api.py - Age updates
netbox_api.py - Rack retrieval
netbox_api.py
Reports and logging
- Device export
netbox_api.py - Rack export
netbox_api.py - Device CSV
- Device XLSX
- Rack XLSX
- Action logging
netbox_api.py - Log file
Terminal presentation
- Joke retrieval
netbox_api.py - Terminal display
netbox_api.py - ASCII art
ascii_art.py - Color definitions
color_definitions.py
Other components
- CLI user
- NetBox API
- Jokes API
Connections 24
- CLI user → Command dispatcher: runs command
README.md - Command dispatcher → Config validation: validates config
netbox_api.py - Config validation → API configuration: reads settings
netbox_api.py - Config validation → NetBox API: checks connection
netbox_api.py - Command dispatcher → Device retrieval: dispatches command
README.md - Command dispatcher → Rack retrieval: dispatches command
README.md - Command dispatcher → Age updates: dispatches command
README.md - Command dispatcher → Joke retrieval: dispatches command
README.md - Device retrieval → NetBox API: retrieves devices
README.md - Device retrieval → Age calculation: calculates age
README.md - Device retrieval → Device export: exports data
README.md - Device export → Device CSV: writes CSV
README.md - Device export → Device XLSX: writes XLSX
README.md - Rack retrieval → NetBox API: retrieves racks
README.md - Rack retrieval → Rack export: provides details
README.md - Rack export → Rack XLSX: writes workbook
README.md - Age updates → NetBox API: updates devices
netbox_api.py - Age updates → Age calculation: calculates age
netbox_api.py - Command dispatcher → Action logging: records actions
README.md - Action logging → Log file: writes logs
README.md - Joke retrieval → Jokes API: fetches joke
netbox_api.py - Joke retrieval → Terminal display: prints joke
README.md - Terminal display → ASCII art: uses artwork
netbox_api.py - Terminal display → Color definitions: uses colors
netbox_api.py