summaryrefslogtreecommitdiff
path: root/meta-bytedance
diff options
context:
space:
mode:
authorLei YU <yulei.sh@bytedance.com>2021-06-04 11:15:32 +0300
committerLei YU <yulei.sh@bytedance.com>2021-08-20 12:37:19 +0300
commit88b675a08d66e2a70419195f81a4d3f9132c42d1 (patch)
tree2c42dca919e616307d057d9705a71b07932fbd1f /meta-bytedance
parentac505e7e62d9fed96829aa9e04ab162b70974c95 (diff)
downloadopenbmc-88b675a08d66e2a70419195f81a4d3f9132c42d1.tar.xz
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 <yulei.sh@bytedance.com> Change-Id: I0c9c84917364cad701f00fc3041d427a6e8750bc
Diffstat (limited to 'meta-bytedance')
-rw-r--r--meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json72
1 files changed, 72 insertions, 0 deletions
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":