diff --git a/ntc_templates/templates/hp_procurve_show_system.textfsm b/ntc_templates/templates/hp_procurve_show_system.textfsm index cc3b743ee4..e0170d48e4 100644 --- a/ntc_templates/templates/hp_procurve_show_system.textfsm +++ b/ntc_templates/templates/hp_procurve_show_system.textfsm @@ -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+) @@ -21,22 +22,36 @@ Value BUFFERS_LOWEST (\d+) Value BUFFERS_MISSED (\d+) Start - ^.*Status and Counters -> INFO - -INFO - ^\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*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} - ^\s*CPU Util[^:]*:\s+${CPU_UTIL}\s+Free\s+:\s+${MEM_FREE} - ^\s*IP Mgmt\s+- Pkts Rx\s+:\s+${PACKETS_RX}\s+Packet\s+- Total\s+:\s+${PACKETS_TOT} - ^\s*Pkts Tx\s+:\s+${PACKETS_TX}\s+Buffers\s+Free\s+:\s+${BUFFERS_FREE} + ^.*Status\s+and\s+Counters + ^\s*System\s+Name\s+:\s+${NAME} + ^\s*System\s+Contact\s+:\s+${CONTACT} + ^\s*System\s+Location\s+:\s+${LOCATION} + ^\s*MAC\s+Age\s+Time[^:]*:\s+${MAC_AGE} + ^\s*Time\s+Zone\s+:\s+${TIMEZONE} + ^\s*Daylight\s+Time\s+Rule\s+:\s+${DAYLIGHT_RULE} + ^\s*Software\s+revision\s+:\s+${SOFTWARE_VERSION}\s+Base\s+MAC\s+Addr\s+:\s+${MAC_ADDRESS} + ^\s*Software\s+revision\s+:\s+${SOFTWARE_VERSION} + ^\s*Base\s+MAC\s+Addr\s+:\s+${MAC_ADDRESS} + ^\s*ROM\s+Version\s+:\s+${ROM_VERSION}\s+Serial\s+Number\s+:\s+${SERIAL} + ^\s*Allow\s+V1\s+Modules\s+:\s+${ALLOW_MODS} + ^\s*Up\s+Time\s+:\s+${UPTIME}\s+Memory\s+-\s+Total\s+:\s+${MEM_TOT} + ^\s*CPU\s+Util[^:]*:\s+${CPU_UTIL}\s+Free\s+:\s+${MEM_FREE} + ^\s*IP\s+Mgmt\s+-\s+Pkts\s+Rx\s+:\s+${PACKETS_RX}\s+Packet\s+-\s+Total\s+:\s+${PACKETS_TOT} + ^\s*Pkts\s+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 - \ No newline at end of file + ^\s*VSF-Member\s*: -> Continue.Record + ^\s*VSF-Member\s*:\s*${MEMBER_ID} -> VSF + ^. -> Error + +VSF + ^\s*ROM\s+Version\s+:\s+${ROM_VERSION} + ^\s*Up\s+Time\s+:\s+${UPTIME} + ^\s*CPU\s+Util[^:]*:\s+${CPU_UTIL} + ^\s*MAC\s+Addr\s+:\s+${MAC_ADDRESS} + ^\s*Serial\s+Number\s+:\s+${SERIAL} + ^\s*Memory\s+-\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 \ No newline at end of file diff --git a/tests/hp_procurve/show_system/hp_procurve_show_system.yml b/tests/hp_procurve/show_system/hp_procurve_show_system.yml index 1335166722..3e00894185 100644 --- a/tests/hp_procurve/show_system/hp_procurve_show_system.yml +++ b/tests/hp_procurve/show_system/hp_procurve_show_system.yml @@ -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" diff --git a/tests/hp_procurve/show_system/hp_procurve_show_system2.raw b/tests/hp_procurve/show_system/hp_procurve_show_system2.raw new file mode 100644 index 0000000000..1e21b69f5d --- /dev/null +++ b/tests/hp_procurve/show_system/hp_procurve_show_system2.raw @@ -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 diff --git a/tests/hp_procurve/show_system/hp_procurve_show_system2.yml b/tests/hp_procurve/show_system/hp_procurve_show_system2.yml new file mode 100644 index 0000000000..ba65442a46 --- /dev/null +++ b/tests/hp_procurve/show_system/hp_procurve_show_system2.yml @@ -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"