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_nxos_show_interface_status.template: error on 10G and 40G interfaces #331

Closed
JCapretta opened this issue Jan 14, 2019 · 1 comment
Closed

Comments

@JCapretta
Copy link
Contributor

ISSUE TYPE
  • Bug Report
TEMPLATE USING
Value PORT (\S+)
Value NAME (.*?)
Value STATUS (\S+)
Value VLAN (\d+|routed|trunk)
Value DUPLEX (\S+)
Value SPEED (\d+|auto)
Value TYPE (.+?)

Start
  ^[Pp]ort\s+[Nn]ame\s+[Ss]tatus\s+[Vv]lan\s+[Dd]uplex\s+[Ss]peed\s+[Tt]ype\s*$$ -> INTFS
  ^-+\s*$$
  ^$$
  ^.*$$ -> Error

INTFS
  ^${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s+${TYPE}\s*$$ -> Record
  ^-+\s*$$
  ^$$
  ^.*$$ -> Error

SAMPLE COMMAND OUTPUT
--------------------------------------------------------------------------------
Port          Name               Status    Vlan      Duplex  Speed   Type
--------------------------------------------------------------------------------
mgmt0         --                 connected routed    full    1000    --
Eth1/1        interface1         connected trunk     full    10G     10Gbase-SR-S
Eth1/2        interface2         connected trunk     full    10G     10Gbase-SR-S
Eth1/3        interface3         connected trunk     full    10G     10Gbase-SR
Eth1/4        interface4         connected trunk     full    10G     10Gbase-SR
Eth1/5        interface5         connected trunk     full    10G     10Gbase-SR-S
Eth1/6        interface6         connected trunk     full    10G     10Gbase-SR-S
Eth1/7        interface7         connected trunk     full    10G     10Gbase-SR-S
Eth1/8        interface8         connected trunk     full    10G     10Gbase-SR-S


SUMMARY

cisco_nxos_show_interface_status.template throws an error on 10G and 40G interfaces

STEPS TO REPRODUCE
$ textfsm.py templates/cisco_nxos_show_interface_status.template tests/cisco_nxos/show_interface_status/cisco_nxos_show_interface_status1.raw
EXPECTED RESULTS

No error

ACTUAL RESULTS
FSM Template:
Value PORT (\S+)
Value NAME (.*?)
Value STATUS (\S+)
Value VLAN (\d+|routed|trunk)
Value DUPLEX (\S+)
Value SPEED (\d+|auto)
Value TYPE (.+?)

Start
  ^[Pp]ort\s+[Nn]ame\s+[Ss]tatus\s+[Vv]lan\s+[Dd]uplex\s+[Ss]peed\s+[Tt]ype\s*$$ -> INTFS
  ^-+\s*$$
  ^$$
  ^.*$$ -> Error

INTFS
  ^${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s+${TYPE}\s*$$ -> Record
  ^-+\s*$$
  ^$$
  ^.*$$ -> Error


State Error raised. Rule Line: 19. Input Line: Eth1/1        interface1  connected trunk     full    10G     10Gbase-SR-S
JCapretta added a commit to JCapretta/ntc-templates that referenced this issue Jan 14, 2019
 * added new test files
 * modified template
JCapretta added a commit to JCapretta/ntc-templates that referenced this issue Jan 14, 2019
 * added new test files
 * modified template
jmcgill298 pushed a commit that referenced this issue Jan 18, 2019
BUG FIXES:
  * `SPEED`: change capture group to use `\S+` to account for new data
  * `TYPE`: change capture group to use `\S+` to account for new data

TEST FILES:
 * Added new files to provide sample data representing what was not working with previous capture groups
@jmcgill298
Copy link
Contributor

#332

jvanderaa pushed a commit that referenced this issue Nov 10, 2021
BUG FIXES:
  * `SPEED`: change capture group to use `\S+` to account for new data
  * `TYPE`: change capture group to use `\S+` to account for new data

TEST FILES:
 * Added new files to provide sample data representing what was not working with previous capture groups
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

No branches or pull requests

2 participants