Skip to content

hp_procurve: show system template fails on Aruba 2930F with VSF stacking #2282

@molhamalnasr

Description

@molhamalnasr
ISSUE TYPE
  • Template Issue with error and raw data
TEMPLATE USING

hp_procurve_show_system.textfsm:

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 ALLOW_MODS ([Yy]es|[Nn]o)
Value MAC_ADDRESS (\S+)
Value SERIAL (\S+)
Value UPTIME (\d+ \w+)
Value CPU_UTIL (\d+)
Value MEM_TOT ([\d,]+)
Value MEM_FREE ([\d,]+)
Value PACKETS_RX ([\d,]+)
Value PACKETS_TX ([\d,]+)
Value PACKETS_TOT (\d+)
Value BUFFERS_FREE (\d+)
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}
  ^\s*Lowest\s+:\s+${BUFFERS_LOWEST}
  ^\s*Missed\s+:\s+${BUFFERS_MISSED} -> Record
SAMPLE COMMAND OUTPUT

show system — Aruba 2930F with VSF (2 members):

 Status and Counters - General System Information

  System Name        : lab-sw-01
  System Contact     :
  System Location    :
  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

show system — Aruba 2930F standalone (no VSF) — works correctly with current template:

 Status and Counters - General System Information

  System Name        : lab-sw-02
  System Contact     : admin@example.com
  System Location    :

  MAC Age Time (sec) : 300

  Time Zone          : 2
  Daylight Time Rule : Western-Europe

  Software revision  : WC.16.11.0020        Base MAC Addr      : b2c3d4-e5f6a7
  ROM Version        : WC.16.01.0010        Serial Number      : CD56EFG7HK

  Up Time            : 141 days             Memory   - Total   : 333,517,312
  CPU Util (%)       : 0                               Free    : 212,260,288

  IP Mgmt  - Pkts Rx : 2,096,454            Packet   - Total   : 6600
             Pkts Tx : 2,127,453            Buffers    Free    : 4347
                                                       Lowest  : 4315
                                                       Missed  : 0
SUMMARY

The hp_procurve_show_system template fails to parse output from Aruba 2930F switches configured with VSF (Virtual Switching Framework) stacking.

On VSF-stacked switches, the show system output format differs from standalone switches in two ways:

  1. Software revision and Base MAC Addr appear on separate lines instead of the same line
  2. Per-member sections (VSF-Member :1, VSF-Member :2, etc.) appear with individual serial numbers, MAC addresses, memory stats, and uptime — none of which are matched by the current template

The template has no rules to match any of these lines, so it returns incomplete/empty data (no serial number, no MAC address, no ROM version).

VSF stacking is a widely used feature on Aruba 2930F/2930M series switches in enterprise campus networks. Having a mix of standalone and VSF-stacked switches in the same network is very common.

STEPS TO REPRODUCE
import textfsm
from io import StringIO

template_text = open("ntc_templates/templates/hp_procurve_show_system.textfsm").read()

# === Test 1: VSF stacked switch (2 members) ===
print("=" * 70)
print("TEST 1: VSF stacked switch (2 members)")
print("=" * 70)

vsf_output = """
 Status and Counters - General System Information

  System Name        : lab-sw-01
  System Contact     :
  System Location    :
  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
"""

fsm = textfsm.TextFSM(StringIO(template_text))
result = fsm.ParseText(vsf_output)
print(f"Number of records returned: {len(result)}")
print()
if result:
    for i, row in enumerate(result):
        print(f"Record {i}:")
        for header, value in zip(fsm.header, row):
            print(f'  {header}: "{value}"')
        print()
else:
    print("NO RECORDS RETURNED")

# === Test 2: Standalone switch (no VSF) ===
print()
print("=" * 70)
print("TEST 2: Standalone switch (no VSF)")
print("=" * 70)

standalone_output = """
 Status and Counters - General System Information

  System Name        : lab-sw-02
  System Contact     : admin@example.com
  System Location    :

  MAC Age Time (sec) : 300

  Time Zone          : 2
  Daylight Time Rule : Western-Europe

  Software revision  : WC.16.11.0020        Base MAC Addr      : b2c3d4-e5f6a7
  ROM Version        : WC.16.01.0010        Serial Number      : CD56EFG7HK

  Up Time            : 141 days             Memory   - Total   : 333,517,312
  CPU Util (%)       : 0                               Free    : 212,260,288

  IP Mgmt  - Pkts Rx : 2,096,454            Packet   - Total   : 6600
             Pkts Tx : 2,127,453            Buffers    Free    : 4347
                                                       Lowest  : 4315
                                                       Missed  : 0
"""

fsm2 = textfsm.TextFSM(StringIO(template_text))
result2 = fsm2.ParseText(standalone_output)
print(f"Number of records returned: {len(result2)}")
print()
if result2:
    for i, row in enumerate(result2):
        print(f"Record {i}:")
        for header, value in zip(fsm2.header, row):
            print(f'  {header}: "{value}"')
        print()
else:
    print("NO RECORDS RETURNED")
EXPECTED RESULTS

Test 1 (VSF): The template should return one record per VSF member (consistent with how aruba_aoscx_show_vsf_detail handles VSF), with a new MEMBER_ID field:

parsed_sample:
  - member_id: "1"
    name: "lab-sw-01"
    software_version: "WC.16.11.0027"
    rom_version: "WC.16.01.0010"
    serial: "AB12CDE3FH"
    mac_address: "a1b2c3-d4e5f0"
    uptime: "84 days"
    cpu_util: "0"
    mem_tot: "333,451,776"
    mem_free: "210,899,116"
    # ... other fields
  - member_id: "2"
    name: "lab-sw-01"
    software_version: "WC.16.11.0027"
    rom_version: "WC.16.01.0010"
    serial: "AB34CDE5GJ"
    mac_address: "a1b2c3-f7e8d9"
    uptime: "84 days"
    cpu_util: "0"
    mem_tot: "333,451,776"
    mem_free: "227,954,500"
    # ... other fields

Test 2 (Standalone): Should continue to return a single record with an empty member_id — fully backward compatible with all existing fields populated.

ACTUAL RESULTS

Test 1 (VSF) — most fields are empty:

======================================================================
TEST 1: VSF stacked switch (2 members)
======================================================================
Number of records returned: 1

Record 0:
  NAME: "lab-sw-01"
  CONTACT: ""
  LOCATION: ""
  MAC_AGE: "300"
  TIMEZONE: "2"
  DAYLIGHT_RULE: "Western-Europe"
  SOFTWARE_VERSION: ""          <-- MISSING
  ROM_VERSION: ""               <-- MISSING
  ALLOW_MODS: ""
  MAC_ADDRESS: ""               <-- MISSING
  SERIAL: ""                    <-- MISSING
  UPTIME: ""                    <-- MISSING
  CPU_UTIL: ""                  <-- MISSING
  MEM_TOT: ""                   <-- MISSING
  MEM_FREE: ""                  <-- MISSING
  PACKETS_RX: ""
  PACKETS_TX: ""
  PACKETS_TOT: ""
  BUFFERS_FREE: ""
  BUFFERS_LOWEST: ""
  BUFFERS_MISSED: ""

Test 2 (Standalone) — works correctly:

======================================================================
TEST 2: Standalone switch (no VSF)
======================================================================
Number of records returned: 1

Record 0:
  NAME: "lab-sw-02"
  CONTACT: "admin@example.com"
  LOCATION: ""
  MAC_AGE: "300"
  TIMEZONE: "2"
  DAYLIGHT_RULE: "Western-Europe"
  SOFTWARE_VERSION: "WC.16.11.0020"
  ROM_VERSION: "WC.16.01.0010"
  ALLOW_MODS: ""
  MAC_ADDRESS: "b2c3d4-e5f6a7"
  SERIAL: "CD56EFG7HK"
  UPTIME: "141 days"
  CPU_UTIL: "0"
  MEM_TOT: "333,517,312"
  MEM_FREE: "212,260,288"
  PACKETS_RX: "2,096,454"
  PACKETS_TX: "2,127,453"
  PACKETS_TOT: "6600"
  BUFFERS_FREE: "4347"
  BUFFERS_LOWEST: "4315"
  BUFFERS_MISSED: "0"

As shown above, the template works correctly for standalone switches but returns empty values for all critical fields (SOFTWARE_VERSION, ROM_VERSION, MAC_ADDRESS, SERIAL, UPTIME, CPU_UTIL, MEM_TOT, MEM_FREE) when parsing VSF stacked switch output.


Note: I have a working fix for this template and I'm happy to submit a PR with full test data including both standalone and VSF raw outputs. The fix adds a MEMBER_ID field (following the precedent from aruba_aoscx_show_vsf_detail) and returns all VSF members as separate records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions