device_exec
Executes commands on a network device console in an eNSP topology, with optional authentication and save settings.
Instructions
在已启动的 eNSP 设备 console 上逐条执行命令。
target 为设备名(配 topo_path)或端口号。view 为 keep/user/system。 username/password 用于需要登录的 console,只有密码的 console 可只给 password。 new_password 仅在设备要求初次设置或修改密码时使用;不主动修改已有密码。 stop_on_error 默认遇错停止;失败时不 save。confirm 为 Y/N/YES/NO。 返回 ok、逐条 results、errorCount、stoppedEarly 和 saveStatus;超时断线不会重试命令。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | 127.0.0.1 | |
| save | No | ||
| view | No | keep | |
| target | Yes | ||
| confirm | No | Y | |
| commands | Yes | ||
| password | No | ||
| username | No | ||
| topo_path | No | ||
| new_password | No | ||
| stop_on_error | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |