Skip to content

Commit

Permalink
XR SHOW DROPS NP ALL: Change capture groups to use lists
Browse files Browse the repository at this point in the history
TEMPLATE UPDATES:
- Change variable data to be a list
  * Allows for platforms with additional capacity to still work
  * Changed capture groups:
    `DROP_FRM_CRC_ERR_ILKN$variable` -> `ILKN_CRC_ERR_LOCATION` & `DROP_FROM_CRC_ERR_ILKN`
    `DROP_FRM_CRC_ERR_SGMII$variable` -> `SGMII_CRC_ERR_LOCATION` & `DROP_FROM_CRC_ERR_SGMII`
    `DROP_FRM_CRC_ERR_XAUI$variable` -> `XAUI_CRC_ERR_LOCATION` & `DROP_FROM_CRC_ERR_XAUI`
    `DROP_FRM_FRAME_ERR_ILKN$variable` -> `ILKN_FRAME_ERR_LOCATION` & `DROP_FROM_FRAME_ERR_ILKN`
    `DROP_FRM_FRAME_ERR_SGMII$variable` -> `SGMII_FRAME_ERR_LOCATION` & `DROP_FROM_FRAME_ERR_SGMII`
    `DROP_FRM_FRAME_ERR_XAUI$variable` -> `XAUI_FRAME_ERR_LOCATION` & `DROP_FROM_FRAME_ERR_XAUI`

TEST FILES:
- Update parsed file to use lists with new capture group names
  • Loading branch information
jmcgill298 committed Jan 27, 2019
1 parent 29a883a commit ac2f256
Show file tree
Hide file tree
Showing 4 changed files with 826 additions and 1,344 deletions.
62 changes: 20 additions & 42 deletions templates/cisco_xr_show_drops_np_all.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,19 @@ Value Filldown LOCATION (\S+)
Value Required NP (\d+)
Value BFD_NEIGHBOR_DROP (\d+)
Value BFD_REMOTE_PUNT_DISC_0_DROP (\d+)
Value DROP_FRM_CRC_ERR_ILKN0 (\d+)
Value DROP_FRM_CRC_ERR_ILKN1 (\d+)
Value DROP_FRM_CRC_ERR_ILKN2 (\d+)
Value DROP_FRM_CRC_ERR_SGMII0 (\d+)
Value DROP_FRM_CRC_ERR_SGMII1 (\d+)
Value DROP_FRM_CRC_ERR_SGMII2 (\d+)
Value DROP_FRM_CRC_ERR_SGMII3 (\d+)
Value DROP_FRM_CRC_ERR_XAUI4 (\d+)
Value DROP_FRM_CRC_ERR_XAUI5 (\d+)
Value DROP_FRM_CRC_ERR_XAUI6 (\d+)
Value DROP_FRM_FRM_ERR_ILKN0 (\d+)
Value DROP_FRM_FRM_ERR_ILKN1 (\d+)
Value DROP_FRM_FRM_ERR_ILKN2 (\d+)
Value DROP_FRM_FRM_ERR_SGMII0 (\d+)
Value DROP_FRM_FRM_ERR_SGMII1 (\d+)
Value DROP_FRM_FRM_ERR_SGMII2 (\d+)
Value DROP_FRM_FRM_ERR_SGMII3 (\d+)
Value DROP_FRM_FRM_ERR_XAUI4 (\d+)
Value DROP_FRM_FRM_ERR_XAUI5 (\d+)
Value DROP_FRM_FRM_ERR_XAUI6 (\d+)
Value DROP_FRM_RUNT (\d+)
Value List ILKN_CRC_ERR_LOCATION (\d+)
Value List SGMII_CRC_ERR_LOCATION (\d+)
Value List XAUI_CRC_ERR_LOCATION (\d+)
Value List DROP_FROM_CRC_ERR_ILKN (\d+)
Value List DROP_FROM_CRC_ERR_SGMII (\d+)
Value List DROP_FROM_CRC_ERR_XAUI (\d+)
Value List ILKN_FRAME_ERR_LOCATION (\d+)
Value List SGMII_FRAME_ERR_LOCATION (\d+)
Value List XAUI_FRAME_ERR_LOCATION (\d+)
Value List DROP_FROM_FRAME_ERR_ILKN (\d+)
Value List DROP_FROM_FRAME_ERR_SGMII (\d+)
Value List DROP_FROM_FRAME_ERR_XAUI (\d+)
Value DROP_FROM_RUNT (\d+)
Value IPV4_BFD_EXCD (\d+)
Value IPV4_FRAG_NEEDED_PUNT_EXCD (\d+)
Value IPV4_TTL_ERROR_EXCD (\d+)
Expand Down Expand Up @@ -84,27 +76,13 @@ Start
^NP\s+${NP}\s+Drops:
^BFD_NEIGHBOR_DROP\s+${BFD_NEIGHBOR_DROP}
^BFD_REMOTE_PUNT_DISC_0_DROP\s+${BFD_REMOTE_PUNT_DISC_0_DROP}
^DROP_FRM_CRC_ERR_ILK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R_LOCATION}\s+${DROP_FROM_CRC_ERR_ILKN}
^DROP_FRM_CRC_ERR_SGMII${SGMII_CRC_ERR_LOCATION}\s+${DROP_FROM_CRC_ERR_SGMII}
^DROP_FRM_CRC_ERR_XAUI{XAUI_CRC_ERR_LOCATION}\s+${DROP_FROM_CRC_ERR_XAUI}
^DROP_FRM_FRM_ERR_ILKN${ILKN_FRAME_ERR_LOCATION}\s+${DROP_FROM_FRAME_ERR_ILKN}
^DROP_FRM_FRM_ERR_SGMII${SGMII_FRAME_ERR_LOCATION}\s+${DROP_FROM_FRAME_ERR_SGMII}
^DROP_FRM_FRM_ERR_XAUI${XAUI_FRAME_ERR_LOCATION}\s+${DROP_FROM_FRAME_ERR_XAUI}
^DROP_FRM_RUNT\s+${DROP_FROM_RUNT}
^IPV4_BFD_EXCD\s+${IPV4_BFD_EXCD}
^IPV4_FRAG_NEEDED_PUNT_EXCD\s+${IPV4_FRAG_NEEDED_PUNT_EXCD}
^IPV4_TTL_ERROR_EXCD\s+${IPV4_TTL_ERROR_EXCD}
Expand Down
Loading

0 comments on commit ac2f256

Please sign in to comment.