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

ping template for Cisco IOS XR devices #1564

Merged
merged 40 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2834b7a
Add files via upload
jorlandobr Nov 17, 2023
44f11e2
Merge branch 'networktocode:master' into jorlandobr-patch-3
jorlandobr Dec 5, 2023
045a971
Merge branch 'networktocode:master' into jorlandobr-patch-3
jorlandobr Dec 6, 2023
b76b806
Merge branch 'networktocode:master' into jorlandobr-patch-3
jorlandobr Dec 21, 2023
9f0be26
Update cisco_ios_ping.textfsm
jorlandobr Dec 23, 2023
5ffef25
Add files via upload
jorlandobr Dec 23, 2023
849dc01
Update index
jorlandobr Dec 23, 2023
93435a0
Add files via upload
jorlandobr Dec 23, 2023
896b79a
Add files via upload
jorlandobr Dec 23, 2023
ff19c05
Update cisco_xr_ping_fail.raw
jorlandobr Dec 23, 2023
091eee3
Update cisco_xr_ping.raw
jorlandobr Dec 23, 2023
4f3c9bb
Update cisco_xr_ping_fail.raw
jorlandobr Dec 23, 2023
da628d1
Update ci.yml
jorlandobr Dec 23, 2023
1a01c66
Update cisco_xr_ping.textfsm
jorlandobr Dec 23, 2023
0b6f6e1
Update ci.yml
jorlandobr Dec 24, 2023
d856b55
Add files via upload
jorlandobr Dec 24, 2023
023e695
Update cisco_asa_ping.textfsm
jorlandobr Dec 24, 2023
88d7f40
Update cisco_asa_ping_quench.raw
jorlandobr Dec 24, 2023
7898ed1
Update cisco_asa_ping_quench.yml
jorlandobr Dec 24, 2023
e249d72
Update cisco_asa_ping_unreachable.raw
jorlandobr Dec 24, 2023
9fbfb4f
Update cisco_asa_ping_unreachable.yml
jorlandobr Dec 24, 2023
12cb7a1
Update cisco_asa_ping_unreachable.raw
jorlandobr Dec 24, 2023
2e224e0
Update cisco_asa_ping_quench.raw
jorlandobr Dec 24, 2023
4d02f92
Update cisco_asa_ping.textfsm
jorlandobr Dec 24, 2023
7c6cd6b
Update cisco_asa_ping.textfsm
jorlandobr Dec 24, 2023
d3d2266
Update ci.yml
jorlandobr Dec 26, 2023
0bff2d2
Update cisco_asa_ping_quench.raw
jorlandobr Dec 26, 2023
a14d738
Update cisco_asa_ping_quench.yml
jorlandobr Dec 26, 2023
8ce0858
Update cisco_asa_ping_unreachable.raw
jorlandobr Dec 26, 2023
74f3bcd
Update cisco_asa_ping_unreachable.yml
jorlandobr Dec 26, 2023
64ed007
Update cisco_xr_ping.textfsm
jorlandobr Dec 27, 2023
50678c0
Update cisco_xr_ping.textfsm
jorlandobr Dec 27, 2023
d49642b
Update ci.yml
jorlandobr Dec 27, 2023
1cf17e2
Update cisco_ios_ping.textfsm
jorlandobr Dec 27, 2023
929b8d3
Update cisco_xr_ping.textfsm
jorlandobr Dec 27, 2023
6c60733
Update cisco_xr_ping.textfsm
jorlandobr Dec 27, 2023
bc147a4
Update ci.yml
jorlandobr Dec 27, 2023
f412238
Update ci.yml
jorlandobr Dec 27, 2023
4438d65
Update cisco_xr_ping.textfsm
jorlandobr Dec 27, 2023
3976d26
Update ci.yml
jorlandobr Dec 27, 2023
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
13 changes: 7 additions & 6 deletions ntc_templates/templates/cisco_asa_ping.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ Value Required SENT_QTY (\d+)
Value Required SENT_TYPE (.*)
Value Required DESTINATION (\S+)
Value Required TIMEOUT (\d+)
Value Required RESPONSE_STREAM ([\.\!]+)
Value Required RESPONSE_STREAM ([\.\!/Q/U]+)
Value Required SUCCESS_PCT (\d+)
Value Required SUCCESS_QTY (\d+)
Value Required RTT_MIN (\d+)
Value Required RTT_AVG (\d+)
Value Required RTT_MAX (\d+)
Value RTT_MIN (\d+)
Value RTT_AVG (\d+)
Value RTT_MAX (\d+)


Start
^Type\s+escape\s+sequence\s+to\s+abort.
^Sending\s+${SENT_QTY},\s+${SENT_TYPE}\s+to\s+${DESTINATION},\s+timeout\s+is\s+${TIMEOUT}\s+seconds:
^${RESPONSE_STREAM}
^Success\s+rate\s+is\s+${SUCCESS_PCT}\s+percent\s+\(${SUCCESS_QTY}/\d+\),\s+round-trip\s+min/avg/max\s+=\s+${RTT_MIN}/${RTT_AVG}/${RTT_MAX}\s+ms
^Success\s+rate\s+is\s+${SUCCESS_PCT}\s+percent\s+\(${SUCCESS_QTY}\/\d+\)(?:,\s+round-trip\s+min/avg/max\s+\=\s+)?(?:${RTT_MIN}/${RTT_AVG}/${RTT_MAX})?(?:\sms)?
^\s*$$
^. -> Error
# Error out if raw data does not match any above rules.
^.* -> Error "Could not parse line:"
2 changes: 1 addition & 1 deletion ntc_templates/templates/cisco_ios_ping.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Value Required SENT_TYPE (.*)
Value Required DESTINATION (\S+)
Value Required TIMEOUT (\d+)
Value SOURCE (\S+)
Value List RESPONSE_STREAM ([\.\!]+)
Value List RESPONSE_STREAM ([\.\!/U/Q]+)
Value Required SUCCESS_PCT (\d+)
Value Required SUCCESS_QTY (\d+)
Value RTT_MIN (\d+)
Expand Down
24 changes: 24 additions & 0 deletions ntc_templates/templates/cisco_xr_ping.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Value Required SENT_QTY (\d+)
Value Required SENT_TYPE (.*)
Value Required DESTINATION (\S+)
Value Required TIMEOUT (\d+)
Value SOURCE (\S+)
Value List RESPONSE_STREAM ([\.\!/Q/U]+)
Value Required SUCCESS_PCT (\d+)
Value Required SUCCESS_QTY (\d+)
Value RTT_MIN (\d+)
Value RTT_AVG (\d+)
Value RTT_MAX (\d+)


Start
^(Mon?)|(Tue?)|(Wed?)|(Thu?)|(Fri?)|(Sat?)|(Sun?)\s.*$$
^Type\s+escape\s+sequence\s+to\s+abort.
^Sending\s+${SENT_QTY},\s+${SENT_TYPE}\s+to\s+${DESTINATION},\s+timeout\s+is\s+${TIMEOUT}\s+seconds:
^Packet\s+sent\s+with\s+a\s+source\s+address\s+of\s+${SOURCE}
^Packet\s+sent\s+with\s+the\s+DF\s+bit\s+set
^${RESPONSE_STREAM}
^Success\s+rate\s+is\s+${SUCCESS_PCT}\s+percent\s+\(${SUCCESS_QTY}\/\d+\)(?:,\s+round-trip\s+min/avg/max\s+\=\s+)?(?:${RTT_MIN}/${RTT_AVG}/${RTT_MAX})?(?:\sms)?
^\s*$$
# Error out if raw data does not match any above rules.
^.* -> Error "Could not parse line:"
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ cisco_xr_show_version.textfsm, .*, cisco_xr, sh[[ow]] ver[[sion]]
cisco_xr_show_hsrp.textfsm, .*, cisco_xr, sh[[ow]] hs[[rp]]
cisco_xr_show_arp.textfsm, .*, cisco_xr, sh[[ow]] arp
cisco_xr_show_bgp.textfsm, .*, cisco_xr, sh[[ow]] bg[[p]]
cisco_xr_ping.textfsm, .*, cisco_xr, ping

dell_force10_show_ip_interface_brief.textfsm, .*, dell_force10, sh[[ow]] ip int[[erface]] br[[ief]]
dell_force10_show_vlan_brief.textfsm, .*, dell_force10, sh[[ow]] vl[[an]] br[[ief]]
Expand Down
4 changes: 4 additions & 0 deletions tests/cisco_asa/ping/cisco_asa_ping_mix.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
Q..U!
Success rate is 20 percent (1/5), round-trip min/avg/max = 9/9/9 ms
12 changes: 12 additions & 0 deletions tests/cisco_asa/ping/cisco_asa_ping_mix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
response_stream: "Q..U!"
success_pct: "20"
success_qty: "1"
rtt_min: "9"
rtt_avg: "9"
rtt_max: "9"
4 changes: 4 additions & 0 deletions tests/cisco_asa/ping/cisco_asa_ping_quench.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
Q..Q.
Success rate is 0 percent (0/5)
12 changes: 12 additions & 0 deletions tests/cisco_asa/ping/cisco_asa_ping_quench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
response_stream: "Q..Q."
success_pct: "0"
success_qty: "0"
rtt_min: ""
rtt_avg: ""
rtt_max: ""
4 changes: 4 additions & 0 deletions tests/cisco_asa/ping/cisco_asa_ping_unreachable.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
U..U.
Success rate is 0 percent (0/5)
12 changes: 12 additions & 0 deletions tests/cisco_asa/ping/cisco_asa_ping_unreachable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
response_stream: "U..U."
success_pct: "0"
success_qty: "0"
rtt_min: ""
rtt_avg: ""
rtt_max: ""
4 changes: 4 additions & 0 deletions tests/cisco_ios/ping/cisco_ios_ping_mix.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
Q..U!
Success rate is 20 percent (1/5), round-trip min/avg/max = 9/9/9 ms
14 changes: 14 additions & 0 deletions tests/cisco_ios/ping/cisco_ios_ping_mix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
source: ""
response_stream:
- "Q..U!"
success_pct: "20"
success_qty: "1"
rtt_min: "9"
rtt_avg: "9"
rtt_max: "9"
4 changes: 4 additions & 0 deletions tests/cisco_ios/ping/cisco_ios_ping_quench.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
Q..Q.
Success rate is 0 percent (0/5)
14 changes: 14 additions & 0 deletions tests/cisco_ios/ping/cisco_ios_ping_quench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
source: ""
response_stream:
- "Q..Q."
success_pct: "0"
success_qty: "0"
rtt_min: ""
rtt_avg: ""
rtt_max: ""
4 changes: 4 additions & 0 deletions tests/cisco_ios/ping/cisco_ios_ping_unreachable.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
U..U.
Success rate is 0 percent (0/5)
14 changes: 14 additions & 0 deletions tests/cisco_ios/ping/cisco_ios_ping_unreachable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
source: ""
response_stream:
- "U..U."
success_pct: "0"
success_qty: "0"
rtt_min: ""
rtt_avg: ""
rtt_max: ""
5 changes: 5 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fri Dec 22 17:30:39.512 BRA
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.191.129.114, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
14 changes: 14 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.191.129.114"
timeout: "2"
source: ""
response_stream:
- "!!!!!"
success_pct: "100"
success_qty: "5"
rtt_min: "1"
rtt_avg: "1"
rtt_max: "1"
5 changes: 5 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping_fail.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Fri Nov 17 16:29:18.710 BRA
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.27.18.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
14 changes: 14 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping_fail.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.27.18.2"
timeout: "2"
source: ""
response_stream:
- "....."
success_pct: "0"
success_qty: "0"
rtt_min: ""
rtt_avg: ""
rtt_max: ""
4 changes: 4 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping_mix.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
Q..U!
Success rate is 20 percent (1/5), round-trip min/avg/max = 9/9/9 ms
14 changes: 14 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping_mix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
source: ""
response_stream:
- "Q..U!"
success_pct: "20"
success_qty: "1"
rtt_min: "9"
rtt_avg: "9"
rtt_max: "9"
4 changes: 4 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping_quench.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
QQQQQ
Success rate is 0 percent (0/5)
14 changes: 14 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping_quench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
source: ""
response_stream:
- "QQQQQ"
success_pct: "0"
success_qty: "0"
rtt_min: ""
rtt_avg: ""
rtt_max: ""
4 changes: 4 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping_unreachable.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.245.179.14, timeout is 2 seconds:
UUUUU
Success rate is 0 percent (0/5)
14 changes: 14 additions & 0 deletions tests/cisco_xr/ping/cisco_xr_ping_unreachable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- sent_qty: "5"
sent_type: "100-byte ICMP Echos"
destination: "10.245.179.14"
timeout: "2"
source: ""
response_stream:
- "UUUUU"
success_pct: "0"
success_qty: "0"
rtt_min: ""
rtt_avg: ""
rtt_max: ""