Skip to content

Commit c6dca50

Browse files
authored
Merge pull request #2323 from mjbear/arista_eos_sh_inv_error-directive
Add error directive to arista_eos show inventory
2 parents 321e98b + 7aef412 commit c6dca50

18 files changed

Lines changed: 1308 additions & 7 deletions
Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,84 @@
11
Value PORT ([0-9\/]+)
22
Value PID (\S+)
33
Value SN (\S+)
4-
Value DESCR (.+)
4+
Value DESCR (\S.*\S)
55
Value VID (\S+)
66

77
Start
88
^\s*System\s+\S+?$$ -> Chassis
9+
^. -> Error
910

1011
Chassis
11-
^\s+Model
12-
^\s+-
12+
^\s+Model\s*$$ -> ChassisSplit
13+
^\s+---+
1314
^\s+HW
1415
^\s+${VID}\s+${SN}\s+\d+-\d+-\d+ -> Record
15-
^\s+${PID}?\s+${DESCR}$$
16+
^\s+${PID}?\s+${DESCR}\s*$$
17+
^Subcomponent serial numbers\s*$$ -> Subcomponent
18+
^\s*System has \d+ card slot -> Modules
1619
^\s*System.+(power supply|power-supply) -> Power_Supply
20+
^. -> Error
1721

22+
ChassisSplit
23+
^\s+---+
24+
^\s+Description\s*$$
25+
^\s+HW -> Chassis
26+
^\s+${PID}\s*$$
27+
^\s+${DESCR}$$
28+
^. -> Error
29+
30+
Subcomponent
31+
^\s+Component\s+Serial
32+
^\s+---+
33+
^\s+\S+\s+\S+\s*$$
34+
^\s*System.+(power supply|power-supply) -> Power_Supply
35+
^. -> Error
36+
37+
Modules
38+
^\s+Module\s+Model\s+HW
39+
^\s+---+
40+
^\s+${DESCR}\s+${PID}\s+${VID}\s+${SN}\s+\d+-\d+-\d+ -> Record
41+
^\s*System.+(power supply|power-supply) -> Power_Supply
42+
^. -> Error
1843

1944
Power_Supply
2045
^\s+Slot
21-
^\s+-
46+
^\s+---+
2247
^\s+${PORT}\s+${PID}\s+${SN} -> Record
2348
^\s*System.+(fan) -> Fan
49+
^. -> Error
2450

2551
Fan
2652
^\s+Module
27-
^\s+-
53+
^\s+---+
2854
^\s+${PORT}?\s+\d+?\s+${PID}?\s+${SN} -> Record
2955
^\s*System.+ports -> Ports
56+
^. -> Error
3057

3158
Ports
3259
^\s+${DESCR}\s+${PORT} -> Record
3360
^\s*System.+transceiver -> Transceiver
61+
^\s+Type\s+Count$$
62+
^\s+---+
63+
^. -> Error
3464

3565
Transceiver
3666
^\s+${PORT}\s+${DESCR}\s+${PID}\s+${SN}\s+${VID} -> Record
67+
^\s+\d[\d\/]*\s+Not Present\s*$$
68+
^\s+${PORT}\s+Arista Networks\s+\S+\s*$$
69+
^\s+${PORT}\s+${DESCR}\s+${PID}\s+${SN}\s*$$ -> Record
70+
^\s+Port\s+Manufacturer\s+Model\s+Serial\s+Number\s+Rev\s*$$
71+
^\s+---+
72+
^\s*System has \d+ \S+ transceiver slots\s*$$
73+
^\s*System.+storage -> Storage
74+
^. -> Error
75+
76+
Storage
77+
^Supervisor \d+:\s*$$
78+
^\s+Mount\s+Type\s+Model\s+Serial
79+
^\s+Size\s+\(GB\)
80+
^\s+---+
81+
^\s+/\S+
82+
^\s+\d+\s*$$
83+
^\s*System has precision clock\s*$$
84+
^. -> Error

tests/arista_eos/show_inventory/arista_eos_show_inventory1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
parsed_sample:
3-
- descr: "52-port SFP+ 10GigE 1RU + Clock "
3+
- descr: "52-port SFP+ 10GigE 1RU + Clock"
44
pid: "DCS-7150S-52-CL"
55
port: ""
66
sn: "JPE13120702"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
System information
2+
Model Description
3+
------------------------ ----------------------------------------------------
4+
DCS-7060SX2-48YC6 48x25GbE (SFP+) & 6x100GbE (QSFP+) Ethernet Switch
5+
6+
HW Version Serial Number Mfg Date Epoch
7+
----------- -------------- ---------- -----
8+
11.04 GKC85370109 2017-11-03 01.00
9+
10+
System has 2 power supply slots
11+
Slot Model Serial Number
12+
---- ---------------- ----------------
13+
1 PWR-500AC-R BQQI8596RHY
14+
2 PWR-500AC-R AJTA9552L1G
15+
16+
System has 4 fan modules
17+
Module Number of Fans Model Serial Number
18+
------- --------------- ---------------- ----------------
19+
1 1 FAN-7000H-R N/A
20+
2 1 FAN-7000H-R N/A
21+
3 1 FAN-7000H-R N/A
22+
4 1 FAN-7000H-R N/A
23+
24+
System has 87 ports
25+
Type Count
26+
------------------ ----
27+
Management 1
28+
Switched 68
29+
Unconnected 14
30+
SwitchedBootstrap 4
31+
32+
System has 54 switched transceiver slots
33+
Port Manufacturer Model Serial Number Rev
34+
---- ---------------- ---------------- ---------------- ----
35+
1 Arista Networks SFP-10GLR-31 M2003999463 0002
36+
2 Not Present
37+
6 Arista Networks S28-PC01 P9273010998-5 01
38+
9 FS SFP-10GLR-31 Q2216980292
39+
39 Arista Networks SFP-10GSR-85 H6165547412 0002
40+
54 Arista Networks Q28-PC015 P1555690200-6 A
41+
42+
System has 1 storage device
43+
Mount Type Model Serial Number Rev Size (GB)
44+
---------- ---- -------------- ------------- --- ---------
45+
/mnt/flash eMMC Toshiba 008G70 74x3372t 0.0 4
46+
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
parsed_sample:
3+
- descr: "48x25GbE (SFP+) & 6x100GbE (QSFP+) Ethernet Switch"
4+
pid: "DCS-7060SX2-48YC6"
5+
port: ""
6+
sn: "GKC85370109"
7+
vid: "11.04"
8+
- descr: ""
9+
pid: "PWR-500AC-R"
10+
port: "1"
11+
sn: "BQQI8596RHY"
12+
vid: ""
13+
- descr: ""
14+
pid: "PWR-500AC-R"
15+
port: "2"
16+
sn: "AJTA9552L1G"
17+
vid: ""
18+
- descr: ""
19+
pid: "FAN-7000H-R"
20+
port: "1"
21+
sn: "N/A"
22+
vid: ""
23+
- descr: ""
24+
pid: "FAN-7000H-R"
25+
port: "2"
26+
sn: "N/A"
27+
vid: ""
28+
- descr: ""
29+
pid: "FAN-7000H-R"
30+
port: "3"
31+
sn: "N/A"
32+
vid: ""
33+
- descr: ""
34+
pid: "FAN-7000H-R"
35+
port: "4"
36+
sn: "N/A"
37+
vid: ""
38+
- descr: "Management"
39+
pid: ""
40+
port: "1"
41+
sn: ""
42+
vid: ""
43+
- descr: "Switched"
44+
pid: ""
45+
port: "68"
46+
sn: ""
47+
vid: ""
48+
- descr: "Unconnected"
49+
pid: ""
50+
port: "14"
51+
sn: ""
52+
vid: ""
53+
- descr: "SwitchedBootstrap"
54+
pid: ""
55+
port: "4"
56+
sn: ""
57+
vid: ""
58+
- descr: "Arista Networks"
59+
pid: "SFP-10GLR-31"
60+
port: "1"
61+
sn: "M2003999463"
62+
vid: "0002"
63+
- descr: "Arista Networks"
64+
pid: "S28-PC01"
65+
port: "6"
66+
sn: "P9273010998-5"
67+
vid: "01"
68+
- descr: "FS"
69+
pid: "SFP-10GLR-31"
70+
port: "9"
71+
sn: "Q2216980292"
72+
vid: ""
73+
- descr: "Arista Networks"
74+
pid: "SFP-10GSR-85"
75+
port: "39"
76+
sn: "H6165547412"
77+
vid: "0002"
78+
- descr: "Arista Networks"
79+
pid: "Q28-PC015"
80+
port: "54"
81+
sn: "P1555690200-6"
82+
vid: "A"
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
System information
2+
Model
3+
------------------------
4+
DCS-7280CR3-32D4
5+
6+
Description
7+
--------------------------------------------------------
8+
32x100GbE (QSFP100) & 4x400GbE (QSFP-DD) Ethernet Switch
9+
10+
HW Version Serial Number Mfg Date Epoch
11+
----------- -------------- ---------- -----
12+
12.26 TAL01749952 2021-09-02 01.00
13+
14+
System has 2 power supply slots
15+
Slot Model Serial Number
16+
---- ---------------- ----------------
17+
1 PWR-1011-AC-BLUE 8A743707338310H
18+
2 PWR-1011-AC-BLUE 9E13780768199DU
19+
20+
System has 3 fan modules
21+
Module Number of Fans Model Serial Number
22+
------- --------------- ---------------- ----------------
23+
1 2 FAN-7011H-R N/A
24+
2 2 FAN-7011H-R N/A
25+
3 2 FAN-7011H-R N/A
26+
27+
System has 129 ports
28+
Type Count
29+
------------------ ----
30+
Management 1
31+
Switched 124
32+
SwitchedBootstrap 4
33+
34+
System has 36 switched transceiver slots
35+
Port Manufacturer Model Serial Number Rev
36+
---- ---------------- ---------------- ---------------- ----
37+
1 Arista Networks CAB-Q-Q-100G-5M MZM2081503XM 02
38+
5 Arista Networks AOC-Q-Q-100G-20M TLN8862170HW 20
39+
6 Arista Networks CAB-Q-Q-100G-3M HHL27071719W 20
40+
8 Arista Networks QSFP28-BLR4-100G T8906502786 01
41+
15 Arista Networks QSFP28-LR4-100G E0659725058 01
42+
16 Arista Networks QSFP-LR4-100G U7511938457 01
43+
32 Arista Networks CAB-Q-Q-100G-5M IGB5071267YS 02
44+
36 Not Present
45+
46+
System has 1 storage device
47+
Mount Type Model Serial Number Rev Size (GB)
48+
---------- ---- -------------- ------------- --- ---------
49+
/mnt/flash eMMC Toshiba 016GB0 v0769pq4 0.0 8
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
parsed_sample:
3+
- descr: "32x100GbE (QSFP100) & 4x400GbE (QSFP-DD) Ethernet Switch"
4+
pid: "DCS-7280CR3-32D4"
5+
port: ""
6+
sn: "TAL01749952"
7+
vid: "12.26"
8+
- descr: ""
9+
pid: "PWR-1011-AC-BLUE"
10+
port: "1"
11+
sn: "8A743707338310H"
12+
vid: ""
13+
- descr: ""
14+
pid: "PWR-1011-AC-BLUE"
15+
port: "2"
16+
sn: "9E13780768199DU"
17+
vid: ""
18+
- descr: ""
19+
pid: "FAN-7011H-R"
20+
port: "1"
21+
sn: "N/A"
22+
vid: ""
23+
- descr: ""
24+
pid: "FAN-7011H-R"
25+
port: "2"
26+
sn: "N/A"
27+
vid: ""
28+
- descr: ""
29+
pid: "FAN-7011H-R"
30+
port: "3"
31+
sn: "N/A"
32+
vid: ""
33+
- descr: "Management"
34+
pid: ""
35+
port: "1"
36+
sn: ""
37+
vid: ""
38+
- descr: "Switched"
39+
pid: ""
40+
port: "124"
41+
sn: ""
42+
vid: ""
43+
- descr: "SwitchedBootstrap"
44+
pid: ""
45+
port: "4"
46+
sn: ""
47+
vid: ""
48+
- descr: "Arista Networks"
49+
pid: "CAB-Q-Q-100G-5M"
50+
port: "1"
51+
sn: "MZM2081503XM"
52+
vid: "02"
53+
- descr: "Arista Networks"
54+
pid: "AOC-Q-Q-100G-20M"
55+
port: "5"
56+
sn: "TLN8862170HW"
57+
vid: "20"
58+
- descr: "Arista Networks"
59+
pid: "CAB-Q-Q-100G-3M"
60+
port: "6"
61+
sn: "HHL27071719W"
62+
vid: "20"
63+
- descr: "Arista Networks"
64+
pid: "QSFP28-BLR4-100G"
65+
port: "8"
66+
sn: "T8906502786"
67+
vid: "01"
68+
- descr: "Arista Networks"
69+
pid: "QSFP28-LR4-100G"
70+
port: "15"
71+
sn: "E0659725058"
72+
vid: "01"
73+
- descr: "Arista Networks"
74+
pid: "QSFP-LR4-100G"
75+
port: "16"
76+
sn: "U7511938457"
77+
vid: "01"
78+
- descr: "Arista Networks"
79+
pid: "CAB-Q-Q-100G-5M"
80+
port: "32"
81+
sn: "IGB5071267YS"
82+
vid: "02"

0 commit comments

Comments
 (0)