Batfish Run Assertion Suite
batfish_run_assertion_suiteValidates and runs a YAML assertion suite against a Batfish network snapshot, returning per-assertion pass, fail, or error results with a summary; invalid suites run nothing.
Instructions
Validate and run an assertion suite (YAML text) on a snapshot.
suite_yaml uses the suite schema (see examples/assertions.yaml)::
version: 1
assertions:
- type: assert_flows_succeed
params:
startLocation: as1border1
headers:
dstIps: 2.128.0.101
ipProtocols: [TCP]
dstPorts: "443"Header fields follow Batfish rules: srcIps/dstIps accept IPs,
prefixes, and node names; srcPorts/dstPorts are string specs such
as "443". Without ipProtocols, Batfish tests ICMP. Prefer node
names, interface locations, or explicit host IPs over broad prefixes,
which may make Batfish choose representative flows with network-address
sources.
All-or-nothing: if the suite is invalid, nothing runs and the result is
{results: [], errors: [...], summary: {...}}. Otherwise results are
{type, status, message, snapshot, ran_at, runtime, fun?, answer_rows?, details?, code?} per assertion, plus a summary of pass/fail/error
counts. Failure messages use a one-line summary; rows are returned as
answer_rows when parseable, otherwise as capped details.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"suite_yaml": "<suite_yaml>"
},
"name": "batfish_run_assertion_suite"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| debug | No | ||
| network | No | ||
| snapshot | No | ||
| suite_yaml | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||