This repository houses a series of Python scripts designed to teach how to automate various network administration tasks, each script increases in complexity and functionality. The scripts leverage libraries like Netmiko for establishing SSH connections to network devices and Flask for rendering a user-friendly web interface.
- Part 1: Initiates a simple SSH connection to a device, executes a 'show' command, and prints the result.
- Part 2: Builds upon Part 1 by allowing the execution of multiple 'show' commands.
- Part 3: Extends functionality to handle multiple devices.
- Part 4: Introduces reading IP addresses from a text file.
- Part 5: Outputs the results to a file.
- Part 6: Outputs the results to a CSV file.
- Part 7: Implements error handling for SSH connections and command executions.
- Part 8: Allows interactive command entering.
- Part 9: Refactors the script to use functions, enhancing readability and maintainability.
- Part 10: Introduces multithreading for concurrent processing of multiple devices.
- Part 11: Adds the capability to email the results to the user.
- Part 20: A 'Hello World' Flask app, serving as an introduction to Flask.
- Part 21: Enhances the Flask app to render templates and handle form submissions.
- Part 22: Integrates the Flask app with the network command runner, allowing users to input commands and IP addresses and receive results via the web interface.
- Part 30: Simple script to parse 'show vlan' command, showing how ntc templates turn text output into a dictionary
- Part 31: Show ip route with NTC.
- Part 32: Show cdp neighbors in fromated output
- Part 40: Queries the ARIN Whois database to retrieve organization details for a given IP address.
- Python 3.x
- Pip (Python Package Installer)
- Clone this repository to your local machine.
git clone seanerama/network_python