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
25 changes: 25 additions & 0 deletions ntc_templates/templates/aruba_aoscx_show_module.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Value Filldown MODULE_TYPE (Management|Line)
Value Required MODULE (\S+)
Value MODEL (\S+)
Value DESCRIPTION (\S.*\S)
Value Required SERIAL_NUMBER (\S+)
Value STATUS (\S.*\S)

Start
^${MODULE_TYPE}\s+Modules\s*$$ -> Header
^=+\s*$$
^\s*$$
^. -> Error

Header
^=+\s*$$
^\s*Product\s+Serial\s*$$
^Name\s+Number\s+Description\s+Number\s+Status\s*$$
^-+\s+-+\s+-+\s+-+\s+-+\s*$$ -> Rows
^\s*$$
^. -> Error

Rows
^${MODULE}\s+${MODEL}\s+${DESCRIPTION}\s{2,}${SERIAL_NUMBER}\s+${STATUS}\s*$$ -> Record
^\s*$$ -> Start
^. -> Error
1 change: 1 addition & 0 deletions ntc_templates/templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ aruba_aoscx_show_arp_all-vrfs.textfsm, .*, aruba_aoscx, sh[[ow]] ar[[p]] a[[ll-v
aruba_aoscx_show_bfd_all-vrfs.textfsm, .*, aruba_aoscx, sh[[ow]] bf[[d]] a[[ll-vrfs]]
aruba_aoscx_show_vsf_detail.textfsm, .*, aruba_aoscx, sh[[ow]] vsf d[[etail]]
aruba_aoscx_show_interface.textfsm, .*, aruba_aoscx, sh[[ow]] int[[erface]]
aruba_aoscx_show_module.textfsm, .*, aruba_aoscx, sh[[ow]] mod[[ule]]
aruba_aoscx_show_system.textfsm, .*, aruba_aoscx, sh[[ow]] sys[[tem]]
aruba_aoscx_show_vlan.textfsm, .*, aruba_aoscx, sh[[ow]] vl[[an]]

Expand Down
22 changes: 22 additions & 0 deletions tests/aruba_aoscx/show_module/show_module.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Management Modules
==================

Product Serial
Name Number Description Number Status
---- ------- -------------------------------------- ---------- ----------------
1/1 JL658A 6300M 24SFP+ 4SFP56 Swch SG1ABCDEF1 Active (local)
2/1 JL661A 6300M 48G CL4 PoE 4SFP56 Swch SG2ABCDEF2 Ready
3/1 JL661A 6300M 48G CL4 PoE 4SFP56 Swch SG3ABCDEF3 Ready
4/1 JL661A 6300M 48G CL4 PoE 4SFP56 Swch SG4ABCDEF4 Ready


Line Modules
============

Product Serial
Name Number Description Number Status
---- ------- -------------------------------------- ---------- ----------------
1/1 JL658A 6300M 24SFP+ 4SFP56 Swch SG1ABCDEF1 Ready
2/1 JL661A 6300M 48G CL4 PoE 4SFP56 Swch SG2ABCDEF2 Ready
3/1 JL661A 6300M 48G CL4 PoE 4SFP56 Swch SG3ABCDEF3 Ready
4/1 JL661A 6300M 48G CL4 PoE 4SFP56 Swch SG4ABCDEF4 Ready
50 changes: 50 additions & 0 deletions tests/aruba_aoscx/show_module/show_module.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
parsed_sample:
- description: "6300M 24SFP+ 4SFP56 Swch"
model: "JL658A"
module: "1/1"
module_type: "Management"
serial_number: "SG1ABCDEF1"
status: "Active (local)"
- description: "6300M 48G CL4 PoE 4SFP56 Swch"
model: "JL661A"
module: "2/1"
module_type: "Management"
serial_number: "SG2ABCDEF2"
status: "Ready"
- description: "6300M 48G CL4 PoE 4SFP56 Swch"
model: "JL661A"
module: "3/1"
module_type: "Management"
serial_number: "SG3ABCDEF3"
status: "Ready"
- description: "6300M 48G CL4 PoE 4SFP56 Swch"
model: "JL661A"
module: "4/1"
module_type: "Management"
serial_number: "SG4ABCDEF4"
status: "Ready"
- description: "6300M 24SFP+ 4SFP56 Swch"
model: "JL658A"
module: "1/1"
module_type: "Line"
serial_number: "SG1ABCDEF1"
status: "Ready"
- description: "6300M 48G CL4 PoE 4SFP56 Swch"
model: "JL661A"
module: "2/1"
module_type: "Line"
serial_number: "SG2ABCDEF2"
status: "Ready"
- description: "6300M 48G CL4 PoE 4SFP56 Swch"
model: "JL661A"
module: "3/1"
module_type: "Line"
serial_number: "SG3ABCDEF3"
status: "Ready"
- description: "6300M 48G CL4 PoE 4SFP56 Swch"
model: "JL661A"
module: "4/1"
module_type: "Line"
serial_number: "SG4ABCDEF4"
status: "Ready"
17 changes: 17 additions & 0 deletions tests/aruba_aoscx/show_module/show_module2.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Management Modules
==================

Product Serial
Name Number Description Number Status
---- ------- -------------------------------------- ---------- ----------------
1/1 JL817A 4100i 12G CL4/6 POE 2SFP+ DIN Sw TW1ABCDEF1 Ready


Line Modules
============

Product Serial
Name Number Description Number Status
---- ------- -------------------------------------- ---------- ----------------
1/1 JL817A 4100i 12G CL4/6 POE 2SFP+ DIN Sw TW1ABCDEF1 Ready
14 changes: 14 additions & 0 deletions tests/aruba_aoscx/show_module/show_module2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
parsed_sample:
- description: "4100i 12G CL4/6 POE 2SFP+ DIN Sw"
model: "JL817A"
module: "1/1"
module_type: "Management"
serial_number: "TW1ABCDEF1"
status: "Ready"
- description: "4100i 12G CL4/6 POE 2SFP+ DIN Sw"
model: "JL817A"
module: "1/1"
module_type: "Line"
serial_number: "TW1ABCDEF1"
status: "Ready"
Loading