Skip to content

Commit

Permalink
added VLAN value and search pattern (networktocode#1002)
Browse files Browse the repository at this point in the history
* Add VLAN value for Cisco ASA `show interface`
  • Loading branch information
dbell-infra authored and cppmonkey committed Oct 25, 2023
1 parent 8d54be8 commit 03902c1
Show file tree
Hide file tree
Showing 6 changed files with 224 additions and 173 deletions.
2 changes: 2 additions & 0 deletions ntc_templates/templates/cisco_asa_show_interface.textfsm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Value SPEED (\d+\w+\s\w+)
Value DESCRIPTION (.*)
Value ADDRESS ([a-zA-Z0-9]+.[a-zA-Z0-9]+.[a-zA-Z0-9]+)
Value MTU (\d+)
Value VLAN (\d+)
Value IP_ADDRESS (\d+\.\d+\.\d+\.\d+)
Value NET_MASK (\d+\.\d+\.\d+\.\d+)
Value ONEMIN_IN_PPS (\d+)
Expand All @@ -33,6 +34,7 @@ Start
^.*\(${DUPLEX}\),\s+\d+\s+Mbps\(${SPEED}\)
^.*Duplex,\s+Auto-Speed
^.*Description:\s+${DESCRIPTION}
^.*VLAN\s+identifier\s+${VLAN}
^.*MAC\s+address\s+${ADDRESS},\s+MTU\s+${MTU}
^.*MAC\s+address\s+${ADDRESS},\s+MTU\s+not\s+set
^.*IP\s+address\s+${IP_ADDRESS},\s+subnet\s+mask\s+${NET_MASK}
Expand Down
164 changes: 85 additions & 79 deletions tests/cisco_asa/show_interface/cisco_asa_show_interface.yml
Original file line number Diff line number Diff line change
@@ -1,146 +1,152 @@
---
parsed_sample:
- address: "fa16.3eb0.c3d3"
- interface: "GigabitEthernet0/0"
interface_zone: "outside"
link_status: "up"
protocol_status: "up"
hardware_type: "i82540EM rev03"
bandwidth: "1000 Mbps"
delay: "10 usec"
description: "to iosv-1"
duplex: "Full-duplex"
fivemin_drop_rate: "0"
fivemin_in_pps: "0"
fivemin_in_rate: "0"
fivemin_out_pps: "0"
fivemin_out_rate: "0"
hardware_type: "i82540EM rev03"
interface: "GigabitEthernet0/0"
interface_zone: "outside"
ip_address: "10.0.0.5"
link_status: "up"
speed: "1000 Mbps"
description: "to iosv-1"
address: "fa16.3eb0.c3d3"
mtu: "1500"
vlan: ""
ip_address: "10.0.0.5"
net_mask: "255.255.255.252"
onemin_drop_rate: "0"
onemin_in_pps: "0"
onemin_in_rate: "0"
onemin_out_pps: "0"
onemin_out_rate: "0"
protocol_status: "up"
speed: "1000 Mbps"
- address: "fa16.3ed1.7e26"
bandwidth: "1000 Mbps"
delay: "10 usec"
description: "to iosv-2"
duplex: "Full-duplex"
fivemin_drop_rate: "0"
onemin_drop_rate: "0"
fivemin_in_pps: "0"
fivemin_in_rate: "0"
fivemin_out_pps: "0"
fivemin_out_rate: "0"
hardware_type: "i82540EM rev03"
interface: "GigabitEthernet0/1"
fivemin_drop_rate: "0"
- interface: "GigabitEthernet0/1"
interface_zone: "outside-1"
ip_address: "10.0.0.13"
link_status: "up"
protocol_status: "up"
hardware_type: "i82540EM rev03"
bandwidth: "1000 Mbps"
delay: "10 usec"
duplex: "Full-duplex"
speed: "1000 Mbps"
description: "to iosv-2"
address: "fa16.3ed1.7e26"
mtu: "1500"
vlan: ""
ip_address: "10.0.0.13"
net_mask: "255.255.255.252"
onemin_drop_rate: "0"
onemin_in_pps: "0"
onemin_in_rate: "0"
onemin_out_pps: "0"
onemin_out_rate: "0"
protocol_status: "up"
speed: "1000 Mbps"
- address: "fa16.3e1c.d1c3"
bandwidth: "1000 Mbps"
delay: "10 usec"
description: "OOB Management"
duplex: "Full-duplex"
fivemin_drop_rate: "0"
onemin_drop_rate: "0"
fivemin_in_pps: "0"
fivemin_in_rate: "91"
fivemin_in_rate: "0"
fivemin_out_pps: "0"
fivemin_out_rate: "11"
hardware_type: "i82540EM rev03"
interface: "Management0/0"
fivemin_out_rate: "0"
fivemin_drop_rate: "0"
- interface: "Management0/0"
interface_zone: "mgmt"
ip_address: "172.16.1.222"
link_status: "up"
protocol_status: "up"
hardware_type: "i82540EM rev03"
bandwidth: "1000 Mbps"
delay: "10 usec"
duplex: "Full-duplex"
speed: "1000 Mbps"
description: "OOB Management"
address: "fa16.3e1c.d1c3"
mtu: "1500"
vlan: ""
ip_address: "172.16.1.222"
net_mask: "255.255.255.0"
onemin_drop_rate: "0"
onemin_in_pps: "1"
onemin_in_rate: "79"
onemin_out_pps: "1"
onemin_out_rate: "117"
onemin_drop_rate: "0"
fivemin_in_pps: "0"
fivemin_in_rate: "91"
fivemin_out_pps: "0"
fivemin_out_rate: "11"
fivemin_drop_rate: "0"
- interface: "DMZ"
interface_zone: "DMZ"
link_status: "up"
protocol_status: "up"
speed: "1000 Mbps"
- address: "fa16.3eb0.c3d3"
hardware_type: ""
bandwidth: ""
delay: ""
description: "DMZ (Vl3)"
duplex: ""
fivemin_drop_rate: ""
fivemin_in_pps: ""
fivemin_in_rate: ""
fivemin_out_pps: ""
fivemin_out_rate: ""
hardware_type: ""
interface: "DMZ"
interface_zone: "DMZ"
ip_address: "10.6.2.1"
link_status: "up"
speed: ""
description: "DMZ (Vl3)"
address: "fa16.3eb0.c3d3"
mtu: "1500"
vlan: ""
ip_address: "10.6.2.1"
net_mask: "255.255.255.0"
onemin_drop_rate: ""
onemin_in_pps: ""
onemin_in_rate: ""
onemin_out_pps: ""
onemin_out_rate: ""
protocol_status: "up"
speed: ""
- address: "fa16.3eb0.c3d3"
bandwidth: ""
delay: ""
description: "outside(Vl2)"
duplex: ""
fivemin_drop_rate: ""
onemin_drop_rate: ""
fivemin_in_pps: ""
fivemin_in_rate: ""
fivemin_out_pps: ""
fivemin_out_rate: ""
hardware_type: ""
interface: "outside"
fivemin_drop_rate: ""
- interface: "outside"
interface_zone: "outside-3"
ip_address: "10.12.16.237"
link_status: "up"
protocol_status: "up"
hardware_type: ""
bandwidth: ""
delay: ""
duplex: ""
speed: ""
description: "outside(Vl2)"
address: "fa16.3eb0.c3d3"
mtu: "1500"
vlan: ""
ip_address: "10.12.16.237"
net_mask: "255.255.255.248"
onemin_drop_rate: ""
onemin_in_pps: ""
onemin_in_rate: ""
onemin_out_pps: ""
onemin_out_rate: ""
protocol_status: "up"
speed: ""
- address: "fa16.3eb0.c3d3"
bandwidth: ""
delay: ""
description: ""
duplex: ""
fivemin_drop_rate: ""
onemin_drop_rate: ""
fivemin_in_pps: ""
fivemin_in_rate: ""
fivemin_out_pps: ""
fivemin_out_rate: ""
hardware_type: ""
interface: "inside"
fivemin_drop_rate: ""
- interface: "inside"
interface_zone: "inside"
ip_address: "10.6.10.1"
link_status: "up"
protocol_status: "up"
hardware_type: ""
bandwidth: ""
delay: ""
duplex: ""
speed: ""
description: ""
address: "fa16.3eb0.c3d3"
mtu: "1500"
vlan: ""
ip_address: "10.6.10.1"
net_mask: "255.255.255.0"
onemin_drop_rate: ""
onemin_in_pps: ""
onemin_in_rate: ""
onemin_out_pps: ""
onemin_out_rate: ""
protocol_status: "up"
speed: ""
onemin_drop_rate: ""
fivemin_in_pps: ""
fivemin_in_rate: ""
fivemin_out_pps: ""
fivemin_out_rate: ""
fivemin_drop_rate: ""
Loading

0 comments on commit 03902c1

Please sign in to comment.