From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-002e3701.pphosted.com (mx0b-002e3701.pphosted.com [148.163.143.35]) by mx.groups.io with SMTP id smtpd.web10.5740.1634115814063153925 for ; Wed, 13 Oct 2021 02:03:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=AIiouR1/; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.143.35, mailfrom: prvs=0920a4c5b0=abner.chang@hpe.com) Received: from pps.filterd (m0134425.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19CN2QUx010526; Wed, 13 Oct 2021 09:03:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=YXksF2ni9/OKkh9texQLsYCIk2tOZoIrTUv24nZz1ao=; b=AIiouR1/wDPRjqAjYT2ZTKeBoqaWVt19HWuL/ZqTvPLKA8oHB3tTpTHfv4bmaFfhRTC8 xmdrbROaHo4iLUVRSecyVIzoQk43pfK9hODqZTjCr3b3sbJpx7SOB0lbf/WFd9LsEDj7 hMFjOKvJNYr8N1bvnfb5TJcAfg+3uLYD6jFxrTwPRLHdeoV7w2+3/vnqSjkrzdABbj9T CtdQBANtf/wBBEaKMuOuaAN9gWAiTJ+FwdYwISKp41nQRewbOX7rIy00RLz8ZzVRz6nt cIQYy9mqBJdMMIMhlcNE0d7TE0qrLekGtgkj2PzBzNzVQS5Nzbjl+lxrIoyvYQtxXRGm fQ== Received: from g4t3425.houston.hpe.com (g4t3425.houston.hpe.com [15.241.140.78]) by mx0b-002e3701.pphosted.com with ESMTP id 3bnkbabxhk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Oct 2021 09:03:26 +0000 Received: from G9W8455.americas.hpqcorp.net (exchangepmrr1.us.hpecorp.net [16.216.161.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g4t3425.houston.hpe.com (Postfix) with ESMTPS id 31B5EB4; Wed, 13 Oct 2021 09:03:26 +0000 (UTC) Received: from G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) by G9W8455.americas.hpqcorp.net (2002:10d8:a15e::10d8:a15e) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 13 Oct 2021 09:03:26 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (15.241.52.13) by G1W8108.americas.hpqcorp.net (16.193.72.60) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Wed, 13 Oct 2021 09:03:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FjD5V2IBaAl8Oc+OZKfbtwhmT9+bNj1yhxQsHZ//ClT6kSbMuG339/kCCIKlRxPgm8P3wmdVd3H1UO4OIjNb++qSBox/mnQMwJ1H2IPECFRxa2Utq3/ypupM6pPNfBXSH6npbCvN3HWnVvgvolbVi18PeW+Ddv1a4hZABuxseUt1gsbuNmtvN/4Mb1u5rATPAKhVgXzfA+3sPyYsV9DKEqCjeYWxSQC2P9As3ljd5irMGgMJf/DIn62tE+H0Fv8tTXgeuXyuE39UylTJ/JLXKSIoqFrGZ+4bhXEzyvkBqI1p1BFTLek+FlxZye1ngE+TnS0AZfcmhTrtUuW5Qgz0+w== 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=YXksF2ni9/OKkh9texQLsYCIk2tOZoIrTUv24nZz1ao=; b=L81sli+ZjWfXcLB2y8Z6UCt87rORwHKVzjqvSuHA6z+mjQUpCpBjCwEzbQPU37ZhwAcjwzyyWqkW7zeUq7ibSLoU7lgdrpj3i86H2Qnht3f6EvCgEV6+uiKKi6QuxcOGUAU5WmBgHPWYrYeTKr++H9wfXZiB4ZPfHWe6u1PqmOPhg5xa1T37t/PGyiRB/tzMeriZaY8BXeteOT3GtrmWj0BDEcOWpgFbJmzVgw1zIpuwV4qr+cpNYU9YhfeZAGx1ufq/rPSseapwbHTbVQY5Oi66bouyCEQgxUMOMYi8o3x9zvPJsQNh11v6ZDCTjf3CCukjokOCPm32u3NxIvQWvQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7508::16) by CS1PR8401MB0421.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7508::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.22; Wed, 13 Oct 2021 09:03:24 +0000 Received: from CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::b88a:7fe7:6294:683f]) by CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM ([fe80::b88a:7fe7:6294:683f%9]) with mapi id 15.20.4587.026; Wed, 13 Oct 2021 09:03:24 +0000 From: "Abner Chang" To: "Wang, Nickle (HPS SW)" , "devel@edk2.groups.io" CC: Liming Gao Subject: Re: [PATCH 1/1] RedfishClientPkg: Facilities of EDK2 Redfish Feature driver Env. Thread-Topic: [PATCH 1/1] RedfishClientPkg: Facilities of EDK2 Redfish Feature driver Env. Thread-Index: AQHXwAzPLZtf281d6U2w2gsp6bQFvavQoN3w Date: Wed, 13 Oct 2021 09:03:24 +0000 Message-ID: References: <20211013083105.1993-1-nickle.wang@hpe.com> <20211013083105.1993-2-nickle.wang@hpe.com> In-Reply-To: <20211013083105.1993-2-nickle.wang@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: hpe.com; dkim=none (message not signed) header.d=none;hpe.com; dmarc=none action=none header.from=hpe.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ca7eda65-2b3f-41f8-4253-08d98e285020 x-ms-traffictypediagnostic: CS1PR8401MB0421: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: D43RkaHN5dP1Ah4zL7s2EHQQ/JACO6D2sAa8cdNCo7C3e34ZZgzgUX2XDTc1TebFtQSxg19tGLzbVndEVkMzmE2vQaFCMLpIdpMmK6uDEILoCOP5YuRoYH4bi931GQi4RcuXqprdaibC5s7Yof7HgykidiitqKaidrKozDNxsneQeplZlvID6dpwPp64apcm5peUnefW00XDALEpVLL7Tkyfn8eOjDzFiDBBpze3Bc3WbfbAmo4tk9NslDG3AVZ013ddd6h9fmuWd3wtauSX4EmFI7KssDHMQWcxtVXTyNW9ITEw3pPRZMbxjbj+RiIZo19Ft7GYgydB+zwcCSRxrKYmJhteRghwD3sJwYSKuYLlysseGaL4MAuEndjgKs+hhxZTPrVho7xGaR13i+xdK48djeBrz4CrG0ZeYKienKuqUQuugj+QscA/20isa76MMztdTyk4ef+pifgvZGUWLjlKJzknN5OElPDPqeHR0Q0FJXZBvepbi8L/5yQdJc5fKx1ReXWt+bxk9NYUO5fu4p7BRz/TkSl1mpnV3oAQ1iLxAJchQl9n0TYuXaRlSszVb4C2RiFviK6/kH/MpglliJFY+MI7rb9T2TElzyRj1UyajgsRDajK4atlSu8Asno5TBb3WGjAKXUG/TJe0yZoQFxNxaCcO5ppXuDuWhLpo6ONE6lld1dEa3DT6t8YVTnEnt8BNDfUGXsB2XQfK58/mA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(122000001)(53546011)(5660300002)(52536014)(186003)(6506007)(38070700005)(82960400001)(71200400001)(9686003)(7696005)(86362001)(8676002)(26005)(8936002)(83380400001)(4326008)(76116006)(38100700002)(2906002)(508600001)(316002)(55016002)(110136005)(33656002)(66476007)(66946007)(66556008)(30864003)(66446008)(64756008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?FdbhtsIz/c35bpIo4TPeguYqoFUw+uGzr5E5vMz6UWsuyI0ynLUqSqfvYDOd?= =?us-ascii?Q?0P7KX9+olZJGAkDV+J2IJiL5bdVutFtQ4MX7ilWKJoJ81/Hq6OPydGZRsQPe?= =?us-ascii?Q?pRvNiY0nk3o3GwDjIW2rVy1krEJsOCh61GCpnE+nbBAiWkot6Q+LTuI1IWav?= =?us-ascii?Q?rA/SEFr3tDZui7QQMxk63lg3OLHZX5czbPaHVkB41gF9PiyrZq5qh7b99bAQ?= =?us-ascii?Q?nhKHUFpH9eFVnrpItjFg1x8Z94H3DNsnvqo5Ja4bHw8hhZhFMikdYZPk2XV9?= =?us-ascii?Q?cL8mAfOrD9z80ecU/G2t5o+4K4hFMjxRxSiiYH1yYC2QyQu6O6EPmv2Jckdf?= =?us-ascii?Q?oD38pYeYTnzNMXSVeXHERfxr5vIdyyNV2GjEvHV6E3EWL99rz8y1VM+4JI4J?= =?us-ascii?Q?ZAVwT4Iapurhha9jba7XyCHafJGrpHUrLXTiXJdrC1yD4b15CHzif8pOfvqj?= =?us-ascii?Q?qo6INM0nUr4kTuO5uxcFtXxzPZOAFHujoic+MTQ5q0BWW04zns7UMFCU2cTi?= =?us-ascii?Q?MikZrswpByUXjcEdfOmhruQOXxntaA0Lv1qSCtCBygfuov+etsinWbTa4qiN?= =?us-ascii?Q?F8xd7NW+wRuQAg0kSJ6M7ZfzMcEBDdIhq6Mbtkz01VAZKNiSRuukxoURje9d?= =?us-ascii?Q?ToNmqGuLwzriTOOBKr9zFJRQ5nyzA4y1Vo5pc8s08w2ztfupUlVuLOvGnz+z?= =?us-ascii?Q?LU+thoLBW/XRi4XHxtTRnS/ADuvymKT1OPdtkZRvQVCjHY4BV7GijT4XgGiW?= =?us-ascii?Q?0RbjjJs5D9K4UaUbqQFXeVz9o6yiYWG+9r54AFI5G/IwFNzcKRYwjtN6fqpL?= =?us-ascii?Q?fDt74Hsc5Glcx+xUiP6DBZylL5RWnknoi83MiGfWUp8qK05pj8blG6JYMl5z?= =?us-ascii?Q?LIV2kzaUxeQvVx/+IXgrcaNfGinNPejhjZ9V1bwt7dukm+SCUWwJ/Ma1LhZB?= =?us-ascii?Q?85aRj/JZXn/NWbrI2/7uV17VlwvJABeSAoVKgp/TxJBCXLrokheJ88QLWEzU?= =?us-ascii?Q?5Gkkefy/AkEsQ1mt+ifj3M18JTjuHstrkXKzMo3Qh8UMvGLV6m4U3qmqdnSI?= =?us-ascii?Q?QBfCSV27ZBAO3+URTPjzHzzI6/lSw8z+QSTl8iEc5FUYjqwDQ2LcU1jK8K5o?= =?us-ascii?Q?x1PmG/heDKBNmNYO8XlYWNlAiH0YvRryb0HeX2KDxZtWIAKql8w2aBMcSG6U?= =?us-ascii?Q?B9Q0+S/9XtFU8K6K99n+JebAzA00XcVhCO7MpF8sXQlBcNhu7HS/ZFTaU2L2?= =?us-ascii?Q?w9U6QOUOlSYp/RxxN6/ew9c2UfhEdZnqAjHQVwM515FnFfwii9kvHwnGGWQc?= =?us-ascii?Q?ItQ8SIP9E+CZa6PYL0hT4Aqj?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CS1PR8401MB1144.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: ca7eda65-2b3f-41f8-4253-08d98e285020 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2021 09:03:24.3053 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VGRD9tnnYF5Z49irHZH19+cl2oGVXsOdtUTu6kAqE1zb1rP19vfrEiANYu2CkiXxih/ttI9rY1JWgXZBYGAszw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0421 X-OriginatorOrg: hpe.com X-Proofpoint-ORIG-GUID: Va43WCQY2LVmEB_hfcr04Tw4NFkqRBTx X-Proofpoint-GUID: Va43WCQY2LVmEB_hfcr04Tw4NFkqRBTx X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-13_03,2021-10-13_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 malwarescore=0 adultscore=0 priorityscore=1501 spamscore=0 phishscore=0 mlxscore=0 bulkscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110130062 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable It's fine this time, but please add [staging/RedfishClientPkg] when next ti= me send the patch against edk2-staging. Only one comment in below, others look good to me. Reviewed-by: Abner Chang > -----Original Message----- > From: Wang, Nickle (HPS SW) > Sent: Wednesday, October 13, 2021 4:31 PM > To: devel@edk2.groups.io > Cc: Wang, Nickle (HPS SW) ; Chang, Abner (HPS > SW/FW Technologist) ; Liming Gao > > Subject: [PATCH 1/1] RedfishClientPkg: Facilities of EDK2 Redfish Feature > driver Env. >=20 > Initial common header file and meta files for feature drivers. >=20 > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Liming Gao > --- > .../Include/Guid/RedfishClientPkgTokenSpace.h | 20 +++ > .../EdkIIRedfishResourceConfigProtocol.h | 129 ++++++++++++++++++ > .../Include/RedfishCollectionCommon.h | 53 +++++++ > .../Include/RedfishResourceCommon.h | 123 +++++++++++++++++ > RedfishClientPkg/RedfishClientPkg.dec | 8 +- > 5 files changed, 332 insertions(+), 1 deletion(-) > create mode 100644 > RedfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h > create mode 100644 > RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h > create mode 100644 RedfishClientPkg/Include/RedfishCollectionCommon.h > create mode 100644 RedfishClientPkg/Include/RedfishResourceCommon.h >=20 > diff --git a/RedfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h > b/RedfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h > new file mode 100644 > index 0000000000..1cdf429da4 > --- /dev/null > +++ b/RedfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h > @@ -0,0 +1,20 @@ > +/** @file >=20 > + GUID for RedfishClientPkg PCD Token Space >=20 > + >=20 > + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
>=20 > + >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#ifndef _REDFISHCLIENTPKG_TOKEN_SPACE_GUID_H_ >=20 > +#define _REDFISHCLIENTPKG_TOKEN_SPACE_GUID_H_ Please remove the prefix "_" Abner >=20 > + >=20 > +#define REDFISHCLIENTPKG_TOKEN_SPACE_GUID \ >=20 > + { \ >=20 > + 0x8c444dae, 0x728b, 0x48ee, { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x= 9c, > 0xc8 } \ >=20 > + } >=20 > + >=20 > +extern EFI_GUID gEfiRedfishClientPkgTokenSpaceGuid; >=20 > + >=20 > +#endif >=20 > diff --git > a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h > b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h > new file mode 100644 > index 0000000000..d6c41dda52 > --- /dev/null > +++ > b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h > @@ -0,0 +1,129 @@ > +/** @file >=20 > + This file defines the EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL > interface. >=20 > + >=20 > + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
>=20 > + >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#ifndef EDKII_REDFISH_RESOURCE_CONFIG_H_ >=20 > +#define EDKII_REDFISH_RESOURCE_CONFIG_H_ >=20 > + >=20 > +typedef struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL; >=20 > + >=20 > +/** >=20 > + Provising redfish resource by given URI. >=20 > + >=20 > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance. >=20 > + @param[in] Uri Target URI to create resource. >=20 > + @param[in] HttpPostMode TRUE if resource does not exist, HTTP > POST method is used. >=20 > + FALSE if the resource exist but some = of properties are > missing, >=20 > + HTTP PUT method is used. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +typedef >=20 > +EFI_STATUS >=20 > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING) > ( >=20 > + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, >=20 > + IN CHAR8 *Uri, >=20 > + IN BOOLEAN HttpPostMode >=20 > + ); >=20 > + >=20 > +/** >=20 > + Consume resource from given URI. >=20 > + >=20 > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance. >=20 > + @param[in] Uri The target URI to consume. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +typedef >=20 > +EFI_STATUS >=20 > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME) ( >=20 > + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, >=20 > + IN CHAR8 *Uri >=20 > + ); >=20 > + >=20 > + >=20 > +/** >=20 > + Update resource to given URI. >=20 > + >=20 > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance. >=20 > + @param[in] Uri The target URI to consume. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +typedef >=20 > +EFI_STATUS >=20 > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE) ( >=20 > + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, >=20 > + IN CHAR8 *Uri >=20 > + ); >=20 > + >=20 > + >=20 > +/** >=20 > + Check resource on given URI. >=20 > + >=20 > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance. >=20 > + @param[in] Uri The target URI to consume. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +typedef >=20 > +EFI_STATUS >=20 > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK) ( >=20 > + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, >=20 > + IN CHAR8 *Uri >=20 > + ); >=20 > + >=20 > +// >=20 > +// definition of REDFISH_SCHEMA_INFO >=20 > +// >=20 > +#define REDFISH_SCHEMA_STRING_SIZE (FixedPcdGet32 > (PcdMaxRedfishSchemaStringSize)) >=20 > +#define REDFISH_SCHEMA_VERSION_SIZE (FixedPcdGet32 > (PcdMaxRedfishSchemaVersionSize)) >=20 > + >=20 > +typedef struct _SCHEMA_INFO { >=20 > + CHAR8 Schema[REDFISH_SCHEMA_STRING_SIZE]; >=20 > + CHAR8 Major[REDFISH_SCHEMA_VERSION_SIZE]; >=20 > + CHAR8 Minor[REDFISH_SCHEMA_VERSION_SIZE]; >=20 > + CHAR8 Errata[REDFISH_SCHEMA_VERSION_SIZE]; >=20 > +} REDFISH_SCHEMA_INFO; >=20 > + >=20 > +/** >=20 > + Get information about this protocol. >=20 > + >=20 > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance. >=20 > + @param[out] Info The schema information. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +typedef >=20 > +EFI_STATUS >=20 > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO) ( >=20 > + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, >=20 > + OUT REDFISH_SCHEMA_INFO *Info >=20 > + ); >=20 > + >=20 > +struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL { >=20 > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING > Provisioning; >=20 > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME Consume; >=20 > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE Update; >=20 > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK Check; >=20 > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO GetInfo; >=20 > +}; >=20 > + >=20 > +extern EFI_GUID gEdkIIRedfishResourceConfigProtocolGuid; >=20 > + >=20 > +#endif >=20 > diff --git a/RedfishClientPkg/Include/RedfishCollectionCommon.h > b/RedfishClientPkg/Include/RedfishCollectionCommon.h > new file mode 100644 > index 0000000000..3962b361ed > --- /dev/null > +++ b/RedfishClientPkg/Include/RedfishCollectionCommon.h > @@ -0,0 +1,53 @@ > +/** @file >=20 > + Redfish feature driver collection common header file. >=20 > + >=20 > + (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
>=20 > + >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#ifndef EFI_REDFISH_COLLECTION_COMMON_H_ >=20 > +#define EFI_REDFISH_COLLECTION_COMMON_H_ >=20 > + >=20 > +// >=20 > +// Libraries >=20 > +// >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > + >=20 > +// >=20 > +// Protocols >=20 > +// >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > + >=20 > +#define IS_EMPTY_STRING(a) ((a) =3D=3D NULL || (a)[0] =3D= =3D '\0') >=20 > +#define REDFISH_DEBUG_TRACE DEBUG_INFO >=20 > + >=20 > +typedef struct _REDFISH_COLLECTION_PRIVATE { >=20 > + EFI_REST_JSON_STRUCTURE_PROTOCOL *JsonStructProtocol; >=20 > + EDKII_REDFISH_FEATURE_PROTOCOL *FeatureProtocol; >=20 > + REDFISH_SERVICE RedfishService; >=20 > + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL ConfigHandler; >=20 > + EFI_EVENT Event; >=20 > + CHAR8 *CollectionPath; >=20 > + CHAR8 *CollectionJson; >=20 > + REDFISH_PAYLOAD CollectionPayload; >=20 > + REDFISH_RESPONSE RedResponse; >=20 > +} REDFISH_COLLECTION_PRIVATE; >=20 > + >=20 > +#define REDFISH_COLLECTION_PRIVATE_DATA_FROM_PROTOCOL(This) \ >=20 > + BASE_CR ((This), REDFISH_COLLECTION_PRIVATE, ConfigHandler) >=20 > + >=20 > +#endif >=20 > diff --git a/RedfishClientPkg/Include/RedfishResourceCommon.h > b/RedfishClientPkg/Include/RedfishResourceCommon.h > new file mode 100644 > index 0000000000..1ba992bb69 > --- /dev/null > +++ b/RedfishClientPkg/Include/RedfishResourceCommon.h > @@ -0,0 +1,123 @@ > +/** @file >=20 > + Redfish feature driver common header file. >=20 > + >=20 > + (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
>=20 > + >=20 > + SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#ifndef EFI_REDFISH_RESOURCE_COMMON_H_ >=20 > +#define EFI_REDFISH_RESOURCE_COMMON_H_ >=20 > + >=20 > +#define MAX_RED_PATH_LEN 128 >=20 > +#define IS_EMPTY_STRING(a) ((a) =3D=3D NULL || (a)[0] =3D=3D '\0') >=20 > +#define REDFISH_DEBUG_TRACE DEBUG_INFO >=20 > + >=20 > +// >=20 > +// Libraries >=20 > +// >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > + >=20 > +// >=20 > +// Protocols >=20 > +// >=20 > +#include >=20 > +#include >=20 > +#include >=20 > +#include >=20 > + >=20 > + >=20 > +typedef struct _REDFISH_RESOURCE_COMMON_PRIVATE { >=20 > + REDFISH_SERVICE RedfishService; >=20 > + EFI_REST_JSON_STRUCTURE_PROTOCOL *JsonStructProtocol; >=20 > + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL RedfishResourceConfig; >=20 > + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL ConfigHandler; >=20 > + EFI_EVENT Event; >=20 > + CHAR8 *Uri; >=20 > + CHAR8 *Json; >=20 > + REDFISH_PAYLOAD Payload; >=20 > +} REDFISH_RESOURCE_COMMON_PRIVATE; >=20 > + >=20 > +#define > REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_CONFIG_PROTOCO > L(This) \ >=20 > + BASE_CR ((This), REDFISH_RESOURCE_COMMON_PRIVATE, > ConfigHandler) >=20 > + >=20 > +#define > REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTO > COL(This) \ >=20 > + BASE_CR ((This), REDFISH_RESOURCE_COMMON_PRIVATE, > RedfishResourceConfig) >=20 > + >=20 > + >=20 > +/** >=20 > + Consume resource from given URI. >=20 > + >=20 > + @param[in] This Pointer to > REDFISH_RESOURCE_COMMON_PRIVATE instance. >=20 > + @param[in] Json The JSON to consume. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +RedfishConsumeResourceCommon ( >=20 > + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, >=20 > + IN CHAR8 *Json >=20 > + ); >=20 > + >=20 > +/** >=20 > + Provisioning redfish resource by given URI. >=20 > + >=20 > + @param[in] This Pointer to EFI_HP_REDFISH_HII_PROTOCO= L > instance. >=20 > + @param[in] ResourceExist TRUE if resource exists, PUT method w= ill be > used. >=20 > + FALSE if resource does not exist POST= method is used. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +RedfishProvisioningResourceCommon ( >=20 > + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, >=20 > + IN BOOLEAN ResourceExist >=20 > + ); >=20 > + >=20 > +/** >=20 > + Check resource from given URI. >=20 > + >=20 > + @param[in] This Pointer to > REDFISH_RESOURCE_COMMON_PRIVATE instance. >=20 > + @param[in] Json The JSON to consume. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +RedfishCheckResourceCommon ( >=20 > + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, >=20 > + IN CHAR8 *Json >=20 > + ); >=20 > + >=20 > +/** >=20 > + Update resource to given URI. >=20 > + >=20 > + @param[in] This Pointer to > REDFISH_RESOURCE_COMMON_PRIVATE instance. >=20 > + @param[in] Json The JSON to consume. >=20 > + >=20 > + @retval EFI_SUCCESS Value is returned successfully. >=20 > + @retval Others Some error happened. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +RedfishUpdateResourceCommon ( >=20 > + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, >=20 > + IN CHAR8 *Json >=20 > + ); >=20 > + >=20 > +#endif >=20 > diff --git a/RedfishClientPkg/RedfishClientPkg.dec > b/RedfishClientPkg/RedfishClientPkg.dec > index 8fa92d5b1e..f01509d78f 100644 > --- a/RedfishClientPkg/RedfishClientPkg.dec > +++ b/RedfishClientPkg/RedfishClientPkg.dec > @@ -21,9 +21,12 @@ >=20 >=20 > [Protocols] >=20 > ## Include/Protocol/EdkIIRedfishFeature.h >=20 > - gEdkIIRedfishFeatureProtocolGuid =3D { 0x785CC694, 0x4930, 0xEFBF, { 0= x2A, > 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } } >=20 > + gEdkIIRedfishFeatureProtocolGuid =3D { 0x785CC694, 0x4930, 0xEF= BF, > { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } } >=20 > + ## Include/Protocol/EdkIIRedfishResourceConfigProtocol.h >=20 > + gEdkIIRedfishResourceConfigProtocolGuid =3D { 0x6f164c68, 0xfb09, 0x46= 46, > { 0xa8, 0xd3, 0x24, 0x11, 0x5d, 0xab, 0x3e, 0xe7 } } >=20 >=20 >=20 > [Guids] >=20 > + ## Include/Guid/RedfishClientPkgTokenSpace.h >=20 > gEfiRedfishClientPkgTokenSpaceGuid =3D { 0x8c444dae, 0x728b, 0x48ee= , > { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } } >=20 >=20 >=20 > [PcdsFixedAtBuild] >=20 > @@ -35,3 +38,6 @@ > # >=20 >=20 > gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDriverStartupE > ventGuid|{0xB3, 0x8F, 0xE8, 0x7C, 0xD7, 0x4B, 0x79, 0x46, 0x87, 0xA8, 0xA= 8, > 0xD8, 0xDE, 0xE5, 0x0D, 0x2B}|VOID*|0x10000003 >=20 >=20 >=20 > +[PcdsFixedAtBuild] >=20 > + > gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32| > UINT32|0x10000001 >=20 > + > gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8| > UINT32|0x10000002 >=20 > -- > 2.31.1.windows.1