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
39 changes: 27 additions & 12 deletions ntc_templates/templates/hp_procurve_show_system.textfsm
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Value NAME (\S+)
Value CONTACT (.+)
Value LOCATION (.+)
Value MAC_AGE (\d+)
Value TIMEZONE (\S+)
Value DAYLIGHT_RULE (\S+)
Value SOFTWARE_VERSION (\S+)
Value ROM_VERSION (\S+)
Value Filldown NAME (\S+)
Value Filldown CONTACT (.+)
Value Filldown LOCATION (.+)
Value Filldown MAC_AGE (\d+)
Value Filldown TIMEZONE (\S+)
Value Filldown DAYLIGHT_RULE (\S+)
Value Filldown SOFTWARE_VERSION (\S+)
Value MEMBER_ID (\d+)
Value Required ROM_VERSION (\S+)
Value ALLOW_MODS ([Yy]es|[Nn]o)
Value MAC_ADDRESS (\S+)
Value SERIAL (\S+)
Expand All @@ -21,16 +22,16 @@ Value BUFFERS_LOWEST (\d+)
Value BUFFERS_MISSED (\d+)

Start
^.*Status and Counters -> INFO

INFO
^.*Status and Counters
^\s*System Name\s+:\s+${NAME}
^\s*System Contact\s+:\s+${CONTACT}
^\s*System Location\s+:\s+${LOCATION}
^\s*MAC Age Time[^:]*:\s+${MAC_AGE}
^\s*Time Zone\s+:\s+${TIMEZONE}
^\s*Daylight Time Rule\s+:\s+${DAYLIGHT_RULE}
^\s*Software revision\s+:\s+${SOFTWARE_VERSION}\s+Base MAC Addr\s+:\s+${MAC_ADDRESS}
^\s*Software revision\s+:\s+${SOFTWARE_VERSION}
^\s*Base MAC Addr\s+:\s+${MAC_ADDRESS}
^\s*ROM Version\s+:\s+${ROM_VERSION}\s+Serial Number\s+:\s+${SERIAL}
^\s*Allow V1 Modules\s+:\s+${ALLOW_MODS}
^\s*Up Time\s+:\s+${UPTIME}\s+Memory\s+- Total\s+:\s+${MEM_TOT}
Expand All @@ -39,4 +40,18 @@ INFO
^\s*Pkts Tx\s+:\s+${PACKETS_TX}\s+Buffers\s+Free\s+:\s+${BUFFERS_FREE}
^\s*Lowest\s+:\s+${BUFFERS_LOWEST}
^\s*Missed\s+:\s+${BUFFERS_MISSED} -> Record

^\s*VSF-Member\s*: -> Continue.Record
^\s*VSF-Member\s*:\s*${MEMBER_ID} -> VSF
^. -> Error

VSF
^\s*ROM Version\s+:\s+${ROM_VERSION}
^\s*Up Time\s+:\s+${UPTIME}
^\s*CPU Util[^:]*:\s+${CPU_UTIL}
^\s*MAC Addr\s+:\s+${MAC_ADDRESS}
^\s*Serial Number\s+:\s+${SERIAL}
^\s*Memory\s+- Total\s+:\s+${MEM_TOT}
^\s*Free\s+:\s+${MEM_FREE}
^\s*VSF-Member\s*: -> Continue.Record
^\s*VSF-Member\s*:\s*${MEMBER_ID}
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ parsed_sample:
mac_age: "300"
mem_free: "61,999,280"
mem_tot: "128,380,928"
member_id: ""
name: "HP_Procurve-01"
packets_rx: "39,808,402"
packets_tot: "6750"
Expand Down
35 changes: 35 additions & 0 deletions tests/hp_procurve/show_system/hp_procurve_show_system2.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

Status and Counters - General System Information

System Name : lab-sw-01
System Contact : IT Support
System Location : Server Room 1
MAC Age Time (sec) : 300

Time Zone : 2
Daylight Time Rule : Western-Europe

Software revision : WC.16.11.0027
Base MAC Addr : a1b2c3-d4e5f6

VSF-Member :1

ROM Version : WC.16.01.0010
Up Time : 84 days
CPU Util (%) : 0
MAC Addr : a1b2c3-d4e5f0
Serial Number : AB12CDE3FH
Memory - Total : 333,451,776
Free : 210,899,116



VSF-Member :2

ROM Version : WC.16.01.0010
Up Time : 84 days
CPU Util (%) : 0
MAC Addr : a1b2c3-f7e8d9
Serial Number : AB34CDE5GJ
Memory - Total : 333,451,776
Free : 227,954,500
46 changes: 46 additions & 0 deletions tests/hp_procurve/show_system/hp_procurve_show_system2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
parsed_sample:
- allow_mods: ""
buffers_free: ""
buffers_lowest: ""
buffers_missed: ""
contact: "IT Support"
cpu_util: "0"
daylight_rule: "Western-Europe"
location: "Server Room 1"
mac_address: "a1b2c3-d4e5f0"
mac_age: "300"
mem_free: "210,899,116"
mem_tot: "333,451,776"
member_id: "1"
name: "lab-sw-01"
packets_rx: ""
packets_tot: ""
packets_tx: ""
rom_version: "WC.16.01.0010"
serial: "AB12CDE3FH"
software_version: "WC.16.11.0027"
timezone: "2"
uptime: "84 days"
- allow_mods: ""
buffers_free: ""
buffers_lowest: ""
buffers_missed: ""
contact: "IT Support"
cpu_util: "0"
daylight_rule: "Western-Europe"
location: "Server Room 1"
mac_address: "a1b2c3-f7e8d9"
mac_age: "300"
mem_free: "227,954,500"
mem_tot: "333,451,776"
member_id: "2"
name: "lab-sw-01"
packets_rx: ""
packets_tot: ""
packets_tx: ""
rom_version: "WC.16.01.0010"
serial: "AB34CDE5GJ"
software_version: "WC.16.11.0027"
timezone: "2"
uptime: "84 days"
Loading