From 9516f41f9295170ad5d59ded36584d22776417d5 Mon Sep 17 00:00:00 2001 From: George Liu Date: Thu, 29 Sep 2022 17:21:41 +0800 Subject: Implements FanCollection schema The FanCollection schema is a resource in Redifsh version 2022.2 [1] that represents the management properties for the monitoring and management of cooling fans implemented by Redfish [2]. This commit retrieves the fan collection by obtaining the endpoints of the `cooled_by` association. The `cooled_by` association represents the relationship between a chassis and the fans responsible for providing cooling to the chassis. ref: [1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0268_2022.2.pdf [2] http://redfish.dmtf.org/schemas/v1/Fan.v1_3_0.json Redfish validator is currently failing. In order for the validator to pass, it is necessary to merge this commit with https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57559 Tested: 1. doGet method to get FanCollection ``` curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans", "@odata.type": "#FanCollection.FanCollection", "Description": "The collection of Fan resource instances chassis", "Members": [ { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan5" }, { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan4" }, { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan3" }, { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan2" }, { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan1" }, { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0" } ], "Members@odata.count": 6, "Name": "Fan Collection" } 2. Input the wrong chassisId with the doGet method curl -k https://${bmc}/redfish/v1/Chassis/chassis11/ThermalSubsystem/Fans { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Chassis named 'chassis11' was not found.", "MessageArgs": [ "Chassis", "chassis11" ], "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 'chassis11' was not found." } } ``` Signed-off-by: George Liu Change-Id: If5e9ff5655f444694c7ca1aea95d45e2c9222625 Signed-off-by: Lakshmi Yadlapati --- Redfish.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Redfish.md') diff --git a/Redfish.md b/Redfish.md index f2fb141916..4607589af2 100644 --- a/Redfish.md +++ b/Redfish.md @@ -312,6 +312,14 @@ Fields common to all schemas - Status +#### /redfish/v1/Chassis/{ChassisId}/ThermalSubsystem/Fans + +##### FansCollection + +- Description +- Members +- Members@odata.count + ### /redfish/v1/Chassis/{ChassisId}/Power#/PowerControl/{ControlName}/ #### PowerControl -- cgit v1.2.3