Skip to content
R1-MCP
Get Support

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.

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, plus switch_config_copy and switch_config_restore_via_probe for single-switch restores, and config_diff to see what changed on a switch since its capture.

You can keep up to 50 test beds, each with up to 100 devices. A bed left untouched for 365 days is deleted, together with its stored configs.

  1. Capturetestbed_capture records the current state of the lab as a test bed you can return to. Each switch needs its venueId and switchId (the MAC). Capture takes a fresh R1 config backup — which evicts the oldest of R1’s roughly 7 retained backups for that switch — unless you pass an existing backupId. The config text is mirrored to durable private storage and is never shown to Claude; the capture reports only size and whether the config contains secrets.
  2. Plantestbed_plan works 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.
  3. Applytestbed_apply compiles the plan into a transition MOP, saves it, and returns its mopId. It changes nothing on the devices itself. The swap runs when you drive that MOP with mop_replay: step by step, or unattended with action: "start_auto", unattended: true. Run mop_replay with dryRun: true first. An empty plan is refused with nothing_to_apply.

The Swap lab hardware to a saved test bed prompt runs this end to end and asks you for the target bed and mode.

testbed_export and testbed_import move a test bed between accounts or environments — useful for handing a reproduction setup to someone else.

The bundle that testbed_export returns is definition only: inventory, placement, and per-switch config metadata, with no config text. Importing it creates the bed with each switch listed in configsPending, so you re-capture each switch with testbed_capture on the new bench before planning.

The export’s download_url depends on format:

formatThe download
json (default)The full off-box archive, with each switch’s config text embedded. Importing it restores the configs.
html, pdf, docxA printable test-bed definition document — inventory, topology, and config metadata only, never config text

Two restore paths exist for switches, and which one applies depends on whether R1 still holds the switch’s captured backup. R1 retains only a bounded number of backups per switch, so an old one ages out.

  • In-place restore to startup configswitch_config_copy, the normal path while the captured backup is still retained. It reports the switch as restorable, and apply: true issues the R1 restore, which overwrites the startup config and reloads the switch — roughly ten minutes offline. It warns loudly when the switch now runs a different firmware train from the one the config was captured on, or when the captured train is unknown; the restore is still allowed, so read the warning first. Other states: restored, offline, no_config, no_backup_id.
  • Probe TFTP restoreswitch_config_restore_via_probe, for a switch whose backup has aged out of R1. That state is reported as evicted, and once it happens the in-place restore is gone: R1 has no API to re-inject a config. This path carries the durable copy back onto the box over a TFTP download served by an on-LAN probe, then reboots the switch onto it. It needs a linked Probe MCP account (the dashboard’s Probe (config restore) card) and a probe on the same LAN as the switch, named by probeId. reboot: false writes the startup config without rebooting (state copied_no_reboot).

Both default to a preview: without apply: true they report what would happen and change nothing.

config_diff answers “what changed on this switch since I captured it”, line by line — including after R1’s own backup comparison can’t help because the baseline has aged out of R1’s roughly 7 slots.

  • Baseline: a stored capture — baseTestbedId plus the switch serial.
  • Compared against: the switch’s current config, taken from R1’s newest successful backup (the default), or another stored capture (compareTestbedId).
  • Read-only: it never takes a new R1 backup, because that would evict one. With no usable backup it stops with no_live_backup — run testbed_capture to get one.
  • Secrets stay hidden: a credential line (passwords, SNMP communities, RADIUS/TACACS keys) still shows up as changed, with its value replaced by <redacted: kind>.
  • Capped: at most 400 emitted lines, with no paging — it reports what changed, and can’t be used to read a config back out. Two configs too different for a useful line diff come back as counts plus a note.

context (0–10, default 2) sets how many unchanged lines surround each change.

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.

Driving the transition MOP changes real hardware. Run it against a lab, read the plan first, and dry-run it with mop_replay before you run it live. Write Guard does not gate test-bed swaps or the switch restores — their own previews and unattended acknowledgement are the safety net.