From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web08.27382.1635130184200976622 for ; Sun, 24 Oct 2021 19:49:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=nuuOVGUU; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0932ea4fe9=nickle.wang@hpe.com) Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19OLdEOF019921; Mon, 25 Oct 2021 02:49:32 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=Qfgfzq0flhTWQgfbtekQ4NeT9d/ENGPqgc7oNa8//hE=; b=nuuOVGUUhB0HmJ2yxdpN9/y4dTIiNX1Km4i68IYYUxKJNTPQSIfpNlHE2BCG8aX4u0sM HfJ3ZtZZLweGwxl20FlOOEp/BLbZ7xybBJyGIOv+5CasTl3bcReRlAi4rI35smLxJ+Yx qP2dP3iTId4arfLTKsokArLbISoRPUdt4TdGe3RvmJXd8Xfes4ye5ly8hDadcdPV7VNz xX2CIKRZ17THQopy/1SYY8Vpc79gvdPVccGblzOiLqADC2G0SIzh2D8fercypbSzADRe SflcdTnBvwOxfb49mGq0+e5DQSOJwFC7ct2/xkwfqGRE2tRYJRUYWLhdFI7LbcwvaukZ Aw== Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0b-002e3701.pphosted.com with ESMTP id 3bwdd21gth-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Oct 2021 02:49:32 +0000 Received: from G9W8455.americas.hpqcorp.net (g9w8455.houston.hp.com [16.216.161.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by g9t5008.houston.hpe.com (Postfix) with ESMTPS id C6F944F; Mon, 25 Oct 2021 02:49:31 +0000 (UTC) Received: from G2W6310.americas.hpqcorp.net (2002:10c5:4034::10c5:4034) by G9W8455.americas.hpqcorp.net (2002:10d8:a15e::10d8:a15e) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 25 Oct 2021 02:49:31 +0000 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (15.241.52.13) by G2W6310.americas.hpqcorp.net (16.197.64.52) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Mon, 25 Oct 2021 02:49:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ee8dInQqctYNt/hP7p0WI9CJ0BqeGvUBx2Xa/lW740C/QLl3ZfQBINuEOuexQqMSsFqzH+BhYPxcl6Kkn+Wj3g4MoNUHCo8GfulhTHusI/NaynJ2WKxhCI5cE3zWqKQrNZofN69QWqYU+ULfkhcY3PDXnEgkqMkrhgPzn6nWW493QgxDaHLyzchvMUnRsyleEsHgfsgGUsL9LjFFZjRjpdIKF0j1v4Z+kUUq1CdVRdDBFmgUpf7KASYf+plKo3WeT5GrURzu9rAYkowquPQCXcQC8JZ5Tuw1bXaBJnUFybfLQYHHo1w6kGd0p4WfD9kF0YI/7Gz3ZuALPJVpHrmOQw== 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=Qfgfzq0flhTWQgfbtekQ4NeT9d/ENGPqgc7oNa8//hE=; b=cJaThQE5ryTJT4kH3JRPLcCNP/4voGMgKD1vK28gZNJz+2cN5yQed8eK7MLHsoSmFXRLcERvDd7aY4AgM5h8TTtk0EIgbGfmq1T6tw6C887SWIqsLVC+jcDZt9Vx4xCaihjhqJ1AnxpqJoSd+PGgg/4DIBkEsZ0NqSdbFTxFQcEK5nDhIYtHCUDLI131SaW2dRdFWx6urMXVsL5ZAHfmSq6hfr8JbYH4XGxZZ52R8n9Ibbvi2MfI1AuObfgOOrMj/2a+bdEE9PNXL6TxDZ1NHi6ENYzndOnLYsK1/KnmQfSpmZ+zRHqJ69rquQA0fYGMGDreTqq3FeFikSYcCCVbBw== 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 DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:760d::7) by DF4PR8401MB0716.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7608::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.15; Mon, 25 Oct 2021 02:49:29 +0000 Received: from DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM ([fe80::b41f:195:c98b:d0eb]) by DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM ([fe80::b41f:195:c98b:d0eb%5]) with mapi id 15.20.4628.020; Mon, 25 Oct 2021 02:49:29 +0000 From: "Nickle Wang" To: "Chang, Abner (HPS SW/FW Technologist)" , "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: AQHXwAzMu0qxjYydXkeNcrM1r0xShavQokEAgBJzX9A= Date: Mon, 25 Oct 2021 02:49:29 +0000 Message-ID: References: <20211013083105.1993-1-nickle.wang@hpe.com> <20211013083105.1993-2-nickle.wang@hpe.com> In-Reply-To: Accept-Language: en-US, zh-TW 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: b60fdad7-d426-4f09-e5ec-08d9976210f3 x-ms-traffictypediagnostic: DF4PR8401MB0716: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: n4eW+TQCgIW8R+xCFiA5+GkDAXZ2RTx30AxS13Pal3kgFTLFvl5OOr44+zYpU0RdFfY37+O9O3BpykMCf3+ij2ZWwaDRNU1V6dIEljTzrmmpdOmAD7p3/4lcrue4OM+fE3Wdiv0jvOTVb96HzhRY4I/I3uAwB7M3BlW5jbzFb4E9vJ49ET/EYXVOze47cB4dHtMFNJagGYyLP6ekj+pUyuUxRs28FJEVg4jEbIjeOUbrUoFndtT3EmsTmW6vpr/cgweemMZne/3SINAKW88Whl+7E4yjpk8hTGp/e9RCUMIVen4Noc4m2Fs0PG0RM4viEnweJKRxSdUW8WNQSbQbkTC56bLL9hkwTRaykDVgaqV7jr+xzTxQVv6tK6M0wKtrbfe6w1Irz3trEPYxKJZmmBicP6xHMZFWhKkWhC52A8GUNsh3VGJkqE5vDMTJAzghOp3E4hQ1Yce+c8ZM05WQdJ5Ry/81RHDDeOMR31eThqeRzJqBXyKneQp70YH6YVaaVRWTMiq/tbmZUivhf8vkvB847Uv5oihKhQCAqiGMpiJgoGqRuWbbBJ5tcbLX2oT8SaisGXjKGUB6qWePJiwUwnMEawf5fd+xMqNcQ73lGcmORcVANGkthoiChp91mVuExAW5N703UxjPmn9mYR9KhbZ2g8cWN2agrJwJHkYoScCUHtYrMablt+BZD6sjkS7VFYIgPPDY66iST/o+2zqnOw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(366004)(9686003)(55016002)(8676002)(66446008)(7696005)(64756008)(82960400001)(53546011)(38100700002)(110136005)(33656002)(76116006)(66946007)(52536014)(122000001)(508600001)(2906002)(5660300002)(83380400001)(30864003)(186003)(71200400001)(66556008)(6506007)(86362001)(8936002)(4326008)(66476007)(316002)(38070700005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ur7qIx/srjJDd7eEkW9RxHiwN1BYxfIEXiYpgYreG6ayegsPLtI1lRwrqENr?= =?us-ascii?Q?6VTvYtTmtPV3BgSsyFsQWgsnhpU4pKqXX/rUoVh48l3RilqIjvWg/cvxDQZU?= =?us-ascii?Q?YxXIJ2pZXHkjWjzvNwiLVGT+mFIfqZKvzN+edFv+PeguSHdzLWxikLxn844S?= =?us-ascii?Q?wzNWRY7XwbSnTTbwFeLg50GCy+3BM1YzR0SvKiaoIPuvMZTx9vOs9sfmWuvU?= =?us-ascii?Q?cVmtCg44pb9PKodmqLjhs1ZjWv1HMvuKG8pmmvB7OAmLrDs8rd9S4obKSQsq?= =?us-ascii?Q?pyWD9ae50a692cNRLD4z1sS5M4LOOvMyZL8chtEGdgwYSRLsqiZD0q3310nD?= =?us-ascii?Q?yYKsHlT0rceBwsejTkD5g0n1LbSs8cvGXyCsWw8z9BEVADR2GveWQYd07dcw?= =?us-ascii?Q?1xZTD5vjYBipOhCEEG9oCvIyT8YBT/Ada5fvHtfddZR2h+EPZdKXW2mk0Rx3?= =?us-ascii?Q?c2tiQWUcoJzfQtrfYllOnrr69qgJG30+kogrBstrqX8y9yCWKcLwj2Y60XX0?= =?us-ascii?Q?WeTuRcIe7ZUHJlzBWGtU6Z1JtZIlQQH9ydhr/BTcQ8EwMhqCxFOlZLPwDtXU?= =?us-ascii?Q?8j72J5tJSTOHSwg5J+1ok3hmg7LgzRJiM2bQmd3UbnnJAhnN4B4jEGgVISSp?= =?us-ascii?Q?NJ4YR7YuURbclqdwnIXMQhQ/yqEuRayqen4PkwzHX2MsiJ3wNDLvUMNRAs5h?= =?us-ascii?Q?ghTBZxDtJ9YY/pUXQHeGwSITphabTAalyTunhiEC1uHZjEBEUzvwLcPDhOXU?= =?us-ascii?Q?igfSQDNax1SzQv7xR2+N/Tsa8V2D54IxTqr2jBZdWSzP7h5ucUgMkGaTVAaV?= =?us-ascii?Q?3g5tKxvmip8IYkzLCztTVdKFWW6hKgMWZ4YACBMC2Pa76GhYOAzJg/VG5dLK?= =?us-ascii?Q?PAAgb01zZRKGe2JTQ91qj+U9RqTWlzAf6uT9xiosL6PdL5/KE7MrHbmPCydU?= =?us-ascii?Q?WTwBAXV2Hw5U7JWloHSH8Ar4xrPaRLhLPczPnUys1t1nr1byXH1aduTFp6av?= =?us-ascii?Q?eHRQvfX3cVkZdhHUz6uf3L031Rznv31WqMl/cufpIfB/Z7ZffOBXt9UCCaLu?= =?us-ascii?Q?ewpLBkcap+imeBSOE0K8Mv/8iHpNWGm1kKMhx0T6mHP7d+vq8ejmz2zAOOSh?= =?us-ascii?Q?J90rxfx5Wma2QafI5VMtebiwAd6dAZWfaQRxYGnxxHShd1XC2BfQvUzzHIWu?= =?us-ascii?Q?/J9524dIKvcbMdI+0Zuf1PF0q+Tm6EL7Ftu+d15D3Z9O9EQtkWwZLptS/Cck?= =?us-ascii?Q?1JZrQCMPZVhKj0aqgIhAt1e7Hbv70rd33NKDnjm9umgvI7uTP5biXZQsXF46?= =?us-ascii?Q?/OjMycp1YzX1DJLPZ49zssoKJp5QKFLmdmNPf45bSnE8D7bl5gJsf1XzMVad?= =?us-ascii?Q?6jKyjdWtZcFJAKtTRiqdZLHXfZ79PnfA/XL2qKFm8w655+tJIcFmoWScRF4D?= =?us-ascii?Q?aab0uRd861NXGPKSWlCFTRPa3mMaWB5YhS7DLxoLIIt3pGQ4/Kx9sVK2it9K?= =?us-ascii?Q?8P4KLeG8h10boD8VVGi1JxFyM+ZAWXx3rQAl1NneinTpgxu8qYzx5NPsc2Kf?= =?us-ascii?Q?ZHHkMNRnPJLFOx+nDx5SbObI2PK3HzMhEdmf2VCdHI5gd6H1oPapeZ5+1K0u?= =?us-ascii?Q?tBYyndX2hmUIRXemxTV3zRWCJeccwrI+mcW4eMv0l7dQEf9HHixfs9En/z6g?= =?us-ascii?Q?C6x8t6JsKTfFXo4QdaAmfLvUiVw=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DF4PR8401MB0812.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: b60fdad7-d426-4f09-e5ec-08d9976210f3 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2021 02:49:29.5165 (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: hu6GXJXLdxoORL8j+J+zFhlbZYc1WytAYRhb7sEg2JF4Qk9dOIyHfLjLgpmlOXQPr381kbKbnf/RCpfcVHydaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR8401MB0716 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: yWozvPCOhoKRf40EOPFzlBIyVAlERINf X-Proofpoint-ORIG-GUID: yWozvPCOhoKRf40EOPFzlBIyVAlERINf 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-24_07,2021-10-25_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 phishscore=0 mlxscore=0 spamscore=0 suspectscore=0 adultscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110250015 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks Abner. V2 patch is sent to fix this issue. Nickle -----Original Message----- From: Chang, Abner (HPS SW/FW Technologist) =20 Sent: Wednesday, October 13, 2021 5:03 PM To: Wang, Nickle (HPS SW) ; devel@edk2.groups.io Cc: Liming Gao Subject: RE: [PATCH 1/1] RedfishClientPkg: Facilities of EDK2 Redfish Featu= re driver Env. 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=20 > SW/FW Technologist) ; Liming Gao=20 > > Subject: [PATCH 1/1] RedfishClientPkg: Facilities of EDK2 Redfish=20 > 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=20 > 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=20 > 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,=20 > + 0x9c, > 0xc8 } \ >=20 > + } >=20 > + >=20 > +extern EFI_GUID gEfiRedfishClientPkgTokenSpaceGuid; >=20 > + >=20 > +#endif >=20 > diff --git > a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol > .h=20 > 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=20 > + 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=20 > + 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=20 > + 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, {=20 > 0x2A, 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,=20 > + 0x4646, > { 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.PcdEdkIIRedfishFeatureDriverStartup > E > ventGuid|{0xB3, 0x8F, 0xE8, 0x7C, 0xD7, 0x4B, 0x79, 0x46, 0x87, 0xA8,=20 > ventGuid|0xA8, > 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