Skip to content

Commit

Permalink
NXOS_SHOW_INTERFACE_STATUS: Update template to better handle name wit…
Browse files Browse the repository at this point in the history
…Fixes networktocode#196 (networktocode#204)

* NXOS_SHOW_INTERFACE_STATUS: Update template to better handle name with variable spacing

* Update '\w' to use '\S'

* Add possible solution that avoids depending on 'auto|half|full'
  • Loading branch information
jmcgill298 committed Oct 14, 2018
1 parent c91f590 commit 49fb841
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions templates/cisco_nxos_show_interface_status.template
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
Value PORT (.*?)
Value NAME (\S+(?:\s\w+\s\w+)?)
Value STATUS (\w+?)
Value VLAN (\w+|\d+?)
Value DUPLEX (full|auto|half)
Value SPEED (.*?)
Value TYPE (.*?)
Value PORT (\S+)
Value NAME (.*?)
Value STATUS (\S+)
Value VLAN (\d+|routed|trunk)
Value DUPLEX (\S+)
Value SPEED (\d+|auto)
Value TYPE (.+?)

Start
^${PORT}\s+${NAME}\s+${STATUS}\s+${VLAN}\s+${DUPLEX}\s+${SPEED}\s+${TYPE}$$ -> Record
^[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

0 comments on commit 49fb841

Please sign in to comment.