Skip to content

Commit

Permalink
New Template: Adds support for Cisco FTD and cisco_asa_ping (#654)
Browse files Browse the repository at this point in the history
  • Loading branch information
micahculpepper authored Apr 29, 2020
1 parent 508cbac commit 20d7d56
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 1 deletion.
19 changes: 19 additions & 0 deletions templates/cisco_asa_ping.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Value Required SENT_QTY (\d+)
Value Required SENT_TYPE (.*)
Value Required DESTINATION (\S+)
Value Required TIMEOUT (\d+)
Value Required RESPONSE_STREAM ([\.\!]+)
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+)


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
^\s*$$
^. -> Error
3 changes: 2 additions & 1 deletion templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ cisco_asa_show_version.textfsm, .*, cisco_asa, sh[[ow]] ver[[sion]]
cisco_asa_show_route.textfsm, .*, cisco_asa, sh[[ow]] ro[[ute]]
cisco_asa_show_xlate.textfsm, .*, cisco_asa, sh[[ow]] x[[late]]
cisco_asa_show_name.textfsm, .*, cisco_asa, sh[[ow]] nam[[e]]
cisco_asa_show_arp.textfsm, .*, cisco_asa, sh[[ow]] arp
cisco_asa_show_arp.textfsm, .*, cisco_(asa|ftd), sh[[ow]] arp
cisco_asa_show_nat.textfsm, .*, cisco_asa, sh[[ow]] nat
cisco_asa_ping.textfsm, .*, cisco_(asa|ftd), ping
cisco_asa_dir.textfsm, .*, cisco_asa, dir

cisco_ios_show_module.textfsm:cisco_ios_show_module_status.textfsm:cisco_ios_show_module_submodule.textfsm:cisco_ios_show_module_online_diag.textfsm, .*, cisco_ios, sh[[ow]] mod[[ule]]
Expand Down
4 changes: 4 additions & 0 deletions tests/cisco_asa/ping/cisco_asa_ping.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 192.168.10.45, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/10 ms
12 changes: 12 additions & 0 deletions tests/cisco_asa/ping/cisco_asa_ping.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: "192.168.10.45"
timeout: "2"
response_stream: "!!!!!"
success_pct: "100"
success_qty: "5"
rtt_min: "1"
rtt_avg: "2"
rtt_max: "10"
4 changes: 4 additions & 0 deletions tests/cisco_ftd/ping/cisco_ftd_ping.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.91.108.200, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
12 changes: 12 additions & 0 deletions tests/cisco_ftd/ping/cisco_ftd_ping.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.91.108.200"
timeout: "2"
response_stream: "!!!!!"
success_pct: "100"
success_qty: "5"
rtt_min: "1"
rtt_avg: "1"
rtt_max: "1"
1 change: 1 addition & 0 deletions tests/test_index_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def test_index_ordering():
"checkpoint_gaia",
"ciena_saos",
"cisco_asa",
"cisco_ftd",
"cisco_ios",
"cisco_nxos",
"cisco_s300",
Expand Down

0 comments on commit 20d7d56

Please sign in to comment.