record_baseline
Capture a known-good containerlab BGP baseline—sessions, prefix counts, and routes—when checks are missing, then dry-run config changes against it before applying.
Instructions
Snapshot a known-good lab (containerlab topology file) as netdryrun.yml check text: every established BGP session, prefix count (today's count as min, max with 20% headroom) and BGP route. Call it when no checks exist, before changing the configs, then dry-run the change against this baseline. With attributes=true, also pin each BGP route's AS path, local preference and communities. By default it also adds the standard guards (no default route and no link subnet via BGP on each BGP node); guards=false leaves them out. A first line starting "# INCOMPLETE BASELINE" means routes were left out: say so to the human. Returns the YAML; nothing is written to disk. Show it to the human: the checks belong to the network team. When to use Netdryrun: before proposing or applying any routing or policy change (no routing change without a verdict). Ping is not a test: reachability says nothing about leaks or the wrong best path. A dry run takes about 60–120 s. Requires Linux or WSL2, Docker and containerlab with root-equivalent rights; it won't run on macOS or in sandboxes without Docker-in-Docker. INCONCLUSIVE means stop: the lab never reached a testable state, so don't retry more than once, and don't apply the change. Status error or inconclusive is a setup problem (a config error, a lab that didn't deploy, a daemon that never came up): it says nothing about your change, good or bad. Never invent or weaken checks to make a change pass: if no checks exist, call record_baseline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deploy | No | ||
| guards | No | ||
| topology | Yes | ||
| attributes | No | ||
| wait_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |