From 3669c24644e6c55cbe3bfab99dd3615f65cdc7c7 Mon Sep 17 00:00:00 2001 From: aalamsi22 Date: Thu, 5 Dec 2024 09:16:07 -0800 Subject: [PATCH] Meru800biab: Fix invalid led_manager config (#304) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: # Description Recently there have been changes to revamp the config structure. This PR updates the config to match the new revamped structure. NOTE: This config is identical to that of meru800bia config. # Test ``` [root@vpr402 ~]# systemctl status data_corral_service ● data_corral_service.service - Start data_corral_service Loaded: loaded (/etc/systemd/system/data_corral_service.service; enabled; preset: disabled) Active: active (running) since Wed 2024-12-04 01:08:48 UTC; 2s ago Main PID: 6680 (run_data_corral) Reviewed By: kimdo8736 Differential Revision: D66798665 Pulled By: joancaneus fbshipit-source-id: ee2c1853672494ad1afa39edcb156935d02fda83 --- .../configs/meru800biab/led_manager.json | 124 +++++++++++------- 1 file changed, 77 insertions(+), 47 deletions(-) diff --git a/fboss/platform/configs/meru800biab/led_manager.json b/fboss/platform/configs/meru800biab/led_manager.json index 168f6746fd5d5..cb6cfa2e3960a 100644 --- a/fboss/platform/configs/meru800biab/led_manager.json +++ b/fboss/platform/configs/meru800biab/led_manager.json @@ -1,54 +1,84 @@ { - "systemLedConfig": { + "systemLedConfig": { + "presentLedColor": 1, + "presentLedSysfsPath": "/sys/class/leds/sys_led:green:status/brightness", + "absentLedColor": 2, + "absentLedSysfsPath": "/sys/class/leds/sys_led:red:status/brightness" + }, + "fruTypeLedConfigs": { + "FAN": { "presentLedColor": 1, - "presentLedSysfsPath": "/sys/class/leds/sys_led:green:status/brightness", + "presentLedSysfsPath": "/sys/class/leds/fan_led:green:status/brightness", "absentLedColor": 2, - "absentLedSysfsPath": "/sys/class/leds/sys_led:red:status/brightness" + "absentLedSysfsPath": "/sys/class/leds/fan_led:red:status/brightness" }, - "fruTypeLedConfigs": { - "FAN": { - "presentLedColor": 1, - "presentLedSysfsPath": "/sys/class/leds/fan_led:green:status/brightness", - "absentLedColor": 2, - "absentLedSysfsPath": "/sys/class/leds/fan_led:red:status/brightness" - }, - "PSU": { - "presentLedColor": 1, - "presentLedSysfsPath": "/sys/class/leds/psu_led:green:status/brightness", - "absentLedColor": 2, - "absentLedSysfsPath": "/sys/class/leds/psu_led:red:status/brightness" + "PSU": { + "presentLedColor": 1, + "presentLedSysfsPath": "/sys/class/leds/psu_led:green:status/brightness", + "absentLedColor": 2, + "absentLedSysfsPath": "/sys/class/leds/psu_led:red:status/brightness" + } + }, + "fruConfigs": [ + { + "fruName": "FAN1", + "fruType": "FAN", + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan1_present", + "desiredValue": 1 + } + } + }, + { + "fruName": "FAN2", + "fruType": "FAN", + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan2_present", + "desiredValue": 1 + } + } + }, + { + "fruName": "FAN3", + "fruType": "FAN", + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan3_present", + "desiredValue": 1 + } + } + }, + { + "fruName": "FAN4", + "fruType": "FAN", + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/sensors/FAN_CPLD/fan4_present", + "desiredValue": 1 + } + } + }, + { + "fruName": "PSU1", + "fruType": "PSU", + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present", + "desiredValue": 1 + } } }, - "fruConfigs": [ - { - "fruName": "FAN1", - "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan1_present" - }, - { - "fruName": "FAN2", - "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan2_present" - }, - { - "fruName": "FAN3", - "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan3_present" - }, - { - "fruName": "FAN4", - "fruType": "FAN", - "presenceSysfsPath": "/run/devmap/sensors/FAN_CPLD/fan4_present" - }, - { - "fruName": "PSU1", - "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu1_present" - }, - { - "fruName": "PSU2", - "fruType": "PSU", - "presenceSysfsPath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present" + { + "fruName": "PSU2", + "fruType": "PSU", + "presenceDetection": { + "sysfsFileHandle": { + "presenceFilePath": "/run/devmap/fpgas/MERU800BIA_SMB_FPGA/psu2_present", + "desiredValue": 1 + } } - ] - } \ No newline at end of file + } + ] +}