Skip to content

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:

  1. Learn Python fundamentals (external resources)
  2. Read Multi-Device Show Command Collection β€” learn Netmiko basics
  3. Try Configuration Backup Tutorial β€” understand backup patterns
  4. Explore CDP Network Audit Deep Dive β€” see how threading and configuration work at scale

πŸ› οΈ Intermediate Path

Ready to understand production patterns:

  1. Read Nornir Fundamentals β€” multi-device automation framework
  2. Read Enterprise Config Backup with Nornir β€” scalable patterns
  3. Study Access Switch Audit Deep Dive β€” parallel collection and intelligent parsing
  4. Study CDP Network Audit Deep Dive β€” threading, configuration, and jump hosts

πŸš€ Advanced Path

Ready to build custom solutions:

  1. Review all Deep Dives for architectural patterns
  2. Study Cisco Compliance Audit Deep Dive β€” policy-driven compliance with remediation generation
  3. Customize scripts for your environment (GitHub repositories include full source)
  4. Integrate with PRIME Framework methodology
  5. 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:

1
2
3
4
5
6
7
8
9
# Clone the repository
git clone https://github.com/Nautomation-Prime/<script-name>
cd <script-name>

# Install dependencies
pip install -r requirements.txt

# Run with --help to see options
python main.py --help

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 pass or 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:

  1. Line-by-Line Transparency - Every function is documented, every decision explained
  2. Hardened for Production - Robust error handling, security best practices, pre-flight checks
  3. 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.