Skip to content

Commit

Permalink
EOS SHOW MODULE: Add new template (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgill298 authored Jan 21, 2019
1 parent 7298481 commit 14981cb
Show file tree
Hide file tree
Showing 4 changed files with 238 additions and 0 deletions.
25 changes: 25 additions & 0 deletions templates/arista_eos_show_module.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Value MODULE (\S+)
Value PORTS (\d+)
Value CARD (.+?)
Value TYPE (\S+)
Value MODEL (\S+)
Value SERIAL_NUM (\S+)
Value Fillup MAC_ADDRESS_START (.+?)
Value Fillup MAC_ADDRESS_END (.+?)
Value Fillup HW_VER (\S+)
Value Fillup SW_VER (\S+|\s+)
Value Fillup STATUS (\S+)
Value Fillup UPTIME (.+)

Start
^-.+
^Module\s+Ports\s+Card\s+Type\s+Model\s+Serial\s+No\.\s*$$
^${MODULE}\s+${PORTS}\s+${CARD}\s+${TYPE}\s+${MODEL}\s+${SERIAL_NUM}\s*$$ -> Record
^Module\s+MAC\s+addresses\s+Hw\s+Sw\s*$$
^${MODULE}\s+(?:${MAC_ADDRESS_START}\s+-\s+${MAC_ADDRESS_END})?\s+${HW_VER}(\s+${SW_VER})?\s*$$
^Module\s+Status\s+Uptime\s*$$
^${MODULE}\s+${STATUS}(\s+${UPTIME})?\s*$$
^\s*$$
^. -> Error "LINE NOT FOUND"

EOF
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ arista_eos_show_ip_route.template, .*, arista_eos, sh[[ow]] i[[p]] rou[[te]]
arista_eos_show_version.template, .*, arista_eos, sh[[ow]] ver[[sion]]
arista_eos_show_ip_arp.template, .*, arista_eos, sh[[ow]] i[[p]] ar[[p]]
arista_eos_show_ip_bgp.template, .*, arista_eos, sh[[ow]] i[[p]] bg[[p]]
arista_eos_show_module.template, .*, arista_eos, sh[[ow]] modu[[le]]
arista_eos_bash_df_-h.template, .*, arista_eos, bas[[h]] d[[f]] [[-h]]
arista_eos_show_clock.template, .*, arista_eos, sh[[ow]] clo[[ck]]
arista_eos_dir_flash.template, .*, arista_eos, dir fl[[ash:]]
Expand Down
168 changes: 168 additions & 0 deletions tests/arista_eos/show_module/arista_eos_show_module.template.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
---
parsed_sample:
- module : '1'
ports : '3'
card : 'DCS-7500-SUP2'
type : 'Supervisor'
model : 'DCS-7500-SUP2'
serial_num : 'XX16380393'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : '3'
ports : '144'
card : '36-port QSFP100'
type : 'Linecard'
model : '7500R-36CQ-LC'
serial_num : 'XX16340219'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : '4'
ports : '144'
card : '36-port QSFP100'
type : 'Linecard'
model : '7500R-36CQ-LC'
serial_num : 'XX16364164'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : '5'
ports : '144'
card : '36-port QSFP100'
type : 'Linecard'
model : '7500R-36CQ-LC'
serial_num : 'XX16364166'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : '6'
ports : '144'
card : '36-port QSFP100'
type : 'Linecard'
model : '7500R-36CQ-LC'
serial_num : 'XX16351233'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : '7'
ports : '144'
card : '36-port QSFP100'
type : 'Linecard'
model : '7500R2-36CQ-LC'
serial_num : 'XX17341299'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : 'Fabric1'
ports : '0'
card : 'DCS-7508R'
type : 'Fabric'
model : '7508R-FM'
serial_num : 'XX16472732'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : 'Fabric2'
ports : '0'
card : 'DCS-7508R'
type : 'Fabric'
model : '7508R-FM'
serial_num : 'XX16472587'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : 'Fabric3'
ports : '0'
card : 'DCS-7508R'
type : 'Fabric'
model : '7508R-FM'
serial_num : 'XX16320292'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : 'Fabric4'
ports : '0'
card : 'DCS-7508R'
type : 'Fabric'
model : '7508R-FM'
serial_num : 'XX16320357'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : 'Fabric5'
ports : '0'
card : 'DCS-7508R'
type : 'Fabric'
model : '7508R-FM'
serial_num : 'XX16320439'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'


- module : 'Fabric6'
ports : '0'
card : 'DCS-7508R'
type : 'Fabric'
model : '7508R-FM'
serial_num : 'XX16320585'
mac_address_start : '44:4c:a8:e6:17:5e'
mac_address_end: '44:4c:a8:e6:17:5f'
hw_ver : '14.20'
sw_ver : '4.19.5M'
status : 'Ok'
uptime : '74 days, 0:25:22'
44 changes: 44 additions & 0 deletions tests/arista_eos/show_module/arista_eos_show_module.template.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
Module Ports Card Type Model Serial No.
------- ----- ------------------------ -------------- -----------
1 3 DCS-7500-SUP2 Supervisor DCS-7500-SUP2 XX16380393
3 144 36-port QSFP100 Linecard 7500R-36CQ-LC XX16340219
4 144 36-port QSFP100 Linecard 7500R-36CQ-LC XX16364164
5 144 36-port QSFP100 Linecard 7500R-36CQ-LC XX16364166
6 144 36-port QSFP100 Linecard 7500R-36CQ-LC XX16351233
7 144 36-port QSFP100 Linecard 7500R2-36CQ-LC XX17341299
Fabric1 0 DCS-7508R Fabric 7508R-FM XX16472732
Fabric2 0 DCS-7508R Fabric 7508R-FM XX16472587
Fabric3 0 DCS-7508R Fabric 7508R-FM XX16320292
Fabric4 0 DCS-7508R Fabric 7508R-FM XX16320357
Fabric5 0 DCS-7508R Fabric 7508R-FM XX16320439
Fabric6 0 DCS-7508R Fabric 7508R-FM XX16320585

Module MAC addresses Hw Sw
------- ------------------------------------- ----- -------
1 44:4c:a8:e6:17:5e - 44:4c:a8:e6:17:5f 14.20 4.19.5M
3 44:4c:a8:e2:d0:28 - 44:4c:a8:e2:d0:b7 13.00
4 44:4c:a8:ee:a9:2c - 44:4c:a8:ee:a9:bb 13.00
5 44:4c:a8:ee:97:2c - 44:4c:a8:ee:97:bb 13.00
6 44:4c:a8:ee:2f:1c - 44:4c:a8:ee:2f:ab 13.00
7 28:99:3a:a4:01:58 - 28:99:3a:a4:01:e7 12.01
Fabric1 12.03
Fabric2 12.03
Fabric3 12.03
Fabric4 12.03
Fabric5 12.03
Fabric6 12.03

Module Status Uptime
------- ------ ----------------
1 Active
3 Ok 74 days, 0:25:22
4 Ok 74 days, 0:25:22
5 Ok 74 days, 0:25:22
6 Ok 74 days, 0:25:22
7 Ok 74 days, 0:25:22
Fabric1 Ok 74 days, 0:25:22
Fabric2 Ok 74 days, 0:25:22
Fabric3 Ok 74 days, 0:25:22
Fabric4 Ok 74 days, 0:25:22
Fabric5 Ok 74 days, 0:25:22
Fabric6 Ok 74 days, 0:25:22

0 comments on commit 14981cb

Please sign in to comment.