Scripts
Script Library¶
Production-Ready Automation for Cisco Infrastructure¶
Welcome to the Nautomation Prime Script Library. Here you'll find open-source, hardened Python automation tools designed for enterprise Cisco deployments.
Python Prerequisite
This site focuses on applying Python to network automation. We assume familiarity with core Python concepts (variables, functions, loops, exceptions, and file I/O). If you're new to Python, complete a fundamentals course first, then return here.
π Available Scripts¶
CDP Network Audit Tool¶
Status: β
Available
Description: A threaded discovery utility that starts from seed Cisco devices and crawls the network using Cisco Discovery Protocol (CDP), producing structured Excel reports with professional formatting.
Features:
- Parallel discovery with configurable worker pool (via config.py or environment variable overrides)
- Centralised configuration with comprehensive config.py (200+ documented settings)
- Two-tier authentication (primary user with customisable fallback username)
- Jump server / bastion support (Paramiko channel + Netmiko sock)
- DNS enrichment for discovered hostnames
- Excel reporting from pre-formatted templates with multiple sheets
- Hybrid logging with optional logging.conf
- Up to 3 automatic retries for transient connectivity issues
- Comprehensive error tracking (authentication failures, connection errors)
- Extensive customisation options (credentials, paths, Excel formatting, DNS, logging, and more)
π View Deep Dive Documentation | GitHub Repository
Access Switch Port Audit Tool¶
Status: β Available Description: A production-hardened collector designed to map interface health and utilisation across your access layer.
Features:
- Parallel device SSH connections for high-speed audits
- Conservative "Stale Port" detection logic using PoE, neighbours, and input timers
- Multi-source port classification (Access vs. Trunk vs. Routed)
- Professional Excel workbooks with automated conditional formatting
- Full Jump-Host (Bastion) integration for restricted environments
π View Deep Dive Documentation | GitHub Repository
Cisco IOS-XE Compliance Audit¶
Status: β Available Description: A policy-driven compliance auditor with 90+ role-aware checks, automated remediation generation, and multi-format reporting for enterprise Cisco switches.
Features:
- Policy-as-code YAML configuration for easy governance customization
- Role-aware port classification (uplink, downlink, access, routed, unused)
- 90+ toggleable checks across management, control, and data planes
- Multi-format reporting (HTML dashboards, JSON, CSV, remediation scripts)
- Delta tracking for continuous compliance trending
- Dry-run mode for safe policy validation and CI/CD integration
- Jump host / bastion support for restricted environments
- Concurrent device auditing for large-scale operations
π View Deep Dive Documentation | ποΈ Runbook | GitHub Repository
π§ Learning Paths¶
Unsure where to start? These learning paths connect scripts to tutorials and deep dives based on your experience level:
π Beginner Path¶
Start here if you're new to network automation:
- Learn Python fundamentals (external resources)
- Read Multi-Device Show Command Collection β learn Netmiko basics
- Try Configuration Backup Tutorial β understand backup patterns
- Explore CDP Network Audit Deep Dive β see how threading and configuration work at scale
π οΈ Intermediate Path¶
Ready to understand production patterns:
- Read Nornir Fundamentals β multi-device automation framework
- Read Enterprise Config Backup with Nornir β scalable patterns
- Study Access Switch Audit Deep Dive β parallel collection and intelligent parsing
- Study CDP Network Audit Deep Dive β threading, configuration, and jump hosts
π Advanced Path¶
Ready to build custom solutions:
- Review all Deep Dives for architectural patterns
- Study Cisco Compliance Audit Deep Dive β policy-driven compliance with remediation generation
- Customize scripts for your environment (GitHub repositories include full source)
- Integrate with PRIME Framework methodology
- Contact us for consulting services on bespoke automation
π Coming Soon¶
Zero Touch Provisioning (ZTP) Tool¶
Status: π§ In Development
Description: Automated deployment solution for Cisco devices that streamlines initial configuration and reduces deployment time from hours to minutes.
Planned Features:
- Automated device configuration from templates
- DHCP option integration for network-based provisioning
- Email notifications for deployment status and errors
- HTTP server integration for configuration and log file management
- Pre-flight validation and rollback capabilities
- Multi-device orchestration with dependency management
- Comprehensive logging with remote log collection
Current Status: Core functionality tested and validated. Additional features (email notifications, HTTP log server integration) under active development.
IOS-XE Software Upgrade Orchestrator¶
Status: π§ In Development
Description: Automated, intelligent firmware management for Cisco IOS-XE switch stacks that eliminates manual upgrade errors and reduces downtime through comprehensive pre-flight validation.
Planned Features:
- Pre-flight validation (disk space, compatibility, current version checks)
- Binary integrity verification (MD5/SHA checksums)
- Automated file transfer to target devices (SCP/TFTP/HTTP)
- Stack-aware upgrade orchestration with rolling restarts
- Version compliance reporting across the estate
- Rollback capability for failed upgrades
- Parallel upgrade support for multiple stacks
- Email notifications and comprehensive logging
- Integration with maintenance windows and change control systems
Current Status: Architecture and design phase. Feature set being finalized based on enterprise deployment requirements.
π οΈ Getting Started with Scripts¶
Prerequisites¶
- Python 3.8+
- Netmiko or equivalent SSH library
- Network access to target devices
- Appropriate credentials/permissions
Installation & Setup¶
Each script repository includes detailed installation instructions in its README. Typical workflow:
Credential Management¶
Scripts use your operating system's native credential manager for secure authentication:
- Windows: CDP Network Audit prompts you to save credentials to Windows Credential Manager on first run. Enter your username and password when prompted, and the script will store them securely. Future runs use the stored credentials automatically.
- macOS: Credentials are stored in Keychain - Upcoming
- Linux: Credentials are stored in
passor similar managers - Upcoming
Credentials are never stored in plaintext files or hardcoded in scripts.
See each repository's README for platform-specific instructions.
Configuration¶
All scripts follow the Nautomation Prime philosophy of transparency and security:
- Credentials are stored in OS credential managers (Windows Credential Manager, etc.)
- Configuration files are well-documented with inline comments.
- Pre-flight validation checks prevent unsafe deployments.
Support & Questions¶
For issues, feature requests, or questions about any script:
- Check the Deep Dives documentation for detailed explanations.
- Open an issue on the respective GitHub repository.
- Contact us via email or LinkedIn for consulting services.
οΏ½ Resources by Topic¶
Quick access to find what you need:
| Topic | Resources |
|---|---|
| Network Discovery | π CDP Network Audit Deep Dive β’ πΎ Script |
| Port & Interface Health | π Access Switch Audit Deep Dive β’ πΎ Script |
| Compliance & Governance | π Cisco Compliance Audit Deep Dive β’ ποΈ Runbook β’ πΎ Script |
| Configuration Management | π Configuration Backup (Beginner) β’ π Enterprise Backup with Nornir (Intermediate) |
| Data Collection & Reporting | π Show Commands to Excel (Beginner) β’ π Multi-Device Collection (Beginner) |
| Automation Frameworks | π Nornir Fundamentals β’ π Advanced Patterns |
| Automation Methodology | π PRIME Framework β’ βΉοΈ Philosophy & Approach |
οΏ½π The "Prime" Philosophy¶
All scripts in this library adhere to three core principles:
- Line-by-Line Transparency - Every function is documented, every decision explained
- Hardened for Production - Robust error handling, security best practices, pre-flight checks
- Vendor-Neutral - Built on industry-standard libraries like Netmiko, Nornir, and TextFSM
Mission: To empower network engineers through the PRIME Frameworkβdelivering automation with measurable ROI, production-grade quality, and sustainable team capability built on the PRIME Philosophy of transparency, measurability, ownership, safety, and empowerment.