Test beds
The Test Bed feature is for labs where the same physical hardware has to become a different setup on demand — a demo rig on Monday, a customer reproduction on Tuesday.
Enable it under Features in the dashboard.
The model
Section titled “The model”A test bed is a saved set of device configurations. Swapping to one means moving the hardware you have into that state — which is more than restoring a file, because serials, ports, and stack members don’t line up between setups.
Tools: testbed_save, testbed_list, testbed_get, testbed_delete,
testbed_capture, testbed_plan, testbed_apply, testbed_export,
testbed_import.
The workflow
Section titled “The workflow”- Capture —
testbed_capturerecords the current state of the lab as a test bed you can return to. - Plan —
testbed_planworks out what has to change to get from where you are to the target test bed. Read the plan before applying it; this is where a mismatch between the saved bed and the hardware actually present shows up. - Apply —
testbed_applyexecutes the plan.
The Swap lab hardware to a saved test bed prompt runs this end to end and asks you for the target bed and mode.
Export and import
Section titled “Export and import”testbed_export and testbed_import move a test bed between accounts or
environments — useful for handing a reproduction setup to someone else, or
keeping a bed in version control alongside the test plan that runs against it.
Config restore
Section titled “Config restore”Two restore paths exist for switches:
- In-place restore to startup config — the normal path for a switch that’s reachable.
- Probe TFTP restore — for a switch that has been evicted and is no longer reachable through the controller. This uses an on-LAN probe to serve the configuration over TFTP, which is the only way back for a device that can’t be reached any other way.
Working with test plans
Section titled “Working with test plans”Test beds pair naturally with test plans: the bed puts the hardware in a known state, and the test plan verifies behavior against it with gated expectations and 90 days of regression history.
A caution
Section titled “A caution”testbed_apply changes real hardware. Run it against a lab, read the plan
first, and consider enabling Write Guard so nothing
mutating goes through unreviewed.