Skip to content

Commit

Permalink
XR_SHOW_INTF: Correct capturing of IP Address info - Fixes #280
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgill298 committed Oct 26, 2018
1 parent cae3210 commit 91d42a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions templates/cisco_xr_show_interfaces.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Value HARDWARE_TYPE (\w+)
Value ADDRESS ([a-zA-Z0-9]+.[a-zA-Z0-9]+.[a-zA-Z0-9]+)
Value BIA ([a-zA-Z0-9]+.[a-zA-Z0-9]+.[a-zA-Z0-9]+)
Value DESCRIPTION (.*)
Value IP_ADDRESS (\d+\.\d+\.\d+\.\d+\/\d+)
Value IP_ADDRESS (.*?)
Value MTU (\d+)
Value DUPLEX (.+?)
Value SPEED (.+?)
Expand All @@ -16,7 +16,7 @@ Start
^${INTERFACE}\sis\s+${LINK_STATUS},\s+line\sprotocol\sis\s+${ADMIN_STATE}
^\s+Hardware\s+is\s+${HARDWARE_TYPE}(\s+)?(Ethernet)?(,)?(\s+address\s+is\s+${ADDRESS}\s+\(bia\s+${BIA})?
^\s+Description:\s+${DESCRIPTION}
^\s+Internet\s+Address\s+is\s+${IP_ADDRESS}
^\s+[Ii]nternet\s+[Aa]ddress\s+is\s+${IP_ADDRESS}\s*$$
^\s+MTU\s+${MTU}.*BW\s+${BANDWIDTH}
^\s+${DUPLEX}, ${SPEED},.+link
^\s+Encapsulation\s+${ENCAPSULATION}
Expand Down
12 changes: 6 additions & 6 deletions tests/cisco_xr/show_interfaces/cisco_xr_show_interfaces.parsed
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ parsed_sample:
encapsulation: Loopback
hardware_type: Loopback
interface: Loopback5
ip_address: ''
ip_address: '192.168.169.21/32'
link_status: up
mtu: '1500'
speed: ''
Expand All @@ -23,7 +23,7 @@ parsed_sample:
encapsulation: 'Null'
hardware_type: 'Null'
interface: Null0
ip_address: ''
ip_address: 'Unknown'
link_status: up
mtu: '1500'
speed: ''
Expand All @@ -36,7 +36,7 @@ parsed_sample:
encapsulation: TUNNEL
hardware_type: Tunnel
interface: tunnel-te300
ip_address: ''
ip_address: '192.168.169.21/32'
link_status: up
mtu: '1500'
speed: ''
Expand All @@ -49,7 +49,7 @@ parsed_sample:
encapsulation: ARPA
hardware_type: Management
interface: MgmtEth0/RSP1/CPU0/0
ip_address: ''
ip_address: '10.253.3.18/25'
link_status: up
mtu: '1514'
speed: 1000Mb/s
Expand All @@ -62,7 +62,7 @@ parsed_sample:
encapsulation: ARPA
hardware_type: FortyGigE
interface: FortyGigE0/0/0/0
ip_address: ''
ip_address: '192.168.166.9/30'
link_status: up
mtu: '9216'
speed: 40000Mb/s
Expand All @@ -75,7 +75,7 @@ parsed_sample:
encapsulation: ARPA
hardware_type: TenGigE
interface: TenGigE0/3/0/0
ip_address: ''
ip_address: '192.168.166.65/30'
link_status: up
mtu: '9216'
speed: 10000Mb/s

0 comments on commit 91d42a5

Please sign in to comment.