[Mellanox] [202012] Allow user to set LED to orange (#9514)
Backport https://github.com/Azure/sonic-buildimage/pull/9259 to 202012 #### Why I did it Nvidia platform API does not support set LED to orange. #### How I did it Allow user to set LED to orange #### How to verify it Manual test
This commit is contained in:
parent
0226140e9c
commit
0197855d5d
@ -41,6 +41,17 @@ class Led(object):
|
||||
else:
|
||||
return False
|
||||
|
||||
with open(led_path, 'w') as led:
|
||||
led.write(Led.LED_ON)
|
||||
status = True
|
||||
elif color == Led.STATUS_LED_COLOR_ORANGE:
|
||||
if Led.STATUS_LED_COLOR_ORANGE in led_cap_list:
|
||||
led_path = self.get_orange_led_path()
|
||||
elif Led.STATUS_LED_COLOR_RED in led_cap_list:
|
||||
led_path = self.get_red_led_path()
|
||||
else:
|
||||
return False
|
||||
|
||||
with open(led_path, 'w') as led:
|
||||
led.write(Led.LED_ON)
|
||||
status = True
|
||||
|
Loading…
Reference in New Issue
Block a user