Skip to content

Add LED and SFP methods to support new port LED policy#662

Open
justin-oliver wants to merge 2 commits into
sonic-net:masterfrom
justin-oliver:master-port-led-master
Open

Add LED and SFP methods to support new port LED policy#662
justin-oliver wants to merge 2 commits into
sonic-net:masterfrom
justin-oliver:master-port-led-master

Conversation

@justin-oliver
Copy link
Copy Markdown

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.py with basic abstract methods for describing and controlling LEDs.

Update sfp_base.py with an LED list that contains LedBase derived objects representing all LEDs tied to a particular port. A platform must implement get_all_leds if 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)

Signed-off-by: Justin Oliver <justinoliver@arista.com>
Signed-off-by: Justin Oliver <justinoliver@arista.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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.

2 participants