Python network programming techniques : 50 real-world recipes to automate infrastructure networks and overcome networking challenges with Python /

Bibliographic Details
Main Author: Neidinger, Marcel (Author)
Corporate Author: Knovel (Firm)
Format: eBook
Language:English
Published: Birmingham : Packt Publishing, 2021.
Subjects:
Online Access:Connect to the full text of this electronic book
Table of Contents:
  • Cover
  • Copyright
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: A Primer on Python 3
  • Technical requirements
  • Assigning variables in Python
  • Getting ready
  • How to do it...
  • How it works...
  • Converting between data types in Python
  • Getting ready
  • How to do it...
  • How it works...
  • Looping over lists in Python
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Controlling the flow of a Python program using if statements
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Executing code until a condition is met using while loops
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Writing reusable code with functions
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Storing and accessing key-value pairs using dictionaries
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Importing modules from the standard library
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Installing modules from the PyPI
  • Getting ready
  • How to do it...
  • How it works...
  • Chapter 2: Connecting to Network Devices via SSH Using Paramiko
  • Technical requirements
  • Initiating an SSH session with Paramiko
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Executing a command via SSH
  • Getting ready
  • How to do it...
  • How it works...
  • Reading the output of an executed command
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Executing the same command against multiple devices
  • Getting ready
  • How to do it...
  • How it works...
  • Executing a sequence of commands
  • Getting ready
  • How to do it...
  • How it works...
  • Using public/private keys for authentication
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Loading local SSH configuration
  • Getting ready
  • How to do it...
  • How it works...
  • Chapter 3: Building Configuration Templates Using Jinja2
  • Technical requirements
  • Loading Jinja2 templates in Python
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Passing variables from Python to a template
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Writing your rendered template to a file
  • Getting ready
  • How to do it
  • How it works...
  • Using for-loops in Jinja2 to configure an access list
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Creating a port configuration template using if-clauses in Jinja2
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Creating modular templates using Jinja2's import methods
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Using Python functions from within your template with Jinja2 filters
  • Getting ready
  • How to do it...
  • How it works...
  • There's more...
  • Structuring your configuration template with blocks and template inheritance
  • Getting ready