-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EOS SHOW MODULE: Add new template (#343)
- Loading branch information
1 parent
d15e5d1
commit 48257ed
Showing
4 changed files
with
238 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
168 changes: 168 additions & 0 deletions
168
tests/arista_eos/show_module/arista_eos_show_module.template.parsed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
44
tests/arista_eos/show_module/arista_eos_show_module.template.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |