Learning paths › Automation › NAPALM: structured data across vendors
NAPALM: structured data across vendors
NAPALM read as structured data instead of parsed text — MAC and ARP tables, and BGP neighbour state checked across a topology and reported only where it is wrong — then configuration pushed without logging in and made idempotent, a running config diffed against intent, and the things that separate a production script from a demo: commands and devices moved out of the code, credentials out of the source and stored encrypted, a device that does not answer, and platform detection before per-platform commands. Explanation and checks; four written exercises.
Lessons
- Read structured data instead of parsing text
- Pull the MAC table and ARP cache as data
- Ask a router which BGP neighbours it has
- Read the state of every neighbour
- Tell an established peer from a flapping one
- Check many neighbours in one pass
- Scale the check across a real topology
- Report only the peers that are wrong
- Push an ACL without logging in
- Make the change idempotent
- Diff running config against intent
- Apply a set of config files in order
- Apply the right file to the right device
- What a production script has that a demo doesn't
- Start with the smallest thing that works
- Move the commands out of the code
- Move the devices out too
- Get credentials out of your source code
- Survive the device that doesn't answer
- Detect what you're talking to before you talk
- Send each platform its own commands
- Store credentials encrypted, not in plain text
- Time a sequential run
- Find where the minutes go
More in Automation
- First scripts that configure devices
- Concurrency, and the Python types device output returns
- 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