build_topology
Define nodes, links, and configurations in one request to build a Cisco Modeling Labs (CML) lab, with an option to start it immediately. Avoids repetitive create_lab/add_node/add_link calls.
Instructions
Create a whole lab - nodes, links, and configs - in one call. Use this when you already have a topology design in mind (e.g. from list_example_topologies, or one you designed yourself from the user's description) rather than calling create_lab/add_node/add_link repeatedly.
nodes: [{id, label, node_definition, x?, y?, image_definition?,
configuration?, cpus?, ram?}, ...]
id is a caller-chosen local key used only to wire up links below;
it is not sent to CML.
links: [{node_a, node_b, iface_a?, iface_b?}, ...]
node_a/node_b reference the local ids from nodes. iface_a/iface_b
are optional interface labels (e.g. 'GigabitEthernet0/0'); if omitted
the next free interface on each node is used.
start: if True, start the lab immediately after building it.
Returns the new lab's id plus a map from each local node id to its real CML node id, so you can immediately call add_node/add_link/set_node_config etc. against the result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| links | Yes | ||
| nodes | Yes | ||
| start | No | ||
| lab_title | Yes | ||
| lab_description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||