Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Edgecore platform with 7 templates #1463

Merged
merged 23 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9e3fe39
Add new platform 'edgecore' + 7 templates (without tests)
Aug 7, 2023
cba8e83
Fix template for 'show interfaces brief' and add tests
Aug 31, 2023
a568329
Fix template for 'show ip interface' and add tests
Aug 31, 2023
78b7f11
Fix template for 'show system' and add tests
Aug 31, 2023
781e863
Fix template for 'show interfaces status' and add tests
Sep 1, 2023
7db6384
Fix template for 'show interfaces switchport' and add tests
Sep 1, 2023
218b5e8
Fix template for 'show version' and add tests
Sep 1, 2023
b354a4b
Fix template for 'show vlan' and add tests
Sep 1, 2023
f6ca3da
Merge remote-tracking branch 'ntc/master' into edgecore
Sep 10, 2023
7a289ca
Update ntc_templates/templates/edgecore_show_interfaces_status.textfsm
PavloSkliarenko Sep 11, 2023
2090907
Update ntc_templates/templates/edgecore_show_ip_interface.textfsm
PavloSkliarenko Sep 11, 2023
c3f9e41
Update ntc_templates/templates/edgecore_show_system.textfsm
PavloSkliarenko Sep 11, 2023
e39a5b3
Update ntc_templates/templates/edgecore_show_vlan.textfsm
PavloSkliarenko Sep 11, 2023
50cecd9
Values naming fix
Sep 11, 2023
a06015d
Change Pri value name to Priority
Sep 12, 2023
c2d41ef
Split SPEED_DUPLEX in edgecore_show_interfaces_brief template
Sep 12, 2023
32f3256
Split SPEED_DUPLEX into multiples
Sep 12, 2023
dc86182
Merge remote-tracking branch 'ntc/master' into edgecore
Nov 6, 2023
18cd2d0
Fix Cisco IOS test .yml
Nov 6, 2023
bc073f7
Merge remote-tracking branch 'ntc/master' into edgecore
Nov 6, 2023
76e7a76
.yml fix
Nov 6, 2023
ce9adde
Merge remote-tracking branch 'ntc/master' into edgecore
Nov 7, 2023
3478fd7
Merge branch 'master' into edgecore
jmcgill298 Jul 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions ntc_templates/templates/edgecore_show_interfaces_brief.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Value INTERFACE (\S+\s+\d+\s*/\s*\d+)
Value NAME (.*?)
Value STATUS (\S+)
Value PVID (\d+)
Value PRIORITY (\d+)
Value NEGOTIATION (Auto)
Value SPEED (\d+)
Value DUPLEX (\S+)
Value TYPE (\S+)
Value TRUNK (\S+)

Start
^\s*Interface\s+Name\s+Status\s+PVID\s+Pri\s+Speed/Duplex\s+Type\s+Trunk\s*$$ -> IfacesTable
^\s*$$
^. -> Error

IfacesTable
^(?:\s*-+)+\s*$$
^\s*${INTERFACE}(?:\s+${NAME})?\s+${STATUS}\s+${PVID}\s+${PRIORITY}\s+(${NEGOTIATION}(\-)?)?(${SPEED})?(${DUPLEX})?\s+${TYPE}\s+${TRUNK}\s*$$ -> Record
^\s*$$
^. -> Error
76 changes: 76 additions & 0 deletions ntc_templates/templates/edgecore_show_interfaces_status.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
Value Required PORT (.*)
Value PORT_TYPE (.*)
Value ADDRESS (.*)
Value NAME (.*)
Value PORT_ADMIN (.*)
Value MDIX_MODE (.*)
Value NEGOTIATION (Auto)
Value SPEED (\d+)
Value DUPLEX (\S+)
Value CAPABILITIES (.*)
Value BROADCAST_STORM (.*)
Value BROADCAST_STORM_LIMIT (.*)
Value MULTICAST_STORM (.*)
Value MULTICAST_STORM_LIMIT (.*)
Value UNKNOWNUNICAST_STORM (.*)
Value UNKNOWNUNICAST_STORM_LIMIT (.*)
Value FLOW_CONTROL (.*)
Value VLAN_TRUNKING (.*)
Value LACP (.*)
Value PORT_SECURITY (.*)
Value MAX_MAC_COUNT (.*)
Value PORT_SECURITY_ACTION (.*)
Value MEDIA_TYPE (.*)
Value GIGA_PHY_MODE (.*)
Value LINK_STATUS (.*)
Value OPERATION_STATUS (.*)
Value PORT_UPTIME (.*)
Value FLOW_CONTROL_TYPE (.*)

Start
^\s*Information\s+of.*$$ -> Continue.Record
^\s*Information\s+of\s+${PORT}\s*$$
^\s*M(ac|AC)\s+Address:\s*${ADDRESS}\s*$$
^\s*Basic\s+Information:\s*$$ -> BasicInfo
^\s*$$
^. -> Error

BasicInfo
^\s*Port\s+Type:\s*${PORT_TYPE}\s*$$
^\s*M(ac|AC)\s+Address:\s*${ADDRESS}\s*$$
^\s*Configuration:\s*$$ -> Configuration
^\s*$$
^. -> Error

Configuration
^\s*Name:\s*${NAME}\s*$$
^\s*Port\s+Admin:\s*${PORT_ADMIN}\s*$$
^\s*MDIX\s+mode:\s*${MDIX_MODE}\s*$$
^\s*Speed-duplex:\s*${NEGOTIATION}\s*$$
^\s*Capabilities:\s*${CAPABILITIES}\s*$$
^\s*Broadcast\s+Storm:\s*${BROADCAST_STORM}\s*$$
^\s*Broadcast\s+Storm\s+Limit:\s*${BROADCAST_STORM_LIMIT}\s*$$
^\s*Multicast\s+Storm:\s*${MULTICAST_STORM}\s*$$
^\s*Multicast\s+Storm\s+Limit:\s*${MULTICAST_STORM_LIMIT}\s*$$
^\s*UnknownUnicast\s+Storm:\s*${UNKNOWNUNICAST_STORM}\s*$$
^\s*UnknownUnicast\s+Storm\s+Limit:\s*${UNKNOWNUNICAST_STORM_LIMIT}\s*$$
^\s*Flow\s+Control:\s*${FLOW_CONTROL}\s*$$
^\s*VLAN\s+Trunking:\s*${VLAN_TRUNKING}\s*$$
^\s*LACP:\s*${LACP}\s*$$
^\s*Port\s+Security:\s*${PORT_SECURITY}\s*$$
^\s*Max\s+MAC\s+Count:\s*${MAX_MAC_COUNT}\s*$$
^\s*Port\s+Security\s+Action:\s*${PORT_SECURITY_ACTION}\s*$$
^\s*Media\s+Type:\s*${MEDIA_TYPE}\s*$$
^\s*Giga\s+PHY\s+mode:\s*${GIGA_PHY_MODE}\s*$$
^\s*Current Status:\s*$$ -> CurrentStatus
^\s*$$
^. -> Error

CurrentStatus
^\s*Link\s+Status:\s*${LINK_STATUS}\s*$$
^\s*Port\s+Operation\s+Status:\s*${OPERATION_STATUS}\s*$$
^\s*Operation\s+Speed-duplex:\s*${SPEED}${DUPLEX}\s*$$
^\s*Port\s+Uptime:\s*${PORT_UPTIME}\s*$$
^\s*Flow\s+Control\s+Type:\s*${FLOW_CONTROL_TYPE}\s*$$
^\s*$$ -> Start
^. -> Error
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
Value INTERFACE (.*)
Value BROADCAST_THRESHOLD (.*)
Value MULTICAST_THRESHOLD (.*)
Value UNICAST_THRESHOLD (.*)
Value UNKNOWN_UNICAST_THRESHOLD (.*)
Value LACP_STATUS (.*)
Value INGRESS_RATE_LIMIT (.*)
Value EGRESS_RATE_LIMIT (.*)
Value VLAN_MEMBERSHIP_MODE (.*)
Value INGRESS_RULE (.*)
Value ACCEPTABLE_FRAME_TYPE (.*)
Value NATIVE_VLAN (.*)
Value PRIORITY_FOR_UNTAGGED_TRAFFIC (.*)
Value GVRP_STATUS (.*)
Value List ALLOWED_VLAN (\d+)
Value List ALLOWED_VLAN_TAG (\w+)
Value List FORBIDDEN_VLAN (\d+)
Value List FORBIDDEN_VLAN_TAG (\w+)
Value PRIVATE_VLAN_MODE (.*)
Value PRIVATE_VLAN_HOST_ASSOCIATION (.*)
Value PRIVATE_VLAN_MAPPING (.*)
Value TUNNEL_STATUS_802_1Q (.*)
Value TUNNEL_MODE_802_1Q (.*)
Value TUNNEL_TPID_802_1Q (.*)
Value LAYER_2_PROTOCOL_TUNNEL (.*)

Start
^\s*Information\sof\s.*$$ -> Continue.Record
^\s*Information\sof\s${INTERFACE}\s*$$
^\s*Broadcast\s+Threshold:\s*${BROADCAST_THRESHOLD}\s*$$
^\s*Multicast\s+Threshold:\s*${MULTICAST_THRESHOLD}\s*$$
^\s*Unicast\s+Threshold:\s*${UNICAST_THRESHOLD}\s*$$
^\s*Unknown-unicast\s+Threshold:\s*${UNKNOWN_UNICAST_THRESHOLD}\s*$$
^\s*LACP\s+Status:\s*${LACP_STATUS}\s*$$
^\s*Ingress\s+Rate\s+Limit:\s*${INGRESS_RATE_LIMIT}\s*$$
^\s*Egress\s+Rate\s+Limit:\s*${EGRESS_RATE_LIMIT}\s*$$
^\s*VLAN\sMembership\sMode:\s*${VLAN_MEMBERSHIP_MODE}\s*$$
^\s*Ingress\s+Rule:\s*${INGRESS_RULE}\s*$$
^\s*Acceptable\s+Frame\s+Type:\s*${ACCEPTABLE_FRAME_TYPE}\s*$$
^\s*Native\sVLAN:\s*${NATIVE_VLAN}\s*$$
^\s*Priority\s+for\s+Untagged\s+Traffic:\s*${PRIORITY_FOR_UNTAGGED_TRAFFIC}\s*$$
^\s*GVRP\s+Status:\s*${GVRP_STATUS}\s*$$
^\s*Allowed\sVLAN:\s*${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){1}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){2}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){3}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){4}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){5}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){6}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){7}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){8}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),\s*){9}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s*Allowed\sVLAN:\s*(\d+\(\w+\),?\s*)*$$
^\s+${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){1}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){2}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){3}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){4}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){5}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){6}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){7}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){8}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){9}${ALLOWED_VLAN}\(${ALLOWED_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),?\s*)*$$
^\s*Forbidden\sVLAN:\s*${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){1}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){2}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){3}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){4}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){5}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){6}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){7}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){8}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),\s*){9}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s*Forbidden\sVLAN:\s*(\d+\(\w+\),?\s*)*$$
^\s+${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){1}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){2}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){3}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){4}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){5}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){6}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){7}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){8}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),\s*){9}${FORBIDDEN_VLAN}\(${FORBIDDEN_VLAN_TAG}\).*$$ -> Continue
^\s+(\d+\(\w+\),?\s*)*$$
^\s*Private-VLAN\s+Mode:\s*${PRIVATE_VLAN_MODE}\s*$$
^\s*Private-VLAN\s+host-association:\s*${PRIVATE_VLAN_HOST_ASSOCIATION}\s*$$
^\s*Private-VLAN\s+Mapping:\s*${PRIVATE_VLAN_MAPPING}\s*$$
^\s*802.1Q-tunnel\s+Status:\s*${TUNNEL_STATUS_802_1Q}\s*$$
^\s*802.1Q-tunnel\s+Mode:\s*${TUNNEL_MODE_802_1Q}\s*$$
^\s*802.1Q-tunnel\s+TPID:\s*${TUNNEL_TPID_802_1Q}\s*$$
^\s*Layer\s+2\s+Protocol\s+Tunnel\s*:\s*${LAYER_2_PROTOCOL_TUNNEL}\s*$$
^\s*$$
^. -> Error
11 changes: 11 additions & 0 deletions ntc_templates/templates/edgecore_show_ip_interface.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Value IP (\S+)
Value NETMASK (\S+)
Value INTERFACE (.*)
Value ADDR_MODE (.*)

Start
^\s*IP\s+Address\s+and\s+Netmask:.*$$ -> Continue.Record
^\s*IP\s+Address\s+and\s+Netmask:\s+${IP}\s+${NETMASK}\s+on\s+${INTERFACE},\s*$$
^\s*Address\s+Mode:\s+${ADDR_MODE}\s*$$
^\s*$$
^. -> Error
49 changes: 49 additions & 0 deletions ntc_templates/templates/edgecore_show_system.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Value DESCRIPTION (.*)
Value OID (\d+(\.\d+)*)
Value UPTIME (.*)
Value HOSTNAME (\S+)
Value LOCATION (.*)
Value CONTACT (.*)
Value ADDRESS ([a-zA-Z0-9]{2}(?:-[a-zA-Z0-9]{2}){5})
Value SERVER_STATUS (\S+)
Value SERVER_PORT (\d+)
Value SECURE_SERVER_STATUS (\S+)
Value SECURE_SERVER_PORT (\d+)
Value TELNET_SERVER_STATUS (\S+)
Value TELNET_SERVER_PORT (\d+)
Value AUTH_LOGIN (.*)
Value AUTH_ENABLED (.*)
Value JUMBO_FRAME_STATUS (\S+)
Value List POST_RESULTS (.*)

Start
^\s*System\s+Description:\s+${DESCRIPTION}\s*$$
^\s*System\s+OID\s+String:\s+${OID}\s*$$
^\s*System\s+Information\s*$$ -> SystemInfo
^\s*$$
^. -> Error

SystemInfo
^\s*System\s+Up\s+Time:\s+${UPTIME}\s*$$
^\s*System\s+Name:\s+${HOSTNAME}\s*$$
^\s*System\s+Location:\s+${LOCATION}\s*$$
^\s*System\s+Contact:\s+${CONTACT}\s*$$
^\s*MAC\s+Address\s+\(Unit\d+\):\s+${ADDRESS}\s*$$
^\s*Web\s+Server:\s+${SERVER_STATUS}\s*$$
^\s*Web\s+Server\s+Port:\s+${SERVER_PORT}\s*$$
^\s*Web\s+Secure\s+Server:\s+${SECURE_SERVER_STATUS}\s*$$
^\s*Web\s+Secure\s+Server\s+Port:\s+${SECURE_SERVER_PORT}\s*$$
^\s*Telnet\s+Server:\s+${TELNET_SERVER_STATUS}\s*$$
^\s*Telnet\s+Server\s+Port:\s+${TELNET_SERVER_PORT}\s*$$
^\s*Authentication\s+Login:\s+${AUTH_LOGIN}\s*$$
^\s*Authentication\s+Enabled:\s+${AUTH_ENABLED}\s*$$
^\s*Jumbo\s+Frame:\s+${JUMBO_FRAME_STATUS}\s*$$
^\s*POST\s+Result:\s*$$ -> PostResults
^\s*$$
^. -> Error

PostResults
^\s*Done\s+All\s+Pass.\s*$$
^\s*$$
^\s*${POST_RESULTS}\s*$$ -> PostResults
^. -> Error
31 changes: 31 additions & 0 deletions ntc_templates/templates/edgecore_show_version.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Value UNIT (\d+)
Value SERIAL (.*)
Value SERVICE_TAG (.*)
Value HARDWARE_VERSION (.*)
Value CHIP_ID (.*)
Value EPLD_VERSION (.*)
Value NUM_OF_PORTS (.*)
Value POWER_STATUS (.*)
Value REDUNDANT_POWER_STATUS (.*)
Value LOADER_VERSION (.*)
Value ROM_VERSION (.*)
Value OPERATION_CODE_VERSION (.*)

Start
^\s*Unit\s+\d+$$ -> Continue.Record
^\s*Unit\s+${UNIT}$$
^\s*Serial\s+Number:\s*${SERIAL}\s*$$
^\s*Service\s+Tag:(?:\s*${SERVICE_TAG})?\s*$$
^\s*Hardware\s+Version:\s*${HARDWARE_VERSION}\s*$$
^\s*Chip\s+Device\s+ID:\s*${CHIP_ID}\s*$$
^\s*EPLD\s+Version:\s*${EPLD_VERSION}\s*$$
^\s*Number\s+of\s+Ports:\s*${NUM_OF_PORTS}\s*$$
^\s*Main\s+Power\s+Status:\s*${POWER_STATUS}\s*$$
^\s*Redundant\s+Power\s+Status:\s*${REDUNDANT_POWER_STATUS}\s*$$
^\s*Agent.*$$
^\s*Unit\s+ID:\s*\d+\s*$$
^\s*Loader\s+Version:\s*${LOADER_VERSION}\s*$$
^\s*Boot\s+ROM\s+Version:\s*${ROM_VERSION}\s*$$
^\s*Operation\s+Code\s+Version:\s*${OPERATION_CODE_VERSION}\s*$$
^\s*$$
^. -> Error
37 changes: 37 additions & 0 deletions ntc_templates/templates/edgecore_show_vlan.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Value VLAN_ID (\d+)
Value TYPE (\S+)
Value VLAN_NAME (.*)
Value STATUS (\S+)
Value List PORTS (\S+\s*\d+\s*/\s*\d+)

Start
^\s*Default\s+VLAN\s+ID\s*:\s*\d+\s*$$
^\s*VLAN\s+ID:\s*\d+\s*$$ -> Continue.Record
^\s*VLAN\s+ID:\s*${VLAN_ID}\s*$$
^\s*Type:\s*${TYPE}\s*$$
^\s*Name:\s*(?:${VLAN_NAME})?\s*$$
^\s*Status:\s*${STATUS}\s*$$
^\s*Ports/Port\s+Channels:\s*${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){1}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){2}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){3}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){4}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){5}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){6}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){7}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){8}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){9}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*Ports/Port\s+Channels:\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*)*$$
^\s*${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){1}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){2}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){3}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){4}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){5}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){6}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){7}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){8}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*){9}${PORTS}\s*\(\w+\).*$$ -> Continue
^\s*(\S+\s*\d+\s*/\s*\d+\s*\(\w+\)\s*)*$$
^\s*$$
^. -> Error
8 changes: 8 additions & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,14 @@ dell_powerconnect_show_interfaces_status.textfsm, .*, dell_powerconnect, sh[[ow]

dlink_ds_show_arpentry.textfsm, .*, dlink_ds, sh[[ow]] arpe[[ntry]]

edgecore_show_interfaces_switchport.textfsm, .*, edgecore, show interfaces switchport
edgecore_show_interfaces_status.textfsm, .*, edgecore, show interfaces status
edgecore_show_interfaces_brief.textfsm, .*, edgecore, show interfaces brief
edgecore_show_ip_interface.textfsm, .*, edgecore, show ip interface
edgecore_show_version.textfsm, .*, edgecore, show version
edgecore_show_system.textfsm, .*, edgecore, show system
edgecore_show_vlan.textfsm, .*, edgecore, show vlan

ericsson_ipos_show_isis_adjacency.textfsm, .*, ericsson_ipos, sh[[ow]] isis adja[[cency]]
ericsson_ipos_show_version.textfsm, .*, ericsson_ipos, sh[[ow]] ver[[sion]]
ericsson_ipos_show_arp.textfsm, .*, ericsson_ipos, sh[[ow]] ar[[p]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Interface Name Status PVID Pri Speed/Duplex Type Trunk
--------- ------------------ -------- ---- --- ------------- ------------ -----
Eth 1/ 1 Mikrotik-11.22.33. Down 1 0 Auto 100TX None
Eth 1/ 2 vl10_toTESTS-PC Down 5 0 Auto 100TX None
Eth 1/ 3 FortiGateLOL-vl10 Up 730 0 Auto-100full 100TX None
Eth 1/ 4 Down 3010 0 Auto 100TX None
Eth 1/ 5 Down 884 0 Auto 100TX None
Eth 1/ 6 Down 884 0 Auto 100TX None
Eth 1/ 7 Phone_Lollink_RNCB Up 222 0 Auto-100full 100TX None
Eth 1/ 8 Up 222 0 Auto-100full 100TX None
Eth 1/ 9 Up 1 0 Auto-1000full 1000T None
Eth 1/10 Up 1 0 Auto-1000full 1000T None
Loading