forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ycable] fix the logic to update cable_info values when ycable is not…
… present; fix read side logic for ycable (sonic-net#249) Description This PR fixes the MUX_CABLE_INFO table insertion logic which was not done before this PR. If the muxcable is plugged in, with this change if the config DB states that it is a muxcable then the logic populates the MUX_CABLE_INFO with 'N/A' or 'unknown' entries. This was not done before This PR also fixes the read_side logic, which if initialized with a -1 value would never be updated to the correct value, this PR makes sure that if the read_side is read correctly if cable not powered on/disconnected from server side, and the read_side is populated correctly in state DB. Before this change the read_side was not populated correctly if the cable was not powered from server side/disconnected. Motivation and Context Required for the logic of services looking for MUX_CABLE_INFO values which require this be populated without cable presence. read_side fix logic makes sure that if the cable is powered off/disconnected from server side then the cable driver works well in those cases How Has This Been Tested? Unit-Tests and tested in the lab Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
- Loading branch information
Showing
2 changed files
with
157 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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