From nobody Sun May 5 11:20:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+92333+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92333+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1660188240416967.8465692095072; Wed, 10 Aug 2022 20:24:00 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id VCafYY1788612xMwYVtOFwA0; Wed, 10 Aug 2022 20:24:00 -0700 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.63]) by mx.groups.io with SMTP id smtpd.web10.2358.1660188237976025748 for ; Wed, 10 Aug 2022 20:23:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PynE4LUhnrefO5tnUTtW3BohyHJhq+4Wxm9Bt88eaLdUBXpFzJdNgYQAVZdzaIH+X80JOQ6q7JZf6nmHC3SmckzFQT/jq6nuenoTyNPGz56P8emrzShjSzbpteQpK+E+1eeMG8uyAKy+fCX6lZvjChpcOrjJPnPnb0y+SuhyK+fLQBENbmUcPfoquyxCaNWavlltjCeLrzsr1gtTiXfhtEBvpbNR/GHMobSlZAdQIDbpZ+E834l1YY9MGvRa0HuSeRVw+zqmXNkFQv3Bt0kYz4j8axyWV06sS4lU7TgFnCsiGrs/Xit5+X9V4pXoFWMB7qj241BS6B8s2JBzn3eUYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BL15NqtHiTZyeeqYEO3NsX/sz00x+VDwIqne2cT3XA8=; b=fGrI5I3FqyzFNSqx5r/8l02C4pgRYK0QQD6u0u4eZR4aHCWUJOVlXX6jFhSDwWdVVFgZ6F+Mt048WvrFgTTY8G9TuaxcdDegBJxcu+tItD7PnE8nZKzhNOfTeJ5Y5EICfOm5S5B92CL13rlQqnL7kj5SM/hIlSkykkA20sUCyT+Q0dM7YkEy5YX2k2ZqBB8ett7jewS7WHUautkSge13D7nPWUJOOV6ycAJdbvoDK/qxNVZTcEG3HcL967QDCkCZWTe7JARK8uK1bsNiFTfdx3M4feP6DK2SyAFsOQCJpv4usFg3ILlNYAyY190Np1slkFTrs/gGW32cijILGYJd6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ami.com; dmarc=pass action=none header.from=ami.com; dkim=pass header.d=ami.com; arc=none X-Received: from BLAPR10MB5185.namprd10.prod.outlook.com (2603:10b6:208:328::16) by CH0PR10MB5244.namprd10.prod.outlook.com (2603:10b6:610:d9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5525.10; Thu, 11 Aug 2022 03:23:54 +0000 X-Received: from BLAPR10MB5185.namprd10.prod.outlook.com ([fe80::3007:4429:73e9:503e]) by BLAPR10MB5185.namprd10.prod.outlook.com ([fe80::3007:4429:73e9:503e%3]) with mapi id 15.20.5525.011; Thu, 11 Aug 2022 03:23:54 +0000 From: "Igor Kulchytskyy via groups.io" To: "devel@edk2.groups.io" CC: "Abner.Chang@amd.com" , "nickle.wang@hpe.com" , Igor Kulchytskyy , Abner Chang Subject: [edk2-devel] [PATCH V2] RedfishPkg: Redfish functions for REST requests are not fully spec complied Thread-Topic: [PATCH V2] RedfishPkg: Redfish functions for REST requests are not fully spec complied Thread-Index: AQHYrTHIQodcrRJaUUupliXvjjym4A== Date: Thu, 11 Aug 2022 03:23:54 +0000 Message-ID: <1660188224-18884-1-git-send-email-igork@ami.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7ab369ad-295f-4969-c3fa-08da7b48eb61 x-ms-traffictypediagnostic: CH0PR10MB5244:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: bQj8VnlZclsjGaPz28+Cwhk0OjyOhMq6zEVOZDd26URpnt5DF8aIay3spxL/GZwlApJsh/50xyiXTm+aRoqO6SzP5tFBcV1H8yD0cO7KouDDNEN+4HhPQaMZ2g5XJBxXG/FxgTFVMaMe9Zl681YcMmu47UGkLE/M0JXS+kXfaWrK2w5VLPnGs4EeasHOXC/v3MAjmJsdGBBtTrDqvjn4lKlt1ADtD8dAbEZX+px5dQ0E7dl2FdyZvtX+r8noTOTb+2Aaa/thKrviBs4veHz19glwPDvRDRICxoWxpyeSD599yjJZa5CSdmF7JqQHqPGVYZNjUWjmercTQ0O/0CqvtU0ZbndEKRd2zHMDmdCza1SI2oHoUDqpDGDjHR+L2YRf79oGeCQXDpi7g48MKDYdHfbSjdW2AZL66tRjjK1EGQhoMFP1vvJPWYlpQjXKfCBtdJf7rCYph4sdX716kQexPyWwjrWOMY46Pri97a50cTiFAgvCtgKwdQepEIGUx7ZRXaaHlY4LnWMfb72DLuVnFNDOpIMzhsYKt1/LoKf5Umq7cRtUDfOaZXimbQ1asJuxTcCeWdc/1XAsAlQUKduJVeawPN/WSrah5My6mVbXwilZVbwvdB9Utopys/eCWsSctLeU3UKA60GYbjzwQ91be0+qjem8nBG5tKDFruIPr2f+hqFEkOUJEnTuo0pJhSOdQ8voeWrN9zVbsHTvwZ0CP0KMUCDjiziEDjmKAI+OVhOR++LQflNg4p9DLaa+Z4fGocrvuv8heol5FdOtbTwW190+aCJDXh1qmyJ2yqAf7Cvjxp9IESrtCReON8OOhJbRp49UdUZ9QVBxMzDd1p2BadPVeRdXbkhEzOKuGiW87Cr4NU+4EnjkuPKt/XkMfoU1BN1nApMBDwYzdp1VraI2gw== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?gjeAheCsSgRjedXXnSQ5HFfBXFk8h9+zl9rySl9wVc6H8J3Pa7/a0518Fr?= =?iso-8859-1?Q?QTliEOWeGp0beQdxk1hlnexBmH1kl2Onp5dY5HM1Za7h6TZDAG14PHj691?= =?iso-8859-1?Q?jzHnNBGvJo7BJjgs3wOou/ZX/JnLWacgIinws1K8iiD6z3+VSYcatEyHeu?= =?iso-8859-1?Q?z6FrzqLfaXMCwYpe76duJBIUEX72wnxakRH1vKAjwwWUBOPWo1vZol5/te?= =?iso-8859-1?Q?fD8wT7RAFv/+Gtlug5ExU5o0z7sr6I7c21gosOqIU3LCUj59d7rQByH80a?= =?iso-8859-1?Q?pv8FTwFu7Yw7SnmplASH7vRlxgnYgiIiEGU9e2Gf/1HDbRwPTV5XAb2P9j?= =?iso-8859-1?Q?bs4/kAyKXonsZht+0oqoYdDEyV/avK7lKV9UveR038b1EGTL9vUnt4YcsW?= =?iso-8859-1?Q?oUSGwWuJD0EkdsRrMtzAcVB2SBXWQyOyv52N/MTSIy6565fEin4L2D93WQ?= =?iso-8859-1?Q?/5a0KxNOh8ldFThID6eVS/c4IHINmsakpWuZYA9fzyg0PIiJUPESnt4nEu?= =?iso-8859-1?Q?VrKbMnn08iXsK3MHuClcecUbdi8/U9aVocMBeJMoeWNyNFAZVqI23yzMGY?= =?iso-8859-1?Q?HTqBD5A4xBXvWo7g2DmlGWCdkybsl66qaeyvd/Ya4WjdCo55kHwqQjHvKR?= =?iso-8859-1?Q?oY/+N4A+g9373E4X6dMbKBR3frNffwyf5jjf5oQdGqYUvf6SEzANrNNvjL?= =?iso-8859-1?Q?6nl07NjOlTT5PIMBIPNGvRzO+KS2AKcVf2SFKBiUBivwIbU+r9cd0p6i2w?= =?iso-8859-1?Q?1oMe7neNUeU9plU72dYjmj2DRKUrDRg/Dz4UKq222FjXIz4pUY1nYErQmb?= =?iso-8859-1?Q?Yh7tW6X0pjUSvkL8XCEvNOSG5GYn2zi3lUulU0EGDduKfgu6LCc4BAy2pO?= =?iso-8859-1?Q?NT8YdhkaUz9Q2QivjNSLSmwG0I196T54QeCLeDy7TcoLPIkMW/y300qJPy?= =?iso-8859-1?Q?piP7F3yGZzFxxKJXvsVbP+vkghZJFu7iU82PZkIRggrr32j39SgkRmsccm?= =?iso-8859-1?Q?/07K2sPogXbDCF5VK/c+niEXMBqg0bQfT0ICIGCqGLWq3wj5Y/DBayZeFv?= =?iso-8859-1?Q?LMxw4PTyXD/fsxTfUhsFe7r9xuPpDEvk9WHDMH8Bd51HQh40uwgaC1uxH5?= =?iso-8859-1?Q?tL7HEy8492N3t7Ht5MoaTNSDOXjqcQwnrEDj8bfJKOBIwkt+yZbCsvYFTf?= =?iso-8859-1?Q?SjgRL5Y7VKs3bY9VQMvDQi5qIWDh3btnU9qfapEEmKdbN2I49/iGmAHQFE?= =?iso-8859-1?Q?jQEMafEomwyMgmDuSq1I2Z8NOILwcz1gCYsy6YICFBgVJ67wYTZJnc6ps7?= =?iso-8859-1?Q?+q0pHW9nZ544K1czkFJOA6HkI8gosb66trHXh438Hs9eWxzFqNkKVekDbr?= =?iso-8859-1?Q?Q0BPNu6R18BwsNVw5ouAs3U72oPNYP13LYLL34jOBgiyM6y1IV/TIEryDB?= =?iso-8859-1?Q?BlOIq0DucTI6jUc8PZRKLORNwtcZVW4xrmY4keAN0PNRGJI+KE3+gGKjQa?= =?iso-8859-1?Q?7M8Ux8g3b4P4wu+TafJXbdn+r1Fb3RY0qjclJsXk2+yFAw4qhBhTEWGiCK?= =?iso-8859-1?Q?QxF0ss0UFVs9nxd4TbY+g4YHz4c6a9Xu7jZvn98n71jpe4tNOrF0Qd0les?= =?iso-8859-1?Q?a4jcjbgxkr1J1Sm8Ekt/Kns6gjj4J1o/sC?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5185.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ab369ad-295f-4969-c3fa-08da7b48eb61 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Aug 2022 03:23:54.3105 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xj4a+gTsbP6fnjd/VWyzKGTOKgbJI/OIUdAxUL+ST83WLCK0S8MV7n/LYcAD0lRx X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB5244 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,igork@ami.com X-Gm-Message-State: tr7aZPLiKdLWeChWPkNaHqF6x1787277AA= Content-Language: en-US Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1660188240; bh=yRTp+kAMfHRBcOYdxGRL0AhUspnyi6ERdcNk9aRsFb8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=jXjjoqnzUCb+AqE70GuSCQnPg4JCQJYqQIHJq36d6sW/AdP+IAfMFmKD++MLgx/5tzi gBXtBhdCZkcO0N5zkoDGpNHwCbLItCJDCCY8BtDB631OVV7fnPdc+DWbyTIZ19gOCOr8M UNb5VPudGLxndOr4fwHUvURtllTDCN9nY5c= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1660188242269100003 Content-Type: text/plain; charset="utf-8" There is no function to send POST request with the ContentType different from "application\json". There is no function to send DELETE request with the body. Cc: Abner Chang Cc: Nickle Wang Signed-off-by: Igor Kulchytskyy --- RedfishPkg/Include/Library/RedfishLib.h = | 696 ++++++++++++++++++++ RedfishPkg/PrivateInclude/Library/RedfishLib.h = | 616 ----------------- RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c = | 189 ++++++ RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishService= .h | 8 + RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c = | 41 +- RedfishPkg/RedfishPkg.dec = | 2 +- 6 files changed, 933 insertions(+), 619 deletions(-) diff --git a/RedfishPkg/Include/Library/RedfishLib.h b/RedfishPkg/Include/L= ibrary/RedfishLib.h new file mode 100644 index 0000000..a32d49b --- /dev/null +++ b/RedfishPkg/Include/Library/RedfishLib.h @@ -0,0 +1,696 @@ +/** @file + This library provides a set of utility APIs that allow to create/read/up= date/delete + (CRUD) Redfish resources and provide basic query abilities by using [URI= /RedPath] + (https://github.com/DMTF/libredfish). + + The query language is based on XPath (https://www.w3.org/TR/1999/REC-xpa= th-19991116/). + This library and query language essentially treat the entire Redfish Ser= vice like it + was a single JSON document. In other words whenever it encounters an oda= ta.id in JSON + document, it will retrieve the new JSON document (if needed). We name th= e path as + RedPath: + + Expression Description + + nodename Selects the JSON entity with the name "nodename". + If the value of nodename is an object with "@odata.id", + it will continue get the value from "@odata.id". + + / Selects from the root node + + [index] Selects the index number JSON entity from an array or + object. If the JSON entity is one collection (has + Members & Members@odata.count), means to get the index + member in "Members". Index number >=3D1, 1 means to ret= urn + the first instance. + + [XXX] Operation on JSON entity. + If the JSON entity is one collection (has Members & + Members@odata.count), means to get all elements in + "Members". If the JSON entity is one array, means to + get all elements in array. Others will match the nodena= me + directly (e.g. JSON_OBJECT, JSON_STRING, JSON_TRUE, + JSON_FALSE, JSON_INTEGER). + + [nodename] Selects all the elements from an JSON entity that + contain a property named "nodename" + + [name=3Dvalue] Selects all the elements from an JSON entity where + the property "name" is equal to "value" + + [name~value] Selects all the elements from an JSON entity where + the string property "name" is equal to "value" using + case insensitive comparison. + + [namevalue] Selects all the elements from an JSON entity where + the property "name" is greater than "value" + + [name>=3Dvalue] Selects all the elements from an JSON entity where + the property "name" is greater than or equal to "value" + + Some examples: + + /v1/Chassis[1] - Will return the first Chassis instance. + /v1/Chassis[SKU=3D1234] - Will return all Chassis instances with a SKU= field equal to 1234. + /v1/Systems[Storage] - Will return all the System instances that have= Storage field populated. + + Copyright (c) 2019, Intel Corporation. All rights reserved.
+ (C) Copyright 2021 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef REDFISH_LIB_H_ +#define REDFISH_LIB_H_ + +#include + +#include +#include + +#define ODATA_TYPE_NAME_MAX_SIZE 128 +#define ODATA_TYPE_MAX_SIZE 128 + +/// +/// Library class public defines +/// +typedef VOID *REDFISH_SERVICE; +typedef VOID *REDFISH_PAYLOAD; + +/// +/// Library class public structures/unions +/// +typedef struct { + EFI_HTTP_STATUS_CODE *StatusCode; + UINTN HeaderCount; + EFI_HTTP_HEADER *Headers; + REDFISH_PAYLOAD Payload; +} REDFISH_RESPONSE; + +/// +/// Odata type-name mapping structure. +/// +typedef struct { + CONST CHAR8 OdataTypeName[ODATA_TYPE_NAME_MAX_SIZE]; + CONST CHAR8 OdataType[ODATA_TYPE_MAX_SIZE]; +} REDFISH_ODATA_TYPE_MAPPING; + +/** + This function uses REST EX protocol provided in RedfishConfigServiceInfo. + The service enumerator will also handle the authentication flow automati= cally + if HTTP basic auth or Redfish session login is configured to use. + + Callers are responsible for freeing the returned service by RedfishClean= upService(). + + @param[in] RedfishConfigServiceInfo Redfish service information the EFI= Redfish + feature driver communicates with. + + @return New created Redfish Service, or NULL if error happens. + +**/ +REDFISH_SERVICE +EFIAPI +RedfishCreateService ( + IN REDFISH_CONFIG_SERVICE_INFORMATION *RedfishConfigServiceInfo + ); + +/** + Free the Service and all its related resources. + + @param[in] RedfishService The Service to access the Redfish resou= rces. + +**/ +VOID +EFIAPI +RedfishCleanupService ( + IN REDFISH_SERVICE RedfishService + ); + +/** + Create REDFISH_PAYLOAD instance in local with JSON represented resource = value and + the Redfish Service. + + The returned REDFISH_PAYLOAD can be used to create or update Redfish res= ource in + server side. + + Callers are responsible for freeing the returned payload by RedfishClean= upPayload(). + + @param[in] Value JSON Value of the redfish resource. + @param[in] RedfishService The Service to access the Redfish re= sources. + + @return REDFISH_PAYLOAD instance of the resource, or NULL if error h= appens. + +**/ +REDFISH_PAYLOAD +EFIAPI +RedfishCreatePayload ( + IN EDKII_JSON_VALUE Value, + IN REDFISH_SERVICE RedfishService + ); + +/** + Free the RedfishPayload and all its related resources. + + @param[in] Payload Payload to be freed. + +**/ +VOID +EFIAPI +RedfishCleanupPayload ( + IN REDFISH_PAYLOAD Payload + ); + +/** + This function returns the decoded JSON value of a REDFISH_PAYLOAD. + + Caller doesn't need to free the returned JSON value because it will be r= eleased + in corresponding RedfishCleanupPayload() function. + + @param[in] Payload A REDFISH_PAYLOAD instance. + + @return Decoded JSON value of the payload. + +**/ +EDKII_JSON_VALUE +EFIAPI +RedfishJsonInPayload ( + IN REDFISH_PAYLOAD Payload + ); + +/** + Fill the input RedPath string with system UUID from SMBIOS table or use = the customized + ID if FromSmbios =3D=3D FALSE. + + This is a helper function to build a RedPath string which can be used to= address + a Redfish resource for this computer system. The input PathString must h= ave a Systems + note in format of "Systems[UUID=3D%g]" or "Systems[UUID~%g]" to fill the= UUID value. + + Example: + Use "/v1/Systems[UUID=3D%g]/Bios" to build a RedPath to address the "B= ios" resource + for this computer system. + + @param[in] RedPath RedPath format to be build. + @param[in] FromSmbios Get system UUID from SMBIOS as computer sys= tem instance ID. + @param[in] IdString The computer system instance ID. + + @return Full RedPath with system UUID inside, or NULL if error happe= ns. + +**/ +CHAR8 * +EFIAPI +RedfishBuildPathWithSystemUuid ( + IN CONST CHAR8 *RedPath, + IN BOOLEAN FromSmbios, + IN CHAR8 *IdString OPTIONAL + ); + +/** + Get a redfish response addressed by a RedPath string, including HTTP Sta= tusCode, Headers + and Payload which record any HTTP response messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] RedfishService The Service to access the Redfish re= sources. + @param[in] RedPath RedPath string to address a resource= , must start + from the root node. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX. The correspon= ding redfish resource has + been returned in Payload within RedRespo= nse. + @retval EFI_INVALID_PARAMETER RedfishService, RedPath, or RedResponse = is NULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned Payload is NULL, indi= cates any error happen. + 2. If the returned StatusCode is NULL, i= ndicates any error happen. + 3. If the returned StatusCode is not 2XX= , indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishGetByService ( + IN REDFISH_SERVICE RedfishService, + IN CONST CHAR8 *RedPath, + OUT REDFISH_RESPONSE *RedResponse + ); + +/** + Get a redfish response addressed by URI, including HTTP StatusCode, Head= ers + and Payload which record any HTTP response messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] RedfishService The Service to access the URI resources. + @param[in] URI String to address a resource. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX. The correspon= ding redfish resource has + been returned in Payload within RedRespo= nse. + @retval EFI_INVALID_PARAMETER RedfishService, RedPath, or RedResponse = is NULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned Payload is NULL, indi= cates any error happen. + 2. If the returned StatusCode is NULL, i= ndicates any error happen. + 3. If the returned StatusCode is not 2XX= , indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishGetByUri ( + IN REDFISH_SERVICE RedfishService, + IN CONST CHAR8 *Uri, + OUT REDFISH_RESPONSE *RedResponse + ); + +/** + Get a redfish response addressed by the input Payload and relative RedPa= th string, + including HTTP StatusCode, Headers and Payload which record any HTTP res= ponse messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] Payload A existing REDFISH_PAYLOAD instance. + @param[in] RedPath Relative RedPath string to address a res= ource inside Payload. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful: + 1. The HTTP StatusCode is NULL and the r= eturned Payload in + RedResponse is not NULL, indicates the R= edfish resource has + been parsed from the input payload direc= tly. + 2. The HTTP StatusCode is not NULL and t= he value is 2XX, + indicates the corresponding redfish reso= urce has been returned + in Payload within RedResponse. + @retval EFI_INVALID_PARAMETER Payload, RedPath, or RedResponse is NULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned Payload is NULL, indi= cates any error happen. + 2. If StatusCode is not NULL and the ret= urned value of StatusCode + is not 2XX, indicates any error happe= n. +**/ +EFI_STATUS +EFIAPI +RedfishGetByPayload ( + IN REDFISH_PAYLOAD Payload, + IN CONST CHAR8 *RedPath, + OUT REDFISH_RESPONSE *RedResponse + ); + +/** + Use HTTP PATCH to perform updates on pre-existing Redfish resource. + + This function uses the RedfishService to patch a Redfish resource addres= sed by + Uri (only the relative path is required). Changes to one or more propert= ies within + the target resource are represented in the input Content, properties not= specified + in Content won't be changed by this request. The corresponding redfish r= esponse will + returned, including HTTP StatusCode, Headers and Payload which record an= y HTTP response + messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] RedfishService The Service to access the Redfish re= sources. + @param[in] Uri Relative path to address the resourc= e. + @param[in] Content JSON represented properties to be up= date. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX. The Redfish r= esource will be returned + in Payload within RedResponse if server = send it back in the HTTP + response message body. + @retval EFI_INVALID_PARAMETER RedfishService, Uri, Content, or RedResp= onse is NULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned StatusCode is NULL, i= ndicates any error happen. + 2. If the returned StatusCode is not NUL= L and the value is not 2XX, + indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishPatchToUri ( + IN REDFISH_SERVICE RedfishService, + IN CONST CHAR8 *Uri, + IN CONST CHAR8 *Content, + OUT REDFISH_RESPONSE *RedResponse + ); + +/** + Use HTTP PATCH to perform updates on target payload. Patch to odata.id i= n Payload directly. + + This function uses the Payload to patch the Target. Changes to one or mo= re properties + within the target resource are represented in the input Payload, propert= ies not specified + in Payload won't be changed by this request. The corresponding redfish r= esponse will + returned, including HTTP StatusCode, Headers and Payload which record an= y HTTP response + messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] Target The target payload to be updated. + @param[in] Payload Palyoad with properties to be changed. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX. The Redfish r= esource will be returned + in Payload within RedResponse if server = send it back in the HTTP + response message body. + @retval EFI_INVALID_PARAMETER Target, Payload, or RedResponse is NULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned StatusCode is NULL, i= ndicates any error happen. + 2. If the returned StatusCode is not NUL= L and the value is not 2XX, + indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishPatchToPayload ( + IN REDFISH_PAYLOAD Target, + IN REDFISH_PAYLOAD Payload, + OUT REDFISH_RESPONSE *RedResponse + ); + + +/** + Use HTTP POST to create new Redfish resource in the Resource Collection. + + The POST request should be submitted to the Resource Collection in which= the new resource + is to belong. The Resource Collection is addressed by URI. The Redfish m= ay + ignore any service controlled properties. The corresponding redfish resp= onse will returned, + including HTTP StatusCode, Headers and Payload which record any HTTP res= ponse messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] RedfishService The Service to access the Redfish re= sources. + @param[in] Uri Relative path to address the resourc= e. + @param[in] Content JSON represented properties to be up= date. + @param[in] ContentSize Size of the Content to be send to Re= dfish service + @param[in] ContentType Type of the Content to be send to Re= dfish service + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX. The Redfish r= esource will be returned + in Payload within RedResponse if server = send it back in the HTTP + response message body. + @retval EFI_INVALID_PARAMETER RedfishService, Uri, Content, or RedResp= onse is NULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned StatusCode is NULL, i= ndicates any error happen. + 2. If the returned StatusCode is not NUL= L and the value is not 2XX, + indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishPostToUriEx ( + IN REDFISH_SERVICE RedfishService, + IN CONST CHAR8 *Uri, + IN CONST CHAR8 *Content, + IN UINTN ContentSize, + IN CONST CHAR8 *ContentType, + OUT REDFISH_RESPONSE *RedResponse + ); + + +/** + Use HTTP POST to create a new resource in target payload. + + The POST request should be submitted to the Resource Collection in which= the new resource + is to belong. The Resource Collection is addressed by Target payload. Th= e Redfish may + ignore any service controlled properties. The corresponding redfish resp= onse will returned, + including HTTP StatusCode, Headers and Payload which record any HTTP res= ponse messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] Target Target payload of the Resource Collection. + @param[in] Payload The new resource to be created. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX. The Redfish r= esource will be returned + in Payload within RedResponse if server = send it back in the HTTP + response message body. + @retval EFI_INVALID_PARAMETER Target, Payload, or RedResponse is NULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned StatusCode is NULL, i= ndicates any error happen. + 2. If the returned StatusCode is not NUL= L and the value is not 2XX, + indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishPostToPayload ( + IN REDFISH_PAYLOAD Target, + IN REDFISH_PAYLOAD Payload, + OUT REDFISH_RESPONSE *RedResponse + ); + +/** + Use HTTP DELETE to remove a resource. + + This function uses the RedfishService to remove a Redfish resource which= is addressed + by input Uri (only the relative path is required). The corresponding red= fish response will + returned, including HTTP StatusCode, Headers and Payload which record an= y HTTP response + messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] RedfishService The Service to access the Redfish re= sources. + @param[in] Uri Relative path to address the resourc= e. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX, the Redfish r= esource has been removed. + If there is any message returned from se= rver, it will be returned + in Payload within RedResponse. + @retval EFI_INVALID_PARAMETER RedfishService, Uri, or RedResponse is N= ULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned StatusCode is NULL, i= ndicates any error happen. + 2. If the returned StatusCode is not NUL= L and the value is not 2XX, + indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishDeleteByUri ( + IN REDFISH_SERVICE RedfishService, + IN CONST CHAR8 *Uri, + OUT REDFISH_RESPONSE *RedResponse + ); + +/** + Use HTTP DELETE to remove a resource. + + This function uses the RedfishService to remove a Redfish resource which= is addressed + by input Uri (only the relative path is required). The corresponding red= fish response will + returned, including HTTP StatusCode, Headers and Payload which record an= y HTTP response + messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] RedfishService The Service to access the Redfish re= sources. + @param[in] Uri Relative path to address the resourc= e. + @param[in] Content JSON represented properties to be de= leted. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX, the Redfish r= esource has been removed. + If there is any message returned from se= rver, it will be returned + in Payload within RedResponse. + @retval EFI_INVALID_PARAMETER RedfishService, Uri, or RedResponse is N= ULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned StatusCode is NULL, i= ndicates any error happen. + 2. If the returned StatusCode is not NUL= L and the value is not 2XX, + indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishDeleteByUriEx ( + IN REDFISH_SERVICE RedfishService, + IN CONST CHAR8 *Uri, + IN CONST CHAR8 *Content, + OUT REDFISH_RESPONSE *RedResponse + ); + +/** + Dump text in fractions. + + @param[in] String ASCII string to dump. + +**/ +VOID +RedfishDumpJsonStringFractions ( + IN CHAR8 *String + ); + +/** + Extract the JSON text content from REDFISH_PAYLOAD and dump to debug con= sole. + + @param[in] Payload The Redfish payload to dump. + +**/ +VOID +RedfishDumpPayload ( + IN REDFISH_PAYLOAD Payload + ); + +/** + Dump text in JSON value. + + @param[in] JsonValue The Redfish JSON value to dump. + +**/ +VOID +RedfishDumpJson ( + IN EDKII_JSON_VALUE JsonValue + ); + +/** + This function will cleanup the HTTP header and Redfish payload resources. + + @param[in] StatusCode The status code in HTTP response message. + @param[in] HeaderCount Number of HTTP header structures in Header= s list. + @param[in] Headers Array containing list of HTTP headers. + @param[in] Payload The Redfish payload to dump. + +**/ +VOID +RedfishFreeResponse ( + IN EFI_HTTP_STATUS_CODE *StatusCode, + IN UINTN HeaderCount, + IN EFI_HTTP_HEADER *Headers, + IN REDFISH_PAYLOAD Payload + ); + +/** + Check if the "@odata.type" in Payload is valid or not. + + @param[in] Payload The Redfish payload to be checked. + @param[in] OdataTypeName OdataType will be retrived from map= ping list. + @param[in] OdataTypeMappingList The list of OdataType. + @param[in] OdataTypeMappingListSize The number of mapping list + + @return TRUE if the "@odata.type" in Payload is valid, otherwise FALSE. + +**/ +BOOLEAN +RedfishIsValidOdataType ( + IN REDFISH_PAYLOAD Payload, + IN CONST CHAR8 *OdataTypeName, + IN REDFISH_ODATA_TYPE_MAPPING *OdataTypeMappingList, + IN UINTN OdataTypeMappingListSize + ); + +/** + Check if the payload is collection + + @param[in] Payload The Redfish payload to be checked. + + @return TRUE if the payload is collection. + +**/ +BOOLEAN +RedfishIsPayloadCollection ( + IN REDFISH_PAYLOAD Payload + ); + +/** + Get collection size. + + @param[in] Payload The Redfish collection payload + @param[in] CollectionSize Size of this collection + + @return EFI_SUCCESS Coolection size is returned in Collecti= onSize + @return EFI_INVALID_PARAMETER The payload is not a collection. +**/ +EFI_STATUS +RedfishGetCollectionSize ( + IN REDFISH_PAYLOAD Payload, + IN UINTN *CollectionSize + ); + +/** + Get Redfish payload of collection member + + @param[in] Payload The Redfish collection payload + @param[in] Index Index of collection member + + @return NULL Fail to get collection member. + @return Non NULL Payload is returned. +**/ +REDFISH_PAYLOAD +RedfishGetPayloadByIndex ( + IN REDFISH_PAYLOAD Payload, + IN UINTN Index + ); + +/** + Check and return Redfish resource of the given Redpath. + + @param[in] RedfishService Pointer to REDFISH_SERVICE + @param[in] Redpath Redpath of the resource. + @param[in] Response Optional return the resource. + + @return EFI_STATUS +**/ +EFI_STATUS +RedfishCheckIfRedpathExist ( + IN REDFISH_SERVICE RedfishService, + IN CHAR8 *Redpath, + IN REDFISH_RESPONSE *Response OPTIONAL + ); + +/** + This function returns the string of Redfish service version. + + @param[in] RedfishService Redfish service instance. + @param[out] ServiceVersionStr Redfish service string. + + @return EFI_STATUS + +**/ +EFI_STATUS +RedfishGetServiceVersion ( + IN REDFISH_SERVICE RedfishService, + OUT CHAR8 **ServiceVersionStr + ); + +/** + This function returns the string of Redfish service version. + + @param[in] ServiceVerisonStr The string of Redfish service version. + @param[in] Url The URL to build Redpath with ID. + Start with "/", for example "/Registries" + @param[in] Id ID string + @param[out] Redpath Pointer to retrive Redpath, caller has to= free + the memory allocated for this string. + @return EFI_STATUS + +**/ +EFI_STATUS +RedfishBuildRedpathUseId ( + IN CHAR8 *ServiceVerisonStr, + IN CHAR8 *Url, + IN CHAR8 *Id, + OUT CHAR8 **Redpath + ); + +#endif diff --git a/RedfishPkg/PrivateInclude/Library/RedfishLib.h b/RedfishPkg/Pr= ivateInclude/Library/RedfishLib.h deleted file mode 100644 index b2488ab..0000000 --- a/RedfishPkg/PrivateInclude/Library/RedfishLib.h +++ /dev/null @@ -1,616 +0,0 @@ -/** @file - This library provides a set of utility APIs that allow to create/read/up= date/delete - (CRUD) Redfish resources and provide basic query abilities by using [URI= /RedPath] - (https://github.com/DMTF/libredfish). - - The query language is based on XPath (https://www.w3.org/TR/1999/REC-xpa= th-19991116/). - This library and query language essentially treat the entire Redfish Ser= vice like it - was a single JSON document. In other words whenever it encounters an oda= ta.id in JSON - document, it will retrieve the new JSON document (if needed). We name th= e path as - RedPath: - - Expression Description - - nodename Selects the JSON entity with the name "nodename". - If the value of nodename is an object with "@odata.id", - it will continue get the value from "@odata.id". - - / Selects from the root node - - [index] Selects the index number JSON entity from an array or - object. If the JSON entity is one collection (has - Members & Members@odata.count), means to get the index - member in "Members". Index number >=3D1, 1 means to ret= urn - the first instance. - - [XXX] Operation on JSON entity. - If the JSON entity is one collection (has Members & - Members@odata.count), means to get all elements in - "Members". If the JSON entity is one array, means to - get all elements in array. Others will match the nodena= me - directly (e.g. JSON_OBJECT, JSON_STRING, JSON_TRUE, - JSON_FALSE, JSON_INTEGER). - - [nodename] Selects all the elements from an JSON entity that - contain a property named "nodename" - - [name=3Dvalue] Selects all the elements from an JSON entity where - the property "name" is equal to "value" - - [name~value] Selects all the elements from an JSON entity where - the string property "name" is equal to "value" using - case insensitive comparison. - - [namevalue] Selects all the elements from an JSON entity where - the property "name" is greater than "value" - - [name>=3Dvalue] Selects all the elements from an JSON entity where - the property "name" is greater than or equal to "value" - - Some examples: - - /v1/Chassis[1] - Will return the first Chassis instance. - /v1/Chassis[SKU=3D1234] - Will return all Chassis instances with a SKU= field equal to 1234. - /v1/Systems[Storage] - Will return all the System instances that have= Storage field populated. - - Copyright (c) 2019, Intel Corporation. All rights reserved.
- (C) Copyright 2021 Hewlett Packard Enterprise Development LP
- - SPDX-License-Identifier: BSD-2-Clause-Patent - -**/ - -#ifndef REDFISH_LIB_H_ -#define REDFISH_LIB_H_ - -#include - -#include -#include - -#define ODATA_TYPE_NAME_MAX_SIZE 128 -#define ODATA_TYPE_MAX_SIZE 128 - -/// -/// Library class public defines -/// -typedef VOID *REDFISH_SERVICE; -typedef VOID *REDFISH_PAYLOAD; - -/// -/// Library class public structures/unions -/// -typedef struct { - EFI_HTTP_STATUS_CODE *StatusCode; - UINTN HeaderCount; - EFI_HTTP_HEADER *Headers; - REDFISH_PAYLOAD Payload; -} REDFISH_RESPONSE; - -/// -/// Odata type-name mapping structure. -/// -typedef struct { - CONST CHAR8 OdataTypeName[ODATA_TYPE_NAME_MAX_SIZE]; - CONST CHAR8 OdataType[ODATA_TYPE_MAX_SIZE]; -} REDFISH_ODATA_TYPE_MAPPING; - -/** - This function uses REST EX protocol provided in RedfishConfigServiceInfo. - The service enumerator will also handle the authentication flow automati= cally - if HTTP basic auth or Redfish session login is configured to use. - - Callers are responsible for freeing the returned service by RedfishClean= upService(). - - @param[in] RedfishConfigServiceInfo Redfish service information the EFI= Redfish - feature driver communicates with. - - @return New created Redfish Service, or NULL if error happens. - -**/ -REDFISH_SERVICE -EFIAPI -RedfishCreateService ( - IN REDFISH_CONFIG_SERVICE_INFORMATION *RedfishConfigServiceInfo - ); - -/** - Free the Service and all its related resources. - - @param[in] RedfishService The Service to access the Redfish resou= rces. - -**/ -VOID -EFIAPI -RedfishCleanupService ( - IN REDFISH_SERVICE RedfishService - ); - -/** - Create REDFISH_PAYLOAD instance in local with JSON represented resource = value and - the Redfish Service. - - The returned REDFISH_PAYLOAD can be used to create or update Redfish res= ource in - server side. - - Callers are responsible for freeing the returned payload by RedfishClean= upPayload(). - - @param[in] Value JSON Value of the redfish resource. - @param[in] RedfishService The Service to access the Redfish re= sources. - - @return REDFISH_PAYLOAD instance of the resource, or NULL if error h= appens. - -**/ -REDFISH_PAYLOAD -EFIAPI -RedfishCreatePayload ( - IN EDKII_JSON_VALUE Value, - IN REDFISH_SERVICE RedfishService - ); - -/** - Free the RedfishPayload and all its related resources. - - @param[in] Payload Payload to be freed. - -**/ -VOID -EFIAPI -RedfishCleanupPayload ( - IN REDFISH_PAYLOAD Payload - ); - -/** - This function returns the decoded JSON value of a REDFISH_PAYLOAD. - - Caller doesn't need to free the returned JSON value because it will be r= eleased - in corresponding RedfishCleanupPayload() function. - - @param[in] Payload A REDFISH_PAYLOAD instance. - - @return Decoded JSON value of the payload. - -**/ -EDKII_JSON_VALUE -EFIAPI -RedfishJsonInPayload ( - IN REDFISH_PAYLOAD Payload - ); - -/** - Fill the input RedPath string with system UUID from SMBIOS table or use = the customized - ID if FromSmbios =3D=3D FALSE. - - This is a helper function to build a RedPath string which can be used to= address - a Redfish resource for this computer system. The input PathString must h= ave a Systems - note in format of "Systems[UUID=3D%g]" or "Systems[UUID~%g]" to fill the= UUID value. - - Example: - Use "/v1/Systems[UUID=3D%g]/Bios" to build a RedPath to address the "B= ios" resource - for this computer system. - - @param[in] RedPath RedPath format to be build. - @param[in] FromSmbios Get system UUID from SMBIOS as computer sys= tem instance ID. - @param[in] IdString The computer system instance ID. - - @return Full RedPath with system UUID inside, or NULL if error happe= ns. - -**/ -CHAR8 * -EFIAPI -RedfishBuildPathWithSystemUuid ( - IN CONST CHAR8 *RedPath, - IN BOOLEAN FromSmbios, - IN CHAR8 *IdString OPTIONAL - ); - -/** - Get a redfish response addressed by a RedPath string, including HTTP Sta= tusCode, Headers - and Payload which record any HTTP response messages. - - Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in - redfish response data. - - @param[in] RedfishService The Service to access the Redfish re= sources. - @param[in] RedPath RedPath string to address a resource= , must start - from the root node. - @param[out] RedResponse Pointer to the Redfish response data. - - @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not - NULL and the value is 2XX. The correspon= ding redfish resource has - been returned in Payload within RedRespo= nse. - @retval EFI_INVALID_PARAMETER RedfishService, RedPath, or RedResponse = is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get - more error info from returned HTTP Statu= sCode, Headers and Payload - within RedResponse: - 1. If the returned Payload is NULL, indi= cates any error happen. - 2. If the returned StatusCode is NULL, i= ndicates any error happen. - 3. If the returned StatusCode is not 2XX= , indicates any error happen. -**/ -EFI_STATUS -EFIAPI -RedfishGetByService ( - IN REDFISH_SERVICE RedfishService, - IN CONST CHAR8 *RedPath, - OUT REDFISH_RESPONSE *RedResponse - ); - -/** - Get a redfish response addressed by URI, including HTTP StatusCode, Head= ers - and Payload which record any HTTP response messages. - - Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in - redfish response data. - - @param[in] RedfishService The Service to access the URI resources. - @param[in] URI String to address a resource. - @param[out] RedResponse Pointer to the Redfish response data. - - @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not - NULL and the value is 2XX. The correspon= ding redfish resource has - been returned in Payload within RedRespo= nse. - @retval EFI_INVALID_PARAMETER RedfishService, RedPath, or RedResponse = is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get - more error info from returned HTTP Statu= sCode, Headers and Payload - within RedResponse: - 1. If the returned Payload is NULL, indi= cates any error happen. - 2. If the returned StatusCode is NULL, i= ndicates any error happen. - 3. If the returned StatusCode is not 2XX= , indicates any error happen. -**/ -EFI_STATUS -EFIAPI -RedfishGetByUri ( - IN REDFISH_SERVICE RedfishService, - IN CONST CHAR8 *Uri, - OUT REDFISH_RESPONSE *RedResponse - ); - -/** - Get a redfish response addressed by the input Payload and relative RedPa= th string, - including HTTP StatusCode, Headers and Payload which record any HTTP res= ponse messages. - - Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in - redfish response data. - - @param[in] Payload A existing REDFISH_PAYLOAD instance. - @param[in] RedPath Relative RedPath string to address a res= ource inside Payload. - @param[out] RedResponse Pointer to the Redfish response data. - - @retval EFI_SUCCESS The opeartion is successful: - 1. The HTTP StatusCode is NULL and the r= eturned Payload in - RedResponse is not NULL, indicates the R= edfish resource has - been parsed from the input payload direc= tly. - 2. The HTTP StatusCode is not NULL and t= he value is 2XX, - indicates the corresponding redfish reso= urce has been returned - in Payload within RedResponse. - @retval EFI_INVALID_PARAMETER Payload, RedPath, or RedResponse is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get - more error info from returned HTTP Statu= sCode, Headers and Payload - within RedResponse: - 1. If the returned Payload is NULL, indi= cates any error happen. - 2. If StatusCode is not NULL and the ret= urned value of StatusCode - is not 2XX, indicates any error happe= n. -**/ -EFI_STATUS -EFIAPI -RedfishGetByPayload ( - IN REDFISH_PAYLOAD Payload, - IN CONST CHAR8 *RedPath, - OUT REDFISH_RESPONSE *RedResponse - ); - -/** - Use HTTP PATCH to perform updates on pre-existing Redfish resource. - - This function uses the RedfishService to patch a Redfish resource addres= sed by - Uri (only the relative path is required). Changes to one or more propert= ies within - the target resource are represented in the input Content, properties not= specified - in Content won't be changed by this request. The corresponding redfish r= esponse will - returned, including HTTP StatusCode, Headers and Payload which record an= y HTTP response - messages. - - Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in - redfish response data. - - @param[in] RedfishService The Service to access the Redfish re= sources. - @param[in] Uri Relative path to address the resourc= e. - @param[in] Content JSON represented properties to be up= date. - @param[out] RedResponse Pointer to the Redfish response data. - - @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not - NULL and the value is 2XX. The Redfish r= esource will be returned - in Payload within RedResponse if server = send it back in the HTTP - response message body. - @retval EFI_INVALID_PARAMETER RedfishService, Uri, Content, or RedResp= onse is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get - more error info from returned HTTP Statu= sCode, Headers and Payload - within RedResponse: - 1. If the returned StatusCode is NULL, i= ndicates any error happen. - 2. If the returned StatusCode is not NUL= L and the value is not 2XX, - indicates any error happen. -**/ -EFI_STATUS -EFIAPI -RedfishPatchToUri ( - IN REDFISH_SERVICE RedfishService, - IN CONST CHAR8 *Uri, - IN CONST CHAR8 *Content, - OUT REDFISH_RESPONSE *RedResponse - ); - -/** - Use HTTP PATCH to perform updates on target payload. Patch to odata.id i= n Payload directly. - - This function uses the Payload to patch the Target. Changes to one or mo= re properties - within the target resource are represented in the input Payload, propert= ies not specified - in Payload won't be changed by this request. The corresponding redfish r= esponse will - returned, including HTTP StatusCode, Headers and Payload which record an= y HTTP response - messages. - - Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in - redfish response data. - - @param[in] Target The target payload to be updated. - @param[in] Payload Palyoad with properties to be changed. - @param[out] RedResponse Pointer to the Redfish response data. - - @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not - NULL and the value is 2XX. The Redfish r= esource will be returned - in Payload within RedResponse if server = send it back in the HTTP - response message body. - @retval EFI_INVALID_PARAMETER Target, Payload, or RedResponse is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get - more error info from returned HTTP Statu= sCode, Headers and Payload - within RedResponse: - 1. If the returned StatusCode is NULL, i= ndicates any error happen. - 2. If the returned StatusCode is not NUL= L and the value is not 2XX, - indicates any error happen. -**/ -EFI_STATUS -EFIAPI -RedfishPatchToPayload ( - IN REDFISH_PAYLOAD Target, - IN REDFISH_PAYLOAD Payload, - OUT REDFISH_RESPONSE *RedResponse - ); - -/** - Use HTTP POST to create a new resource in target payload. - - The POST request should be submitted to the Resource Collection in which= the new resource - is to belong. The Resource Collection is addressed by Target payload. Th= e Redfish may - ignore any service controlled properties. The corresponding redfish resp= onse will returned, - including HTTP StatusCode, Headers and Payload which record any HTTP res= ponse messages. - - Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in - redfish response data. - - @param[in] Target Target payload of the Resource Collection. - @param[in] Payload The new resource to be created. - @param[out] RedResponse Pointer to the Redfish response data. - - @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not - NULL and the value is 2XX. The Redfish r= esource will be returned - in Payload within RedResponse if server = send it back in the HTTP - response message body. - @retval EFI_INVALID_PARAMETER Target, Payload, or RedResponse is NULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get - more error info from returned HTTP Statu= sCode, Headers and Payload - within RedResponse: - 1. If the returned StatusCode is NULL, i= ndicates any error happen. - 2. If the returned StatusCode is not NUL= L and the value is not 2XX, - indicates any error happen. -**/ -EFI_STATUS -EFIAPI -RedfishPostToPayload ( - IN REDFISH_PAYLOAD Target, - IN REDFISH_PAYLOAD Payload, - OUT REDFISH_RESPONSE *RedResponse - ); - -/** - Use HTTP DELETE to remove a resource. - - This function uses the RedfishService to remove a Redfish resource which= is addressed - by input Uri (only the relative path is required). The corresponding red= fish response will - returned, including HTTP StatusCode, Headers and Payload which record an= y HTTP response - messages. - - Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in - redfish response data. - - @param[in] RedfishService The Service to access the Redfish re= sources. - @param[in] Uri Relative path to address the resourc= e. - @param[out] RedResponse Pointer to the Redfish response data. - - @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not - NULL and the value is 2XX, the Redfish r= esource has been removed. - If there is any message returned from se= rver, it will be returned - in Payload within RedResponse. - @retval EFI_INVALID_PARAMETER RedfishService, Uri, or RedResponse is N= ULL. - @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get - more error info from returned HTTP Statu= sCode, Headers and Payload - within RedResponse: - 1. If the returned StatusCode is NULL, i= ndicates any error happen. - 2. If the returned StatusCode is not NUL= L and the value is not 2XX, - indicates any error happen. -**/ -EFI_STATUS -EFIAPI -RedfishDeleteByUri ( - IN REDFISH_SERVICE RedfishService, - IN CONST CHAR8 *Uri, - OUT REDFISH_RESPONSE *RedResponse - ); - -/** - Dump text in fractions. - - @param[in] String ASCII string to dump. - -**/ -VOID -RedfishDumpJsonStringFractions ( - IN CHAR8 *String - ); - -/** - Extract the JSON text content from REDFISH_PAYLOAD and dump to debug con= sole. - - @param[in] Payload The Redfish payload to dump. - -**/ -VOID -RedfishDumpPayload ( - IN REDFISH_PAYLOAD Payload - ); - -/** - Dump text in JSON value. - - @param[in] JsonValue The Redfish JSON value to dump. - -**/ -VOID -RedfishDumpJson ( - IN EDKII_JSON_VALUE JsonValue - ); - -/** - This function will cleanup the HTTP header and Redfish payload resources. - - @param[in] StatusCode The status code in HTTP response message. - @param[in] HeaderCount Number of HTTP header structures in Header= s list. - @param[in] Headers Array containing list of HTTP headers. - @param[in] Payload The Redfish payload to dump. - -**/ -VOID -RedfishFreeResponse ( - IN EFI_HTTP_STATUS_CODE *StatusCode, - IN UINTN HeaderCount, - IN EFI_HTTP_HEADER *Headers, - IN REDFISH_PAYLOAD Payload - ); - -/** - Check if the "@odata.type" in Payload is valid or not. - - @param[in] Payload The Redfish payload to be checked. - @param[in] OdataTypeName OdataType will be retrived from map= ping list. - @param[in] OdataTypeMappingList The list of OdataType. - @param[in] OdataTypeMappingListSize The number of mapping list - - @return TRUE if the "@odata.type" in Payload is valid, otherwise FALSE. - -**/ -BOOLEAN -RedfishIsValidOdataType ( - IN REDFISH_PAYLOAD Payload, - IN CONST CHAR8 *OdataTypeName, - IN REDFISH_ODATA_TYPE_MAPPING *OdataTypeMappingList, - IN UINTN OdataTypeMappingListSize - ); - -/** - Check if the payload is collection - - @param[in] Payload The Redfish payload to be checked. - - @return TRUE if the payload is collection. - -**/ -BOOLEAN -RedfishIsPayloadCollection ( - IN REDFISH_PAYLOAD Payload - ); - -/** - Get collection size. - - @param[in] Payload The Redfish collection payload - @param[in] CollectionSize Size of this collection - - @return EFI_SUCCESS Coolection size is returned in Collecti= onSize - @return EFI_INVALID_PARAMETER The payload is not a collection. -**/ -EFI_STATUS -RedfishGetCollectionSize ( - IN REDFISH_PAYLOAD Payload, - IN UINTN *CollectionSize - ); - -/** - Get Redfish payload of collection member - - @param[in] Payload The Redfish collection payload - @param[in] Index Index of collection member - - @return NULL Fail to get collection member. - @return Non NULL Payload is returned. -**/ -REDFISH_PAYLOAD -RedfishGetPayloadByIndex ( - IN REDFISH_PAYLOAD Payload, - IN UINTN Index - ); - -/** - Check and return Redfish resource of the given Redpath. - - @param[in] RedfishService Pointer to REDFISH_SERVICE - @param[in] Redpath Redpath of the resource. - @param[in] Response Optional return the resource. - - @return EFI_STATUS -**/ -EFI_STATUS -RedfishCheckIfRedpathExist ( - IN REDFISH_SERVICE RedfishService, - IN CHAR8 *Redpath, - IN REDFISH_RESPONSE *Response OPTIONAL - ); - -/** - This function returns the string of Redfish service version. - - @param[in] RedfishService Redfish service instance. - @param[out] ServiceVersionStr Redfish service string. - - @return EFI_STATUS - -**/ -EFI_STATUS -RedfishGetServiceVersion ( - IN REDFISH_SERVICE RedfishService, - OUT CHAR8 **ServiceVersionStr - ); - -/** - This function returns the string of Redfish service version. - - @param[in] ServiceVerisonStr The string of Redfish service version. - @param[in] Url The URL to build Redpath with ID. - Start with "/", for example "/Registries" - @param[in] Id ID string - @param[out] Redpath Pointer to retrive Redpath, caller has to= free - the memory allocated for this string. - @return EFI_STATUS - -**/ -EFI_STATUS -RedfishBuildRedpathUseId ( - IN CHAR8 *ServiceVerisonStr, - IN CHAR8 *Url, - IN CHAR8 *Id, - OUT CHAR8 **Redpath - ); - -#endif diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c b/RedfishPkg= /PrivateLibrary/RedfishLib/RedfishLib.c index 9f9d377..09d833d 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c +++ b/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c @@ -583,6 +583,104 @@ RedfishPatchToPayload ( return EFI_SUCCESS; } + +/** + Use HTTP POST to create new Redfish resource in the Resource Collection. + + The POST request should be submitted to the Resource Collection in which= the new resource + is to belong. The Resource Collection is addressed by URI. The Redfish m= ay + ignore any service controlled properties. The corresponding redfish resp= onse will returned, + including HTTP StatusCode, Headers and Payload which record any HTTP res= ponse messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] RedfishService The Service to access the Redfish re= sources. + @param[in] Uri Relative path to address the resourc= e. + @param[in] Content JSON represented properties to be up= date. + @param[in] ContentSize Size of the Content to be send to Re= dfish service + @param[in] ContentType Type of the Content to be send to Re= dfish service + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX. The Redfish r= esource will be returned + in Payload within RedResponse if server = send it back in the HTTP + response message body. + @retval EFI_INVALID_PARAMETER RedfishService, Uri, Content, or RedResp= onse is NULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned StatusCode is NULL, i= ndicates any error happen. + 2. If the returned StatusCode is not NUL= L and the value is not 2XX, + indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishPostToUriEx ( + IN REDFISH_SERVICE RedfishService, + IN CONST CHAR8 *Uri, + IN CONST CHAR8 *Content, + IN UINTN ContentSize, + IN CONST CHAR8 *ContentType, + OUT REDFISH_RESPONSE *RedResponse + ) +{ + EFI_STATUS Status; + EDKII_JSON_VALUE JsonValue; + + Status =3D EFI_SUCCESS; + JsonValue =3D NULL; + + if ((RedfishService =3D=3D NULL) || (Uri =3D=3D NULL) || (Content =3D=3D= NULL) || (RedResponse =3D=3D NULL)) { + return EFI_INVALID_PARAMETER; + } + + ZeroMem (RedResponse, sizeof (REDFISH_RESPONSE)); + + JsonValue =3D (EDKII_JSON_VALUE)postUriFromService ( + RedfishService, + Uri, + Content, + ContentSize, + ContentType, + &(RedResponse->StatusCode) + ); + + // + // 1. If the returned StatusCode is NULL, indicates any error happen. + // + if (RedResponse->StatusCode =3D=3D NULL) { + Status =3D EFI_DEVICE_ERROR; + goto ON_EXIT; + } + + // + // 2. If the returned StatusCode is not NULL and the value is not 2XX, i= ndicates any error happen. + // NOTE: If there is any error message returned from server, it will = be returned in + // Payload within RedResponse. + // + if ((*(RedResponse->StatusCode) < HTTP_STATUS_200_OK) || \ + (*(RedResponse->StatusCode) > HTTP_STATUS_206_PARTIAL_CONTENT)) + { + Status =3D EFI_DEVICE_ERROR; + } + +ON_EXIT: + if (JsonValue !=3D NULL) { + RedResponse->Payload =3D createRedfishPayload (JsonValue, RedfishServi= ce); + if (RedResponse->Payload =3D=3D NULL) { + // + // Ignore the error when create RedfishPayload, just free the JsonVa= lue since it's not what + // we care about if the returned StatusCode is 2XX. + // + JsonValueFree (JsonValue); + } + } + + return Status; +} + + /** Use HTTP POST to create a new resource in target payload. @@ -738,6 +836,97 @@ ON_EXIT: return Status; } + +/** + Use HTTP DELETE to remove a resource. + + This function uses the RedfishService to remove a Redfish resource which= is addressed + by input Uri (only the relative path is required). The corresponding red= fish response will + returned, including HTTP StatusCode, Headers and Payload which record an= y HTTP response + messages. + + Callers are responsible for freeing the HTTP StatusCode, Headers and Pay= load returned in + redfish response data. + + @param[in] RedfishService The Service to access the Redfish re= sources. + @param[in] Uri Relative path to address the resourc= e. + @param[in] Content JSON represented properties to be de= leted. + @param[out] RedResponse Pointer to the Redfish response data. + + @retval EFI_SUCCESS The opeartion is successful, indicates t= he HTTP StatusCode is not + NULL and the value is 2XX, the Redfish r= esource has been removed. + If there is any message returned from se= rver, it will be returned + in Payload within RedResponse. + @retval EFI_INVALID_PARAMETER RedfishService, Uri, or RedResponse is N= ULL. + @retval EFI_DEVICE_ERROR An unexpected system or network error oc= curred. Callers can get + more error info from returned HTTP Statu= sCode, Headers and Payload + within RedResponse: + 1. If the returned StatusCode is NULL, i= ndicates any error happen. + 2. If the returned StatusCode is not NUL= L and the value is not 2XX, + indicates any error happen. +**/ +EFI_STATUS +EFIAPI +RedfishDeleteByUriEx ( + IN REDFISH_SERVICE RedfishService, + IN CONST CHAR8 *Uri, + IN CONST CHAR8 *Content, + OUT REDFISH_RESPONSE *RedResponse + ) +{ + EFI_STATUS Status; + EDKII_JSON_VALUE JsonValue; + + Status =3D EFI_SUCCESS; + JsonValue =3D NULL; + + if ((RedfishService =3D=3D NULL) || (Content =3D=3D NULL) || (Uri =3D=3D= NULL) || (RedResponse =3D=3D NULL)) { + return EFI_INVALID_PARAMETER; + } + + ZeroMem (RedResponse, sizeof (REDFISH_RESPONSE)); + + JsonValue =3D (EDKII_JSON_VALUE)deleteUriFromServiceEx ( + RedfishService, + Uri, + Content, + &(RedResponse->StatusCode) + ); + + // + // 1. If the returned StatusCode is NULL, indicates any error happen. + // + if (RedResponse->StatusCode =3D=3D NULL) { + Status =3D EFI_DEVICE_ERROR; + goto ON_EXIT; + } + + // + // 2. If the returned StatusCode is not NULL and the value is not 2XX, i= ndicates any error happen. + // NOTE: If there is any error message returned from server, it will = be returned in + // Payload within RedResponse. + // + if ((*(RedResponse->StatusCode) < HTTP_STATUS_200_OK) || \ + (*(RedResponse->StatusCode) > HTTP_STATUS_206_PARTIAL_CONTENT)) + { + Status =3D EFI_DEVICE_ERROR; + } + +ON_EXIT: + if (JsonValue !=3D NULL) { + RedResponse->Payload =3D createRedfishPayload (JsonValue, RedfishServi= ce); + if (RedResponse->Payload =3D=3D NULL) { + // + // Ignore the error when create RedfishPayload, just free the JsonVa= lue since it's not what + // we care about if the returned StatusCode is 2XX. + // + JsonValueFree (JsonValue); + } + } + + return Status; +} + /** Dump text in fractions. diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/re= dfishService.h b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/includ= e/redfishService.h index 5c13b68..75afadc 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishSe= rvice.h +++ b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/include/redfishSe= rvice.h @@ -129,6 +129,14 @@ deleteUriFromService ( EFI_HTTP_STATUS_CODE **StatusCode ); +json_t * +deleteUriFromServiceEx ( + redfishService *service, + const char *uri, + const char *content, + EFI_HTTP_STATUS_CODE **StatusCode + ); + redfishPayload * getRedfishServiceRoot ( redfishService *service, diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/servic= e.c b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c index afa172b..086e04a 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c +++ b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c @@ -923,10 +923,12 @@ ON_EXIT: return ret; } + json_t * -deleteUriFromService ( +deleteUriFromServiceEx ( redfishService *service, const char *uri, + const char *content, EFI_HTTP_STATUS_CODE **StatusCode ) { @@ -937,6 +939,8 @@ deleteUriFromService ( EFI_HTTP_REQUEST_DATA *RequestData =3D NULL; EFI_HTTP_MESSAGE *RequestMsg =3D NULL; EFI_HTTP_MESSAGE ResponseMsg; + CHAR8 ContentLengthStr[80]; + size_t contentLength; ret =3D NULL; @@ -956,7 +960,7 @@ deleteUriFromService ( // // Step 1: Create HTTP request message with 4 headers: // - HttpIoHeader =3D HttpIoCreateHeader ((service->sessionToken || service->= basicAuthStr) ? 5 : 4); + HttpIoHeader =3D HttpIoCreateHeader ((service->sessionToken || service->= basicAuthStr) ? 8 : 7); if (HttpIoHeader =3D=3D NULL) { ret =3D NULL; goto ON_EXIT; @@ -979,6 +983,23 @@ deleteUriFromService ( Status =3D HttpIoSetHeader (HttpIoHeader, "Connection", "Keep-Alive"); ASSERT_EFI_ERROR (Status); + Status =3D HttpIoSetHeader (HttpIoHeader, "Content-Type", "application/j= son"); + ASSERT_EFI_ERROR (Status); + + if(content !=3D NULL){ + contentLength =3D strlen (content); + AsciiSPrint ( + ContentLengthStr, + sizeof (ContentLengthStr), + "%lu", + (UINT64)contentLength + ); + Status =3D HttpIoSetHeader (HttpIoHeader, "Content-Length", ContentL= engthStr); + ASSERT_EFI_ERROR (Status); + Status =3D HttpIoSetHeader (HttpIoHeader, "OData-Version", "4.0"); + ASSERT_EFI_ERROR (Status); + } + // // Step 2: build the rest of HTTP request info. // @@ -1004,6 +1025,11 @@ deleteUriFromService ( RequestMsg->HeaderCount =3D HttpIoHeader->HeaderCount; RequestMsg->Headers =3D HttpIoHeader->Headers; + if(content !=3D NULL){ + RequestMsg->BodyLength =3D contentLength; + RequestMsg->Body =3D (VOID *)content; + } + ZeroMem (&ResponseMsg, sizeof (ResponseMsg)); // @@ -1057,6 +1083,17 @@ ON_EXIT: return ret; } +json_t * +deleteUriFromService ( + redfishService *service, + const char *uri, + EFI_HTTP_STATUS_CODE **StatusCode + ) +{ + return deleteUriFromServiceEx(service, uri, NULL, StatusCode); +} + + redfishPayload * getRedfishServiceRoot ( redfishService *service, diff --git a/RedfishPkg/RedfishPkg.dec b/RedfishPkg/RedfishPkg.dec index 9886502..0aa2688 100644 --- a/RedfishPkg/RedfishPkg.dec +++ b/RedfishPkg/RedfishPkg.dec @@ -64,7 +64,7 @@ ## @libraryclass Redfish Helper Library # Library provides Redfish helper functions. - RedfishLib|PrivateInclude/Library/RedfishLib.h + RedfishLib|Include/Library/RedfishLib.h [Protocols] ## Include/Protocol/EdkIIRedfishCredential.h -- 2.6.1.windows.1 -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission. -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92333): https://edk2.groups.io/g/devel/message/92333 Mute This Topic: https://groups.io/mt/92951819/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-