set_link_state
Simulate physical link failure by suspending or restoring a link between network nodes. Use network_id to target the link and boolean to set its state, enabling fault injection testing.
Instructions
Bring a link up or down at the topology layer (physical-style fault
injection). up=True restores the link, up=False suspends it. This is
not the same as disabling an interface inside the device CLI -- the device
sees its port go down, matching a real cable pull. Only affects running nodes.
Use the network_id from connect_nodes / get_lab. Current state is readable
from get_lab (each ethernet has a suspend field: 1=suspended).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| up | Yes | ||
| network_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |