Learning paths › Automation › Concurrency, and the Python types device output returns
Concurrency, and the Python types device output returns
Connecting to many devices at once with a cap on concurrency, then a careful pass through the Python types device output actually returns: objects and the names that label them, integers against floats, conversion between binary, hex and decimal, and the string work that follows — indexing and slicing, case normalised before comparing, whitespace stripped off CLI output, and format placeholders. Explanation and checks; five written exercises.
Lessons
- Connect to many devices at once
- Cap concurrency so you don't melt the network
- Run your first script and read its output
- Everything in Python is an object
- A variable is a label, not a box
- The types you will meet in device output
- Check a type before you trust it
- Integers, floats and when the difference bites
- Do arithmetic on values you pulled from a device
- Convert between binary, hex and decimal
- What a string is, and why every CLI returns one
- Turn a number into text you can send
- Escape the characters that break a command
- Join text together to build a command
- Repeat text without typing it twice
- Pull one character out by position
- Slice a range out of a string
- Normalise case before you compare
- Test how a line begins or ends
- Strip the whitespace device output leaves behind
- Check whether a field is a number
- Count how many times something appears
- Build strings with format placeholders
- Ask an object what it can do
More in Automation
- First scripts that configure devices
- NAPALM: structured data across vendors
- Parsing show output and testing conditions
- Readable code, branching and loops
- Build the workstation and the toolchain
- Files, CSV, JSON and pickle
- Paramiko: SSH to devices from Python
- Netmiko at fleet scale
- Tuples, sets and dictionaries for device records
- Exceptions and your first classes
- Plan and build the automation lab
- Files, formatting and regular expressions
- Addresses, functions, modules and classes
- CSV inventories, logging and scheduling
- Netmiko, SCP and structured parsing
- Agents, async and model-driven workflows
- NETCONF, YANG and RESTCONF
- NX-API, pyATS and Genie
- A small GenAI app, end to end
- macOS, Linux and the virtual lab
- Agile delivery and Python fundamentals
- REST APIs, authentication and requests
- Flask, Docker and Jenkins
- Managing a router with NETCONF and RESTCONF
- Ansible: inventory, ad-hoc commands and first playbooks
- Roles and zero-touch provisioning for Linux switches
- Installing the controller and applying a project
- Setting up Python 3
- The Ansible lab and the controller
- Vault, variables and config changes
- Parsing output and knowing which variable wins
- Jinja filters and PAN-OS automation
- Loops, callbacks, strategy and run control
- Roles, imports and writing your own module
- Running playbooks from AWX