diff --git a/ntc_templates/templates/huawei_vrp_display_isis_peer.textfsm b/ntc_templates/templates/huawei_vrp_display_isis_peer.textfsm index d71ed9ed29..fdae3b2457 100644 --- a/ntc_templates/templates/huawei_vrp_display_isis_peer.textfsm +++ b/ntc_templates/templates/huawei_vrp_display_isis_peer.textfsm @@ -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+) @@ -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 diff --git a/ntc_templates/templates/huawei_vrp_display_mpls_te_tunnel.textfsm b/ntc_templates/templates/huawei_vrp_display_mpls_te_tunnel.textfsm new file mode 100644 index 0000000000..33ef0dc2eb --- /dev/null +++ b/ntc_templates/templates/huawei_vrp_display_mpls_te_tunnel.textfsm @@ -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 diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index 4b7c3ff27c..cc2538ee80 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -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]] diff --git a/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer.raw b/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer.raw new file mode 100644 index 0000000000..ac5fc7b94f --- /dev/null +++ b/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer.raw @@ -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 \ No newline at end of file diff --git a/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer.yml b/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer.yml new file mode 100644 index 0000000000..7087e0a059 --- /dev/null +++ b/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer.yml @@ -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: "--" diff --git a/tests/huawei_vrp/display_isis_peer/huawei_vrpv8_display_isis_peer.raw b/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer2.raw similarity index 100% rename from tests/huawei_vrp/display_isis_peer/huawei_vrpv8_display_isis_peer.raw rename to tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer2.raw diff --git a/tests/huawei_vrp/display_isis_peer/huawei_vrpv8_display_isis_peer.yml b/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer2.yml similarity index 77% rename from tests/huawei_vrp/display_isis_peer/huawei_vrpv8_display_isis_peer.yml rename to tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer2.yml index 32d891a5c9..02708c369f 100644 --- a/tests/huawei_vrp/display_isis_peer/huawei_vrpv8_display_isis_peer.yml +++ b/tests/huawei_vrp/display_isis_peer/huawei_vrp_display_isis_peer2.yml @@ -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" diff --git a/tests/huawei_vrp/display_mpls_te_tunnel/huawei_vrp_display_mpls_te_tunnel.raw b/tests/huawei_vrp/display_mpls_te_tunnel/huawei_vrp_display_mpls_te_tunnel.raw new file mode 100644 index 0000000000..e85fe8690e --- /dev/null +++ b/tests/huawei_vrp/display_mpls_te_tunnel/huawei_vrp_display_mpls_te_tunnel.raw @@ -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 \ No newline at end of file diff --git a/tests/huawei_vrp/display_mpls_te_tunnel/huawei_vrp_display_mpls_te_tunnel.yml b/tests/huawei_vrp/display_mpls_te_tunnel/huawei_vrp_display_mpls_te_tunnel.yml new file mode 100644 index 0000000000..2135c7227a --- /dev/null +++ b/tests/huawei_vrp/display_mpls_te_tunnel/huawei_vrp_display_mpls_te_tunnel.yml @@ -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"