-
Notifications
You must be signed in to change notification settings - Fork 893
Add Mellanox BMC flows testplan #20299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
echuawu
wants to merge
1
commit into
sonic-net:master
Choose a base branch
from
echuawu:bmc_flow_test_plan
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,215 @@ | ||
| # Support BMC Flows Test Plan | ||
|
|
||
| ## Related documents | ||
|
|
||
| | **Document Name** | **Link** | | ||
| |-------------------|----------| | ||
| | Support BMC HLD | [https://github.com/sonic-net/SONiC/pull/2062]| | ||
|
|
||
| ## Definitions/Abbreviation | ||
|
|
||
| | **Definitions/Abbreviation** | **Description** | | ||
| |-------------------|----------| | ||
| | SONiC | Software for Open Networking in the Cloud | | ||
| | BMC | Baseboard Management Controller | | ||
| | RedFish | RESTful management protocol for BMC | | ||
|
|
||
| ## Overview | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
|
|
||
| In summary, NOS will deal with BMC through the Redfish RESTful API. | ||
|
|
||
| ## Scope | ||
|
|
||
| The test is to verify the SONiC BMC platform apis which have been exposed to the user and SONiC command lines defined for BMC. | ||
|
|
||
| ### Scale and Performance | ||
|
|
||
| No scale and performance test involved in this test plan. | ||
|
|
||
| ### SONiC BMC Platform API | ||
|
|
||
| The exposed BMC platform APIs: | ||
|
|
||
| Get the BMC name | ||
| ``` | ||
| get_name() | ||
| ``` | ||
|
|
||
| Get the BMC presence | ||
| ``` | ||
| get_presence() | ||
| ``` | ||
|
|
||
| Get the BMC model | ||
| ``` | ||
| get_model() | ||
| ``` | ||
|
|
||
| Get the BMC serial number | ||
| ``` | ||
| get_serial() | ||
| ``` | ||
|
|
||
| Get the BMC revision | ||
| ``` | ||
| get_revision() | ||
| ``` | ||
|
|
||
| Get the BMC status | ||
| ``` | ||
| get_status() | ||
| ``` | ||
|
|
||
| Check if the BMC is replaceable | ||
| ``` | ||
| is_replaceable() | ||
| ``` | ||
|
|
||
| Get the BMC eeprom values | ||
| ``` | ||
| get_eeprom() | ||
| ``` | ||
|
|
||
| Get the BMC firmware version | ||
| ``` | ||
| get_version() | ||
| ``` | ||
|
|
||
| Reset the root password to the default one | ||
| ``` | ||
| reset_root_password() | ||
| ``` | ||
|
|
||
| Trigger the BMC dump | ||
| ``` | ||
| trigger_bmc_debug_log_dump() | ||
| ``` | ||
|
|
||
| Get the BMC dump | ||
| ``` | ||
| get_bmc_debug_log_dump(task_id, filename, path) | ||
| ``` | ||
|
|
||
| Install and update the BMC firmware | ||
| ``` | ||
| update_firmware(fw_image) | ||
| ``` | ||
|
|
||
| ### SONiC BMC Command | ||
|
|
||
| show platform bmc summary | ||
| ``` | ||
| Manufacturer: NVIDIA | ||
| Model: P3809 | ||
| PartNumber: 699-13809-1404-500 | ||
| SerialNumber: 1581324710134 | ||
| PowerState: On | ||
| FirmwareVersion: 88.0002.1252 | ||
| ``` | ||
|
|
||
| show platform firmware status | ||
| ``` | ||
| Component Version Description | ||
| ----------- ------------------------- ---------------------------------------- | ||
| ONIE 2025.05-5.3.0017-9600-dev ONIE - Open Network Install Environment | ||
| SSD 0202-000 SSD - Solid-State Drive | ||
| BIOS 0ACLH004_02.02.010_9600 BIOS - Basic Input/Output System | ||
| CPLD1 CPLD000120_REV0900 CPLD - Complex Programmable Logic Device | ||
| CPLD2 CPLD000254_REV0600 CPLD - Complex Programmable Logic Device | ||
| CPLD3 CPLD000191_REV0102 CPLD - Complex Programmable Logic Device | ||
| BMC 88.0002.1252 BMC – Board Management Controller | ||
| ``` | ||
|
|
||
| show platform bmc eeprom | ||
| ``` | ||
| Manufacturer: NVIDIA | ||
| Model: P3809 | ||
| PartNumber: 699-13809-1404-500 | ||
| PowerState: On | ||
| SerialNumber: 1581324710134 | ||
| ``` | ||
|
|
||
| config platform firmware install component BMC fw -y ${BMC_IMAGE} | ||
|
|
||
| ### Supported Topology | ||
| The test will be supported on any topology. | ||
|
|
||
|
|
||
| ## Test Cases | ||
|
|
||
| ### Pre Test Preparation | ||
| 1. Start platform api service in pmon docker for platform api test usage | ||
|
|
||
| ### Test Case # 1 - Test getting BMC name | ||
| 1. Get the BMC name by BMC platform api get_name() | ||
| 2. Validate the value existence and value type is string | ||
| 3. Validate the value is equal to 'BMC' | ||
|
|
||
| ### Test Case # 2 - Test getting BMC presence | ||
| 1. Get the BMC presence status by BMC platform api get_presence() | ||
| 2. Validate the value existence and value type is bool | ||
| 3. Validate the value is equal to bool True | ||
|
|
||
| ### Test Case # 3 - Test getting BMC model | ||
| 1. Get the BMC model by BMC platform api get_model() | ||
| 2. Validate the value existence and value type is string | ||
| 3. Validate the value is equal to the BMC model value from command 'show platform bmc eeprom' | ||
|
|
||
| ### Test Case # 4 - Test getting BMC serial number | ||
| 1. Get the BMC serial number by BMC platform api get_serial() | ||
| 2. Validate the value existence and value type is string | ||
| 3. Validate the value is equal to the BMC serial number from command 'show platform bmc summary' | ||
|
|
||
| ### Test Case # 5 - Test getting BMC revision | ||
| 1. Get the BMC revision by BMC platform api get_revision() | ||
| 2. Validate the value existence and value type is string | ||
| 3. Validate the value is equal to 'N/A' | ||
|
|
||
| ### Test Case # 6 - Test getting BMC status | ||
| 1. Get the BMC status by BMC platform api get_status() | ||
| 2. Validate the value existence and value type is bool | ||
| 3. Validate the value is equal to bool True | ||
|
|
||
| ### Test Case # 7 - Test getting BMC replaceable value | ||
| 1. Get the BMC replaceable value by BMC platform api is_replaceable() | ||
| 2. Validate the value existence and value type is bool | ||
| 3. Validate the value is equal to bool False | ||
|
|
||
| ### Test Case # 8 - Test getting BMC eeprom | ||
| 1. Get the BMC eeprom value by BMC platform api get_eeprom() | ||
| 2. Validate the value existence and correctness by command 'show platform bmc eeprom' | ||
|
|
||
| ### Test Case # 9 - Test getting BMC version | ||
| 1. Get the BMC firmware version by BMC platform api get_version() | ||
| 2. Validate the value existence and correctness by command 'show platform bmc summary' | ||
|
|
||
| ### Test Case # 10 - Test reseting BMC root password | ||
| 1. Change the root password to a new value by using Redfish api | ||
| 2. Validate login password had been changed by login test using Redfish api | ||
| 3. Reset the BMC root password by BMC platform api reset_root_password() | ||
| 4. Validate the root password had been reset to the default password by login test using Redfish api | ||
|
|
||
| ### Test Case # 11 - Test BMC dump | ||
| 1. Trigger the BMC dump by BMC platform api trigger_bmc_debug_log_dump() | ||
| 2. During waiting, check the dump process by BMC platform api get_bmc_debug_log_dump(task_id, filename, path) | ||
| 3. After BMC dump finished, validate the BMC dump file existence | ||
|
|
||
| ### Test Case # 12 - Test BMC firmware update | ||
| 1. Check and record the original BMC firmware version | ||
| 2. Update the BMC firmware version by BMC platform api update_firmware(fw_image) | ||
| 3. Wait after the installation done, power cycle the switch and wait for switch boot up(This part may be updated according to design implement under discussion) | ||
| 4. Validate the BMC firmware had been updated to the destination version by command 'show platform firmware status' | ||
| 5. Recover the BMC firmware version to the original one by command 'config platform firmware install component BMC fw -y xxx' | ||
| 6. Wait after the installation done, power cycle the switch and wait for switch boot up(This part may be updated according to the design implement under discussion) | ||
| 7. Validate the BMC firmware had been restored to the original version by command 'show platform firmware status' | ||
|
|
||
| ### Test Case # 13 - Test BMC dump in techsupport | ||
| 1. Run command 'show techsupport' to generate a switch dump | ||
| 2. Wait until the dump generated | ||
| 3. Extract the dump file and validate the BMC dump files existence | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we also planning to test the scenario where the BMC dump is not ready before collection begins in the
generate_dump_scriptlogic?Design document was talking on how we wait for 60s before we timeout and ignore this dump.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have some special case need to cover?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking to see if we can close that test gap. No special case requirement from my end.