diff --git a/templates/cisco_xr_admin_show_inventory.template b/templates/cisco_xr_admin_show_inventory.template new file mode 100644 index 0000000000..dce50143a4 --- /dev/null +++ b/templates/cisco_xr_admin_show_inventory.template @@ -0,0 +1,17 @@ +Value NAME (.*) +Value DESCR (.*) +Value PID (([\S+]+|.*)) +Value VID (.*) +Value SN ([\w+\d+]+) + +Start + ^NAME:\s+"${NAME}",\s+DESCR:\s+"${DESCR}" + ^PID:\s+${PID}.*,.*VID:\s+${VID},.*SN:\s+${SN} -> Record + ^PID:\s+,.*VID:\s+${VID},.*SN: -> Record + ^PID:\s+${PID}.*,.*VID:\s+${VID},.*SN: -> Record + ^PID:\s+,.*VID:\s+${VID},.*SN:\s+${SN} -> Record + ^PID:\s+${PID}.*,.*VID:\s+${VID}.* + ^PID:\s+,.*VID:\s+${VID}.* + ^.*SN:\s+${SN} -> Record + ^.*SN: -> Record + diff --git a/templates/index b/templates/index index 3e82710afe..dbaa95bb4b 100644 --- a/templates/index +++ b/templates/index @@ -260,6 +260,7 @@ cisco_xr_show_cdp_neighbors_detail.template, .*, cisco_xr, sh[[ow]] c[[dp]] neig cisco_xr_show_cef_drops_location.template, .*, cisco_xr, sh[[ow]] cef drops loc[[ation]] cisco_xr_show_ip_interface_brief.template, .*, cisco_xr, sh[[ow]] ip int[[erface]] br[[ief]] cisco_xr_show_redundancy_summary.template, .*, cisco_xr, sh[[ow]] redun[[dancy]] summ[[ary]] +cisco_xr_admin_show_inventory.template, .*, cisco_xr, adm[[in]] sh[[ow]] inven[[tory]] cisco_xr_show_interface_brief.template, .*, cisco_xr, sh[[ow]] int[[erface]] br[[ief]] cisco_xr_admin_show_platform.template, .*, cisco_xr, adm[[in]] sh[[ow]] pla[[tform]] cisco_xr_show_ip_bgp_summary.template, .*, cisco_xr, sh[[ow]] ip b[[gp]] s[[ummary]] diff --git a/tests/cisco_xr/admin_show_inventory/cisco_xr_admin_show_inventory.parsed b/tests/cisco_xr/admin_show_inventory/cisco_xr_admin_show_inventory.parsed new file mode 100644 index 0000000000..ff45e8f69a --- /dev/null +++ b/tests/cisco_xr/admin_show_inventory/cisco_xr_admin_show_inventory.parsed @@ -0,0 +1,48 @@ +--- +parsed_sample: + +- descr: ASR9K Route Switch Processor with 440G/slot Fabric and 6GB + name: module 0/RSP0/CPU0 + pid: A9K-RSP440-TR + sn: M9YXCZV9QF + vid: V06 +- descr: ASR-9006 Fan Tray V2 + name: fantray 0/FT0/SP + pid: ASR-9006-FAN-V2 + sn: PDANV9GYV8H + vid: V09 +- descr: ASR9K Generic Fan + name: fan0 0/FT0/SP + pid: N/A + sn: '' + vid: N/A +- descr: 160G Modular Linecard, Packet Transport Optimized + name: module 0/1/CPU0 + pid: A9K-MOD160-TR + sn: 94TU4CACM47Y + vid: V05 +- descr: ASR 9000 8-port 10GE Modular Port Adapter + name: module 0/1/0 + pid: A9K-MPA-8X10GE + sn: 2ZZQVPHZCJ5 + vid: V02 +- descr: 10GBASE-LR SFP+ Module for SMF + name: module mau 0/1/0/0 + pid: SFP-10G-LR + sn: QMXQLS9GKS + vid: 'V01 ' +- descr: 10GBASE-LR SFP+ Module for SMF + name: module mau TenGigE0/2/CPU0/0 + pid: SFP-10G-LR + sn: CB7HHMVC + vid: 'V01 ' +- descr: 3kW AC V2 Power Module + name: power-module 0/PS0/M0/SP + pid: PWR-3KW-AC-V2 + sn: ZP7K5XBV9KE + vid: V03 +- descr: ASR 9006 4 Line Card Slot Chassis with V2 AC PEM + name: chassis ASR-9006 + pid: ASR-9006 + sn: JCY98XR393D + vid: V01 diff --git a/tests/cisco_xr/admin_show_inventory/cisco_xr_admin_show_inventory.raw b/tests/cisco_xr/admin_show_inventory/cisco_xr_admin_show_inventory.raw new file mode 100644 index 0000000000..e5b0b97c1b --- /dev/null +++ b/tests/cisco_xr/admin_show_inventory/cisco_xr_admin_show_inventory.raw @@ -0,0 +1,28 @@ +Fri Aug 9 09:08:06.986 CDT +NAME: "module 0/RSP0/CPU0", DESCR: "ASR9K Route Switch Processor with 440G/slot Fabric and 6GB" +PID: A9K-RSP440-TR, VID: V06, SN: M9YXCZV9QF + +NAME: "fantray 0/FT0/SP", DESCR: "ASR-9006 Fan Tray V2" +PID: ASR-9006-FAN-V2, VID: V09, SN: PDANV9GYV8H + +NAME: "fan0 0/FT0/SP", DESCR: "ASR9K Generic Fan" +PID: N/A, VID: N/A, SN: + +NAME: "module 0/1/CPU0", DESCR: "160G Modular Linecard, Packet Transport Optimized" +PID: A9K-MOD160-TR, VID: V05, SN: 94TU4CACM47Y + +NAME: "module 0/1/0", DESCR: "ASR 9000 8-port 10GE Modular Port Adapter" +PID: A9K-MPA-8X10GE, VID: V02, SN: 2ZZQVPHZCJ5 + +NAME: "module mau 0/1/0/0", DESCR: "10GBASE-LR SFP+ Module for SMF" +PID: SFP-10G-LR , VID: V01 , SN: QMXQLS9GKS + +NAME: "module mau TenGigE0/2/CPU0/0", DESCR: "10GBASE-LR SFP+ Module for SMF" +PID: SFP-10G-LR , VID: V01 , SN: CB7HHMVC + +NAME: "power-module 0/PS0/M0/SP", DESCR: "3kW AC V2 Power Module" +PID: PWR-3KW-AC-V2, VID: V03, SN: ZP7K5XBV9KE + +NAME: "chassis ASR-9006", DESCR: "ASR 9006 4 Line Card Slot Chassis with V2 AC PEM" +PID: ASR-9006, VID: V01, SN: JCY98XR393D +