Skip to content

[sonic-mgmt] Update transceiver onboarding HLD to make parameters attribute based#20230

Merged
prgeor merged 7 commits intosonic-net:masterfrom
mihirpat1:attribute_infra_hld_update
Feb 12, 2026
Merged

[sonic-mgmt] Update transceiver onboarding HLD to make parameters attribute based#20230
prgeor merged 7 commits intosonic-net:masterfrom
mihirpat1:attribute_infra_hld_update

Conversation

@mihirpat1
Copy link
Contributor

@mihirpat1 mihirpat1 commented Aug 13, 2025

Description of PR

This PR modernizes and significantly enhances the transceiver onboarding test plan by introducing a robust, modular attribute management system that replaces the previous CSV-based approach with a comprehensive JSON-based configuration framework.

Also, moved the transceiver_onboarding_test_plan.md file to transceiver/test_plan.md.

PRs planned to add attributes for various test categories

PR title state
Move Transceiver Onboarding Test Plan to transceiver folder GitHub issue/pull request detail
Transceiver firmware upgrade testplan GitHub issue/pull request detail
[Transceiver onboarding] Add EEPROM and System test attributes in HLD GitHub issue/pull request detail
Optics insertion removal testplan GitHub issue/pull request detail

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

ADO - 33984323

@mihirpat1 mihirpat1 requested review from Copilot and removed request for wangxin and yxieca August 13, 2025 18:52
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

This comment was marked as outdated.

@mihirpat1 mihirpat1 requested a review from Copilot August 13, 2025 21:08

This comment was marked as outdated.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mihirpat1 mihirpat1 requested a review from Copilot August 13, 2025 21:44

This comment was marked as outdated.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Copy link
Contributor

@az-pz az-pz left a comment

Choose a reason for hiding this comment

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

Minor comments. Looks great otherwise. Very thorough and comprehensive.

"field_2": "specific_value_2",
"field_3": "specific_value_3",
"platform_hwsku_overrides": {
"PLATFORM_NAME+HWSKU_NAME": {
Copy link
Contributor

Choose a reason for hiding this comment

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

How are we concatenating PLATFORM_NAME and HWSKU_NAME? Is it joined by +?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@az-pz Added a note for this now

| Issue CLI command to shutdown a port | Validate link status using CLI configuration | Ensure that the link goes down |
| Issue CLI command to startup a port | Validate link status using CLI configuration | Ensure that the link is up and the port appears in the LLDP table. |
| In a loop, issue startup/shutdown command 100 times | Stress test for link status validation | Ensure link status toggles to up/down appropriately with each startup/shutdown command. Verify ports appear in the LLDP table when the link is up |
| In a loop, issue startup/shutdown command for a port 100 times | Stress test for link status validation | Ensure link status toggles to up/down appropriately with each startup/shutdown command. Verify ports appear in the LLDP table when the link is up |
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we not using an attribute for the iteration count here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@az-pz I am planning to create a separate PR to use attributes for the system tests and will modify this TC with the relevant PR.
Added the current change to ensure that we don't miss documenting the TC

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mihirpat1
Copy link
Contributor Author

mihirpat1 commented Aug 15, 2025

@AnoopKamath, @bobby-nexthop @Junchao-Mellanox @roy-sror Can you please help in reviewing this PR?

@mihirpat1 mihirpat1 requested a review from roy-sror August 18, 2025 16:46
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

"port_1": {
"vendor_name": "Vendor/Inc",
"vendor_pn": "QSFP-100G-AOC-10M"
"Ethernet0-96:4": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use Python list slicing syntax instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@az-pz I have addressed this now

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.


**Port Range Parsing Rules:**

- **Range Format**: `EthernetX-Y` where X and Y are port numbers (X ≤ Y)
Copy link
Contributor

Choose a reason for hiding this comment

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

We can use python slicing for range format as well. It'd be consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@az-pz I have addressed this now.


**Port Configuration Keys:**
- **Individual Ports**: Standard SONiC port names (e.g., `"Ethernet0"`, `"Ethernet4"`)
- **Port Ranges**: Range notation (e.g., `"Ethernet4-12"`, `"Ethernet0-96:4"`)
Copy link
Contributor

Choose a reason for hiding this comment

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

"Ethernet0-96:4" should be updated to "Ethernet0:97:4".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@az-pz I have addressed this now.


**Requirements**:

- Parse the mandatory 6-component format: `{TYPE}-{SPEED}-{FORM_FACTOR}-{DEPLOYMENT}-{MEDIA_LANE_MASK}-{HOST_LANE_MASK}`

Choose a reason for hiding this comment

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

Any thoughts on making this attribute a dictionary?

"transceiver_configuration": "AOC-100-QSFP-100G_STRAIGHT-0x0F-0x0F"

The string is quite lengthy and more often it will be generated, so we will be generating the configuration and then decoding it, it will be more intutive if the fields of this string are a dictionary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@arpit-nexthop I think that adding more fields to the dictionary in the corresponding DUT info file will increase the length to a large extent. Hence, I added the relevant details to be hardcoded in the string format and then have the parser to translate it to a dictionary.
Let me know if you still think that having a dictionary is better.

https://github.com/mihirpat1/sonic-mgmt/blob/4f8740d56208e1b8e687f750a2e9708eff227cec/docs/testplan/transceiver/test_plan.md#2-transceiver-configuration-string-parsing

Choose a reason for hiding this comment

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

@mihirpat1 I am more concerned with human understandability here than the file size.
AOC-100-QSFP-100G_STRAIGHT-0x0F-0x0F compresses lot of data that needs to be understood.

Just a preference on my part. I will let others comment on this as well.

@mihirpat1 mihirpat1 force-pushed the attribute_infra_hld_update branch from 4f8740d to 521da12 Compare January 2, 2026 00:46
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

Signed-off-by: Mihir Patel <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

"mandatory": ["sff8024_identifier", "dual_bank_supported"],
"defaults": {
"vdm_supported": false,
"is_non_dac_and_cmis": false,
Copy link
Contributor

Choose a reason for hiding this comment

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

@mihirpat1 I am not sure what this flag mean.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prgeor Following is the meaning of this
image

This flag should be true for all CMIS optics which are non-DAC (400ZR, DR8 etc)

"transceivers": {
"deployment_configurations": {
"8x100G_DR8": {
"vdm_supported": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

@mihirpat1 do we have similar for pm_supported ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prgeor Added it now in the EEPROM attributes table

Copy link
Contributor

Choose a reason for hiding this comment

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

@mihirpat1 some optics may support few DOM flags and some not. how are we handling such scenario?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prgeor We plan to have separate attributes for each of such DOM flags.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mihirpat1 should we limit only the infra part in this file? All detailed specific test should be in https://github.com/sonic-net/sonic-mgmt/pull/20359/changes ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prgeor Yes - we plan to remove the test case specific details from this file once this PR merges and we are fine with the test implementation HLD.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@@ -0,0 +1,17 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

@mihirpat1 is this file per testbed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prgeor No - this file is not supposed to contain testbed specific info.
It is supposed to exist as a single file containing all the supported deployment templates and their corresponding mandatory, optional attributes.

@@ -431,13 +1127,13 @@ This section describes the automated process for copying firmware binaries to th
To ensure only the necessary firmware binaries are present for each transceiver:

1. **Parse `transceiver_firmware_info.csv`** to obtain the list of available firmware binaries, their versions, and associated vendor and part numbers.
Copy link
Contributor

@roy-sror roy-sror Feb 11, 2026

Choose a reason for hiding this comment

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

why this file remains in a CSV format?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@roy-sror We are planning to remove this section via #20102 after the current PR is merged.
Will let @az-pz convert the CSV to JSON file via the above PR.

@prgeor prgeor enabled auto-merge (rebase) February 12, 2026 18:01
@prgeor prgeor merged commit 5d4ea11 into sonic-net:master Feb 12, 2026
6 of 9 checks passed
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
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.

8 participants