Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
133 changes: 133 additions & 0 deletions ntc_templates/templates/hp_comware_display_version.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
Value Filldown VERSION (\S+)
Value Filldown RELEASE (\S+)
Value Filldown MODEL (.+?)
Value Filldown UPTIME (.+)
Value Filldown LAST_REBOOT_REASON (.+)
Value Filldown BOOT_IMAGE (\S+)
Value Filldown BOOT_IMAGE_VERSION (\S+)
Value Filldown BOOT_RELEASE (\S+)
Value Filldown BOOT_COMPILE_DATE (.+)
Value Filldown SYSTEM_IMAGE (\S+)
Value Filldown SYSTEM_IMAGE_VERSION (\S+)
Value Filldown SYSTEM_RELEASE (\S+)
Value Filldown SYSTEM_COMPILE_DATE (.+)
Value List SLOT_TYPE (\S+)
Value List CHASSIS (\d+)
Value List SLOT (\d+)
Value List STATUS (Without Board)
Value List SLOT_UPTIME (.+)
Value List BOARD_TYPE (.+)
Value List CARD_TYPE (.+)
Value List DRAM (\d+\w*)
Value List FLASH (\d+\w*)
Value List NAND_FLASH (\d+\w*)
Value List NOR_FLASH (\d+\w*)
Value List NVRAM (\d+\w*)
Value List BOOTROM_VERSION (\S+)
Value List PATCH_VERSION (\S+)
Value List REBOOT_CAUSE (\S+)
Value List HW_VERSION (\S+)
Value List CPLDA (\d+)
Value List CPLDB (\d+)
Value List SUBSLOT (\d+)
Value List SLOT_MODEL (.+?)
Value List SUBSLOT_VERSION (\S+)
Value List PCB (\S+)
Value List PCB_VERSION (\S+)
Value List CPLD (\d+)
Value List CPLD_VERSION (\S+)
Value List POWER_CPLD (\d+)
Value List POWER_CPLD_VERSION (\S+)
Value List RELEASE_VERSION (.+)
Value List BOARD_PROCESSOR_COUNT (\d+)
Value List BOARD_PROCESSOR_MODEL (\S+)
Value List FPGA (\S+)
Value List FPGA_VERSION (\S+)
Value List SLOT_NAME (MPU.*|LPU)
Value List POW_CHIP (\S+)
Value List OAA_FRONT_BOARD (\S+)

Start
^\s*HPE?\s+Comware\s+(Platform\s+)?Software,\s+Version\s+${VERSION},\s+Release\s+${RELEASE}
^\s*HPE?\s+Comware\s+Platform\s+Software
^\s*Copyright
^\s*.*Comware\s+Software,\s+Version\s+${VERSION},\s+Release\s+${RELEASE}
^\s*${MODEL}\s+uptime\s+is\s+${UPTIME}
^\s*Last\s+reboot\s+reason\s*:\s*${LAST_REBOOT_REASON}
^\s*Boot\s+image:\s+${BOOT_IMAGE}
^\s*Boot\s+image\s+version:\s+${BOOT_IMAGE_VERSION},\s+Release\s+${BOOT_RELEASE} -> BootImageCompileDate
^\s*System\s+image:\s+${SYSTEM_IMAGE}
^\s*System\s+image\s+version:\s+${SYSTEM_IMAGE_VERSION},\s+Release\s+${SYSTEM_RELEASE} -> SystemImageCompileDate
# Standalone switch rules (e.g. HP 5800)
^\s*${DRAM}\s+bytes\s+SDRAM
^\s*${NOR_FLASH}\s+bytes\s+Nor\s+Flash\s+Memory
^\s*${NAND_FLASH}\s+bytes\s+Nand\s+Flash\s+Memory
^\s*${FLASH}\s+bytes\s+Flash\s+Memory
^\s*Config\s+Register\s+points\s+to\s+Nand\s+Flash
^\s*Hardware\s+Version\s+is\s+(Ver|REV)\.${HW_VERSION}
^\s*CPLDA\s+Version\s+is\s+${CPLDA},\s+CPLDB\s+Version\s+is\s+${CPLDB}
^\s*CPLD(\s+${CPLD})?\s+Version(:|\s+is)\s+${CPLD_VERSION}
^\s*Power\s+CPLD(\s+${POWER_CPLD})?\s+Version(:|\s+is)\s+${POWER_CPLD_VERSION}
^.*\S*\s*Boot\S+\s+Version(:|\s+is)\s+${BOOTROM_VERSION}\s*
^\s*\[SubSlot\s+${SUBSLOT}\]\s+(${SLOT_MODEL}\s+Hardware\s+Version\s+is\s+Ver\.${SUBSLOT_VERSION})?
^\s*FPGA(\s+${FPGA})?\s+Version:\s+${FPGA_VERSION}
^\s*${BOARD_TYPE}\s+with\s+\d+\s+Processors?
# Chassis / Slot header transitions to SlotSection
^\s*${SLOT_TYPE}\s+Chassis\s+${CHASSIS}\s+Slot\s+${SLOT}: -> SlotSection
^\s*Chassis\s+${CHASSIS}\s+Slot\s+${SLOT}: -> SlotSection
^\s*${SLOT_TYPE}\s+Slot\s+${SLOT}: -> SlotSection
^\s*Slot\s+${SLOT}:? -> SlotSection
^\s*${SLOT_NAME}\s+${SLOT}: -> SlotSection
^\s*(?:${SLOT_TYPE}\s+)?(?:Chassis\s+${CHASSIS}\s+)?Slot\s+${SLOT}\s+${STATUS} -> SlotSection
^\s*$$
^\s*. -> Error


BootImageCompileDate
^\s+Compiled\s+${BOOT_COMPILE_DATE} -> Start

SystemImageCompileDate
^\s+Compiled\s+${SYSTEM_COMPILE_DATE} -> Start

SlotSection
# Flush completed slot record prior to parsing the next slot line
^\s*(Chassis\s+\d+\s+)?Slot\s+\d+ -> Continue.Record
# Slot header capture rules
^\s*${SLOT_TYPE}\s+Chassis\s+${CHASSIS}\s+Slot\s+${SLOT}:
^\s*Chassis\s+${CHASSIS}\s+Slot\s+${SLOT}:
^\s*${SLOT_TYPE}\s+Slot\s+${SLOT}:
^\s*Slot\s+${SLOT}:
^\s*(${SLOT_TYPE}\s+)?(?:Chassis\s+${CHASSIS}\s+)?Slot\s+${SLOT}\s+${STATUS}
# Slot attribute rules
^\s*Uptime\s+is\s+${SLOT_UPTIME}
^\s*${CARD_TYPE}\s+with\s+${BOARD_PROCESSOR_COUNT}(\s+${BOARD_PROCESSOR_MODEL})?\s+Processors?
^\s*BOARD\s+TYPE:\s+${BOARD_TYPE}
^\s*DRAM:\s+${DRAM}
^\s*${DRAM}\s+bytes\s+SDRAM
^\s*FLASH:\s+${FLASH}
^\s*${NOR_FLASH}\s+bytes\s+Nor\s+Flash\s+Memory
^\s*${NAND_FLASH}\s+bytes\s+Nand\s+Flash\s+Memory
^\s*NVRAM:\s+${NVRAM}
^\s*PCB\s+${PCB}\s+Version:\s+(VER.${PCB_VERSION})?
^\s*FPGA(\s+${FPGA})?\s+Version:\s+${FPGA_VERSION}
^\s*Config\s+Register\s+points\s+to\s+Nand\s+Flash
^\s*CPLD(\s+${CPLD})?\s+Version(:|\s+is)\s+${CPLD_VERSION}
^\s*CPLDA\s+Version\s+is\s+${CPLDA},\s+CPLDB\s+Version\s+is\s+${CPLDB}
^\s*Hardware\s+Version\s+is\s+(Ver|REV)\.${HW_VERSION}
^\s*Power\s+CPLD(\s+${POWER_CPLD})?\s+Version(:|\s+is)\s+${POWER_CPLD_VERSION}
^\s*OAA\s+Front\s+Board:\s+${OAA_FRONT_BOARD}
^.*\S*\s*Boot\S+\s+Version(:|\s+is)\s+${BOOTROM_VERSION}\s*
^\s*Last\s+reboot\s+reason\s*:\s*${LAST_REBOOT_REASON}
^\s*PowChip\s+Version:\s+${POW_CHIP}
^\s*Release\s+Version:\s+${RELEASE_VERSION}
^\s*Patch\s+Version\s*:\s*${PATCH_VERSION}
^\s*Reboot\s+Cause\s*:\s*${REBOOT_CAUSE}
^\s*\[SubSlot\s+${SUBSLOT}\]\s+${SLOT_MODEL}(\s+Hardware\s+Version\s+is\s+Ver\.${SUBSLOT_VERSION})?
# Chassis / Slot header transitions to SlotSection
^\s*${SLOT_TYPE}\s+Chassis\s+${CHASSIS}\s+Slot\s+${SLOT}:
^\s*Chassis\s+${CHASSIS}\s+Slot\s+${SLOT}:
^\s*${SLOT_TYPE}\s+Slot\s+${SLOT}:
^\s*Slot\s+${SLOT}:
^\s*${SLOT_NAME}\s+${SLOT}:
^\s*$$
^\s*. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@ hp_comware_display_mac-address.textfsm, .*, hp_comware, di[[splay]] mac-ad[[dres
hp_comware_display_vlan_brief.textfsm, .*, hp_comware, di[[splay]] v[[lan]] b[[rief]]
hp_comware_display_interface.textfsm, .*, hp_comware, dis[[play]] int[[erface]]
hp_comware_display_vlan_all.textfsm, .*, hp_comware, di[[splay]] v[[lan]] a[[ll]]
hp_comware_display_version.textfsm, .*, hp_comware, di[[splay]] ver[[sion]]
hp_comware_display_clock.textfsm, .*, hp_comware, di[[splay]] clo[[ck]]
hp_comware_display_arp.textfsm, .*, hp_comware, di[[splay]] a[[rp]]

Expand Down
18 changes: 18 additions & 0 deletions tests/hp_comware/display_version/hp_comware_display_version.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
HP Comware Platform Software
Comware Software, Version 5.20.105, Release 1809P03-US
Copyright (c) 2010-2015 Hewlett-Packard Development Company, L.P.
HP 5800-24G-SFP Switch with 1 Interface Slot uptime is 513 weeks, 5 days, 15 hours, 35 minutes

HP 5800-24G-SFP Switch with 1 Interface Slot with 2 Processors
1792M bytes SDRAM
4M bytes Nor Flash Memory
512M bytes Nand Flash Memory
Config Register points to Nand Flash

Hardware Version is Ver.B
CPLDA Version is 003, CPLDB Version is 003
BootRom Version is 303
[SubSlot 0] 24SFP+4SFP Plus Hardware Version is Ver.B
[SubSlot 1] 16GE Hardware Version is Ver.A


64 changes: 64 additions & 0 deletions tests/hp_comware/display_version/hp_comware_display_version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
parsed_sample:
- board_processor_count: []
board_processor_model: []
board_type:
- "HP 5800-24G-SFP Switch with 1 Interface Slot"
boot_compile_date: ""
boot_image: ""
boot_image_version: ""
boot_release: ""
bootrom_version:
- "303"
card_type: []
chassis: []
cpld: []
cpld_version: []
cplda:
- "003"
cpldb:
- "003"
dram:
- "1792M"
flash: []
fpga: []
fpga_version: []
hw_version:
- "B"
last_reboot_reason: ""
model: "HP 5800-24G-SFP Switch with 1 Interface Slot"
nand_flash:
- "512M"
nor_flash:
- "4M"
nvram: []
oaa_front_board: []
patch_version: []
pcb: []
pcb_version: []
pow_chip: []
power_cpld: []
power_cpld_version: []
reboot_cause: []
release: "1809P03-US"
release_version: []
slot: []
slot_model:
- "24SFP+4SFP Plus"
- "16GE"
slot_name: []
slot_type: []
slot_uptime: []
status: []
subslot:
- "0"
- "1"
subslot_version:
- "B"
- "A"
system_compile_date: ""
system_image: ""
system_image_version: ""
system_release: ""
uptime: "513 weeks, 5 days, 15 hours, 35 minutes"
version: "5.20.105"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
HP Comware Software, Version 7.1.045, Release 2311P02
Copyright (c) 2010-2014 Hewlett-Packard Development Company, L.P.
HP 5900AF-48G-4XG-2QSFP+ Switch uptime is 589 weeks, 2 days, 7 hours, 8 minutes
Last reboot reason : Power on

Boot image: flash:/5900_5920-cmw710-boot-r2311p02.bin
Boot image version: 7.1.045P16, Release 2311P02
Compiled Aug 09 2014 15:05:16
System image: flash:/5900_5920-cmw710-system-r2311p02.bin
System image version: 7.1.045, Release 2311P02
Compiled Aug 09 2014 15:05:27

Slot 1
HP 5900AF-48G-4XG-2QSFP+ Switch with 2 Processors
Last reboot reason : Power on
2048M bytes SDRAM
4M bytes Nor Flash Memory
512M bytes Nand Flash Memory
Config Register points to Nand Flash

Hardware Version is Ver.A
CPLD Version is 001
BootRom Version is 132
[SubSlot 0] 48GE+4SFP Plus+2QSFP Plus Hardware Version is Ver.A

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
parsed_sample:
- board_processor_count:
- "2"
board_processor_model:
- "None"
board_type: []
boot_compile_date: "Aug 09 2014 15:05:16"
boot_image: "flash:/5900_5920-cmw710-boot-r2311p02.bin"
boot_image_version: "7.1.045P16"
boot_release: "2311P02"
bootrom_version:
- "132"
card_type:
- "HP 5900AF-48G-4XG-2QSFP+ Switch"
chassis: []
cpld:
- "None"
cpld_version:
- "001"
cplda: []
cpldb: []
dram:
- "2048M"
flash: []
fpga: []
fpga_version: []
hw_version:
- "A"
last_reboot_reason: "Power on"
model: "HP 5900AF-48G-4XG-2QSFP+ Switch"
nand_flash:
- "512M"
nor_flash:
- "4M"
nvram: []
oaa_front_board: []
patch_version: []
pcb: []
pcb_version: []
pow_chip: []
power_cpld: []
power_cpld_version: []
reboot_cause: []
release: "2311P02"
release_version: []
slot:
- "1"
slot_model:
- "4"
slot_name: []
slot_type: []
slot_uptime: []
status: []
subslot:
- "0"
subslot_version:
- "None"
system_compile_date: "Aug 09 2014 15:05:27"
system_image: "flash:/5900_5920-cmw710-system-r2311p02.bin"
system_image_version: "7.1.045"
system_release: "2311P02"
uptime: "589 weeks, 2 days, 7 hours, 8 minutes"
version: "7.1.045"
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
HPE Comware Software, Version 7.1.070, Release 6555P02
Copyright (c) 2010-2020 Hewlett Packard Enterprise Development LP
HPE FF 5945 32QSFP28 Switch uptime is 311 weeks, 3 days, 2 hours, 48 minutes
Last reboot reason : Cold reboot

Boot image: flash:/5945-cmw710-boot-r6555p02.bin
Boot image version: 7.1.070, Release 6555P02
Compiled Jan 14 2020 11:00:00
System image: flash:/5945-cmw710-system-r6555p02.bin
System image version: 7.1.070, Release 6555P02
Compiled Jan 14 2020 11:00:00


MPU(M) Slot 1:
Uptime is 311 weeks,3 days,2 hours,48 minutes
HPE FF 5945 32QSFP28 Switch MPU(M) with 1 C2538 Processor(s)
BOARD TYPE: FF 5945 32QSFP28 Switch
DRAM: 8192M bytes
FLASH: 3630M bytes
NVRAM: 0K bytes
PCB 1 Version: VER.A
PCB 2 Version: VER.B
PCB 3 Version: VER.A
Basic BootWare Version: 105
Extended BootWare Version: 106
CPLD 1 Version: 002
CPLD 2 Version: 001
CPLD 3 Version: 002
FPGA 1 Version: 255
Release Version: HPE FF 5945 32QSFP28 Switch-6555P02
Patch Version: None
Reboot Cause: ColdReboot
[SubSlot 0] 32QSFP28 + 2SFP

MPU(S) Slot 2:
Uptime is 311 weeks,3 days,1 hour,34 minutes
HPE FF 5945 32QSFP28 Switch LPU with 1 C2538 Processor(s)
BOARD TYPE: FF 5945 32QSFP28 Switch
DRAM: 8192M bytes
FLASH: 3630M bytes
NVRAM: 0K bytes
PCB 1 Version: VER.A
PCB 2 Version: VER.B
PCB 3 Version: VER.A
Basic BootWare Version: 105
Extended BootWare Version: 106
CPLD 1 Version: 002
CPLD 2 Version: 001
CPLD 3 Version: 002
FPGA 1 Version: 255
Release Version: HPE FF 5945 32QSFP28 Switch-6555P02
Patch Version: None
Reboot Cause: IRFMergeReboot
[SubSlot 0] 32QSFP28 + 2SFP
Loading
Loading