check_device_variables
Verify a device's metadata variables against imported expected values to confirm mappings, detect mismatches, and identify unmapped or undefined ADOM variables.
Instructions
Check a device's metadata variable values against what was imported.
Use after add_model_device to confirm every meta_variables entry
landed as a per-device mapping. A device can hold one mapping per scope
("global" and a VDOM such as "root"). A variable is reported as:
match: every mapping the device has holds the expected value
mismatch: a device mapping holds another value; one entry per differing scope, named in
vdomnot_mapped: no device mapping, so templates get the ADOM default
undefined: no such variable exists in the ADOM
Args: adom: ADOM name device: Device name (e.g. "branch1") expected: Variable name -> expected value, e.g. the CSV row {"branch_id": "1", "hostname": "branch1"}
Returns: dict: status, ok (all match), match / mismatch[{name, expected, actual, vdom}] / not_mapped / undefined lists
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": {
"adom": "<adom>",
"device": "<device>",
"expected": "<expected>"
},
"name": "check_device_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| adom | Yes | ||
| device | Yes | ||
| expected | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||