sonic-net / sonic-platform-common

Python packages which provide a common interface to platform-specific hardware peripherals in SONiC
Other
46 stars 175 forks source link

[CMIS] Return the CDB status value for the caller to check the status… #485

Closed xinyulin closed 2 months ago

xinyulin commented 4 months ago

Description

This PR unifies all CDB API calls to return CDB status, allowing the caller to check the command status returned from the module and perform corresponding actions.

Motivation and Context

Modified the following CDB APIs to return a dictionary with CDB status as the first element and RPL result as the second element.

The caller can first check the CDB status to ensure the command was processed successfully, then retrieve the data from the reply payload (RPL).

How Has This Been Tested?

Tested with Cisco8111 and Credo C1 cable image

prgeor commented 2 months ago

@bingwang-ms could you take this to 202405. This is for improved debugging.

mihirpat1 commented 2 months ago

@bingwang-ms MSFT ADO - 26804772

mssonicbld commented 2 months ago

Cherry-pick PR to 202405: https://github.com/sonic-net/sonic-platform-common/pull/496