From c462724b9e7589553c0809a0830fe2c684ba3539 Mon Sep 17 00:00:00 2001 From: Ivan Sinyagovskiy Date: Wed, 19 Dec 2018 12:13:13 +0300 Subject: [PATCH 1/3] CISCO XR SHOW ASIC ERRORS: Add new template --- ..._xr_show_asic-errors_all_location.template | 25 ++++ templates/index | 1 + ...co_xr_show_asic-errors_all_location.parsed | 120 ++++++++++++++++++ ...cisco_xr_show_asic-errors_all_location.raw | 115 +++++++++++++++++ 4 files changed, 261 insertions(+) create mode 100644 templates/cisco_xr_show_asic-errors_all_location.template create mode 100644 tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.parsed create mode 100644 tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.raw diff --git a/templates/cisco_xr_show_asic-errors_all_location.template b/templates/cisco_xr_show_asic-errors_all_location.template new file mode 100644 index 0000000000..67bbf04bca --- /dev/null +++ b/templates/cisco_xr_show_asic-errors_all_location.template @@ -0,0 +1,25 @@ +Value Filldown ASIC (\S+) +Value INSTANCE (\d+) +Value NUMBER_OF_NODES (\d+) +Value SBE_ERROR_COUNT (\d+) +Value MBE_ERROR_COUNT (\d+) +Value PARITY_ERROR_COUNT (\d+) +Value CRC_ERROR_COUNT (\d+) +Value GENERIC_ERROR_COUNT (\d+) +Value RESET_ERROR_COUNT (\d+) + +Start + ^\* +${ASIC} ASIC Error Summary +\* + ^Instance +: +${INSTANCE} + ^Number of nodes +: +${NUMBER_OF_NODES} + ^SBE error count +: +${SBE_ERROR_COUNT} + ^MBE error count +: +${MBE_ERROR_COUNT} + ^Parity error count +: +${PARITY_ERROR_COUNT} + ^CRC error count +: +${CRC_ERROR_COUNT} + ^Generic error count +: +${GENERIC_ERROR_COUNT} + ^Reset error count +: +${RESET_ERROR_COUNT} -> Record + ^\-+$$ + ^\*+$$ + ^\s+$$ + ^$$ + ^.* -> Error "LINE NOT FOUND" diff --git a/templates/index b/templates/index index 63fd9cd849..40496b3a51 100644 --- a/templates/index +++ b/templates/index @@ -236,6 +236,7 @@ cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.template, .*, cisco_xr, sh[[ow]] cisco_xr_admin_show_controller_fabric_health.template, .*, cisco_xr, adm[[in]] sh[[ow]] controller fab[[ric]] hea[[lth]] cisco_xr_show_controller_fabric_plane_all.template, .*, cisco_xr, sh[[ow]] controller fab[[ric]] pla[[ne]] all cisco_xr_show_configuration_commit_list.template, .*, cisco_xr, sh[[ow]] conf[[iguration]] c[[ommit]] l[[ist]] +cisco_xr_show_asic-errors_all_location.template, .*, cisco_xr, sh[[ow]] asic-errors all loc[[ation]].* cisco_xr_show_dhcp_ipv4_proxy_binding.template, .*, cisco_xr, sh[[ow]] dh[[cp]] ipv4 p[[roxy]] b[[inding]] cisco_xr_show_mpls_ldp_neighbor_brief.template, .*, cisco_xr, sh[[ow]] mp[[ls]] ld[[p]] neigh[[bor]] br[[ief]] cisco_xr_admin_show_environment_fan.template, .*, cisco_xr, adm[[in]] sh[[ow]] env[[ironment]] f[[an]] diff --git a/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.parsed b/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.parsed new file mode 100644 index 0000000000..2a9a84e9e0 --- /dev/null +++ b/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.parsed @@ -0,0 +1,120 @@ +--- +parsed_sample: + +- asic: Fia + crc_error_count: '99999' + generic_error_count: '0' + instance: '0' + mbe_error_count: '44' + number_of_nodes: '22' + parity_error_count: '55' + reset_error_count: '0' + sbe_error_count: '33' +- asic: Fia + crc_error_count: '0' + generic_error_count: '0' + instance: '1' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '23' +- asic: Fia + crc_error_count: '0' + generic_error_count: '0' + instance: '2' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Fia + crc_error_count: '0' + generic_error_count: '0' + instance: '3' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '0' + generic_error_count: '0' + instance: '0' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '0' + generic_error_count: '0' + instance: '1' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '0' + generic_error_count: '0' + instance: '2' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '0' + generic_error_count: '0' + instance: '3' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '0' + generic_error_count: '0' + instance: '4' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '0' + generic_error_count: '0' + instance: '5' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '0' + generic_error_count: '0' + instance: '6' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '0' + generic_error_count: '0' + instance: '7' + mbe_error_count: '0' + number_of_nodes: '0' + parity_error_count: '0' + reset_error_count: '0' + sbe_error_count: '0' +- asic: Prm_np + crc_error_count: '' + generic_error_count: '' + instance: '' + mbe_error_count: '' + number_of_nodes: '' + parity_error_count: '' + reset_error_count: '' + sbe_error_count: '' diff --git a/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.raw b/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.raw new file mode 100644 index 0000000000..9f93e8e422 --- /dev/null +++ b/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.raw @@ -0,0 +1,115 @@ +************************************************************ +* Fia ASIC Error Summary * +************************************************************ +Instance : 0 +Number of nodes : 22 +SBE error count : 33 +MBE error count : 44 +Parity error count : 55 +CRC error count : 99999 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 1 +Number of nodes : 0 +SBE error count : 23 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 2 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 3 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- + +************************************************************ +* Prm_np ASIC Error Summary * +************************************************************ +Instance : 0 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 1 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 2 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 3 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 4 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 5 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 6 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- +Instance : 7 +Number of nodes : 0 +SBE error count : 0 +MBE error count : 0 +Parity error count : 0 +CRC error count : 0 +Generic error count : 0 +Reset error count : 0 +-------------------- \ No newline at end of file From 1b3ab40d14d67933801b6bf72b073f8a62df4993 Mon Sep 17 00:00:00 2001 From: jmcgill298 Date: Sat, 26 Jan 2019 17:41:32 -0500 Subject: [PATCH 2/3] XR SHOW ASIC ERRORS UPDATES GENERAL UPDATES: - Fix recording of empty captures from `ASIC` Filldown: * Use `Continue.Record` technique to move record on fields guarenteed for all ASICs * Require `INSTANCE` to prevent capturing empty data on ASIC Recording - Change all spacing to use `\s+` - Collapse capturing empty lines and space only lines to `\s*$$` --- ..._xr_show_asic-errors_all_location.template | 29 ++++++++++--------- ...co_xr_show_asic-errors_all_location.parsed | 9 ------ ...cisco_xr_show_asic-errors_all_location.raw | 2 +- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/templates/cisco_xr_show_asic-errors_all_location.template b/templates/cisco_xr_show_asic-errors_all_location.template index 67bbf04bca..1c4abb2aa4 100644 --- a/templates/cisco_xr_show_asic-errors_all_location.template +++ b/templates/cisco_xr_show_asic-errors_all_location.template @@ -1,5 +1,5 @@ Value Filldown ASIC (\S+) -Value INSTANCE (\d+) +Value Required INSTANCE (\d+) Value NUMBER_OF_NODES (\d+) Value SBE_ERROR_COUNT (\d+) Value MBE_ERROR_COUNT (\d+) @@ -9,17 +9,18 @@ Value GENERIC_ERROR_COUNT (\d+) Value RESET_ERROR_COUNT (\d+) Start - ^\* +${ASIC} ASIC Error Summary +\* - ^Instance +: +${INSTANCE} - ^Number of nodes +: +${NUMBER_OF_NODES} - ^SBE error count +: +${SBE_ERROR_COUNT} - ^MBE error count +: +${MBE_ERROR_COUNT} - ^Parity error count +: +${PARITY_ERROR_COUNT} - ^CRC error count +: +${CRC_ERROR_COUNT} - ^Generic error count +: +${GENERIC_ERROR_COUNT} - ^Reset error count +: +${RESET_ERROR_COUNT} -> Record - ^\-+$$ + ^.+ASIC\s+Error\s+Summary\s+\* -> Continue.Record + ^\*\s+${ASIC}\s+ASIC\s+Error\s+Summary\s+\* + ^Instance -> Continue.Record + ^Instance\s+:\s+${INSTANCE} + ^Number\s+of\s+nodes\s+:\s+${NUMBER_OF_NODES} + ^SBE\s+error\s+count\s+:\s+${SBE_ERROR_COUNT} + ^MBE\s+error\s+count\s+:\s+${MBE_ERROR_COUNT} + ^Parity\s+error\s+count\s+:\s+${PARITY_ERROR_COUNT} + ^CRC\s+error\s+count\s+:\s+${CRC_ERROR_COUNT} + ^Generic\s+error\s+count\s+:\s+${GENERIC_ERROR_COUNT} + ^Reset\s+error\s+count\s+:\s+${RESET_ERROR_COUNT} + ^-+$$ ^\*+$$ - ^\s+$$ - ^$$ - ^.* -> Error "LINE NOT FOUND" + ^\s*$$ + ^. -> Error "LINE NOT FOUND" diff --git a/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.parsed b/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.parsed index 2a9a84e9e0..ffeeed0c5e 100644 --- a/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.parsed +++ b/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.parsed @@ -109,12 +109,3 @@ parsed_sample: parity_error_count: '0' reset_error_count: '0' sbe_error_count: '0' -- asic: Prm_np - crc_error_count: '' - generic_error_count: '' - instance: '' - mbe_error_count: '' - number_of_nodes: '' - parity_error_count: '' - reset_error_count: '' - sbe_error_count: '' diff --git a/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.raw b/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.raw index 9f93e8e422..33dc7638d7 100644 --- a/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.raw +++ b/tests/cisco_xr/show_asic-errors_all_location/cisco_xr_show_asic-errors_all_location.raw @@ -112,4 +112,4 @@ Parity error count : 0 CRC error count : 0 Generic error count : 0 Reset error count : 0 --------------------- \ No newline at end of file +-------------------- From ebb8a053bbab2c1f8a775fe2a45bf4a404b01a25 Mon Sep 17 00:00:00 2001 From: Jacob McGill Date: Sat, 23 Feb 2019 11:01:04 -0500 Subject: [PATCH 3/3] Update index --- templates/index | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index b/templates/index index 40496b3a51..07f6f21752 100644 --- a/templates/index +++ b/templates/index @@ -236,7 +236,7 @@ cisco_xr_show_bgp_vrf_all_ipv4_unicast_summary.template, .*, cisco_xr, sh[[ow]] cisco_xr_admin_show_controller_fabric_health.template, .*, cisco_xr, adm[[in]] sh[[ow]] controller fab[[ric]] hea[[lth]] cisco_xr_show_controller_fabric_plane_all.template, .*, cisco_xr, sh[[ow]] controller fab[[ric]] pla[[ne]] all cisco_xr_show_configuration_commit_list.template, .*, cisco_xr, sh[[ow]] conf[[iguration]] c[[ommit]] l[[ist]] -cisco_xr_show_asic-errors_all_location.template, .*, cisco_xr, sh[[ow]] asic-errors all loc[[ation]].* +cisco_xr_show_asic-errors_all_location.template, .*, cisco_xr, sh[[ow]] asic-er[[rors]] all loc[[ation]] cisco_xr_show_dhcp_ipv4_proxy_binding.template, .*, cisco_xr, sh[[ow]] dh[[cp]] ipv4 p[[roxy]] b[[inding]] cisco_xr_show_mpls_ldp_neighbor_brief.template, .*, cisco_xr, sh[[ow]] mp[[ls]] ld[[p]] neigh[[bor]] br[[ief]] cisco_xr_admin_show_environment_fan.template, .*, cisco_xr, adm[[in]] sh[[ow]] env[[ironment]] f[[an]]