Parse¶
ntc_templates.parse
¶
ntc_templates.parse.
ParsingException
¶
parse_output(platform=None, command=None, data=None, template_dir=None, try_fallback=False)
¶
Return the structured data based on the output from a network device.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
platform |
The platform the command was run on (e.g., |
None
|
|
command |
The command run on the platform (e.g., |
None
|
|
data |
The output from running the command. |
None
|
|
template_dir |
The directory to look for TextFSM templates. Defaults to setting of environment variable or default ntc-templates dir. The specified directory must have a properly configured index file. |
None
|
|
try_fallback |
Whether to fallback to using the default template directory upon failure with |
False
|
Returns:
Name | Type | Description |
---|---|---|
list |
The TextFSM table entries as dictionaries. |