[LEDs]: Initialize status and fan LEDs to green on Arista 7050-QX-32/7050-QX-32-S (#886)
This commit is contained in:
parent
178fc032ae
commit
49feeaa456
@ -75,6 +75,26 @@ class LedControl(LedControlBase):
|
||||
|
||||
# Constructor
|
||||
def __init__(self):
|
||||
# Initialize all front-panel status LEDs to green
|
||||
with open("/sys/class/leds/status/brightness", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/class/leds/fan_status/brightness", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/class/leds/psu1/brightness", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/class/leds/psu2/brightness", "w") as f:
|
||||
f.write("1")
|
||||
|
||||
# Initialize all fan LEDs to green
|
||||
with open("/sys/devices/platform/sb800-fans/hwmon/hwmon1/fan1_led", "w") as f:
|
||||
f.write("3")
|
||||
with open("/sys/devices/platform/sb800-fans/hwmon/hwmon1/fan2_led", "w") as f:
|
||||
f.write("3")
|
||||
with open("/sys/devices/platform/sb800-fans/hwmon/hwmon1/fan3_led", "w") as f:
|
||||
f.write("3")
|
||||
with open("/sys/devices/platform/sb800-fans/hwmon/hwmon1/fan4_led", "w") as f:
|
||||
f.write("3")
|
||||
|
||||
# Initialize: Turn all front panel QSFP LEDs off
|
||||
for qsfp_index in range(self.QSFP_BREAKOUT_START_IDX, self.QSFP_BREAKOUT_END_IDX + 1):
|
||||
for lane in range(1, 5):
|
||||
|
@ -70,6 +70,27 @@ class LedControl(LedControlBase):
|
||||
|
||||
# Constructor
|
||||
def __init__(self):
|
||||
# Initialize all front-panel status LEDs to green
|
||||
with open("/sys/class/leds/status/brightness", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/class/leds/fan_status/brightness", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/class/leds/psu1/brightness", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/class/leds/psu2/brightness", "w") as f:
|
||||
f.write("1")
|
||||
|
||||
# Initialize all fan LEDs to green
|
||||
with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan1_led", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan2_led", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan3_led", "w") as f:
|
||||
f.write("1")
|
||||
with open("/sys/devices/pci0000:00/0000:00:02.2/0000:02:00.0/i2c-3/3-0060/hwmon/hwmon2/fan4_led", "w") as f:
|
||||
f.write("1")
|
||||
|
||||
|
||||
# Initialize: Turn all front panel QSFP LEDs off
|
||||
for qsfp_index in range(self.QSFP_BREAKOUT_START_IDX, self.QSFP_BREAKOUT_END_IDX + 1):
|
||||
for lane in range(1, 5):
|
||||
|
Reference in New Issue
Block a user