add_lab_node
Add a network device node to an EVE-NG lab canvas by searching for a template by name or vendor. Automatically resolves the correct template, applies its default settings, and auto-places the node when no position is provided.
Instructions
Add a node to a lab's canvas, resolving the template by search and auto-placing it.
template is a case-insensitive substring search against every
template's id, name, and (best-effort) vendor -- not an exact id.
Empty matches everything (lists them all); no matches cancels;
exactly one match proceeds directly; more than one match lists
them and asks you to call again with selection set to the
number or exact id/name of the one you want.
Once resolved, fetches the template's own defaults (node type,
RAM, CPU, ethernet count, console type, icon, and every other
field it reports, e.g. QEMU-specific ones) and uses them for
anything you didn't specify -- this works the same way for every
vendor's templates. If the template has more than one image and
you didn't specify image, this returns the list of images
(status "selection_required") and asks you to pick one instead of
guessing; with exactly one image, it proceeds directly.
Canvas position auto-places when not given: left to right, 5 nodes per row, 100 units apart starting at (100, 100), wrapping to a new row 100 below; skips any grid slot within 50 units of an existing node on both axes.
Args:
lab_path: Full path to the .unl lab file.
template: Template id, name, or vendor to search for -- a
fragment is enough, e.g. "vios", "cisco", or "juniper".
Empty lists every available template.
selection: When multiple templates matched, the number or
exact id/name of the one to use.
node_type: "qemu", "dynamips", or "iol". Defaults to the template's own type.
name: Node display name. Defaults to the template's name/prefix.
image: Image filename from get_node_template. Required if the
template has more than one image; auto-filled if it has exactly one.
config: "Unconfigured" or "Saved".
left: Exact canvas position from the left, e.g. "100". Auto-placed if omitted.
top: Exact canvas position from the top, e.g. "100". Auto-placed if omitted.
ram: RAM in MB. Defaults to the template's default.
console: "telnet" or "vnc". Defaults to the template's default.
cpu: Number of vCPUs. Defaults to the template's default.
ethernet: Number of ethernet interfaces/portgroups. Defaults to
the template's default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cpu | No | ||
| ram | No | ||
| top | No | ||
| left | No | ||
| name | No | ||
| image | No | ||
| config | No | Unconfigured | |
| console | No | ||
| ethernet | No | ||
| lab_path | Yes | ||
| template | No | ||
| node_type | No | ||
| selection | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||