diff --git a/device/arista/x86_64-arista_7050_qx32/plugins/led_control.py b/device/arista/x86_64-arista_7050_qx32/plugins/led_control.py index 1c69d8109f5..1f6034e2e2e 100644 --- a/device/arista/x86_64-arista_7050_qx32/plugins/led_control.py +++ b/device/arista/x86_64-arista_7050_qx32/plugins/led_control.py @@ -75,6 +75,26 @@ def port_link_state_change(self, port, state): # 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): diff --git a/device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py b/device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py index 839092ee1d4..f2cb73194e1 100644 --- a/device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py +++ b/device/arista/x86_64-arista_7050_qx32s/plugins/led_control.py @@ -70,6 +70,27 @@ def port_link_state_change(self, port, state): # 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):