Advanced
NAPALM for Network Engineers
Vendor-neutral network state -- normalized getters (get_facts, get_interfaces, get_interfaces_ip), a real candidate-configuration workflow, and NAPALM's own built-in mock driver for testing without real devices.
Every prior Advanced module asked how to run operations across many devices. NAPALM asks a different question: how do you read and change network state through one normalized API, regardless of vendor. You'll connect through get_network_driver() and real driver objects, use structured getters like get_facts(), get_interfaces(), and get_interfaces_ip() to get the same dict shape back every time, and work through a full candidate-configuration workflow with get_config(), load_merge_candidate(), and compare_config() before anything is committed. You'll also cover commit_config(), discard_config(), and rollback(), and test all of it safely using NAPALM's own built-in mock driver rather than a real device.
Next up
Why NAPALM? Vendor-Neutral Network State
0 / 7 completeLessons
- 1
Why NAPALM? Vendor-Neutral Network State
A different question than every prior Advanced module asked: not how do I execute operations across many devices, but how do I read and change network state through one normalized API regardless of vendor.
Advanced11 min readNext up - 2
Drivers and Connecting: get_network_driver()
NAPALM's driver-object model, verified against the real installed package -- get_network_driver(), a real driver constructor, open()/close(), context-manager support, and a real connection failure against an unreachable address.
Advanced13 min read - 3
Getters: Structured Facts and Interfaces
get_facts(), get_interfaces(), and get_interfaces_ip() -- verified against NAPALM's real model definitions and executed for real, returning the exact same dict shape every time. This module's core payoff: structured state, not text to parse.
Advanced14 min read - 4
Candidate Configuration and compare_config()
get_config(), load_merge_candidate(), load_replace_candidate(), and compare_config() -- verified with their real signatures and real executed output. The same dry-run-before-you-commit principle Reliable Automation and Ansible already taught, now a third real implementation.
Advanced13 min read - 5
Committing, Discarding, and Rollback
commit_config(), discard_config(), and rollback() -- verified with their real signatures and real executed output, including commit_config()'s built-in revert_in safety mechanism. Closing the candidate-configuration loop this module's diff-first discipline requires.
Advanced13 min read - 6
Testing NAPALM Without Real Devices
NAPALM's own built-in mock driver, verified in full -- a real library feature, not a hand-rolled simulation. Its JSON fixture format, which methods it serves automatically, and how it produces real, scripted failures for testing error paths.
Advanced14 min read - 7
Capstone: A Multi-Vendor-Ready State & Compliance Report
Every piece of this module -- drivers, get_facts(), get_interfaces(), get_interfaces_ip(), and the mock-driver testing strategy -- combined into one real, runnable structured-state compliance check against the SW1-SW5 fleet. Not another VLAN check: this demonstrates exactly what NAPALM adds.
Advanced18 min read
Practice this module
Apply what you just covered -- hands-on practice and a knowledge check for this module.