Target Audience
Professionals looking to enhance their automation skills through Python and Cisco APIs
Course Objectives
After completing this course you should be able to:
- Describe Python’s versatility and suitability for network programmability and automation
- Explain why network programmability is needed and how it enables modern network automation
- Describe programmatic interaction with network devices and the benefits of network automation for scaling from traditional to programmable networks
- Identify practical examples and existing Python tools for network automation
- Write and run basic Python scripts, demonstrating foundational syntax, elements (variables, data types, operators), and logic (decisions and loops)
- Introduce standard and third-party libraries, the import statement, and using the Python interpreter
- Demonstrate hands-on interaction with Python, including accepting input and performing basic network tasks (e.g., connectivity checks)
- Emphasize code styles, readability, and development environment setup, including Python installation, VS Code, virtual environments, Docker, and Git
- Implement Python tools for automating device inventory, including data storage with variables, grouping devices with lists and dictionaries, iterating and filtering device data, and file operations (load/save)
- Organize code with functions and develop scripts for inventory management
- Use external libraries (e.g., Netmiko) for SSH connections and scaling network configurations with Python and templates
- Parse and analyze device output, handle exceptions, and build CLI applications for device management
- Implement tools for testing and validating device state using PyATS and Genie, including retrieving and verifying configuration data
- Demonstrate Python context managers, parsing outputs, performing compliance validation, and running scripts on Cisco IOS-XE devices (Guest Shell)
- Create tools for backing up device configs, automating backup storage with Git, comparing configs, and periodic backups with logging
- Use PyATS for configuration comparison and automate backup processes
- Describe HTTP REST API fundamentals, interactive documentation, and creating API requests in Python
- Parse JSON data, automate interactions with APIs (e.g., Cisco Meraki Dashboard, ThousandEyes), and manage authentication securely
- Demonstrate creating, configuring, and analyzing network tests and monitoring data with API scripts
- Explain the importance of debugging, logging, unit testing, and integrating scripts with CI/CD pipelines
- Handle API errors, implement rate limiting/retries, and introduce telemetry collection with OpenTelemetry
Course Content
Python Programming for Network Engineers
- The need for Network Programmability and Automation
- What is Network Programmability
- Benefits of Network Automation
- Automation and Programmability on Network Devices
- Introduction to the Python Programming Language
- Python for Network Automation Tasks
Write Your First Python Scripts
- Python Syntax
- Building Blocks of Python Programs
- Control the Flow of Python Program Execution
- Python Libraries
- Run Python Programs
- Read User Inputs
- Python Code Style and Standards
Python Development Environment Setup
- Python Installation
- Setting Up VS Code
- Python Virtual Environments
- Development Inside a Container
- Introduction to Git for Version Control
Device Inventory Automation
- Capturing Device Details with Variables
- Organizing Device Inventories with Lists and Dictionaries
- Iterating Through Devices
- Making Decisions About Device Status
- Loading and Displaying the Inventory
- Saving the Inventory
- Structuring Python Scripts Using Functions
Scale Configuration of Network Devices
- Connecting to Devices with SSH and Sending CLI Commands
- Scaling Device Configuration
- Validating Device Configurations by Parsing Command Outputs
- Handling Exceptions When Connecting to Devices
- Adding Network Command Execution to the CLI
Network Monitoring and Validation
- Getting Started with pyATS and Genie for Network Validation and Test Automation
- Retrieving Network Configuration and States
- Managing External Resources with Context Managers
- Parsing and Validating Configuration Outputs
- Testing Configuration Compliance
- Automating Connectivity and Health Checks
- Executing Python Scripts on Cisco IOS XE Software Using Guest Shell
Device Configuration Backup Automation
- Backing Up and Versioning Device Configuration with Git
- Comparing Configurations with Backup
- Backing Up and Comparing Configurations Using pyATS
- Logging Scheduled Backups
HTTP API Fundamentals
- HTTP REST API Overview
- API Documentation
- Python API Requests
- JSON Response Parsing and Processing
Cisco ThousandEyes Network Insights with HTTP API Automation
- Secure Authentication Setup
- Cisco ThousandEyes Test Creation
- Network Monitoring Data Collection
- Type Hints in Network Automation Scripts
Network Automation Debugging and Testing
- Introduction to Debugging in Python
- Set Up Python Logging
- Test Your Network Automation Scripts
- CI/CD Pipeline Integration for Network Automation Testing
- Error Handling in API Calls
- API Automation Performance Optimisation
- Monitor Your Python Programs Using Open Telemetry
HTTP API Automation Wrapper
- Reuseable API Wrappers
- Code Organisation with Modules and Packages
- Object-Oriented Programming Overview
- API Interaction Encapsulation in Python Classes
- Extend the Functionality with Class Methods and Attributes
- API Responses into Python Objects
Build a Web Interface for Network Automation
- Introduction to Flask and Web Development
- Web Development Using Flask
- Network Device Management Using Web Interfaces
- Sending Commands to Devices Through the WebUI
- Adding User Authentication to the Web Interface
- Deploy the Flask Application
Large Language Models for Network Automation
- Introduction to Large Language Models
- Set UP LLM APIs for Python
- Set Up Ollama for Local LLM Inference
- Prompt Engineering for Network Automation
Labs:
- Discovery Lab 1: Interact with Python Using the Interpreter
- Discovery Lab 2: Run Your First Script
- Discovery Lab 3: Install Python and Setup Developer Environment
- Discovery Lab 4: Create a Device Inventory Tool
- Discovery Lab 5: Create a Network Device Configuration Tool
- Discovery Lab 6: Monitor and Validate Device Configurations
- Discovery Lab 7: Create a Backup Tool for Network Configurations
- Discovery Lab 8: Retrieve Data from Cisco Meraki Dashboard API
- Discovery Lab 9: Create and Monitor ThousandEyes Network Tests
- Discovery Lab 10: Write Unit Tests for Network Automation Scripts
- Discovery Lab 11: Harden Automation Scripts with Logging and Error Handling
- Discovery Lab 12: Build a Reusable Cisco ThousandEyes API Automation Wrapper
- Discovery Lab 13: Build a Web Interface for Network Device Management
- Discovery Lab 14: Build a Web Interface for Network Automation
- Discovery Lab 15: Build a Network Automation Tool with Ollama
Course Prerequisites
Attendees should meet the following prerequisites:
- Familiarity and basic understanding of core networking concepts.
- Familiarity with Cisco IOS-XE software or other Cisco network device configuration and operation skills.
- Cisco CCNA certification or equivalent knowledge recommended but not mandatory.
Recommended prerequisites:
-
CCNA - Implementing and Administering Cisco Solutions
Test Certification
Recommended as preparation for the following exams:
- There are no exams currently aligned to this course.