Add LED and SFP methods to support new port LED policy#662
Open
justin-oliver wants to merge 2 commits into
Open
Add LED and SFP methods to support new port LED policy#662justin-oliver wants to merge 2 commits into
justin-oliver wants to merge 2 commits into
Conversation
Signed-off-by: Justin Oliver <justinoliver@arista.com>
Signed-off-by: Justin Oliver <justinoliver@arista.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As described in sonic-net/SONiC#2223, we aim to implement a new policy for controlling front panel port LEDs. This PR introduces the platform APIs required to support the LED policy.
Description
Add
led_base.pywith basic abstract methods for describing and controlling LEDs.Update
sfp_base.pywith an LED list that contains LedBase derived objects representing all LEDs tied to a particular port. A platform must implementget_all_ledsif it wishes for LED daemon (ledd) to use the new port LED policy. Otherwise it will stick to the current V1 policy.Motivation and Context
The current port LED handling by ledd has several issues with ambiguous behavior, particularly around port breakout scenarios where we need deterministically to map X subports to Y port LEDs. The LED state determination is also inconsistent across different SKUs and platform vendors and doesn't account for admin status of the interface. By handling LED control directly in ledd, we can have a unified policy for all platforms.
See sonic-net/SONiC#2223 for full details.
How Has This Been Tested?
Added basic unit tests to cover the new APIs.
Additional Information (Optional)