Programming and Application Security
Network Automation
Automating configuration, backups and checks across many devices.
- 11 notes
- 94 minutes of reading
- Netmiko in depth: connecting to many vendors, sending commands and configHow Netmiko handles SSH sessions to Cisco, Juniper, Arista and other devices, how to send show and configuration commands, parse output, and handle credentials and errors safely. 9 min · Intermediate
- NAPALM: vendor-neutral getters, config merge, replace and compareHow NAPALM gives a common Python interface to different network operating systems, using getters for structured data and a load, compare, commit workflow for safe configuration changes. 9 min · Intermediate
- Nornir: running Python tasks across many network devices in parallelHow the Nornir framework uses an inventory, filters, tasks and a threaded runner to run Netmiko or NAPALM jobs against many devices at once, with results you can process in Python. 9 min · Intermediate
- Jinja2 templates for network configurationHow to separate data from configuration using Jinja2 templates: variables, loops, conditionals, filters and whitespace control, rendered from Python for consistent device configs. 8 min · Intermediate
- NETCONF and YANG with Python: model-driven network configurationWhat YANG data models and the NETCONF protocol are, how datastores and operations work, and how to read and change configuration from Python with ncclient. 9 min · Advanced
- RESTCONF: managing network devices over HTTPS with YANGHow RESTCONF exposes YANG-modelled device data as HTTPS resources, how to build URLs, which HTTP methods to use, and how to call it from curl and Python securely. 8 min · Intermediate
- Source of truth: IPAM and DCIM tools such as NetBox and why they matterWhy network automation needs a single source of truth, what IPAM and DCIM tools record, how NetBox fits in, and how to query it from Python with pynetbox. 8 min · Intermediate
- Network configuration compliance and drift detection with PythonHow to define golden configuration rules, collect running configurations, detect drift with rule checks and diffs in Python, and report and fix findings safely. 8 min · Intermediate
- Network automation: why automate, the toolchain and model-driven APIsWhy manual configuration doesn’t scale, the benefits of automation, the automation stack, how tools talk to devices (SSH, NETCONF, RESTCONF, gNMI, REST), YANG, YAML and JSON, sources of truth and idempotency. 8 min · Intermediate
- Ansible and NetDevOps: playbooks, inventories and CI/CD for networksWhy Ansible suits network teams, inventories and variables, an idempotent VLAN playbook using Cisco IOS modules, check mode, protecting secrets, and how Git, reviews and CI/CD pipelines make network changes safer. 9 min · Advanced
- Python for network engineers: libraries and a first automation scriptWhy Python is the language of network automation, the key libraries (Netmiko, NAPALM, ncclient, requests, Nornir, TextFSM), a complete configuration backup script with a YAML inventory, safe changes and a learning path. 9 min · Intermediate