diff --git a/ntc_templates/templates/aruba_aoscx_show_system_inventory.textfsm b/ntc_templates/templates/aruba_aoscx_show_system_inventory.textfsm new file mode 100644 index 0000000000..3a732bdb75 --- /dev/null +++ b/ntc_templates/templates/aruba_aoscx_show_system_inventory.textfsm @@ -0,0 +1,14 @@ +Value TYPE (\w+\s?\w+) +Value LOCATION (\S+) +Value PRODUCT_NUMBER (\S+) +Value DESCRIPTION (.+?) +Value SERIAL (\S+) +Value HARDWARE_VERSION (\S+) + +Start + ^\s*$$ + ^Type\s+Location + ^\s+Number + ^---+ + ^${TYPE}\s+${LOCATION}\s+${PRODUCT_NUMBER}\s+${DESCRIPTION}\s+${SERIAL}\s+${HARDWARE_VERSION}\s*$$ -> Record + ^. -> Error "LINE NOT FOUND" diff --git a/ntc_templates/templates/index b/ntc_templates/templates/index index ff51e1e9ce..d170dbbd84 100644 --- a/ntc_templates/templates/index +++ b/ntc_templates/templates/index @@ -120,6 +120,7 @@ aruba_aoscx_show_interface_dom_detail.textfsm , .*, aruba_aoscx, sh[[ow]] int[[e aruba_aoscx_show_ip_route_all-vrfs.textfsm, .*, aruba_aoscx, sh[[ow]] ip r[[oute]] a[[ll-vrfs]] aruba_aoscx_show_mac-address-table.textfsm, .*, aruba_aoscx, sh[[ow]] ma[[c-address-table]] aruba_aoscx_show_ntp_associations.textfsm, .*, aruba_aoscx, sh[[ow]] ntp as[[sociations]] +aruba_aoscx_show_system_inventory.textfsm, .*, aruba_aoscx, sh[[ow]] sys[[tem]] inv[[entory]] aruba_aoscx_show_interface_mgmt.textfsm, .*, aruba_aoscx, sh[[ow]] int[[erface]] m[[gmt]] aruba_aoscx_show_arp_all-vrfs.textfsm, .*, aruba_aoscx, sh[[ow]] ar[[p]] a[[ll-vrfs]] aruba_aoscx_show_bfd_all-vrfs.textfsm, .*, aruba_aoscx, sh[[ow]] bf[[d]] a[[ll-vrfs]] diff --git a/tests/aruba_aoscx/show_system_inventory/aruba_aoscx_show_system_inventory.raw b/tests/aruba_aoscx/show_system_inventory/aruba_aoscx_show_system_inventory.raw new file mode 100644 index 0000000000..6bb3278b62 --- /dev/null +++ b/tests/aruba_aoscx/show_system_inventory/aruba_aoscx_show_system_inventory.raw @@ -0,0 +1,16 @@ + +Type Location Product Description Serial Hardware + Number Number Version +-------------------- -------- ---------------- -------------------------------------------------- ---------------- ----------- +Chassis 1 JL635A Aruba 8325-48Y8C 48p 25G 8p 100G Swch ABCD1234EF 0 +Power Supply 1/1 JL632A Aruba 8325 650W 100-240VAC FB PSU ABCD1235EF -- +Power Supply 1/2 JL632A Aruba 8325 650W 100-240VAC FB PSU ABCD1236EF -- +Fan Tray-1/1 JL628A 8325 Fan Module -- -- +Fan Tray-1/6 JL628A 8325 Fan Module -- -- +Transceiver 1/1/1 J9151E 10G-LR / 10G SFP+ LR ABCD1237EF 1990-4694 +Transceiver 1/1/8 J4859D 1G-LX / 1G SFP LX ABCD1239EF 1990-4802 +Transceiver 1/1/12 J4858D 1G-SX / 1G SFP SX ABCD1213EF 1990-4750 +Transceiver 1/1/46 J4859D 1G-LX / 1G SFP LX ABCD1214EF 1990-4802 +Transceiver 1/1/48 J9151E 10G-LR / 10G SFP+ LR ABCD1216EF 1990-4694 + + diff --git a/tests/aruba_aoscx/show_system_inventory/aruba_aoscx_show_system_inventory.yml b/tests/aruba_aoscx/show_system_inventory/aruba_aoscx_show_system_inventory.yml new file mode 100644 index 0000000000..a3006c2823 --- /dev/null +++ b/tests/aruba_aoscx/show_system_inventory/aruba_aoscx_show_system_inventory.yml @@ -0,0 +1,62 @@ +--- +parsed_sample: + - description: "Aruba 8325-48Y8C 48p 25G 8p 100G Swch" + hardware_version: "0" + location: "1" + product_number: "JL635A" + serial: "ABCD1234EF" + type: "Chassis" + - description: "Aruba 8325 650W 100-240VAC FB PSU" + hardware_version: "--" + location: "1/1" + product_number: "JL632A" + serial: "ABCD1235EF" + type: "Power Supply" + - description: "Aruba 8325 650W 100-240VAC FB PSU" + hardware_version: "--" + location: "1/2" + product_number: "JL632A" + serial: "ABCD1236EF" + type: "Power Supply" + - description: "8325 Fan Module" + hardware_version: "--" + location: "Tray-1/1" + product_number: "JL628A" + serial: "--" + type: "Fan" + - description: "8325 Fan Module" + hardware_version: "--" + location: "Tray-1/6" + product_number: "JL628A" + serial: "--" + type: "Fan" + - description: "10G-LR / 10G SFP+ LR" + hardware_version: "1990-4694" + location: "1/1/1" + product_number: "J9151E" + serial: "ABCD1237EF" + type: "Transceiver" + - description: "1G-LX / 1G SFP LX" + hardware_version: "1990-4802" + location: "1/1/8" + product_number: "J4859D" + serial: "ABCD1239EF" + type: "Transceiver" + - description: "1G-SX / 1G SFP SX" + hardware_version: "1990-4750" + location: "1/1/12" + product_number: "J4858D" + serial: "ABCD1213EF" + type: "Transceiver" + - description: "1G-LX / 1G SFP LX" + hardware_version: "1990-4802" + location: "1/1/46" + product_number: "J4859D" + serial: "ABCD1214EF" + type: "Transceiver" + - description: "10G-LR / 10G SFP+ LR" + hardware_version: "1990-4694" + location: "1/1/48" + product_number: "J9151E" + serial: "ABCD1216EF" + type: "Transceiver"