Python Foundations For Network Engineers

Overview

This course will be 30% Theory and 70% hands on practical learning. The goal of the course is not to discuss the abstract concepts and terminology of Python. We will instead learn about specific logical constructs that exist in Python, that will enable us to programmatically begin automating networks and network elements.

As network engineers, we have to realize that our industry is changing; evolving. The days of strict command line configuration of networks and networking elements are coming to a close. We need to add programming as a functional skill set to our tool chest, however, we do not need to know everything a Python programming expert needs to know to develop and deploy code like in machine learning applications. The majority of us are just interested in what we need to know to manipulate network environments. To that end this course was developed to assist us by first focusing on how to configure traditional IOS devices with Python. These exercises have been designed to provide us with goal based, practical learning opportunities. However, we will quickly demonstrate how this is useful to learning the programmatic aspects of Python, but not very practical once it is applied at scale.

With this we will move into the application of Python in concert with many different Application Programmable Interfaces. We will explore NXOS, UCS and ACI APIs to name a few. We will be automating network functionality, and orchestrating operational tasks from day one of this course.

Prerequisites

It is necessary that students have CCNA Routing and Switching qualifications or the equivalent work experience. We will be using Python to push commands and syntax to devices, and the nature and structure of those command are outside the scope of this course. Regarding Python, some familiarity will be helpful but no actually knowledge of how to write python scripts will be necessary.

Course Outline

Day 1:

Python Foundations for Network Engineers

  • Introduction
  • Understanding Python
  • Data types:
    • Strings
    • Numbers
    • Booleans

Conditional

*Guide Lab: Python Foundations-I

  • Lists
  • Dictionaries
  • Loops
  • Function
  • Working with Files

*Guided Lab: Python Foundations-2

Day 2: 

Writing and Troubleshooting Python Scripts

  • Writing Scripts
  • Executing Scripts
  • Analyzing Code
  • Error Handling

*Guided Lab: Writing and Troubleshooting Python Scripts

Python Libraries

  • Introduction
  • Python Module
  • Python Package

*Guided Lab: Custom Python Libraries

Day 3:

Network API’s and Protocols

  • Evolution of Network Programmability
  • Data Encoding Formats

JSON

*Guided Lab: Working with JSON objects in Python

  • XML

*Guided Lab: Working with XML in Python

  • Data Models
  • Model-Driven Programmability Stack
  • REST
  • NETCONF
  • gRPC 

Day 4:

Cisco NX-OS Programmability

  • Introduction
  • NX-API CLI Part 1

*Guided Lab: NX-API Discovery 

  • NX-API CLI Part 2
  • NETCONF
  • Python on Box
  • NX-API REST

*Guided Lab: Using Python on the Nexus Switch

Day 5: 

Cisco ACI Programmability

  • Introductions
  • Northbound and Southbound Layers
  • REST APIs
  • REST API Message Format
  • Cisco ACI APIC Object-Based Tree
  • dMIT Queries
  • Cisco ACI Cobra SDK (Python)
  • Cisco ACI toolkit
  • Cisco ACI Power Tool
  • Cisco APIC REST to Python Adapter

*Guided Lab: ACI Cobra Automation Exercises

  • UCS Director
  • OpenStack API Options

SLI Main Menu