From 9f1ae5ae73212293cc2fe92dff1fa2449039fa81 Mon Sep 17 00:00:00 2001 From: Albert Zhang Date: Thu, 10 Jun 2021 14:41:48 +0800 Subject: Add Status information for Fan This commit is to add Fan State/Health status according to the Redfish Fan schema. If the `xyz.openbmc_project.Inventory.Item` interface does not exist, the state status property is set to default "Present". If the `xyz.openbmc_project.State.Decorator.OperationalStatus` interface does not exist, the health status property is set to default "OK". ref: https://redfish.dmtf.org/schemas/v1/Fan.v1_3_0.json Code that updates the OperationalStatus for all the inventory https://github.com/openbmc/openpower-vpd-parser/blob/3fb026386546cfd288ab4f86156c9aa0ffa145d6/ibm_vpd_app.cpp#L620 Tested: Validator passes ''' 1.doGet method to get Fan curl -k https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0 { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0", "@odata.type": "#Fan.v1_3_0.Fan", "Id": "fan0", "Name": "Fan", "Status": { "Health": "OK", "State": "Enabled" } } 2.Enter the wrong fanId with the doGet method to get fan { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Fan named 'fanx' was not found.", "MessageArgs": [ "Fan", "fanx" ], "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 Fan named 'fanx' was not found." } } ''' Signed-off-by: Albert Zhang Change-Id: I52c465f745587233e43a2947c392d1435b2d980b Signed-off-by: Lakshmi Yadlapati --- Redfish.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Redfish.md') diff --git a/Redfish.md b/Redfish.md index 4607589af2..8584673ccc 100644 --- a/Redfish.md +++ b/Redfish.md @@ -320,6 +320,12 @@ Fields common to all schemas - Members - Members@odata.count +#### /redfish/v1/Chassis/{ChassisId}/ThermalSubsystem/Fans/{FanName}/ + +#### Fan + +- Status + ### /redfish/v1/Chassis/{ChassisId}/Power#/PowerControl/{ControlName}/ #### PowerControl -- cgit v1.2.3