Automating Networks with Python
Every network engineer knows it; automation is coming. Python is the de-facto standard for automated network operations these days, and for good reason. Join me to explore a variety of popular and modern Python tools to solve real business problems.
What you'll learn
Many want to automate their production networks but simply don't know how. In this course, Automating Networks with Python, you will learn foundational knowledge of/gain the ability to overcome this challenge. First, you will learn how to collect information from, and make updates to, network devices using legacy SSH command-line methods. This includes diving into tools like Paramiko, Netmiko, and NAPALM. Next, you will discover how to write custom parsers for more advanced CLI-based automation, to include unit testing with pytest. Finally, you will explore how to use modern APIs and their supporting technologies, including NETCONF, RESTCONF, and YANG. When you’re finished with this course, you will have the skills and knowledge of automated network management needed to design, implement, and maintain professional-grade infrastructure as code solutions for your business.
Table of contents
- Things You Should Know Before Beginning 5m
- Understanding Our MPLS Network 3m
- Introducing the Python Paramiko Package 3m
- Demo: Your First Paramiko Networking Script 9m
- Challenge: Add Persistent Storage to the Existing Script 3m
- Bonus Demo: The Python Debugger (pdb) 6m
- Paramiko Summarized with Pseudo-Code 1m
- What is Infrastructure as Code? 8m
- Introducing Jinja2 for Text Templating 3m
- Demo: Supplementary Infrastructure as Code Files 5m
- Demo: Using Paramiko and Jinja2 for CLI-based IAC 3m
- Why Do We Need Netmiko? 2m
- Demo: Retooling Our Solution Using Netmiko 4m
- Bonus Demo: Secure Copy Protocol (SCP) File Transfer Using Netmiko 4m
- Comparing Paramiko and Netmiko 2m
- Introducing Python Regular Expressions 4m
- Demo: Implementing Platform Model ID Parsers 4m
- Demo: Implementing VRF Configuration Parsers 6m
- What is Unit Testing? 1m
- Demo: Using pytest for Model ID Parser Testing 5m
- Demo: Using pytest for VRF Configuration Parser Testing 3m
- Regex and Unit Testing in Summary 1m
- Introducing NAPALM Simplify Mixed Networks 3m
- Demo: NAPALM Getters and Basic Configuration Merging 7m
- Introduction to Set Theory using Python 3m
- Demo: Integrating Set Theory Logic 7m
- Combining Set Theory with NAPALM 2m
- Demo: Enhanced NAPALM Merging with Set Theory 5m
- Other Handy NAPALM Features 2m
- Visually Comparing Paramiko, Netmiko, and NAPALM 2m
- What Problem Does This Solve? 4m
- Introduction to NETCONF Operations and YANG Data Models 4m
- Demo: Introducing ncclient and the “get-config” RPC 5m
- Demo: Managing MPLS RTs Using NETCONF via ncclient 8m
- Demo: Storing VRF Configurations using NETCONF and Nornir 7m
- Demo: Infrastructure as Code using NETCONF and Nornir 7m
- HTTP-based RESTCONF Operations 3m
- Demo: An alternative MPLS RT Solution Using RESTCONF and Nornir 9m
- Comparing NETCONF and RETSCONF 1m
- Why You Must Use Version Control 2m
- Demo: Time Travel with Git 3m
- Embedded Error-checking in Python 2m
- Demo: Command Line Input and File Validation Techniques 3m
- Beautifying Code with Formatters 1m
- Demo: Uncompromising Uniformity with black 2m
- Keeping Code Clean with Linters 1m
- Demo: Deploying pylint To Reveal Simple Problems 4m
- Writing Makefiles to Automate Shell Operations 1m
- Demo: Saving Time with Makefiles 5m
- Module Summary and Final Thoughts 3m