CLI reference
python -m src [flags]| Flag | Description |
|---|---|
--task NAME | Task label recorded in inventory (e.g. SNMPV3, SYSLOG, BACKUP) |
--commands NAME | Command file prefix to load (e.g. snmpv3 → {vendor}/snmpv3.txt) |
--ip IP | Single device IP — use with --vendor |
--vendor VENDOR | Vendor for --ip mode: cisco, alcatel, alcatel_wlc |
--devices FILE | Device CSV file (e.g. config/devices.csv) |
--retry | Retry failed devices from config/failed_devices.csv |
--workers N | Parallel SSH connections (default: max_workers from config.yaml) |
--backup | Save full running-config per device to BACKUP/YYYY-MM/ |
--dry-run | Show what would run without connecting to any device |
--validate | Validate device list and command files — no SSH connections |
--log | Enable SSH session logging to LOGS/ |
--status-file FILE | Update Status column to Configured in a monitoring CSV |
--consolidate | Merge all SUMMARY CSVs into SUMMARY/CONSOLIDATED_SUMMARY.csv |
--report [FILE] | Generate report from a SUMMARY CSV (omit FILE for latest) |
--format csv|json | Summary output format (default: csv) |
--retention DAYS | Backup retention in days (0 = keep all) |
--diff FILE1 FILE2 | Compare two config files line by line |
--health-check | SSH health check on all devices — no config changes |
--baseline VENDOR | Run CIS compliance check against backup configs |
Workers guide
Section titled “Workers guide”Each worker is one simultaneous SSH connection.
| Workers | 10,000 devices @ 30 s each |
|---|---|
| 10 | ~8.3 hours |
| 20 | ~4.2 hours |
| 30 | ~2.8 hours |
| 50 | ~1.7 hours |
Start with --workers 20. Set a permanent default in config.yaml:
execution: max_workers: 20Examples
Section titled “Examples”# Single device testpython -m src --task SNMPV3 --commands snmpv3 --ip 10.0.0.1 --vendor cisco
# Subset test before full rolloutpython -m src --task SNMPV3 --commands snmpv3 --devices config/testdata_devices.csv
# Full rolloutpython -m src --task SNMPV3 --commands snmpv3 --devices config/devices.csv --workers 20
# Retry failurespython -m src --task SNMPV3 --commands snmpv3 --retry --workers 10
# Backup all running-configspython -m src --task BACKUP --commands backup --backup --devices config/devices.csv --workers 20
# Dry run — preview without connectingpython -m src --task SNMPV3 --commands snmpv3 --devices config/devices.csv --dry-run
# Update monitoring CSV after successful runpython -m src --task SNMPV3 --commands snmpv3 --devices config/devices.csv --workers 20 --status-file data/dataswitches.csv