forked from networktocode/ntc-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New template: cisco_xr_show_inventory
- Loading branch information
Showing
4 changed files
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Value NAME (.*) | ||
Value DESCR (.*) | ||
Value PID (([\S+]+|.*)) | ||
Value VID (\S+) | ||
Value SN ([\w+\d+]+) | ||
|
||
Start | ||
^\S{3}\s+\S{3}\s+\d{1,2}\s+\d+:\d+:\d+ | ||
^NAME:\s+"${NAME}",\s+DESCR:\s+"${DESCR}" | ||
^PID\:\s+${PID}\s+,\s+VID\:\s+${VID}\s*\,\s+SN\:\s+${SN} -> Record | ||
^. -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
tests/cisco_xr/show_inventory/cisco_xr_show_inventory_01.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
Tue Jan 16 13:30:53.501 AEST | ||
|
||
NAME: "Rack 0", DESCR: "Cisco 8200 2RU 32x400G QSFP56-DD w/IOS XR HBM MACsec" | ||
PID: 8202-32FH-M , VID: V03, SN: FLM27ABCDEF | ||
|
||
NAME: "0/RP0/CPU0", DESCR: "Cisco 8200 2RU 32x400G QSFP56-DD w/IOS XR HBM MACsec" | ||
PID: 8202-32FH-M , VID: V03, SN: FLM27ZBCDEF | ||
|
||
NAME: "FourHundredGigE0/0/0/0", DESCR: "Cisco QSFPDD 400G LR4 Pluggable Optics Module" | ||
PID: QDD-400G-LR4-S , VID: V01 , SN: INL26ABCAUG | ||
|
||
NAME: "FourHundredGigE0/0/0/28", DESCR: "Cisco QSFPDD 400G LR4 Pluggable Optics Module" | ||
PID: QDD-400G-LR4-S , VID: V01 , SN: INL2ABCDEFG | ||
|
||
NAME: "FourHundredGigE0/0/0/29", DESCR: "Cisco QSFPDD 400G LR4 Pluggable Optics Module" | ||
PID: QDD-400G-LR4-S , VID: V01 , SN: INL261ABCDE | ||
|
||
NAME: "HundredGigE0/0/0/30", DESCR: "Non-Cisco QSFP28 100G CWDM4 MSA WITH FEC Pluggable Optics Module" | ||
PID: Q.161HG.2.C , VID: 01, SN: F78AAB5 | ||
|
||
NAME: "HundredGigE0/0/0/31", DESCR: "Non-Cisco QSFP28 100G CWDM4 MSA WITH FEC Pluggable Optics Module" | ||
PID: Q.161HG.2.C , VID: 01, SN: F78AAB6 | ||
|
||
NAME: "0/FB0", DESCR: "Cisco 8000 Series Fan Controller Board on 8202-32FH-M" | ||
PID: 8202-32FH-M[FB] , VID: N/A, SN: FLM2ZABCDEF | ||
|
||
NAME: "0/FT0", DESCR: "Cisco Fixed Routers V3 Fan with Port-side Air Intake" | ||
PID: FAN-PI-V3 , VID: V01, SN: DCH27ABCDEF | ||
|
||
NAME: "0/FT1", DESCR: "Cisco Fixed Routers V3 Fan with Port-side Air Intake" | ||
PID: FAN-PI-V3 , VID: V01, SN: DCH27BBCDEF | ||
|
||
NAME: "0/FT2", DESCR: "Cisco Fixed Routers V3 Fan with Port-side Air Intake" | ||
PID: FAN-PI-V3 , VID: V01, SN: DCH27CBCDEF | ||
|
||
NAME: "0/FT3", DESCR: "Cisco Fixed Routers V3 Fan with Port-side Air Intake" | ||
PID: FAN-PI-V3 , VID: V01, SN: DCH27DBCDEF | ||
|
||
NAME: "0/PM0", DESCR: "2000W AC Power Module with Port-side Air Intake" | ||
PID: PSU2KW-ACPI , VID: V01 , SN: POG27DBCDEF | ||
|
||
NAME: "0/PM1", DESCR: "2000W AC Power Module with Port-side Air Intake" | ||
PID: PSU2KW-ACPI , VID: V01 , SN: POG27ABCDEF |
72 changes: 72 additions & 0 deletions
72
tests/cisco_xr/show_inventory/cisco_xr_show_inventory_01.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
parsed_sample: | ||
- descr: "Cisco 8200 2RU 32x400G QSFP56-DD w/IOS XR HBM MACsec" | ||
name: "Rack 0" | ||
pid: "8202-32FH-M" | ||
sn: "FLM27ABCDEF" | ||
vid: "V03" | ||
- descr: "Cisco 8200 2RU 32x400G QSFP56-DD w/IOS XR HBM MACsec" | ||
name: "0/RP0/CPU0" | ||
pid: "8202-32FH-M" | ||
sn: "FLM27ZBCDEF" | ||
vid: "V03" | ||
- descr: "Cisco QSFPDD 400G LR4 Pluggable Optics Module" | ||
name: "FourHundredGigE0/0/0/0" | ||
pid: "QDD-400G-LR4-S" | ||
sn: "INL26ABCAUG" | ||
vid: "V01" | ||
- descr: "Cisco QSFPDD 400G LR4 Pluggable Optics Module" | ||
name: "FourHundredGigE0/0/0/28" | ||
pid: "QDD-400G-LR4-S" | ||
sn: "INL2ABCDEFG" | ||
vid: "V01" | ||
- descr: "Cisco QSFPDD 400G LR4 Pluggable Optics Module" | ||
name: "FourHundredGigE0/0/0/29" | ||
pid: "QDD-400G-LR4-S" | ||
sn: "INL261ABCDE" | ||
vid: "V01" | ||
- descr: "Non-Cisco QSFP28 100G CWDM4 MSA WITH FEC Pluggable Optics Module" | ||
name: "HundredGigE0/0/0/30" | ||
pid: "Q.161HG.2.C" | ||
sn: "F78AAB5" | ||
vid: "01" | ||
- descr: "Non-Cisco QSFP28 100G CWDM4 MSA WITH FEC Pluggable Optics Module" | ||
name: "HundredGigE0/0/0/31" | ||
pid: "Q.161HG.2.C" | ||
sn: "F78AAB6" | ||
vid: "01" | ||
- descr: "Cisco 8000 Series Fan Controller Board on 8202-32FH-M" | ||
name: "0/FB0" | ||
pid: "8202-32FH-M[FB]" | ||
sn: "FLM2ZABCDEF" | ||
vid: "N/A" | ||
- descr: "Cisco Fixed Routers V3 Fan with Port-side Air Intake" | ||
name: "0/FT0" | ||
pid: "FAN-PI-V3" | ||
sn: "DCH27ABCDEF" | ||
vid: "V01" | ||
- descr: "Cisco Fixed Routers V3 Fan with Port-side Air Intake" | ||
name: "0/FT1" | ||
pid: "FAN-PI-V3" | ||
sn: "DCH27BBCDEF" | ||
vid: "V01" | ||
- descr: "Cisco Fixed Routers V3 Fan with Port-side Air Intake" | ||
name: "0/FT2" | ||
pid: "FAN-PI-V3" | ||
sn: "DCH27CBCDEF" | ||
vid: "V01" | ||
- descr: "Cisco Fixed Routers V3 Fan with Port-side Air Intake" | ||
name: "0/FT3" | ||
pid: "FAN-PI-V3" | ||
sn: "DCH27DBCDEF" | ||
vid: "V01" | ||
- descr: "2000W AC Power Module with Port-side Air Intake" | ||
name: "0/PM0" | ||
pid: "PSU2KW-ACPI" | ||
sn: "POG27DBCDEF" | ||
vid: "V01" | ||
- descr: "2000W AC Power Module with Port-side Air Intake" | ||
name: "0/PM1" | ||
pid: "PSU2KW-ACPI" | ||
sn: "POG27ABCDEF" | ||
vid: "V01" |