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

Bugfix: Panos sh intf hardware - Account for unk for SPEED/Duplex #710

Merged
merged 2 commits into from
May 22, 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
9 changes: 5 additions & 4 deletions templates/paloalto_panos_show_interface_hardware.textfsm
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Value INTF (\S+)
Value SPEED (\d+|\[n\/a\])
Value DUPLEX (\S+)
Value ID (\S+)
Value SPEED (\[n/a\]|\S+)
Value DUPLEX (\[n/a\]|\S+)
Value STATE (\S+)
Value ADDRESS ([a-fA-F0-9]{2}\:[a-fA-F0-9]{2}\:[a-fA-F0-9]{2}\:[a-fA-F0-9]{2}\:[a-fA-F0-9]{2}\:[a-fA-F0-9]{2})

Start
#^${INTF}\s+\d+\s+[n/a]/[n/a]/${STATE}\s+\S+ -> Record
^${INTF}\s+\d+\s+${SPEED}/${DUPLEX}/${STATE}\s+\S+ -> Record
^${INTF}\s+${ID}\s+${SPEED}/${DUPLEX}/${STATE}\s+${ADDRESS} -> Record
Original file line number Diff line number Diff line change
@@ -1,50 +1,74 @@
---
parsed_sample:
- intf: "ethernet1/1"
id: "16"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "00:1b:17:00:01:10"
- intf: "ethernet1/2"
id: "17"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "00:1b:17:00:01:11"
- intf: "ethernet1/3"
id: "18"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "00:1b:17:00:01:12"
- intf: "ethernet1/4"
id: "19"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "00:1b:17:00:01:13"
- intf: "ethernet1/5"
id: "20"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "00:1b:17:00:01:14"
- intf: "ethernet1/6"
id: "21"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "00:1b:17:00:01:15"
- intf: "ethernet1/7"
id: "22"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "00:1b:17:00:01:16"
- intf: "dedicated-ha1"
id: "5"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "00:90:0b:33:3d:53"
- intf: "dedicated-ha2"
id: "6"
speed: "1000"
state: "up"
duplex: "full"
state: "up"
address: "58:49:3b:1e:69:16"
- intf: "vlan"
id: "1"
speed: "[n/a]"
state: "up"
duplex: "[n/a]"
state: "up"
address: "00:1b:17:00:01:01"
- intf: "loopback"
id: "3"
speed: "[n/a]"
state: "up"
duplex: "[n/a]"
state: "up"
address: "00:1b:17:00:01:03"
- intf: "tunnel"
id: "4"
speed: "[n/a]"
state: "up"
duplex: "[n/a]"
state: "up"
address: "00:1b:17:00:01:04"
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
total configured hardware interfaces: 26

name id speed/duplex/state mac address
--------------------------------------------------------------------------------
ethernet1/1 64 1000/full/up c4:24:56:d7:30:40
ethernet1/2 65 ukn/ukn/down(autoneg) c4:24:56:d7:30:41
ethernet1/3 66 ukn/ukn/down(autoneg) c4:24:56:d7:30:42
ethernet1/4 67 ukn/ukn/down(autoneg) c4:24:56:d7:30:43
ethernet1/5 68 ukn/ukn/down(autoneg) c4:24:56:d7:30:44
ethernet1/6 69 ukn/ukn/down(autoneg) c4:24:56:d7:30:45
ethernet1/7 70 ukn/ukn/down(autoneg) c4:24:56:d7:30:46
ethernet1/8 71 ukn/ukn/down(autoneg) c4:24:56:d7:30:47
ethernet1/9 72 ukn/ukn/down(autoneg) c4:24:56:d7:30:48
ethernet1/10 73 ukn/ukn/down(autoneg) c4:24:56:d7:30:49
ethernet1/11 74 ukn/ukn/down(autoneg) c4:24:56:d7:30:4a
ethernet1/12 75 ukn/ukn/down(autoneg) c4:24:56:d7:30:4b
ethernet1/13 76 ukn/ukn/down(autoneg) c4:24:56:d7:30:4c
ethernet1/14 77 ukn/ukn/down(autoneg) c4:24:56:d7:30:4d
ethernet1/15 78 ukn/ukn/down(autoneg) c4:24:56:d7:30:4e
ethernet1/16 79 ukn/ukn/down(autoneg) c4:24:56:d7:30:4f
ethernet1/17 80 10000/full/up c4:24:56:d7:30:50
ethernet1/18 81 10000/full/up c4:24:56:d7:30:51
ethernet1/19 82 ukn/ukn/down(autoneg) c4:24:56:d7:30:52
ethernet1/20 83 ukn/ukn/down(autoneg) c4:24:56:d7:30:53
ha1-a 5 ukn/ukn/down(autoneg) 08:66:1f:02:04:a2
ha1-b 7 ukn/ukn/down(autoneg) c4:24:56:d7:30:07
vlan 1 [n/a]/[n/a]/up c4:24:56:d7:30:01
loopback 3 [n/a]/[n/a]/up c4:24:56:d7:30:03
tunnel 4 [n/a]/[n/a]/up c4:24:56:d7:30:04
hsci 8 ukn/ukn/down(autoneg) c4:24:56:d7:30:08

aggregation groups: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
---
parsed_sample:
- intf: "ethernet1/1"
id: "64"
speed: "1000"
duplex: "full"
state: "up"
address: "c4:24:56:d7:30:40"
- intf: "ethernet1/2"
id: "65"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:41"
- intf: "ethernet1/3"
id: "66"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:42"
- intf: "ethernet1/4"
id: "67"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:43"
- intf: "ethernet1/5"
id: "68"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:44"
- intf: "ethernet1/6"
id: "69"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:45"
- intf: "ethernet1/7"
id: "70"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:46"
- intf: "ethernet1/8"
id: "71"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:47"
- intf: "ethernet1/9"
id: "72"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:48"
- intf: "ethernet1/10"
id: "73"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:49"
- intf: "ethernet1/11"
id: "74"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:4a"
- intf: "ethernet1/12"
id: "75"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:4b"
- intf: "ethernet1/13"
id: "76"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:4c"
- intf: "ethernet1/14"
id: "77"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:4d"
- intf: "ethernet1/15"
id: "78"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:4e"
- intf: "ethernet1/16"
id: "79"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:4f"
- intf: "ethernet1/17"
id: "80"
speed: "10000"
duplex: "full"
state: "up"
address: "c4:24:56:d7:30:50"
- intf: "ethernet1/18"
id: "81"
speed: "10000"
duplex: "full"
state: "up"
address: "c4:24:56:d7:30:51"
- intf: "ethernet1/19"
id: "82"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:52"
- intf: "ethernet1/20"
id: "83"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:53"
- intf: "ha1-a"
id: "5"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "08:66:1f:02:04:a2"
- intf: "ha1-b"
id: "7"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:07"
- intf: "vlan"
id: "1"
speed: "[n/a]"
duplex: "[n/a]"
state: "up"
address: "c4:24:56:d7:30:01"
- intf: "loopback"
id: "3"
speed: "[n/a]"
duplex: "[n/a]"
state: "up"
address: "c4:24:56:d7:30:03"
- intf: "tunnel"
id: "4"
speed: "[n/a]"
duplex: "[n/a]"
state: "up"
address: "c4:24:56:d7:30:04"
- intf: "hsci"
id: "8"
speed: "ukn"
duplex: "ukn"
state: "down(autoneg)"
address: "c4:24:56:d7:30:08"