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

Adds support for Cisco FTD #654

Merged
merged 5 commits into from
Apr 29, 2020
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
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 @@ -132,8 +132,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_6x",
"cisco_asa",
"cisco_ftd",
"cisco_ios",
"cisco_nxos",
"cisco_s300",
Expand Down