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

New template for huawei VRP + fix. #998

Merged
merged 1 commit into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Value OUTERRORS (\d+)
Start
^\s*${INTERFACE}\s+${PHY}\s+${PROTOCOL}\s+${INUTI}\s+${OUTUTI}\s+${INERRORS}\s+${OUTERRORS} -> Record
^PHY:\s+Physical
^(?:\*|\^)down:
^(?:\*|\^|\#)down:
^\(\w+\):\s+\S+
^InUti/OutUti:
^Interface\s+PHY\s+Protocol\s+InUti\s+OutUti\s+inErrors\s+outErrors\s*$$
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value INTERFACE (\S+)
Value PHY (down|\*down|up|up\(s\))
Value PROTOCOL (down|\*down|up|up\(s\))
Value DESCRIPTION (\S+.*?)


Start
^Interface\s+PHY\s+Protocol\s+Description\s*$$ -> Begin
^\s*$$
^PHY:\s+Physical
^(?:\*|\^|\#)down:
^\(\w+\):\s+\S+
^. -> Error

Begin
^${INTERFACE}\s+${PHY}\s+${PROTOCOL}(?:\s+${DESCRIPTION})?\s*$$ -> Record
^\s*$$
^. -> Error
137 changes: 137 additions & 0 deletions ntc_templates/templates/huawei_vrp_display_port_vlan.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
Value Required INTERFACE ([\w\.\/]+)
Value LINK_TYPE (trunk|access|auto|hybrid)
Value PVID (\d+)
Value List TRUNK_VLAN_LIST (\d+-\d+|\d+)


Start
^\s*$$
^[pPoOrRtT]{4}.*$$ -> VLANS

VLANS
^[\w\.\/]+ -> Continue.Record
^${INTERFACE}\s+${LINK_TYPE}\s+${PVID}\s+${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){3}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){4}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){5}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){6}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){7}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){8}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){9}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){10}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){11}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){12}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){13}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){14}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){15}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){16}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){17}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){18}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){19}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){20}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){21}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){22}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){23}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){24}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){25}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){26}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){27}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){28}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){29}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){30}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){31}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){32}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){33}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){34}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){35}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){36}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){37}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){38}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){39}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){40}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){41}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){42}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){43}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){44}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){45}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){46}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){47}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){48}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){49}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){50}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){51}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){52}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){53}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){54}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){55}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){56}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){57}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){58}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){59}${TRUNK_VLAN_LIST}\s* -> Continue
^[\w\.\/]+\s+(?:\S+\s+){60}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+${TRUNK_VLAN_LIST}\s* -> Continue
^\s+\S+\s+${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){2}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){3}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){4}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){5}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){6}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){7}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){8}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){9}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){10}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){11}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){12}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){13}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){14}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){15}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){16}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){17}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){18}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){19}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){20}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){21}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){22}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){23}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){24}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){25}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){26}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){27}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){28}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){29}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){30}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){31}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){32}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){33}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){34}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){35}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){36}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){37}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){38}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){39}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){40}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){41}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){42}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){43}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){44}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){45}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){46}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){47}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){48}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){49}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){50}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){51}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){52}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){53}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){54}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){55}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){56}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){57}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){58}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){59}${TRUNK_VLAN_LIST}\s* -> Continue
^\s+(?:\S+\s+){60}${TRUNK_VLAN_LIST}\s* -> Continue
^${INTERFACE}\s+${LINK_TYPE}\s+${PVID}\s+-$$ -> Record
^[\w\.\/]+
^\s+
^-+
^.+ -> Error
2 changes: 2 additions & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,11 @@ hp_procurve_show_trunks.textfsm, .*, hp_procurve, sh[[ow]] tr[[unks]]
hp_procurve_show_vlans.textfsm, .*, hp_procurve, sh[[ow]] vl[[ans]]
hp_procurve_show_arp.textfsm, .*, hp_procurve, sh[[ow]] ar[[p]]

huawei_vrp_display_interface_description.textfsm, .*, huawei_vrp, disp[[lay]] inter[[face]] des[[cription]]
huawei_vrp_display_interface_brief.textfsm, .*, huawei_vrp, disp[[lay]] inter[[face]] br[[ief]]
huawei_vrp_display_lldp_neighbor.textfsm, .*, huawei_vrp, disp[[lay]] lldp nei[[ghbor]]
huawei_vrp_display_temperature.textfsm, .*, huawei_vrp, disp[[lay]] tem[[perature]]
huawei_vrp_display_port_vlan.textfsm, .*, huawei_vrp, disp[[lay]] port vl[[an]]
huawei_vrp_display_version.textfsm, .*, huawei_vrp, disp[[lay]] ver[[sion]]

juniper_junos_show_chassis_cluster_interfaces.textfsm, .*, juniper_junos, sh[[ow]] ch[[assis]] c[[luster]] i[[nterface]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
PHY: Physical
*down: administratively down
#down: LBDT down
(l): loopback
(s): spoofing
(E): E-Trunk down
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(lb): LBDT block
Interface PHY Protocol Description
GE0/0/1 up up <C4> work - station 1
GE0/0/2 up up <C4> work - station 1
GE0/0/3 up up <C4> work - station 1
GE0/0/4 up up <C4> work - station 1
GE0/0/5 up up <C4> work - station 1
GE0/0/6 up up <C4> work - station 1
GE0/0/7 up up <C4> work - station 1
GE0/0/8 up up <C4> work - station 1
GE0/0/9 up up <C4> work - station 1
GE0/0/10 up up <C4> work - station 1
GE0/0/11 up up <C4> work - station 1
GE0/0/12 up up <C4> work - station 1
GE0/0/13 up up <C4> work - station 1
GE0/0/14 up up <C4> work - station 1
GE0/0/15 up up <C4> work - station 1
GE0/0/16 down down <C4> work - station 1
GE0/0/17 up up <C4> work - station 1
GE0/0/18 up up <C4> work - station 1
GE0/0/19 down down <C4> work - station 1
GE0/0/20 up up <C4> work - station 1
GE0/0/21 down down <C4> work - station 1
GE0/0/22 up up <C4> work - station 1
GE0/0/23 up up <C4> work - station 1
GE0/0/24 up up <C4> work - station 1
GE0/0/25 *down down
GE0/0/26 *down down
GE0/0/27 up up spine Uplink
GE0/0/28 up up spine Uplink 2
NULL0 up up(s)
Vlanif1 up up
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
---
parsed_sample:
- interface: "GE0/0/1"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/2"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/3"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/4"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/5"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/6"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/7"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/8"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/9"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/10"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/11"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/12"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/13"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/14"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/15"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/16"
phy: "down"
protocol: "down"
description: "<C4> work - station 1"
- interface: "GE0/0/17"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/18"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/19"
phy: "down"
protocol: "down"
description: "<C4> work - station 1"
- interface: "GE0/0/20"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/21"
phy: "down"
protocol: "down"
description: "<C4> work - station 1"
- interface: "GE0/0/22"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/23"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/24"
phy: "up"
protocol: "up"
description: "<C4> work - station 1"
- interface: "GE0/0/25"
phy: "*down"
protocol: "down"
description: ""
- interface: "GE0/0/26"
phy: "*down"
protocol: "down"
description: ""
- interface: "GE0/0/27"
phy: "up"
protocol: "up"
description: "spine Uplink"
- interface: "GE0/0/28"
phy: "up"
protocol: "up"
description: "spine Uplink 2"
- interface: "NULL0"
phy: "up"
protocol: "up(s)"
description: ""
- interface: "Vlanif1"
phy: "up"
protocol: "up"
description: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Port Link Type PVID Trunk VLAN List
-------------------------------------------------------------------------------
GigabitEthernet0/0/1 hybrid 1 2
GigabitEthernet0/0/2 hybrid 1 2
GigabitEthernet0/0/3 hybrid 1 2
GigabitEthernet0/0/4 hybrid 1 2
GigabitEthernet0/0/5 hybrid 1 2
GigabitEthernet0/0/6 hybrid 1 2
GigabitEthernet0/0/7 hybrid 1 2
GigabitEthernet0/0/8 hybrid 1 2
GigabitEthernet0/0/9 hybrid 1 2
GigabitEthernet0/0/10 hybrid 1 2
GigabitEthernet0/0/11 hybrid 1 2
GigabitEthernet0/0/12 hybrid 1 2
GigabitEthernet0/0/13 hybrid 1 2
GigabitEthernet0/0/14 hybrid 1 2
GigabitEthernet0/0/15 hybrid 1 2
GigabitEthernet0/0/16 hybrid 1 2
GigabitEthernet0/0/17 hybrid 1 2
GigabitEthernet0/0/18 hybrid 1 2
GigabitEthernet0/0/19 hybrid 1 2
GigabitEthernet0/0/20 hybrid 1 2
GigabitEthernet0/0/21 hybrid 1 2
GigabitEthernet0/0/22 hybrid 1 2
GigabitEthernet0/0/23 hybrid 1 2
GigabitEthernet0/0/24 hybrid 1 2
GigabitEthernet0/0/25 auto 1 1-4094
GigabitEthernet0/0/26 auto 1 1-4094
GigabitEthernet0/0/27 trunk 1 1-4094
GigabitEthernet0/0/28 trunk 1 1-4094
Loading