Skip to content

[BMC] Add bmc-dual-mgmt topology definition and device inventory#23195

Merged
StormLiangMS merged 2 commits intosonic-net:masterfrom
Blueve:dev/jika/bmc1
Mar 24, 2026
Merged

[BMC] Add bmc-dual-mgmt topology definition and device inventory#23195
StormLiangMS merged 2 commits intosonic-net:masterfrom
Blueve:dev/jika/bmc1

Conversation

@Blueve
Copy link
Copy Markdown
Collaborator

@Blueve Blueve commented Mar 23, 2026

Description of PR

Summary:
Add the foundational testbed infrastructure for BMC dual-mgmt topology testing. This is the first step toward enabling SONiC BMC test support as described in the BMC High-Level Test Plan.

This PR introduces:

  • The bmc-dual-mgmt topology definition file
  • Example device inventory entries for BMC testbed modeling
  • Console link definitions for BMC-to-host and lab-to-BMC serial connections

Type of change

  • Testbed and Framework(new/improvement)

Back port request

Approach

What is the motivation for this PR?

The SONiC BMC test framework requires new topology definitions and testbed modeling to treat the BMC as a DUT. The bmc-dual-mgmt topology supports the scenario where the BMC and main CPU each have their own dedicated management port on the switch front panel.

How did you do it?

  1. Topology file (ansible/vars/topo_bmc-dual-mgmt.yml): Defined a minimal topology with a single console interface (0.115200.0 - line 0, 115200 baud) representing the BMC-to-host UART link, and dut_type: NetworkBmc. No VMs, ASN, or BGP configuration is needed since the BMC has no ASIC or data-plane.

  2. Device inventory (ansible/files/sonic_lab_devices.csv): Added example entries:

    • switch01 - Host-side SONiC switch
    • switch01-bmc - BMC as DUT (HwSku: bmc, Type: DevSonic)
    • switch01-bmc-con - BMC acting as console server for the host (HwSku: bmc, Type: ConsoleServer)
  3. Console links (ansible/files/sonic_lab_console_links.csv): Added:

    • console-1 -> switch01-bmc - Physical lab console to BMC (9600 baud)
    • switch01-bmc-con -> switch01 - BMC to host via board-embedded UART (115200 baud)

How did you verify/test it?

  • Verified topology YAML structure matches the format used by existing topologies (e.g., topo_c0.yml)
  • Verified CSV entries follow the existing column format in sonic_lab_devices.csv and sonic_lab_console_links.csv

Any platform specific information?

This applies to platforms with a BMC running SONiC OS that have dual dedicated management ports (one for BMC, one for CPU).

Supported testbed topology if it is a new test case?

N/A - this PR adds testbed infrastructure only (topology definition + device inventory). Test cases will be added in follow-up PRs.

Documentation

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

- Create topo_bmc-dual-mgmt.yml with console interface 0.115200.0
  and dut_type NetworkBmc (no VMs/BGP needed)
- Add BMC device entries to sonic_lab_devices.csv:
  switch01 (host), switch01-bmc (DUT), switch01-bmc-con (console server)
- Add console link entries to sonic_lab_console_links.csv:
  lab console -> BMC (9600), BMC -> host UART (115200)

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@github-actions github-actions bot requested a review from wangxin March 23, 2026 06:02
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Blueve Blueve marked this pull request as ready for review March 23, 2026 06:12
yxieca
yxieca previously approved these changes Mar 23, 2026
@yxieca
Copy link
Copy Markdown
Collaborator

yxieca commented Mar 23, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

- Add 'bmc' to get_testbed_type() regex in tests/common/testbed.py
  so topology names like 'bmc-dual-mgmt' are recognized as type 'bmc'
  (same pattern as m1-48/m1-128 being recognized as type 'm1')

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Collaborator

@StormLiangMS StormLiangMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS StormLiangMS merged commit f5e0940 into sonic-net:master Mar 24, 2026
18 checks passed
Returns:
bool: True if one is a BMC device and the other is its console server role
"""
if device1_name + "-con" == device2_name:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the most simple approach to by-pass this validator.
i am thinking if we can do this by checking the testbed.yml and relax the validator if the device is a bmc

this will be a TODO

@staticmethod
def _is_bmc_host_pair(device1, device2):
"""Check if two devices are a BMC and its host sharing the same chassis."""
if device1 + "-bmc" == device2:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This information can definitely get from the testbed.yml
Then we don't rely on hard coded naming convention

note a TODO here

ravaliyel pushed a commit to ravaliyel/sonic-mgmt that referenced this pull request Mar 27, 2026
…ic-net#23195)

* Add bmc-dual-mgmt topology and device inventory entries

- Create topo_bmc-dual-mgmt.yml with console interface 0.115200.0
  and dut_type NetworkBmc (no VMs/BGP needed)
- Add BMC device entries to sonic_lab_devices.csv:
  switch01 (host), switch01-bmc (DUT), switch01-bmc-con (console server)
- Add console link entries to sonic_lab_console_links.csv:
  lab console -> BMC (9600), BMC -> host UART (115200)

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>

* Add bmc topology type to testbed type regex

- Add 'bmc' to get_testbed_type() regex in tests/common/testbed.py
  so topology names like 'bmc-dual-mgmt' are recognized as type 'bmc'
  (same pattern as m1-48/m1-128 being recognized as type 'm1')

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>

---------

Signed-off-by: Jing Kan <[email protected]>
Co-authored-by: Copilot <[email protected]>
selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Apr 1, 2026
…ic-net#23195)

* Add bmc-dual-mgmt topology and device inventory entries

- Create topo_bmc-dual-mgmt.yml with console interface 0.115200.0
  and dut_type NetworkBmc (no VMs/BGP needed)
- Add BMC device entries to sonic_lab_devices.csv:
  switch01 (host), switch01-bmc (DUT), switch01-bmc-con (console server)
- Add console link entries to sonic_lab_console_links.csv:
  lab console -> BMC (9600), BMC -> host UART (115200)

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>

* Add bmc topology type to testbed type regex

- Add 'bmc' to get_testbed_type() regex in tests/common/testbed.py
  so topology names like 'bmc-dual-mgmt' are recognized as type 'bmc'
  (same pattern as m1-48/m1-128 being recognized as type 'm1')

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>

---------

Signed-off-by: Jing Kan <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: selldinesh <[email protected]>
albertovillarreal-keys pushed a commit to albertovillarreal-keys/sonic-mgmt that referenced this pull request Apr 3, 2026
…ic-net#23195)

* Add bmc-dual-mgmt topology and device inventory entries

- Create topo_bmc-dual-mgmt.yml with console interface 0.115200.0
  and dut_type NetworkBmc (no VMs/BGP needed)
- Add BMC device entries to sonic_lab_devices.csv:
  switch01 (host), switch01-bmc (DUT), switch01-bmc-con (console server)
- Add console link entries to sonic_lab_console_links.csv:
  lab console -> BMC (9600), BMC -> host UART (115200)

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>

* Add bmc topology type to testbed type regex

- Add 'bmc' to get_testbed_type() regex in tests/common/testbed.py
  so topology names like 'bmc-dual-mgmt' are recognized as type 'bmc'
  (same pattern as m1-48/m1-128 being recognized as type 'm1')

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>

---------

Signed-off-by: Jing Kan <[email protected]>
Co-authored-by: Copilot <[email protected]>
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Apr 13, 2026
…ic-net#23195)

* Add bmc-dual-mgmt topology and device inventory entries

- Create topo_bmc-dual-mgmt.yml with console interface 0.115200.0
  and dut_type NetworkBmc (no VMs/BGP needed)
- Add BMC device entries to sonic_lab_devices.csv:
  switch01 (host), switch01-bmc (DUT), switch01-bmc-con (console server)
- Add console link entries to sonic_lab_console_links.csv:
  lab console -> BMC (9600), BMC -> host UART (115200)

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>

* Add bmc topology type to testbed type regex

- Add 'bmc' to get_testbed_type() regex in tests/common/testbed.py
  so topology names like 'bmc-dual-mgmt' are recognized as type 'bmc'
  (same pattern as m1-48/m1-128 being recognized as type 'm1')

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Jing Kan <[email protected]>

---------

Signed-off-by: Jing Kan <[email protected]>
Co-authored-by: Copilot <[email protected]>
Signed-off-by: opcoder0 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants