Skip to content

Add aruba_aoscx show module#2319

Open
julmanglano wants to merge 3 commits into
networktocode:masterfrom
julmanglano:pr/aruba-aoscx-show-module
Open

Add aruba_aoscx show module#2319
julmanglano wants to merge 3 commits into
networktocode:masterfrom
julmanglano:pr/aruba-aoscx-show-module

Conversation

@julmanglano
Copy link
Copy Markdown
Contributor

ISSUE TYPE
  • New Template Pull Request
COMPONENT

aruba_aoscx, show module

SUMMARY

Adds a new template for the AOS-CX show module command. The
output is a per-module inventory of the chassis / VSF stack split
into two sections (Management Modules and Line Modules). On
a VSF stack each physical member appears once in each section, so
a 6-member stack produces 12 records.

CAPTURE GROUPS
  • MODULE_TYPE (Filldown) — Management or Line, taken from
    the section header.
  • MODULE (Required) — slot identifier (e.g. 1/1).
  • MODEL — HPE/Aruba product number (e.g. JL658A).
  • DESCRIPTION — human-readable card description
    (e.g. 6300M 24SFP+ 4SFP56 Swch).
  • SERIAL_NUMBER (Required) — module serial.
  • STATUS — module state. Includes multi-word with parentheses
    (Active (local)) on the live management module.
CROSS-VENDOR ALIGNMENT
  • MODULE, MODEL, STATUS — already used by
    arista_eos_show_module, cisco_asa_show_module,
    cisco_ios_show_module.
  • SERIAL_NUMBER — chosen over the existing
    SERIAL (cisco_asa, cisco_ios) and SERIAL_NUM (arista) to
    match the full-name convention from the contribution standards.
    Open to renaming if reviewers prefer alignment with the older
    templates instead.
  • DESCRIPTION — kept under the device's own column label
    (Description). Cisco / Arista templates use CARDTYPE for the
    same concept. Open to renaming pre-merge.
  • MODULE_TYPE — AOS-CX-specific (Management vs Line section
    header). No cross-vendor analog.
TEST DATA

Two fixtures:

  • show_module.{raw,yml} — 4-member VSF stack with Management
    and Line sections (8 records). Exercises the multi-word /
    parenthesised Active (local) status on the live management
    module.
  • show_module2.{raw,yml} — standalone (non-VSF) device. Single
    member appearing in both sections (2 records).

Index entry inserted within the aruba_aoscx block at the
length-19 position (after show_interface length 22 and before
show_system length 19, sorted alphabetically within equal-length
group).

@matt852 matt852 added the changes_requested Waiting on user to address feedback label May 11, 2026
Copy link
Copy Markdown
Contributor

@matt852 matt852 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommendation: Changes Suggested

Thanks @julmanglano — this is in great shape, and the PR description's call-outs on the cross-vendor names are exactly right. Two suggestions before merge:

  • Rename SERIAL_NUMBER to SERIAL. docs/dev/data_model.md standardizes on SERIAL for serial numbers, and the two closest sibling templates (cisco_asa_show_module, cisco_ios_show_module) both use Value SERIAL.

    In ntc_templates/templates/aruba_aoscx_show_module.textfsm, the Value declaration:

    -Value Required SERIAL_NUMBER (\S+)
    +Value Required SERIAL (\S+)

    And the matching rule in the Rows state:

    -  ^${MODULE}\s+${MODEL}\s+${DESCRIPTION}\s{2,}${SERIAL_NUMBER}\s+${STATUS}\s*$$ -> Record
    +  ^${MODULE}\s+${MODEL}\s+${DESCRIPTION}\s{2,}${SERIAL}\s+${STATUS}\s*$$ -> Record

    Across both fixtures (tests/aruba_aoscx/show_module/show_module.yml, 8 entries; show_module2.yml, 2 entries), rename every serial_number: key to serial:. First entry as an example:

    -    serial_number: "SG1ABCDEF1"
    +    serial: "SG1ABCDEF1"

    Apply the same single-line key rename to every other serial_number: line in both fixture files.

  • Rename DESCRIPTION to CARDTYPE. cisco_asa_show_module and cisco_ios_show_module both use CARDTYPE for the per-module card description column; docs/dev/data_model.md reserves DESCRIPTION for port/interface descriptions, which is a different semantic.

    In ntc_templates/templates/aruba_aoscx_show_module.textfsm, the Value declaration:

    -Value DESCRIPTION (\S.*\S)
    +Value CARDTYPE (\S.*\S)

    And the matching rule in the Rows state:

    -  ^${MODULE}\s+${MODEL}\s+${DESCRIPTION}\s{2,}${SERIAL_NUMBER}\s+${STATUS}\s*$$ -> Record
    +  ^${MODULE}\s+${MODEL}\s+${CARDTYPE}\s{2,}${SERIAL_NUMBER}\s+${STATUS}\s*$$ -> Record

    Across both fixtures (show_module.yml, 8 entries; show_module2.yml, 2 entries), rename every leading - description: key to - cardtype:. First entry as an example:

    -  - description: "6300M 24SFP+ 4SFP56 Swch"
    +  - cardtype: "6300M 24SFP+ 4SFP56 Swch"

    Apply the same key rename to every other description: entry in both fixture files.

Thanks!

@julmanglano
Copy link
Copy Markdown
Contributor Author

Thanks @matt852 — applied both renames. DESCRIPTIONCARDTYPE and SERIAL_NUMBERSERIAL across the template (Value declarations + Rows-state rule) and both fixture YAMLs. Targeted parser tests + meta tests all green.

* Since the captured data/columns in both sections were the same...
* Reduce duplication
* Reduce complexity from multiple state transitions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes_requested Waiting on user to address feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants