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

cisco_xr_show_interfaces.template line 4 regex incorrect #280

Closed
pwoconnor opened this issue Oct 26, 2018 · 0 comments · Fixed by #281
Closed

cisco_xr_show_interfaces.template line 4 regex incorrect #280

pwoconnor opened this issue Oct 26, 2018 · 0 comments · Fixed by #281

Comments

@pwoconnor
Copy link

ISSUE TYPE
  • Bug Report
TEMPLATE USING
cisco_xr_show_interfaces.template

Line in regex that is incorrect
 ^\s+Internet\s+Address\s+is\s+${IP_ADDRESS}
SAMPLE COMMAND OUTPUT
TenGigE0/0/2/3 is up, line protocol is up 
  Interface state transitions: 1
  Hardware is TenGigE, address is e0ac.f121.3733 (bia e0ac.f121.3733)
  Layer 1 Transport Mode is LAN
  Description: TEST DESCRIPTION
  Internet address is 172.16.1.0/31
  MTU 9178 bytes, BW 10000000 Kbit (Max: 10000000 Kbit)
     reliability 255/255, txload 0/255, rxload 2/255
  Encapsulation ARPA,
  Full-duplex, 10000Mb/s, link type is force-up
  output flow control is on, input flow control is on
  loopback not set,
  ARP type ARPA, ARP timeout 04:00:00
  Last input 00:00:00, output 00:00:00
  Last clearing of "show interface" counters never
  30 second input rate 107543000 bits/sec, 14399 packets/sec
  30 second output rate 21008000 bits/sec, 11364 packets/sec
     153451697561 packets input, 132611285629421 bytes, 4 total input drops
     0 drops for unrecognized upper-level protocol
     Received 1 broadcast packets, 61346651 multicast packets
              1 runts, 0 giants, 0 throttles, 0 parity
     8 input errors, 3 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     121503394577 packets output, 30543269332397 bytes, 0 total output drops
     Output 1 broadcast packets, 60855096 multicast packets
     0 output errors, 0 underruns, 0 applique, 0 resets
     0 output buffer failures, 0 output buffers swapped out
     1 carrier transitions
SUMMARY

The current regex for Value IP_ADDRESS tries to match address with a capital A. In the below line

Internet address is 172.16.1.0/31

I have checked XR verison 4.x, 5.x and 6.x. All versions currently use address with lowercase a.

STEPS TO REPRODUCE
Using the current template produces no results.
EXPECTED RESULTS

Changing the regex to instead look for a lowercase will fix this issue. example below.

Current
^\s+Internet\s+Address\s+is\s+${IP_ADDRESS}
Purposed
^\s+Internet\s+address\s+is\s+${IP_ADDRESS}

ACTUAL RESULTS
With the current version the IP_ADDRESS value does not match. Since this line doesn't match the template does not match an entries and you end not getting any information.
jmcgill298 added a commit to jmcgill298/ntc-templates that referenced this issue Oct 26, 2018
jmcgill298 added a commit to jmcgill298/ntc-templates that referenced this issue Oct 26, 2018
jmcgill298 added a commit that referenced this issue Oct 26, 2018
XR_SHOW_INTF: Correct capturing of IP Address info - Fixes #280
jvanderaa pushed a commit that referenced this issue Nov 10, 2021
XR_SHOW_INTF: Correct capturing of IP Address info - Fixes #280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant