Skip to content

Commit

Permalink
Fix Huawei Isis peer for line overflow (#1771)
Browse files Browse the repository at this point in the history
Co-authored-by: lutfisan <[email protected]>
  • Loading branch information
jmcgill298 and lutfisan authored Jul 29, 2024
1 parent d7607df commit 7e7edbd
Show file tree
Hide file tree
Showing 9 changed files with 135 additions and 4 deletions.
6 changes: 4 additions & 2 deletions ntc_templates/templates/huawei_vrp_display_isis_peer.textfsm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Value SYSTEM_ID ((\d+.\d+.\d+)|\S+)
Value List SYSTEM_ID (\S+)
Value INTERFACE (\S+)
Value CIRCUIT_ID (\d+)
Value STATE (\S+)
Expand All @@ -10,7 +10,9 @@ Start
^\s+Peer\s+information\s+for\s+\S+
^\s+System\s+Id\s+Interface\s+Circuit\s+Id\s+State\s+HoldTime\s+Type\s+PRI
^-+
^${SYSTEM_ID}\s+${INTERFACE}\s+${CIRCUIT_ID}\s+${STATE}\s+${HOLD_TIME}\s+${TYPE}\s+${PRI} -> Record
^\S+\s+\S+\s+\d+ -> Continue.Record
^${SYSTEM_ID}\s+${INTERFACE}\s+${CIRCUIT_ID}\s+${STATE}\s+${HOLD_TIME}\s+${TYPE}\s+${PRI}\s*$$
^${SYSTEM_ID}\s*$$
^Total\s+Peer\S+:\s+\d+
^\s*$$
^. -> Error
18 changes: 18 additions & 0 deletions ntc_templates/templates/huawei_vrp_display_mpls_te_tunnel.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Value SOURCE (\d+\.\d+\.\d+\.\d+)
Value DESTINATION (\d+\.\d+\.\d+\.\d+)
Value ID (\d+)
Value IN_LABEL (\S+)
Value OUT_LABEL (\S+)
Value ROLE (\S+)
Value NAME (\S+)

Start
^-+
^Ingress\s+LsrId\s+Destination\s+LSPID\s+In/OutLabel\s+R\s+Tunnel-name\s*$$
^-+
^${SOURCE}\s+${DESTINATION}\s+${ID}?\s+${IN_LABEL}/${OUT_LABEL}\s+${ROLE}\s+${NAME}\s*$$ -> Record
^-+
^\s*\*\s+means
^\s*\S:\s+\S+,\s+\S+:\s+\S+,
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ huawei_vrp_display_interface_brief.textfsm, .*, huawei_vrp, dis[[play]] inter[[f
huawei_vrp_display_ip_vpn-instance.textfsm, .*, huawei_vrp, di[[splay]] ip vpn[[-instance]]
huawei_vrp_display_service-set_all.textfsm, .*, huawei_vrp, dis[[play]] service-set all
huawei_vrp_display_ipv6_neighbors.textfsm, .*, huawei_vrp, dis[[play]] ipv6 n[[eighbors]]
huawei_vrp_display_mpls_te_tunnel.textfsm, .*, huawei_vrp, dis[[play]] mpls te tunnel
huawei_vrp_display_lldp_neighbor.textfsm, .*, huawei_vrp, dis[[play]] lldp nei[[ghbor]]
huawei_vrp_display_mac-address.textfsm, .*, huawei_vrp, disp[[lay]] mac[[-address]]
huawei_vrp_display_temperature.textfsm, .*, huawei_vrp, dis[[play]] tem[[perature]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Peer information for ISIS(1)

System Id Interface Circuit Id State HoldTime Type PRI
--------------------------------------------------------------------------------
RR-BD3515597G9- GE0/2/0 0000000006 Up 28s L2 --
01H
RR-BD3514349G9- GE0/2/1 0000000005 Up 22s L2 --
01H

Total Peer(s): 2

Peer information for ISIS(990)

System Id Interface Circuit Id State HoldTime Type PRI
--------------------------------------------------------------------------------
RR-BD3515597G9- GE0/2/0.1000 0000000057 Up 30s L2 --
01H*
RR-BD3514349G9- GE0/2/1.1000 0000000056 Up 22s L2 --
01H*

Total Peer(s): 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
parsed_sample:
- system_id:
- "RR-BD3515597G9-"
- "01H"
interface: "GE0/2/0"
circuit_id: "0000000006"
state: "Up"
hold_time: "28s"
type: "L2"
pri: "--"
- system_id:
- "RR-BD3514349G9-"
- "01H"
interface: "GE0/2/1"
circuit_id: "0000000005"
state: "Up"
hold_time: "22s"
type: "L2"
pri: "--"
- system_id:
- "RR-BD3515597G9-"
- "01H*"
interface: "GE0/2/0.1000"
circuit_id: "0000000057"
state: "Up"
hold_time: "30s"
type: "L2"
pri: "--"
- system_id:
- "RR-BD3514349G9-"
- "01H*"
interface: "GE0/2/1.1000"
circuit_id: "0000000056"
state: "Up"
hold_time: "22s"
type: "L2"
pri: "--"
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
parsed_sample:
- system_id: "MA-JK4961-01H"
- system_id:
- "MA-JK4961-01H"
interface: "Eth-Trunk2"
circuit_id: "0000000087"
state: "Up"
hold_time: "25s"
type: "L2"
pri: "--"
- system_id: "PAG-JK1401-01H"
- system_id:
- "PAG-JK1401-01H"
interface: "Eth-Trunk0"
circuit_id: "0000000146"
state: "Up"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* means the LSP is detour LSP
-------------------------------------------------------------------------------
Ingress LsrId Destination LSPID In/OutLabel R Tunnel-name
-------------------------------------------------------------------------------
10.219.220.136 10.219.220.8 29 -/2080 I Tunnel1_RR-KL2414993-01H_to_RAW-KL1956-01H
10.219.220.136 10.219.220.9 22684 -/2204 I Tunnel2_RR-KL2414993-01H_to_RAW-KL1938-01H
10.219.220.8 10.219.220.136 34518 2096/- E Tunnel12_RAW-KL1956-01H_to_RR-KL3453225G-01H
10.219.220.8 10.219.220.136 34521 2098/- E Tunnel12_RAW-KL1956-01H_to_RR-KL3453225G-01H
10.219.220.9 10.219.220.136 34510 2144/- E Tunnel12_RAW-KL1938-01H_to_RR-KL3453225G-01H
-------------------------------------------------------------------------------
R: Role, I: Ingress, T: Transit, E: Egress
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
parsed_sample:
- source: "10.219.220.136"
destination: "10.219.220.8"
id: "29"
in_label: "-"
out_label: "2080"
role: "I"
name: "Tunnel1_RR-KL2414993-01H_to_RAW-KL1956-01H"
- source: "10.219.220.136"
destination: "10.219.220.9"
id: "22684"
in_label: "-"
out_label: "2204"
role: "I"
name: "Tunnel2_RR-KL2414993-01H_to_RAW-KL1938-01H"
- source: "10.219.220.8"
destination: "10.219.220.136"
id: "34518"
in_label: "2096"
out_label: "-"
role: "E"
name: "Tunnel12_RAW-KL1956-01H_to_RR-KL3453225G-01H"
- source: "10.219.220.8"
destination: "10.219.220.136"
id: "34521"
in_label: "2098"
out_label: "-"
role: "E"
name: "Tunnel12_RAW-KL1956-01H_to_RR-KL3453225G-01H"
- source: "10.219.220.9"
destination: "10.219.220.136"
id: "34510"
in_label: "2144"
out_label: "-"
role: "E"
name: "Tunnel12_RAW-KL1938-01H_to_RR-KL3453225G-01H"

0 comments on commit 7e7edbd

Please sign in to comment.