run_show_commands
Execute multiple CLI show commands on a Juniper device in one session. Commands run sequentially and stop on first failure.
Instructions
Run multiple CLI show commands on the device in a single session.
Commands are executed in sequence and stop on the first failure. To run all commands regardless of individual errors, call run_show_command once per command instead.
Args: hostname: Target device hostname (must exist in config.ini) commands: List of CLI commands to execute output_format: Output format — "text" (default), "json", or "xml". Note: pipe stages (| match, | last, | count, etc.) are silently dropped regardless of output_format — PyEZ's Device.cli() sends the command over NETCONF RPC, which JunOS does not pipe-process. Run commands without pipes and filter client-side. run_show_command_batch's grep_pattern argument offers server-side-style filtering, but it only accepts one command at a time — it does not cover this tool's multi-command case, so it is not a drop-in workaround here. config_path: Path to config.ini (empty string uses default search)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commands | Yes | ||
| hostname | Yes | ||
| config_path | No | ||
| output_format | No | text |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |