diff --git a/templates/cisco_ios_show_platform_diag.template b/templates/cisco_ios_show_platform_diag.template new file mode 100644 index 0000000000..d21f1b5e45 --- /dev/null +++ b/templates/cisco_ios_show_platform_diag.template @@ -0,0 +1,24 @@ +Value Filldown CHASSIS_TYPE (.*?) +Value Required SLOT_NUMBER ((?:.*)[A-Z]\d+(?:.*)) +Value MODULE_SKU (.+?) +Value STATE (.+) +Value RUNNING_STATE (.+) +Value INTERNAL_STATE (.+) +Value INTERNAL_OPERATIONAL_STATE (.+) +Value INSERT_TIME (.*) +Value UPTIME (.*) +Value HARDWARE_SIGNAL (.*) +Value PACKET_SIGNAL (.*) + +Start + ^Chassis type: ${CHASSIS_TYPE}(?:\s|$$) + ^.*(?:Sub-slot|Slot):\s${SLOT_NUMBER}\,(?:\s${MODULE_SKU}|\s+$$)(?:\s+|$$) + ^\s+State\s*\:\s${STATE} + ^.*Running state\s*\:\s${RUNNING_STATE} + ^.*Internal state\s*\:\s${INTERNAL_STATE} + ^.*Internal operational state\s*\:\s${INTERNAL_OPERATIONAL_STATE} + ^.*Physical insert detect time\s*\:\s${INSERT_TIME} + ^.*Software declared up time\s*\:\s${UPTIME} + ^.*Hardware ready signal time\s*\:\s${HARDWARE_SIGNAL} + ^.*Packet ready signal time\s*\:\s${PACKET_SIGNAL} + ^$$ -> Record diff --git a/templates/index b/templates/index index 4034e28ad2..f05e62213f 100644 --- a/templates/index +++ b/templates/index @@ -24,6 +24,7 @@ cisco_ios_show_spanning-tree.template, .*, cisco_ios, sh[[ow]] sp[[anning-tree]] cisco_ios_show_ip_route.template, .*, cisco_ios, sh[[ow]] ip r[[oute]] cisco_ios_show_ip_bgp_summary.template, .*, cisco_ios, sh[[ow]] ip bgp sum[[mary]] cisco_ios_show_interface_transceiver.template, .*, cisco_ios, sh[[ow]] int[[erface]] trans[[ceiver]] +cisco_ios_show_platform_diag.template, .*, cisco_ios, sh[[ow]] plat[[form]] di[[ag]] cisco_ios_show_standby_brief.template, .*, cisco_ios, sh[[ow]] standby br[[ief]] cisco_ios_show_standby.template, .*, cisco_ios, sh[[ow]] sta[[ndby]] cisco_ios_show_vtp_status.template, .*, cisco_ios, sh[[ow]] vtp stat[[us]] diff --git a/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag.parsed b/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag.parsed new file mode 100644 index 0000000000..8932740f13 --- /dev/null +++ b/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag.parsed @@ -0,0 +1,75 @@ + +parsed_sample: + +- chassis_type: 'ASR1004' + slot_number: 'R0' + module_sku: 'ASR1000-RP1' + state: '' + running_state: 'ok' + internal_state: 'online' + internal_operational_state: 'ok' + insert_time: '00:00:48 (4d22h ago)' + uptime: '00:00:48 (4d22h ago)' + hardware_signal: '' + packet_signal: '' + +- chassis_type: 'ASR1004' + slot_number: 'R0/0' + module_sku: '' + state: '' + running_state: 'ok, active' + internal_state: '' + internal_operational_state: '' + insert_time: '' + uptime: '' + hardware_signal: '' + packet_signal: '' + +- chassis_type: 'ASR1004' + slot_number: 'R0/1' + module_sku: '' + state: '' + running_state: 'ok, standby' + internal_state: '' + internal_operational_state: '' + insert_time: '' + uptime: '' + hardware_signal: '' + packet_signal: '' + +- chassis_type: 'ASR1004' + slot_number: 'F0' + module_sku: 'ASR1000-ESP10' + state: '' + running_state: 'ok, active' + internal_state: 'online' + internal_operational_state: 'ok' + insert_time: '00:00:48 (4d22h ago)' + uptime: '00:01:40 (4d22h ago)' + hardware_signal: '00:00:49 (4d22h ago)' + packet_signal: '00:01:49 (4d22h ago)' + +- chassis_type: 'ASR1004' + slot_number: 'P0' + module_sku: 'ASR1004-PWR-AC' + state: 'ok' + running_state: '' + internal_state: '' + internal_operational_state: '' + insert_time: '00:01:40 (4d22h ago)' + uptime: '' + hardware_signal: '' + packet_signal: '' + +- chassis_type: 'ASR1004' + slot_number: 'P1' + module_sku: 'ASR1004-PWR-AC' + state: 'ok' + running_state: '' + internal_state: '' + internal_operational_state: '' + insert_time: '00:01:40 (4d22h ago)' + uptime: '' + hardware_signal: '' + packet_signal: '' + diff --git a/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag.raw b/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag.raw new file mode 100644 index 0000000000..841bda52ed --- /dev/null +++ b/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag.raw @@ -0,0 +1,59 @@ +Chassis type: ASR1004 + Slot: 0, ASR1000-SIP10 + Running state : ok + Internal state : online + Internal operational state : ok + Physical insert detect time : 00:00:48 (4d22h ago) + Software declared up time : 00:01:40 (4d22h ago) + CPLD version : 07091401 + Firmware version : 12.2(33r)XNB + + Sub-slot: 0/0, SPA-5X1GE-V2 + Operational status : ok + Internal state : inserted + Physical insert detect time : 00:00:36 (4d22h ago) + Logical insert detect time : 00:02:23 (4d22h ago) + + Sub-slot: 0/1, SPA-2XT3/E3 + Operational status : ok + Internal state : inserted + Physical insert detect time : 00:00:36 (4d22h ago) + Logical insert detect time : 00:02:23 (4d22h ago) + + Slot: R0, ASR1000-RP1 + Running state : ok + Internal state : online + Internal operational state : ok + Physical insert detect time : 00:00:48 (4d22h ago) + Software declared up time : 00:00:48 (4d22h ago) + CPLD version : 07062111 + Firmware version : 12.2(33r)XNB + + Sub-slot: R0/0, + Running state : ok, active + Logical insert detect time : 00:00:48 (4d22h ago) + Became HA Active time : 00:04:56 (4d22h ago) + + Sub-slot: R0/1, + Running state : ok, standby + Logical insert detect time : 00:02:50 (4d22h ago) + + Slot: F0, ASR1000-ESP10 + Running state : ok, active + Internal state : online + Internal operational state : ok + Physical insert detect time : 00:00:48 (4d22h ago) + Software declared up time : 00:01:40 (4d22h ago) + Hardware ready signal time : 00:00:49 (4d22h ago) + Packet ready signal time : 00:01:49 (4d22h ago) + CPLD version : 07051680 + Firmware version : 12.2(33r)XNB + + Slot: P0, ASR1004-PWR-AC + State : ok + Physical insert detect time : 00:01:40 (4d22h ago) + + Slot: P1, ASR1004-PWR-AC + State : ok + Physical insert detect time : 00:01:40 (4d22h ago) + diff --git a/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag_2.parsed b/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag_2.parsed new file mode 100644 index 0000000000..4f9829f9e1 --- /dev/null +++ b/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag_2.parsed @@ -0,0 +1,25 @@ +parsed_sample: + +- chassis_type: 'CSR1000V' + slot_number: 'R0' + module_sku: 'CSR1000V' + state: '' + running_state: 'ok, active' + internal_state: 'online' + internal_operational_state: 'ok' + insert_time: '00:00:35 (4d16h ago)' + uptime: '00:00:35 (4d16h ago)' + hardware_signal: '' + packet_signal: '' + +- chassis_type: 'CSR1000V' + slot_number: 'F0' + module_sku: 'CSR1000V' + state: '' + running_state: 'ok, active' + internal_state: 'online' + internal_operational_state: 'ok' + insert_time: '00:00:35 (4d16h ago)' + uptime: '00:00:59 (4d16h ago)' + hardware_signal: '00:00:51 (4d16h ago)' + packet_signal: '00:01:06 (4d16h ago)' diff --git a/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag_2.raw b/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag_2.raw new file mode 100644 index 0000000000..cac71f6764 --- /dev/null +++ b/tests/cisco_ios/show_platform_diag/cisco_ios_show_platform_diag_2.raw @@ -0,0 +1,18 @@ +Chassis type: CSR1000V + +Slot: R0, CSR1000V + Running state : ok, active + Internal state : online + Internal operational state : ok + Physical insert detect time : 00:00:35 (4d16h ago) + Software declared up time : 00:00:35 (4d16h ago) + +Slot: F0, CSR1000V + Running state : ok, active + Internal state : online + Internal operational state : ok + Physical insert detect time : 00:00:35 (4d16h ago) + Software declared up time : 00:00:59 (4d16h ago) + Hardware ready signal time : 00:00:51 (4d16h ago) + Packet ready signal time : 00:01:06 (4d16h ago) +