Default implementation of under/over speed checks#1
Closed
spilkey-cisco wants to merge 3 commits intomasterfrom
Closed
Default implementation of under/over speed checks#1spilkey-cisco wants to merge 3 commits intomasterfrom
spilkey-cisco wants to merge 3 commits intomasterfrom
Conversation
bmridul
reviewed
Jun 7, 2023
| Returns: | ||
| A boolean, True if fan speed is under the low threshold, False if not | ||
| """ | ||
| speed = self.get_speed() |
There was a problem hiding this comment.
This file seems to have stub implementations. Do we need to provide a reference implementation (which may not work for some vendor..)
Owner
Author
There was a problem hiding this comment.
This default implementation is provided for backwards compatibility. Any vendors who were happy with the way tolerance calculations worked do not need to change their code; they continue to just have get_speed_tolerance implemented, and these default implementations of is_under/over_speed do the previously expected tolerance calculation.
Owner
Author
|
Closing to open new PR to merge into sonic-net/sonic-platform-common |
Owner
Author
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.
Description
Provide default implementation of fan under and over speed threshold checks, providing backwards compatibility for vendors that only implement
get_speed_toleranceMotivation and Context
Fan under/over speed checks should be vendor customizable, since a tolerance based off the pwm/percentage fan speed can easily give false failures, especially for low fan speeds.
How Has This Been Tested?