Skip to content

Commit c8e9327

Browse files
committed
Add Mellanox BMC flows testplan
Add Mellanox BMC flows testplan Change-Id: I7e2bc1c40e3ee947a61877307d58f7f591121e45
1 parent a0a0f5c commit c8e9327

File tree

1 file changed

+314
-0
lines changed

1 file changed

+314
-0
lines changed
Lines changed: 314 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,314 @@
1+
# Support BMC Flows Test Plan
2+
3+
## Related documents
4+
5+
| **Document Name** | **Link** |
6+
|-------------------|----------|
7+
| Support BMC HLD | [https://github.com/sonic-net/SONiC/pull/2062]|
8+
9+
## Definitions/Abbreviation
10+
11+
| **Definitions/Abbreviation** | **Description** |
12+
|-------------------|----------|
13+
| SONiC | Software for Open Networking in the Cloud |
14+
| BMC | Baseboard Management Controller |
15+
| RedFish | RESTful management protocol for BMC |
16+
17+
## Overview
18+
19+
Baseboard Management Controller (BMC) is a specialized microcontroller that provide out-of-band remote monitoring and management capabilities for servers/switches. It operates independently of the switch's main CPU and operating system, allowing administrators to manage the switch even when it is powered off or unresponsive. BMC is a powerful tool that can be used to automate and simplify many tasks associated with managing switches. It can help to improve network efficiency, reliability, and security.
20+
21+
OpenBMC is an open-source project that provides a Linux-based firmware stack for BMC. It implements the Redfish standard, allowing for standardized and secure remote management of server hardware. OpenBMC serves as the software that runs on BMC hardware, utilizing the Redfish API to facilitate efficient hardware management.
22+
23+
Redfish is a standard for managing and interacting with hardware in a datacenter, designed to be simple, secure, and scalable. It works with BMC to provide a RESTful API for remote management of servers. Together, Redfish and BMC enable efficient and standardized hardware management.
24+
25+
In summary, NOS will deal with BMC through the redfish RESTful API.
26+
27+
## Scope
28+
29+
The test is to verify the SONiC BMC platform api and SONiC command lines defined for BMC.
30+
31+
### Scale and Performance
32+
33+
No scale and performance test involved in this test plan.
34+
35+
### SONiC BMC Platform API
36+
37+
BMC API supported in this phase:
38+
39+
Get the BMC name
40+
```
41+
get_name()
42+
```
43+
44+
Get the BMC presence
45+
```
46+
get_presence()
47+
```
48+
49+
Get the BMC model
50+
```
51+
get_model()
52+
```
53+
54+
Get the BMC serial number
55+
```
56+
get_serial()
57+
```
58+
59+
Get the BMC revision
60+
```
61+
get_revision()
62+
```
63+
64+
Get the BMC status
65+
```
66+
get_status()
67+
```
68+
69+
Check if the BMC is replaceable
70+
```
71+
is_replaceable()
72+
```
73+
74+
Get the BMC eeprom values
75+
```
76+
get_eeprom()
77+
```
78+
79+
Get the BMC firmware version
80+
```
81+
get_version()
82+
```
83+
84+
Get BMC instance
85+
```
86+
get_instance()
87+
```
88+
89+
Get curent BMC password
90+
```
91+
get_password_callback()
92+
```
93+
94+
Get BMC login password
95+
```
96+
get_login_password()
97+
```
98+
99+
Get BMC id
100+
```
101+
get_id()
102+
```
103+
104+
Get all the component list
105+
```
106+
get_component_list()
107+
```
108+
109+
Login and logout
110+
```
111+
login()
112+
logout()
113+
```
114+
115+
Enable log
116+
```
117+
enable_log()
118+
```
119+
120+
Get BMC firmware list
121+
```
122+
get_firmware_list()
123+
```
124+
125+
Get BMC eeprom list
126+
```
127+
get_eeprom_list()
128+
```
129+
130+
Trigger power cycle
131+
```
132+
request_power_cycle()
133+
request_power_cycle_bypass()
134+
```
135+
136+
Reset CPU
137+
```
138+
request_cpu_reset()
139+
```
140+
141+
Reset the root password
142+
```
143+
reset_root_password()
144+
```
145+
146+
Trigger the BMC dump
147+
```
148+
trigger_bmc_debug_log_dump()
149+
```
150+
151+
Get the BMC dump
152+
```
153+
get_bmc_debug_log_dump(task_id, filename, path)
154+
```
155+
156+
Install and update the BMC firmware
157+
```
158+
update_firmware(fw_image)
159+
```
160+
161+
### SONiC BMC Command
162+
163+
show platform bmc summary
164+
```
165+
Manufacturer: NVIDIA
166+
Model: P3809
167+
PartNumber: 699-13809-1404-500
168+
SerialNumber: 1581324710134
169+
PowerState: On
170+
FirmwareVersion: 88.0002.1252
171+
```
172+
173+
show platform firmware status
174+
```
175+
Component Version Description
176+
----------- ------------------------- ----------------------------------------
177+
ONIE 2025.05-5.3.0017-9600-dev ONIE - Open Network Install Environment
178+
SSD 0202-000 SSD - Solid-State Drive
179+
BIOS 0ACLH004_02.02.010_9600 BIOS - Basic Input/Output System
180+
CPLD1 CPLD000120_REV0900 CPLD - Complex Programmable Logic Device
181+
CPLD2 CPLD000254_REV0600 CPLD - Complex Programmable Logic Device
182+
CPLD3 CPLD000191_REV0102 CPLD - Complex Programmable Logic Device
183+
BMC 88.0002.1252 BMC – Board Management Controller
184+
```
185+
186+
show platform bmc eeprom
187+
```
188+
Manufacturer: NVIDIA
189+
Model: P3809
190+
PartNumber: 699-13809-1404-500
191+
PowerState: On
192+
SerialNumber: 1581324710134
193+
```
194+
195+
config platform firmware install component BMC fw -y ${BMC_IMAGE}
196+
197+
### Supported Topology
198+
The test will be supported on any topology.
199+
200+
201+
## Test Cases
202+
203+
### Pre Test Preparation
204+
1. Start platform api service in pmon docker for platform api test usage
205+
206+
### Test Case # 1 - Test getting BMC name
207+
1. Get the BMC name by BMC platform api get_name()
208+
2. Validate the value existence and value type is string
209+
3. Validate the value is equal to 'BMC'
210+
211+
### Test Case # 2 - Test getting BMC presence
212+
1. Get the BMC presence status by BMC platform api get_presence()
213+
2. Validate the value existence and value type is bool
214+
3. Validate the value is equal to bool True
215+
216+
### Test Case # 3 - Test getting BMC model
217+
1. Get the BMC model by BMC platform api get_model()
218+
2. Validate the value existence and value type is string
219+
220+
### Test Case # 4 - Test getting BMC serial number
221+
1. Get the BMC serial number by BMC platform api get_serial()
222+
2. Validate the value existence and value type is string
223+
3. Validate the value is equal to the BMC serial number from command 'show platform bmc summary'
224+
225+
### Test Case # 5 - Test getting BMC revision
226+
1. Get the BMC revision by BMC platform api get_revision()
227+
2. Validate the value existence and value type is string
228+
3. Validate the value is equal to 'N/A'
229+
230+
### Test Case # 6 - Test getting BMC status
231+
1. Get the BMC status by BMC platform api get_status()
232+
2. Validate the value existence and value type is bool
233+
3. Validate the value is equal to bool True
234+
235+
### Test Case # 7 - Test getting BMC replaceable value
236+
1. Get the BMC replaceable value by BMC platform api is_replaceable()
237+
2. Validate the value existence and value type is bool
238+
3. Validate the value is equal to bool False
239+
240+
### Test Case # 8 - Test getting BMC eeprom
241+
1. Get the BMC eeprom value by BMC platform api get_eeprom()
242+
2. Validate the value existence and correctness by command 'show platform bmc eeprom'
243+
244+
### Test Case # 9 - Test getting BMC version
245+
1. Get the BMC eeprom value by BMC platform api get_version()
246+
2. Validate the value existence and correctness by command 'show platform bmc summary'
247+
248+
### Test Case # 10 - Test getting BMC instance
249+
1. Get the BMC instance by BMC platform api get_instance()
250+
2. Validate the value existence
251+
252+
### Test Case # 11 - Test getting BMC password
253+
1. Get the BMC password by BMC platform api get_password_callback()
254+
2. Validate the value existence
255+
3. Get the BMC password by BMC platform api get_login_password()
256+
4. Validate the value existence
257+
258+
### Test Case # 12 - Test getting BMC id
259+
1. Get the BMC id by BMC platform api get_id()
260+
2. Validate the value existence
261+
262+
### Test Case # 13 - Test getting BMC components
263+
1. Get the BMC components by BMC platform api get_component_list()
264+
2. Validate the value existence
265+
266+
### Test Case # 14 - Test BMC login and logout
267+
1. Login BMC by BMC platform api login()
268+
2. Validate no exception
269+
3. Logout BMC by BMC platform api logout()
270+
4. Validate no exception
271+
272+
### Test Case # 15 - Test BMC enable log
273+
1. Enable BMC log by BMC platform api enable_log(enable=True)
274+
2. Validate no exception
275+
3. Disable BMC log by BMC platform api enable_log(enable=False)
276+
4. Validate no exception
277+
278+
### Test Case # 16 - Test BMC firmware list
279+
1. Get the BMC firmware list by BMC platform api get_firmware_list()
280+
2. Validate the value existence
281+
282+
### Test Case # 17 - Test BMC eeprom list
283+
1. Get the BMC eeprom list by BMC platform api get_eeprom_list()
284+
2. Validate the value existence
285+
286+
### Test Case # 18 - Test BMC CPU reset
287+
1. Trigger CPU reset by BMC platform api request_cpu_reset()
288+
2. Validate no exception
289+
3. Validate CPU back to UP status in the end
290+
291+
### Test Case # 19 - Test reseting BMC root password
292+
1. Change the root password to a new value by api change_login_password(password, user)
293+
2. Validate login password had been changed by login test using redfish api
294+
3. Reset the BMC root password by BMC platform api reset_root_password()
295+
4. Validate the root password had been reset to the default password by using redfish api
296+
297+
### Test Case # 20 - Test BMC dump
298+
1. Trigger the BMC dump by BMC platform api trigger_bmc_debug_log_dump()
299+
2. During waiting, check the dump process by BMC platform api get_bmc_debug_log_dump()
300+
3. After BMC dump finished, validate the BMC dump file existence
301+
302+
### Test Case # 21 - Test BMC firmware update
303+
1. Check and record the original BMC firmware version
304+
2. Update the BMC firmware version by BMC platform api update_firmware()
305+
3. Wait after the installation done, power cycle the switch by BMC platform api request_power_cycle() and wait for switch boot up
306+
4. Validate the BMC firmware had been updated to the destination version by command 'show platform firmware status'
307+
5. Recover the BMC firmware version to the original one by command 'config platform firmware install component BMC fw -y xxx'
308+
6. Wait after the installation done, power cycle the switch by BMC platform api request_power_cycle() and wait for switch boot up
309+
7. Validate the BMC firmware had been restored to the original version by command 'show platform firmware status'
310+
311+
### Test Case # 22 - Test BMC dump in techsupport
312+
1. Run command 'show techsupport' to generate a switch dump
313+
2. Wait until the dump generated
314+
3. Extract the dump file and validate the BMC dump files existence

0 commit comments

Comments
 (0)