Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
78 changes: 78 additions & 0 deletions ntc_templates/templates/hp_comware_display_version.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
Value Filldown SOFTWARE_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 SLOT_TYPE (\S+)
Value CHASSIS (\d+)
Value SLOT (\d+)
Value STATUS (Without Board)
Value SLOT_UPTIME (.+)
Value BOARD_TYPE (.+)
Value DRAM (\d+\w*)
Value FLASH (\d+\w*)
Value NAND_FLASH (\d+\w*)
Value NOR_FLASH (\d+\w*)
Value NVRAM (\d+\w*)
Value BOOTROM_VERSION (\S+)
Value PATCH_VERSION (\S+)
Value REBOOT_CAUSE (\S+)

PreStart
^HPE?\s+(?:HP\s+)?Comware\s+(?:Platform\s+)?Software,\s+Version\s+${SOFTWARE_VERSION},\s+Release\s+${RELEASE} -> Start
^HPE?\s+(?:HP\s+)?Comware\s+Platform\s+Software -> Start

Start
^Copyright
^.*Comware Software,\s+Version\s+${SOFTWARE_VERSION},\s+Release\s+${RELEASE}
^${MODEL}\s+uptime is\s+${UPTIME}
^Last reboot reason\s*:\s*${LAST_REBOOT_REASON}
^Boot image:\s+${BOOT_IMAGE}
^Boot image version:\s+${BOOT_IMAGE_VERSION},\s+Release\s+${BOOT_RELEASE}
^\s+Compiled\s+${BOOT_COMPILE_DATE}
^System image:\s+${SYSTEM_IMAGE}
^System image version:\s+${SYSTEM_IMAGE_VERSION},\s+Release\s+${SYSTEM_RELEASE}
^\s+Compiled\s+${SYSTEM_COMPILE_DATE}
# 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
^BootRom Version is ${BOOTROM_VERSION}
^${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_TYPE}\s+)?(?:Chassis\s+${CHASSIS}\s+)?Slot\s+${SLOT}\s+${STATUS} -> SlotSection

SlotSection
# Flush completed slot record prior to parsing the next slot line
^\s*(?:\S+\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
^Uptime is ${SLOT_UPTIME}
^BOARD TYPE:\s+${BOARD_TYPE}
^DRAM:\s+${DRAM}
^\s*${DRAM}\s+bytes\s+SDRAM
^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
^NVRAM:\s+${NVRAM}
^(?:Bootrom|Bootware) Version:\s+${BOOTROM_VERSION}
^BootRom Version is ${BOOTROM_VERSION}
^Patch Version\s*:\s*${PATCH_VERSION}
^Reboot Cause\s*:\s*${REBOOT_CAUSE}
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


29 changes: 29 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,29 @@
---
parsed_sample:
- board_type: "HP 5800-24G-SFP Switch with 1 Interface Slot"
boot_compile_date: ""
boot_image: ""
boot_image_version: ""
boot_release: ""
bootrom_version: "303"
chassis: ""
dram: "1792M"
flash: ""
last_reboot_reason: ""
model: "HP 5800-24G-SFP Switch with 1 Interface Slot"
nand_flash: "512M"
nor_flash: "4M"
nvram: ""
patch_version: ""
reboot_cause: ""
release: "1809P03-US"
slot: ""
slot_type: ""
slot_uptime: ""
software_version: "5.20.105"
status: ""
system_compile_date: ""
system_image: ""
system_image_version: ""
system_release: ""
uptime: "513 weeks, 5 days, 15 hours, 35 minutes"
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
HPE Comware Software, Version 7.1.070, Release 3507P18
Copyright (c) 2010-2023 Hewlett Packard Enterprise Development LP
HPE 5130 48G PoE+ 4SFP+ 1-slot HI Switch JH326A uptime is 35 weeks, 3 days, 5 hours, 55 minutes
Last reboot reason : User reboot

Boot image: flash:/5130hi-cmw710-boot-r3507p18.bin
Boot image version: 7.1.070, Release 3507P18
Compiled Oct 12 2023 11:00:00
System image: flash:/5130hi-cmw710-system-r3507p18.bin
System image version: 7.1.070, Release 3507P18
Compiled Oct 12 2023 11:00:00


Slot 1:
Uptime is 35 weeks,3 days,5 hours,55 minutes
5130 48G PoE+ 4SFP+ 1-slot HI Switch with 2 Processor
BOARD TYPE: 5130 48G PoE+ 4SFP+ 1-slot HI Switch
DRAM: 1984M bytes
FLASH: 512M bytes
PCB 1 Version: VER.B
Bootrom Version: 128
CPLD 1 Version: 003
Release Version: HPE 5130 48G PoE+ 4SFP+ 1-slot HI Switch JH326A-3507P18
Patch Version : None
Reboot Cause : UserReboot
[SubSlot 0] 48GE+4SFP Plus

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
parsed_sample:
- board_type: "5130 48G PoE+ 4SFP+ 1-slot HI Switch"
boot_compile_date: "Oct 12 2023 11:00:00"
boot_image: "flash:/5130hi-cmw710-boot-r3507p18.bin"
boot_image_version: "7.1.070"
boot_release: "3507P18"
bootrom_version: "128"
chassis: ""
dram: "1984M"
flash: "512M"
last_reboot_reason: "User reboot"
model: "HPE 5130 48G PoE+ 4SFP+ 1-slot HI Switch JH326A"
nand_flash: ""
nor_flash: ""
nvram: ""
patch_version: "None"
reboot_cause: "UserReboot"
release: "3507P18"
slot: "1"
slot_type: ""
slot_uptime: "35 weeks,3 days,5 hours,55 minutes"
software_version: "7.1.070"
status: ""
system_compile_date: ""
system_image: "flash:/5130hi-cmw710-system-r3507p18.bin"
system_image_version: "7.1.070"
system_release: "3507P18"
uptime: "35 weeks, 3 days, 5 hours, 55 minutes"
Loading
Loading