Skip to content

Commit

Permalink
[psu_base] get_status_led() returns current state of the status LED (s…
Browse files Browse the repository at this point in the history
  • Loading branch information
jleveque authored Jul 15, 2019
1 parent 96188fc commit e5ed2ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
10 changes: 10 additions & 0 deletions sonic_platform_base/fan_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class FanBase(device_base.DeviceBase):

# Possible fan status LED colors
STATUS_LED_COLOR_GREEN = "green"
STATUS_LED_COLOR_AMBER = "amber"
STATUS_LED_COLOR_RED = "red"
STATUS_LED_COLOR_OFF = "off"

Expand Down Expand Up @@ -89,3 +90,12 @@ def set_status_led(self, color):
bool: True if status LED state is set successfully, False if not
"""
raise NotImplementedError

def get_status_led(self):
"""
Gets the state of the fan status LED
Returns:
A string, one of the predefined STATUS_LED_COLOR_* strings above
"""
raise NotImplementedError
8 changes: 3 additions & 5 deletions sonic_platform_base/psu_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class PsuBase(device_base.DeviceBase):

# Possible fan status LED colors
STATUS_LED_COLOR_GREEN = "green"
STATUS_LED_COLOR_AMBER = "amber"
STATUS_LED_COLOR_RED = "red"
STATUS_LED_COLOR_OFF = "off"

Expand Down Expand Up @@ -116,14 +117,11 @@ def set_status_led(self, color):
"""
raise NotImplementedError

def get_status_led(self, color):
def get_status_led(self):
"""
Gets the state of the PSU status LED
Args:
color: A string representing the color of PSU status LED
Returns:
bool: True if get LED state returned successfully, False if not
A string, one of the predefined STATUS_LED_COLOR_* strings above
"""
raise NotImplementedError

0 comments on commit e5ed2ab

Please sign in to comment.