Overview
This course caters to network engineers aiming to enhance both their Python proficiency and network automation skills. Delving deeper into key areas such as netmiko, Nornir, and ncclient, we also focus on automating network testing and validation. Participants gain greater confidence working with Python functions, classes, objects, and error handling. The course additionally introduces more libraries like Scrapli, TTP, pyATS, Genie, pybatfish, and Suzieq, which cover parsing strategies, automation testing, validation, network analysis, observability, and telemetry. The curriculum also encompasses concurrency techniques.
Prerequisites
Delegates will learn how to
What will you learn
- Write Python modules and functions.
- Evaluate techniques to parse unstructured data.
- Use NETCONF filters.
- Handle Python errors effectively (try, assert…).
- Use postman.
- Automate testing and validation of the network.
- Use scrapli, Genie, batfish and Suzieq.
Outline
Review
CLI, NETCONF, RESTCONF, structured versus unstructured data, gNMI and when to use which. PEP 8. Naming conventions. Packages, modules, Classes and methods. The scrapli library. Netmiko versus scrapli.
Hands on: scrapli, Dictionaries versus Regular Expressions.
Modules and Functions
Writing your own modules, containers versus packages, virtual environments. Best practices, calling functions, writing your own functions. Parameters, arguments. Named arguments, dictionaries as arguments. Builtins. Docstrings. Main. __name__, __main__ . Program arguments.
Hands on: Getting interfaces, showing interface status using Netmiko and functions. Using dictionaries as arguments. Writing your own modules.
Parsing strategies
Turning unstructured data into structured data. textfsm, PyATS Genie parser, NAPALM getters, Template Text Parser.
Hands on: Genie parser, TTP. Accessing structured data with lists and dictionaries.
Classes, objects and Python
Python classes in Genie, PyEZ and others .
Hands on: studying network automation classes, objects, methods and attributes.
Configuration management – more nornir, ncclient, requests
Nornir tasks. Nornir results, Nornir functions, Nornir plugins. Nornir processors. YANG, YANG models, pyang. NETCONF hello. Capabilities. Schemas. Filters. Subtrees. XPATH. Exploring available YANG data models. NETCONF and network wide transactions. Asserting NETCONF capabilities. Configuration types. Locking configurations, commits. NETCONF data stores. Netconf-console. RESTCONF differences from NETCONF. URI construction. Postman. More XML and JSON. Git and configuration versions.
Hands on: Nornir and Jinja2. Exploring available models, NETCONF filters. Using postman.
Python error handling and debugging
Context handlers, try, assert, logging, pdb, pytest, unit testing, chatgpt.
Hands on: Writing code with each of the error handling methods, investigating what happens on an error. Use chatgpt to debug your code.
Python Automation Testing
Testing and validation. pyATS, Genie. Testbed file. Genie parse, genie learn, genie diff. Genie conf, Genie ops, Genie SDK, Genie harness. Xpresso.
Hands on: Using Genie for state comparisons of the network.
Network analysis
Batfish, pybatfish, configuration analysis, analysing routing, analysing ACLs. Pandas. Pandas dataframe. Filtering and selecting values of interest.
Hands on: Use Batfish to analyse network snapshots, find network adjacencies, flow path analysis.
Network observability
Suzieq, using docker, using as a package. Sqpoller, suzieq-gui, suzieq-cli, sq-rest-server. Namespaces and seeing devices, network state and Asserts. Time based analysis, snapshots and changes.
Hands on: Suzieq: Gathering data from the network, analysing data from the network. Network state assertion.
Telemetry
gRPC, gNMI. CAP, GET, SET. Subscriptions. Model Driven telemetry.
Hands on: Analysing telemetry data with Python.
Concurrency
asyncio, threads, processes. Nornir concurrency. Scrapli and netmiko concurrency.
Hands on: Multiple SSH connections to devices at same time. Scarpli asyncio.
Frequently asked questions
How can I create an account on myQA.com?
There are a number of ways to create an account. If you are a self-funder, simply select the "Create account" option on the login page.
If you have been booked onto a course by your company, you will receive a confirmation email. From this email, select "Sign into myQA" and you will be taken to the "Create account" page. Complete all of the details and select "Create account".
If you have the booking number you can also go here and select the "I have a booking number" option. Enter the booking reference and your surname. If the details match, you will be taken to the "Create account" page from where you can enter your details and confirm your account.
Find more answers to frequently asked questions in our FAQs: Bookings & Cancellations page.
How do QA’s virtual classroom courses work?
Our virtual classroom courses allow you to access award-winning classroom training, without leaving your home or office. Our learning professionals are specially trained on how to interact with remote attendees and our remote labs ensure all participants can take part in hands-on exercises wherever they are.
We use the WebEx video conferencing platform by Cisco. Before you book, check that you meet the WebEx system requirements and run a test meeting (more details in the link below) to ensure the software is compatible with your firewall settings. If it doesn’t work, try adjusting your settings or contact your IT department about permitting the website.
How do QA’s online courses work?
QA online courses, also commonly known as distance learning courses or elearning courses, take the form of interactive software designed for individual learning, but you will also have access to full support from our subject-matter experts for the duration of your course. When you book a QA online learning course you will receive immediate access to it through our e-learning platform and you can start to learn straight away, from any compatible device. Access to the online learning platform is valid for one year from the booking date.
All courses are built around case studies and presented in an engaging format, which includes storytelling elements, video, audio and humour. Every case study is supported by sample documents and a collection of Knowledge Nuggets that provide more in-depth detail on the wider processes.
When will I receive my joining instructions?
Joining instructions for QA courses are sent two weeks prior to the course start date, or immediately if the booking is confirmed within this timeframe. For course bookings made via QA but delivered by a third-party supplier, joining instructions are sent to attendees prior to the training course, but timescales vary depending on each supplier’s terms. Read more FAQs.
When will I receive my certificate?
Certificates of Achievement are issued at the end the course, either as a hard copy or via email. Read more here.