⚡
FLASH SALE
— 30% OFF Yearly Network Automation Memberships! Use code
SALE30
at checkout. Offer ends August 20th.
➜ Sign up here
Training
Bootcamp
Courses
Tech Sessions
Resources
Blog
Tips
GitHub
YouTube
Newsletter
Playgrounds
Pricing
Sign In
Become Member
TTP Parser
Validate and test the parsing of your TTP templates
Tools
J2 Renderer
TTP Parser
TextFSM Parser
XPath Tester
Members Only
JMESPath Validator
JSON Schema Validator
Data Format Converter
TTP Template
## INPUT HOSTNAME#show running-config | begin vty line vty 0 4 location London, Frankfurt-SER1 exec-timeout 5 0 logging synchronous transport input ssh line vty 5 15 location London, Frankfurt-SER1 exec-timeout 5 0 logging synchronous transport input ssh ! no monitor event-trace timestamps call-home ! If contact email address in call-home is configured as sch-smart-licensing@cisco.com ! the email address configured in Cisco Smart License Portal will be used as contact email address to send SCH notifications. contact-email-addr sch-smart-licensing@cisco.com profile "CiscoTAC-1" active destination transport-method http ntp source Loopback0 ntp server 157..1.1 prefer ntp server 157.1.1.2 ! mac address-table notification change mac address-table notification threshold ! ! ! ! ! end ## TEMPLATE <group name="vty_line.{{ vty_range }}"> line vty {{ vty_range | re(r"\d+\s+\d+") }} {{ exec_timeout | re("exec-timeout \d.* \d.*") | strip() | default("") }} transport input {{ input_transports | ORPHRASE | split() | default([]) }} </group> ## OUTPUT <doc> This template will return all the incoming connection methods allowed into the VTY Lines. ## Input Transports if configured in the VTY Line Range --> It will return a list of input transport protocols allowed into the VTY lines if not set in the VTY Line Range --> It will return a key called "input_transports" with an empty string ## Exec Timeout if configured in the VTY Line Range --> It will return a the command "exec-timeout X X" if not set in the VTY Line Range --> It will return a key called "exec_timeout" with an empty string Example Output: [ { "vty_line": { "0 4": { "exec_timeout": "", "input_transports": [ "ssh", "telnet" ] }, "5 15": { "exec_timeout": "exec-timeout 5 0", "input_transports": [] } } } ] [ { "vty-line": { "0 4": { "ssh": { "transports": [ [ "telnet", "ssh" ] ] } }, "5 15": { "exec_timeout": { "output": "exec-timeout 0 5" } } } } ] ## No matches under the VTY Lines [ { "vty_line": { "0 4": { "exec_timeout": "", "input_transports": [] }, "5 15": { "exec_timeout": "", "input_transports": [] } } } ] </doc>
0
/ 20000
Raw Text
DML
0
/ 20000
Result
[ {} ]
Parse
Share
Auto-Sync