|
| 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 common platform BMC 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 | +Reset the root password |
| 85 | +``` |
| 86 | +reset_root_password() |
| 87 | +``` |
| 88 | + |
| 89 | +Trigger the BMC dump |
| 90 | +``` |
| 91 | +trigger_bmc_debug_log_dump() |
| 92 | +``` |
| 93 | + |
| 94 | +Get the BMC dump |
| 95 | +``` |
| 96 | +get_bmc_debug_log_dump(task_id, filename, path) |
| 97 | +``` |
| 98 | + |
| 99 | +Install the BMC firmware |
| 100 | +``` |
| 101 | +update_firmware(fw_image) |
| 102 | +``` |
| 103 | + |
| 104 | +### SONiC BMC Command |
| 105 | + |
| 106 | +show platform bmc summary |
| 107 | +``` |
| 108 | +Manufacturer: NVIDIA |
| 109 | +Model: P3809 |
| 110 | +PartNumber: 699-13809-1404-500 |
| 111 | +SerialNumber: 1581324710134 |
| 112 | +PowerState: On |
| 113 | +FirmwareVersion: 88.0002.1252 |
| 114 | +``` |
| 115 | + |
| 116 | +show platform firmware status |
| 117 | +``` |
| 118 | +Component Version Description |
| 119 | +----------- ------------------------- ---------------------------------------- |
| 120 | +ONIE 2025.05-5.3.0017-9600-dev ONIE - Open Network Install Environment |
| 121 | +SSD 0202-000 SSD - Solid-State Drive |
| 122 | +BIOS 0ACLH004_02.02.010_9600 BIOS - Basic Input/Output System |
| 123 | +CPLD1 CPLD000120_REV0900 CPLD - Complex Programmable Logic Device |
| 124 | +CPLD2 CPLD000254_REV0600 CPLD - Complex Programmable Logic Device |
| 125 | +CPLD3 CPLD000191_REV0102 CPLD - Complex Programmable Logic Device |
| 126 | +BMC 88.0002.1252 BMC – Board Management Controller |
| 127 | +``` |
| 128 | + |
| 129 | +show platform bmc eeprom |
| 130 | +``` |
| 131 | +Manufacturer: NVIDIA |
| 132 | +Model: P3809 |
| 133 | +PartNumber: 699-13809-1404-500 |
| 134 | +PowerState: On |
| 135 | +SerialNumber: 1581324710134 |
| 136 | +``` |
| 137 | + |
| 138 | +config platform firmware install component BMC fw -y ${BMC_IMAGE} |
| 139 | + |
| 140 | +### Supported Topology |
| 141 | +The test will be supported on t0 and t1 topology. |
| 142 | + |
| 143 | + |
| 144 | +## Test Cases |
| 145 | + |
| 146 | +### Pre Test Preparation |
| 147 | +1. Start platform api service in pmon docker for platform api test usage |
| 148 | +2. Get the switch facts |
| 149 | + |
| 150 | +### Test Case # 1 - Test getting BMC name |
| 151 | +1. Get the BMC name by BMC platform api get_name() |
| 152 | +2. Validate the value existence and value type is string |
| 153 | +3. Validate the value is equal to the BMC name in switch facts |
| 154 | + |
| 155 | +### Test Case # 2 - Test getting BMC presence |
| 156 | +1. Get the BMC presence status by BMC platform api get_presence() |
| 157 | +2. Validate the value existence and value type is bool |
| 158 | +3. Validate the value is equal to the BMC presence in switch facts |
| 159 | + |
| 160 | +### Test Case # 3 - Test getting BMC model |
| 161 | +1. Get the BMC model by BMC platform api get_model() |
| 162 | +2. Validate the value existence and value type is string |
| 163 | +3. Validate the value is equal to the BMC model in switch facts |
| 164 | + |
| 165 | +### Test Case # 4 - Test getting BMC serial number |
| 166 | +1. Get the BMC serial number by BMC platform api get_serial() |
| 167 | +2. Validate the value existence and value type is string |
| 168 | +3. Validate the value is equal to the BMC serial number from command 'show platform bmc summary' |
| 169 | + |
| 170 | +### Test Case # 5 - Test getting BMC revision |
| 171 | +1. Get the BMC revision by BMC platform api get_revision() |
| 172 | +2. Validate the value existence and value type is string |
| 173 | +3. Validate the value is equal to 'N/A' |
| 174 | + |
| 175 | +### Test Case # 6 - Test getting BMC status |
| 176 | +1. Get the BMC status by BMC platform api get_status() |
| 177 | +2. Validate the value existence and value type is bool |
| 178 | +3. Validate the value is equal to bool True |
| 179 | + |
| 180 | +### Test Case # 7 - Test getting BMC replaceable value |
| 181 | +1. Get the BMC replaceable value by BMC platform api is_replaceable() |
| 182 | +2. Validate the value existence and value type is bool |
| 183 | +3. Validate the value is equal to bool False |
| 184 | + |
| 185 | +### Test Case # 8 - Test getting BMC eeprom |
| 186 | +1. Get the BMC eeprom value by BMC platform api get_eeprom() |
| 187 | +2. Validate the value existence and correctness by command 'show platform bmc eeprom' |
| 188 | + |
| 189 | +### Test Case # 9 - Test getting BMC version |
| 190 | +1. Get the BMC eeprom value by BMC platform api get_version() |
| 191 | +2. Validate the value existence and correctness |
| 192 | + |
| 193 | +### Test Case # 10 - Test reseting BMC root password |
| 194 | +1. Change the root password to a new value by api change_login_password(password, user) |
| 195 | +2. Validate login password had been changed by get_login_password() |
| 196 | +3. Reset the BMC root password by BMC platform api reset_root_password() |
| 197 | +4. Validate the api login() could be executed successfully |
| 198 | + |
| 199 | +### Test Case # 11 - Test BMC dump |
| 200 | +1. Trigger the BMC dump by BMC platform api trigger_bmc_debug_log_dump() |
| 201 | +2. During waiting, check the dump process by BMC platform api get_bmc_debug_log_dump() |
| 202 | +3. After BMC dump finished, validate the BMC dump file existence |
| 203 | + |
| 204 | +### Test Case # 12 - Test BMC firmware update |
| 205 | +1. Check and record the original BMC firmware version |
| 206 | +2. Update the BMC firmware version by BMC platform api update_firmware() |
| 207 | +3. Wait after the installation done, power cycle the switch and wait for switch boot up |
| 208 | +4. Validate the BMC firmware had been updated to the destination version by command 'show platform firmware status' |
| 209 | +5. Recover the BMC firmware version to the original one by command 'config platform firmware install component BMC fw -y xxx' |
| 210 | +6. Validate the BMC firmware had been restored to the original version by command 'show platform firmware status' |
| 211 | + |
| 212 | +### Test Case # 13 - Test BMC dump in techsupport |
| 213 | +1. Run command 'show techsupport' to generate a switch dump |
| 214 | +2. Wait until the dump generated |
| 215 | +3. Extract the dump file and validate the BMC dump files existence |
0 commit comments