From 4ca3ec3c54d1d74fcd2b76c594be08fbba3774f1 Mon Sep 17 00:00:00 2001 From: Albert Zhang Date: Sun, 13 Jun 2021 14:39:38 +0800 Subject: Add Redfish EnvironmentMetrics schema in bmcweb This commit implements Chassis' EnvironmentMetrics schema, a resource in Redfish version 2022.2 that represents the environment metrics implemented by Redfish. This resource includes Energy consumption, Fan speeds (percent), Power consumption (Watts), etc. And these data are mainly obtained from under sensors. Only the basic information of EnvironmentMetrics is implemented in the current commit. ref: https://www.dmtf.org/sites/default/files/standards/documents/ DSP0268_2022.2.pdf (6.31 EnvironmentMetrics 1.3.0) http://redfish.dmtf.org/schemas/v1/EnvironmentMetrics.v1_3_0.json Tested: Validator passes 1. doGet method to get EnvironmentMetrics curl -k -H "X-Auth-Token: $token" https://$bmc/redfish/v1/Chassis/ chassis/EnvironmentMetrics { "@odata.id": "/redfish/v1/Chassis/chassis/EnvironmentMetrics", "@odata.type": "#EnvironmentMetrics.v1_3_0.EnvironmentMetrics", "Id": "EnvironmentMetrics", "Name": "Chassis Environment Metrics" } 2. Input the wrong chassisId with the doGet method curl -k -H "X-Auth-Token: $token" https://$bmc/redfish/v1/Chassis/ chassisError/EnvironmentMetrics { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Chassis named 'chassisError' was not found.", "MessageArgs": [ "Chassis", "chassisError" ], "MessageId": "Base.1.13.0.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.13.0.ResourceNotFound", "message": "The requested resource of type Chassis named 'chassisError' was not found." } } Signed-off-by: Albert Zhang Change-Id: I6a75dfbc94f39d90a1368770076b874608394691 Signed-off-by: George Liu --- Redfish.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Redfish.md') diff --git a/Redfish.md b/Redfish.md index 0270208a6a..3d36a57089 100644 --- a/Redfish.md +++ b/Redfish.md @@ -157,6 +157,9 @@ Chassis to Drives, The name of the association is "chassis<->drive") - Status (this is dependant on a entity manager association from Chassis to Drives) +#### /redfish/v1/Chassis/{ChassisId}/EnvironmentMetrics/ +##### EnvironmentMetrics + #### /redfish/v1/Chassis/{ChassisId}/Power/ ##### Power - PowerControl -- cgit v1.2.3