Skip to main content

Module clitable

Module clitable 

Source
Expand description

CliTable - Index-based template selection for parsing CLI output.

CliTable provides automatic template selection based on command/platform attributes, supporting the ntc-templates index format.

§Example

use textfsm_core::{CliTable, HashMap};

let cli_table = CliTable::new("templates/index", "templates/")?;

let mut attrs = HashMap::new();
attrs.insert("Command".into(), "show interfaces".into());
attrs.insert("Platform".into(), "cisco_ios".into());

let table = cli_table.parse_cmd(cli_output, &attrs)?;

Structs§

CliTable
Index-based template selection and parsing for CLI output.
Index
Parsed index file.
IndexEntry
A single row in the index file.
Row
A single row in a TextTable.
TextTable
Table of parsed CLI output with named columns.

Enums§

CliTableError
Errors that occur during CliTable operations.

Functions§

expand_completion
Expand [[...]] completion syntax to regex pattern.