From 88b675a08d66e2a70419195f81a4d3f9132c42d1 Mon Sep 17 00:00:00 2001 From: Lei YU Date: Fri, 4 Jun 2021 16:15:32 +0800 Subject: bytedance: g220a: virtual-sensor: Add associations Add virtual sensor's associations so that the sensors could be shown in Redfish and WebUI. Tested: Verify the Total_Power is shown in Redfish as below $ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/G220A/Sensors/Total_Power { "@odata.id": "/redfish/v1/Chassis/G220A/Sensors/Total_Power", "@odata.type": "#Sensor.v1_0_0.Sensor", "Id": "Total_Power", "Name": "Total Power", "Reading": 514.0, "ReadingRangeMax": null, "ReadingRangeMin": null, "ReadingType": "Power", "ReadingUnits": "W", "Status": { "Health": "OK", "State": "Enabled" } } Signed-off-by: Lei YU Change-Id: I0c9c84917364cad701f00fc3041d427a6e8750bc --- .../virtual_sensor_config.json | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) (limited to 'meta-bytedance') diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json b/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json index 6610184e8..dec59d5fd 100644 --- a/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json +++ b/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json @@ -5,6 +5,14 @@ "Name": "total_power", "SensorType": "power" }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": @@ -35,6 +43,14 @@ "Name": "P0_DIMM_VR_Pwr", "SensorType": "power" }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": @@ -65,6 +81,14 @@ "Name": "P1_DIMM_VR_Pwr", "SensorType": "power" }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": @@ -95,6 +119,14 @@ "Name": "CPU0_VR_Pwr", "SensorType": "power" }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": @@ -133,6 +165,14 @@ "Name": "CPU1_VR_Pwr", "SensorType": "power" }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": @@ -176,6 +216,14 @@ "CriticalHigh": 125, "WarningHigh": 105 }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": @@ -211,6 +259,14 @@ "CriticalHigh": 125, "WarningHigh": 105 }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": @@ -246,6 +302,14 @@ "CriticalHigh": 125, "WarningHigh": 105 }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": @@ -289,6 +353,14 @@ "CriticalHigh": 125, "WarningHigh": 105 }, + "Associations": + [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/board/G220A" + ] + ], "Params": { "DbusParam": -- cgit v1.2.3