Show Objects and TextFSM

rauto show is the profile-aware read-only inspection path. Instead of typing the platform-specific command every time, you ask for an object such as interfaces, route, or vlan; rauto resolves the selected device profile, maps the object to the right command, executes it in the right mode, and parses the output with TextFSM by default.

When to use show

Use rauto show when you want operational data rather than a configuration change:

  • inventory and version checks
  • interface, route, ARP, LLDP, MAC, VLAN, and policy inspection
  • quick pre-checks before a transaction or orchestration run
  • tabular output that can be exported for review

For commands outside the object catalog, use rauto exec and enable TextFSM parsing explicitly when needed. rauto exec, rauto template, and rauto flow also enable parsing when you pass a TextFSM template or request Excel export.

Run a show object

rauto show interfaces \
  --connection core-01

You can also pass connection flags directly:

rauto show route \
  --host 192.168.1.1 \
  --credential network-admin \
  --device-profile cisco_ios

Useful objects include:

  • version
  • interfaces
  • interface-brief
  • route
  • arp
  • lldp
  • mac
  • vlan
  • access-list
  • object-group
  • security-policy
  • nat-policy

The exact list depends on the resolved platform. Use --list to inspect the current catalog:

rauto show --list --device-profile cisco_ios

Object names are normalized before lookup. For example, ver maps to version, interface and ints map to interfaces, and ip-interface-brief maps to interface-brief.

Inspect the resolved command

Use --print-command when you want to see which device command an object maps to before execution:

rauto show route --connection core-01 --print-command

The mapping is defined in the bundled assets/show_catalog/commands-mapping.toml table. It can set a platform-level execution mode or a per-object execution mode. Mode priority is:

  1. explicit --mode
  2. mode from the show catalog mapping
  3. profile default mode

Mode names are matched case-insensitively and then canonicalized to the profile's mode name. For example, --mode enable resolves to Enable when that mode exists in the selected profile.

Built-in mappings are based on NTC-compatible platform names. When the selected profile maps to an NTC platform, rauto can resolve objects such as interfaces, route, arp, and vlan without requiring users to remember vendor-specific commands.

Batch show queries

The CLI form of rauto show runs one object across one or more saved connections. Targets can be selected directly, by inventory group, or by labels/tags:

rauto show interfaces \
  --target core-sw1 \
  --target core-sw2 \
  --group access \
  --label campus \
  --print-command

rauto show route \
  --group core \
  --tag prod \
  --textfsm-excel ./routes.xlsx

CLI batch show uses saved connections as the target source. Before sending commands, rauto resolves each target profile and verifies that the requested object has a matching command on every target, passes command blacklist checks, and has a valid execution mode. If any target/object pair fails this precheck, the batch run fails before executing commands.

The Web/API Batch Show endpoint also supports multiple objects in one request. That multi-object form is exposed through the Web console and API request body; the CLI accepts a single positional object.

TextFSM parsing behavior

rauto show enables TextFSM parsing by default.

rauto show interfaces --connection core-01

Disable parsing when you only want raw output:

rauto show interfaces --connection core-01 --no-parse

Export successful parsed rows to Excel:

rauto show interfaces \
  --connection core-01 \
  --textfsm-excel ./interfaces.xlsx

--textfsm-excel requires parsing. For show, do not combine it with --no-parse; rauto rejects that combination before execution.

If --textfsm-platform is omitted, rauto infers the matching NTC platform from the resolved device profile, such as cisco_ios or huawei_vrp.

By default, rauto uses lenient NTC parsing: fallback TextFSM rules such as ^. -> Error are filtered before parsing. This avoids failing the entire parse when a template sees a non-essential unmatched line. Use --textfsm-strict-errors when you want to preserve those TextFSM Error rules:

rauto show interfaces \
  --connection core-01 \
  --textfsm-strict-errors

Parse exec, template, and flow

show parses by default, but exec, template, and flow parse only when TextFSM parsing is enabled. Passing --parse-textfsm, --textfsm-template, or --textfsm-excel enables parsing for those commands.

rauto exec "show version" \
  --connection core-01 \
  --parse-textfsm

Use a specific template file when automatic selection is not enough:

rauto exec "show version" \
  --connection core-01 \
  --textfsm-template ./templates/cisco_ios_show_version.textfsm

For multi-command templates and flows, repeat --textfsm-template to match command order. If there are more commands than templates, the last template is reused.

rauto template check_basic.j2 \
  --connection core-01 \
  --textfsm-template ./templates/cisco_ios_show_version.textfsm \
  --textfsm-template ./templates/cisco_ios_show_interfaces.textfsm

Custom TextFSM templates

Custom TextFSM templates and command mappings are stored in SQLite and shared by CLI and Web.

Create a template:

rauto textfsm template create my_show_version \
  --file ./templates/my_show_version.textfsm

Bind an exact command to the custom template for a profile:

rauto textfsm mapping set \
  --profile my_custom_profile \
  --command "show version" \
  --template my_show_version

Useful management commands:

rauto textfsm template list
rauto textfsm template show my_show_version
rauto textfsm mapping list --profile my_custom_profile
rauto textfsm mapping delete --profile my_custom_profile --command "show version"

When parsing is enabled and no explicit --textfsm-template is provided, rauto checks custom mappings first. If no custom mapping matches, it falls back to bundled NTC templates.

Custom show objects

Custom show objects are profile-specific mappings stored in SQLite. They override bundled show catalog entries for the same (device_profile, object) pair.

Use them when a device family needs a different command for an existing object or when you want to add an organization-specific object:

rauto show-object set \
  --profile my_custom_profile \
  --object access-list \
  --command "show access-lists" \
  --mode enable \
  --textfsm-template my_access_list

You can also bind a custom show object to an existing profile-command TextFSM mapping. In that mode, the mapping command becomes the effective show command and the custom show object reuses the mapping's parser:

rauto show-object set \
  --profile my_custom_profile \
  --object acl \
  --command "show access-lists" \
  --textfsm-mapping-command "show access-lists"

--command is still required by the CLI parser for show-object set. When --textfsm-mapping-command is present, rauto validates that the referenced TextFSM mapping exists, stores the mapping command as the effective command, and clears any direct --textfsm-template binding.

Useful management commands:

rauto show-object list --profile my_custom_profile
rauto show-object delete --profile my_custom_profile --object access-list

Custom show object parse priority is:

  1. TextFSM template bound directly on the custom show object
  2. profile-command TextFSM mapping
  3. bundled NTC template selected by command and platform

Web UI

The Svelte Web console exposes the same capability under Standard Delivery:

  • Show runs one show object against the current target.
  • Batch Show runs one or more show objects across saved connections, groups, and labels.
  • TextFSM controls include parsing on/off, platform override, Excel export, and strict Error-rule handling.
  • Custom TextFSM templates, profile-command mappings, and custom show objects are managed from Template Manager.

Failure behavior

TextFSM parsing never blocks command execution. If parsing fails, rauto still returns the raw command output and reports the parse error separately.

For show, parsing only runs after a successful command exit. Batch show records per-target results, including target, host, profile, object, platform, command, mode, command source, raw output, parsed output, parse error, and execution error.