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.27498.1635130996500526600 for ; Sun, 24 Oct 2021 20:03:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=OZGoT3Cy; spf=temperror, err=temporary DNS error (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=09325c280a=abner.chang@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 19ONJUQb006028; Mon, 25 Oct 2021 03:03:04 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 : mime-version; s=pps0720; bh=LtPvx1amiluXbfWLOdKOK3nMo8fFcPO1ABdimK5+CI8=; b=OZGoT3Cy587ibS9by5gUO2wrj3W/MMNXEdywHxuubwrtnwEYo/T/7t7PrfQxTqRroUQD C7sfbanW0+ExctCrGQ4K8slhcEUBgsTbI528lTgnvoIZYCIGLyXWpcToF+cwYXTkWO8q dDl7kZ5qf0SwYRXfafGmRnXxGOF9TLecd+Xe3eFCFDJmzjMKNO5HX1GVVgSCCUNpPRBa HY0/LPY8Ql4m3JfFwF2pOwNLq5BcwXpt/VURhx4I27HCTQaCOJdCYr6MJPQdlIkpEKgC USR8l9CzlAsBOZI01SaJKEuBFYOQ8plw9mSMcMgWLiuuJghciglAGfdT6WXdLQ0y4gBd TA== Received: from g9t5008.houston.hpe.com (g9t5008.houston.hpe.com [15.241.48.72]) by mx0b-002e3701.pphosted.com with ESMTP id 3bwdd21jhw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Oct 2021 03:03:03 +0000 Received: from G1W8108.americas.hpqcorp.net (g1w8108.austin.hp.com [16.193.72.60]) (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 0EA6C4F; Mon, 25 Oct 2021 03:03:03 +0000 (UTC) Received: from G4W9121.americas.hpqcorp.net (2002:10d2:1510::10d2:1510) by G1W8108.americas.hpqcorp.net (2002:10c1:483c::10c1:483c) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Mon, 25 Oct 2021 03:03:02 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (15.241.52.10) by G4W9121.americas.hpqcorp.net (16.210.21.16) with Microsoft SMTP Server (TLS) id 15.0.1497.23 via Frontend Transport; Mon, 25 Oct 2021 03:03:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kQhsMdyuyaWXc/Kx1mN3GfjDKn4iYVV5SQMgstd3v9sjG+5cMLwB/u4aPnDvYW//0OGsXEDl5Hfpf9pDkcr4AbIHBp7R90N8XtWn0+lwW56ZyH15bEFm+gmoGbvdqNT2OlsCraqdEb4QV8O7/i3ZFsU+BQz+RptjgbdP/KMLindVRh0uWUVeA1mJ3u39InG0m2mlVE2V/8ojRBOdzeF+89967TskZLpISssfFdpC9s+9D9Pk6FrpWjKYPMJ4W+cs37gjndvF5vdZT83ALrE0KPwNwZGCgLj/T8Ftlwyh8fcQUHxgxsL1l/ChXiSTVkoXMJXPVjUZAnY2sPpj4oqYOQ== 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=LtPvx1amiluXbfWLOdKOK3nMo8fFcPO1ABdimK5+CI8=; b=ZCRB5b05imGPgNd85eZWWAGsD/Yy+CUTN1dkNSGNd5E0+WWHFZGsUzaDDzugPdUlC9rQEHKE7XsRxNA8Oq4y5WeBifgzY6La8d1HIYrXiVb8v2OwWaa1oiJtZ7HQKBGPp6HbnSvyTBWVQVN5Jr9bz6vhdACeevQFECrz9h3k355m2S++S3uAUcspOAiCmRXh69hgE5OXsoS/V5dS/TnUSpZ4uCQW2b9NO+Rq0lxb/QpXFnejCbuB+Jid1X4nswRNLKJZjh48eiMsz0bc1cQ0zD1gQ+Ew8bII5E2TfuSfA40zJYTRRJR5/VR0dY5+MyIMz8zTej65R4Ahiur5c05lrQ== 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 CS1PR8401MB0423.NAMPRD84.PROD.OUTLOOK.COM (2a01:111:e400:7513::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16; Mon, 25 Oct 2021 03:03:00 +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.4628.020; Mon, 25 Oct 2021 03:03:00 +0000 From: "Abner Chang" To: "Wang, Nickle (HPS SW)" , "devel@edk2.groups.io" CC: Liming Gao Subject: Re: [PATCH V2 1/1] staging/RedfishClientPkg: Facilities of EDK2 Redfish Feature driver Env. Thread-Topic: [PATCH V2 1/1] staging/RedfishClientPkg: Facilities of EDK2 Redfish Feature driver Env. Thread-Index: AQHXyUq+QD9brDguSEWbxEJyPPlaZKvjBu38 Date: Mon, 25 Oct 2021 03:03:00 +0000 Message-ID: References: <20211025024731.224-1-nickle.wang@hpe.com> <20211025024731.224-2-nickle.wang@hpe.com> In-Reply-To: <20211025024731.224-2-nickle.wang@hpe.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: ceb446b2-62ca-2896-ae2a-f1ceaa0e5d0a 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: d16e969a-e1d2-4a97-3cca-08d99763f467 x-ms-traffictypediagnostic: CS1PR8401MB0423: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: JGxfclzOBqhgTgd/hCmzENP1hqiOgKT3+G/IDYFBGhjbo/e55M6rXbojr56p8PEvhyCpJB7rq8EvsBZs5m3SWtj+Ke57gnKOWcKwsXlBCPBCEyXflsosMzJ2H4QLm5DAArhPrd2EmLs9GXtDSk2dM8FZhD4ZyJ5lgQDDjxb2zkVTeS84t2mvJOqyBJDltbovewfu05nGwnxJCqB+weLQJfa+5ix9c96iJSyMKPXL3WDVEeREebc9B2Gegl1tyxjLLAMR/1EDCvkLF4BMrsv/z/yDurRbWhxuow6wWSJkzbnmjs5AV4yf5hpAmqpmyeozL0viG6CmZsVU8/O94bxGXSgQnrIhUGlZ9wAX7ZX96tlgEjrIF4g/nDKGVDDGQ8WKHsIE00my/v3CuoxvlcuVVg0R0CNIdy4ZRgKVRWhhzhESM5y2mluSPL5arpY+aKpa4WXxMZy8Xqangr+6J6bozf5Zg9VS0lLdSX1ClqPX15hxvHTJgPTMXQ7zWehen/Nv6QQyacL9Z0DKXujziaJUkm8HkZS6/T3AU0heh+X2rSo1DJ5dVxAYyLf4KR3F9BaoSbyofN+xdziy5cw6pOLx/llpa4sqb56tSYkdUACZSBpZm7vVR6ZsVdZLLF7QIbJiwOhQZIR0sFx1mj4fhseEHkjeb0lWKfBEzLkceD5JLMC1GFw6bud0qxGP5YK9Rvkt2PRgGYNFrcIBo9Qpbbr1tw== 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)(6506007)(316002)(4326008)(82960400001)(66446008)(7696005)(66946007)(53546011)(55236004)(66556008)(55016002)(64756008)(33656002)(122000001)(19627405001)(71200400001)(91956017)(66476007)(5660300002)(30864003)(9686003)(76116006)(186003)(26005)(110136005)(8676002)(2906002)(52536014)(86362001)(38100700002)(508600001)(8936002)(38070700005)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?zlpj5Y8rwtXJwmZhtYbIHLMr0wdf8CsxklD2re1cwU2V5uyeqjgCJP5F68?= =?iso-8859-1?Q?sht8uAa9BgGBprPWNA/Bl84fdvyhgK5iofMeTjxhr/7Xoo4zNPmxFo+C5b?= =?iso-8859-1?Q?16K0rCHhvfXdKV3EZOauSTLPzhgTYHDJzSdzvaxYp75TMv9aMSpOj7PkVo?= =?iso-8859-1?Q?cKSNRni1yQN8cIXELTJ47m1Zg+aB8MMvcNgZOD/3T4NsBjBvlj1W+VkqcG?= =?iso-8859-1?Q?it9NoALiiWVC5mcalgXydTyIbLqZE/k+5Wac+xX3wwedlm6HUMN1phrq3A?= =?iso-8859-1?Q?0Bs9o+xMCXSW15H6Oeq7G2WLbyo7wp/KjJtDFXm3sDs6UElsYk99ksndZe?= =?iso-8859-1?Q?RcxFzlylj3qBJ6Zdt6RFIXbuwLL6QCy7nYavJztAsFEhQx3i8btDxIp5MW?= =?iso-8859-1?Q?Agdo6+Ya/yxrlpb//GWy5UgmN7czreQfT/Kbz1Pq1D6i5bYTvmQwijngKP?= =?iso-8859-1?Q?xeYaBHi/J/vxE/V0W27zwe9f+h7hKG7momTD4DjQ9nmnoMI6hyXipOMcHt?= =?iso-8859-1?Q?XHzutbnCJVrTi3xNqsaJaye6gY4R6sLlMFHA6E4sajm6wZFfjPjmwHYRL6?= =?iso-8859-1?Q?tD3R0QWbRFaDqSjfe5j7R06pBkEEVmTbG+Z1uWtS82ifUq5SB3uN71Y3Rc?= =?iso-8859-1?Q?YyKzlRPHa1kJ/Lo/a87pFd2PQPlNp5w5fXJMhk0gKfb6pgE6f1E0a1f9D+?= =?iso-8859-1?Q?VklNXJ2THXhxXc71lEenmygDgTP2T/btJGJellhYKBT5/3kWE+cxtgow11?= =?iso-8859-1?Q?2HH/99bJZwfvxVP4qpJIS+JM6WMosjjJSD+rVJMwxZz4N5aTtY2v/y+UgF?= =?iso-8859-1?Q?DxBaLz3J80qAr7T+wLYnpwFcWd0UxEM3qoU5UgzJkF0ToDHEr3D9gS6BJR?= =?iso-8859-1?Q?CVKvCi4WmEPDYDPqAv4yD/of0IzEPdBWPTVt9joYQWHOnO4kWKkGW1LVeg?= =?iso-8859-1?Q?YGPrHqW7dIbRZhCRkw3s7Kemsv5ligyw9ccSXTTofG5i/HmXQqGLfvV7Zb?= =?iso-8859-1?Q?vf5UDG3oNfwVFCSWI9KWf2dfIpbiGP9erLmjQ/tzvb30n3NL/cGHCnyXVV?= =?iso-8859-1?Q?EjilTildPM6akitcr8b4MXlNP7JA8R3hCStgS7likO62RlrrZ/K3hkinei?= =?iso-8859-1?Q?2zkaQNjlJv/ZCH1LYFjGoMEolEYdseNIZo/sleCglSPMk0cFs7EsXFZPeD?= =?iso-8859-1?Q?jAATRNJ+yq8+VgZAzosl3D6FK5QUDCKjUEIvP2iDRxUIukbW75xk0ZT9+E?= =?iso-8859-1?Q?iJRY5w6uCSNDNKMsmednXMTZ2a06ghXyyF1XrU3VUNJ+eiQsMNR/W/QyOU?= =?iso-8859-1?Q?H/Qz4Z63Vp1UzHPouS4qdnd+yBrJtyoDZsFXz9QsnxJcUB2MSlmf8T8xgd?= =?iso-8859-1?Q?IZhmFePVHoOyW57NjXJ6Z+yvgg6/6Jkd4freRDXzTveLY4YSKTUc8RlGZf?= =?iso-8859-1?Q?x8r5WmQ9HipYrChv0J3wD72XnbJ8TXFh9t+0uTgt8rTIBVcW5TnOleQT6u?= =?iso-8859-1?Q?FswmptgWRN3qfGKU7ZmD7JzHgsQnefuSOiMzAATUQxrvjT4ZMwNap5hOi1?= =?iso-8859-1?Q?X8cWJtsiDYRCqjiH86ODJzKDCaoBVxS7axOkfymHFr/1HVIO/PardSBWBo?= =?iso-8859-1?Q?NW5QEamc9gux4pP26cW+qZeoWai4kOBY+8enqGHog4CKL1G+Y2wg8Q4rV9?= =?iso-8859-1?Q?FhATxO0+ZOQQ5eRJ1XQ=3D?= 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: d16e969a-e1d2-4a97-3cca-08d99763f467 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2021 03:03:00.6649 (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: /8vJh0+YsnY9vneLKq/kJNhpl1DfLmz+0LemG/Kydda/lqIv0nXwvk4FUIv0JViI/k5r6IYbKbwrdOwFf5JOuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CS1PR8401MB0423 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: e6qQzce_WHb0UFqYTsyAtkqZxjNsCX8m X-Proofpoint-ORIG-GUID: e6qQzce_WHb0UFqYTsyAtkqZxjNsCX8m 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-25_01,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-2110250018 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CS1PR8401MB1144551F3A14843EB1BAF1D4FF839CS1PR8401MB1144_" --_000_CS1PR8401MB1144551F3A14843EB1BAF1D4FF839CS1PR8401MB1144_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Reviewed-by: Abner Chang Thanks ________________________________ From: Wang, Nickle (HPS SW) Sent: Monday, October 25, 2021 10:47 AM To: devel@edk2.groups.io Cc: Wang, Nickle (HPS SW) ; Chang, Abner (HPS SW/FW Te= chnologist) ; Liming Gao Subject: [PATCH V2 1/1] staging/RedfishClientPkg: Facilities of EDK2 Redfis= h Feature driver Env. Initial common header file and meta files for feature drivers. 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/RedfishClientPkgTokenSpac= e.h create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceC= onfigProtocol.h create mode 100644 RedfishClientPkg/Include/RedfishCollectionCommon.h create mode 100644 RedfishClientPkg/Include/RedfishResourceCommon.h diff --git a/RedfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h b/R= edfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h new file mode 100644 index 0000000000..a2a09ed004 --- /dev/null +++ b/RedfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h @@ -0,0 +1,20 @@ +/** @file + GUID for RedfishClientPkg PCD Token Space + + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef REDFISHCLIENTPKG_TOKEN_SPACE_GUID_H_ +#define REDFISHCLIENTPKG_TOKEN_SPACE_GUID_H_ + +#define REDFISHCLIENTPKG_TOKEN_SPACE_GUID \ + { \ + 0x8c444dae, 0x728b, 0x48ee, { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c= , 0xc8 } \ + } + +extern EFI_GUID gEfiRedfishClientPkgTokenSpaceGuid; + +#endif diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigPr= otocol.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProt= ocol.h new file mode 100644 index 0000000000..d6c41dda52 --- /dev/null +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.= h @@ -0,0 +1,129 @@ +/** @file + This file defines the EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL interface. + + (C) Copyright 2021 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef EDKII_REDFISH_RESOURCE_CONFIG_H_ +#define EDKII_REDFISH_RESOURCE_CONFIG_H_ + +typedef struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL EDKII_REDFISH_RESOU= RCE_CONFIG_PROTOCOL; + +/** + Provising redfish resource by given URI. + + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_CONFI= G_PROTOCOL instance. + @param[in] Uri Target URI to create resource. + @param[in] HttpPostMode TRUE if resource does not exist, HTTP P= OST method is used. + FALSE if the resource exist but some of= properties are missing, + HTTP PUT method is used. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING) ( + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, + IN CHAR8 *Uri, + IN BOOLEAN HttpPostMode + ); + +/** + Consume resource from given URI. + + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_CONFI= G_PROTOCOL instance. + @param[in] Uri The target URI to consume. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME) ( + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, + IN CHAR8 *Uri + ); + + +/** + Update resource to given URI. + + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_CONFI= G_PROTOCOL instance. + @param[in] Uri The target URI to consume. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE) ( + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, + IN CHAR8 *Uri + ); + + +/** + Check resource on given URI. + + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_CONFI= G_PROTOCOL instance. + @param[in] Uri The target URI to consume. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK) ( + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, + IN CHAR8 *Uri + ); + +// +// definition of REDFISH_SCHEMA_INFO +// +#define REDFISH_SCHEMA_STRING_SIZE (FixedPcdGet32 (PcdMaxRedfishSchemaStr= ingSize)) +#define REDFISH_SCHEMA_VERSION_SIZE (FixedPcdGet32 (PcdMaxRedfishSchemaVer= sionSize)) + +typedef struct _SCHEMA_INFO { + CHAR8 Schema[REDFISH_SCHEMA_STRING_SIZE]; + CHAR8 Major[REDFISH_SCHEMA_VERSION_SIZE]; + CHAR8 Minor[REDFISH_SCHEMA_VERSION_SIZE]; + CHAR8 Errata[REDFISH_SCHEMA_VERSION_SIZE]; +} REDFISH_SCHEMA_INFO; + +/** + Get information about this protocol. + + @param[in] This Pointer to EDKII_REDFISH_RESOURCE_CONFI= G_PROTOCOL instance. + @param[out] Info The schema information. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +typedef +EFI_STATUS +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO) ( + IN EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *This, + OUT REDFISH_SCHEMA_INFO *Info + ); + +struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL { + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING Provisioning; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME Consume; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE Update; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK Check; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO GetInfo; +}; + +extern EFI_GUID gEdkIIRedfishResourceConfigProtocolGuid; + +#endif diff --git a/RedfishClientPkg/Include/RedfishCollectionCommon.h b/RedfishCl= ientPkg/Include/RedfishCollectionCommon.h new file mode 100644 index 0000000000..3962b361ed --- /dev/null +++ b/RedfishClientPkg/Include/RedfishCollectionCommon.h @@ -0,0 +1,53 @@ +/** @file + Redfish feature driver collection common header file. + + (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef EFI_REDFISH_COLLECTION_COMMON_H_ +#define EFI_REDFISH_COLLECTION_COMMON_H_ + +// +// Libraries +// +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// +// Protocols +// +#include +#include +#include +#include +#include + +#define IS_EMPTY_STRING(a) ((a) =3D=3D NULL || (a)[0] =3D=3D = '\0') +#define REDFISH_DEBUG_TRACE DEBUG_INFO + +typedef struct _REDFISH_COLLECTION_PRIVATE { + EFI_REST_JSON_STRUCTURE_PROTOCOL *JsonStructProtocol; + EDKII_REDFISH_FEATURE_PROTOCOL *FeatureProtocol; + REDFISH_SERVICE RedfishService; + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL ConfigHandler; + EFI_EVENT Event; + CHAR8 *CollectionPath; + CHAR8 *CollectionJson; + REDFISH_PAYLOAD CollectionPayload; + REDFISH_RESPONSE RedResponse; +} REDFISH_COLLECTION_PRIVATE; + +#define REDFISH_COLLECTION_PRIVATE_DATA_FROM_PROTOCOL(This) \ + BASE_CR ((This), REDFISH_COLLECTION_PRIVATE, ConfigHandler) + +#endif diff --git a/RedfishClientPkg/Include/RedfishResourceCommon.h b/RedfishClie= ntPkg/Include/RedfishResourceCommon.h new file mode 100644 index 0000000000..1ba992bb69 --- /dev/null +++ b/RedfishClientPkg/Include/RedfishResourceCommon.h @@ -0,0 +1,123 @@ +/** @file + Redfish feature driver common header file. + + (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef EFI_REDFISH_RESOURCE_COMMON_H_ +#define EFI_REDFISH_RESOURCE_COMMON_H_ + +#define MAX_RED_PATH_LEN 128 +#define IS_EMPTY_STRING(a) ((a) =3D=3D NULL || (a)[0] =3D=3D '\0') +#define REDFISH_DEBUG_TRACE DEBUG_INFO + +// +// Libraries +// +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// +// Protocols +// +#include +#include +#include +#include + + +typedef struct _REDFISH_RESOURCE_COMMON_PRIVATE { + REDFISH_SERVICE RedfishService; + EFI_REST_JSON_STRUCTURE_PROTOCOL *JsonStructProtocol; + EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL RedfishResourceConfig; + EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL ConfigHandler; + EFI_EVENT Event; + CHAR8 *Uri; + CHAR8 *Json; + REDFISH_PAYLOAD Payload; +} REDFISH_RESOURCE_COMMON_PRIVATE; + +#define REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_CONFIG_PROTOCOL(This) \ + BASE_CR ((This), REDFISH_RESOURCE_COMMON_PRIVATE, ConfigHandler) + +#define REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTOCOL(This) = \ + BASE_CR ((This), REDFISH_RESOURCE_COMMON_PRIVATE, RedfishResourc= eConfig) + + +/** + Consume resource from given URI. + + @param[in] This Pointer to REDFISH_RESOURCE_COMMON_PRIV= ATE instance. + @param[in] Json The JSON to consume. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +EFI_STATUS +RedfishConsumeResourceCommon ( + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, + IN CHAR8 *Json + ); + +/** + Provisioning redfish resource by given URI. + + @param[in] This Pointer to EFI_HP_REDFISH_HII_PROTOCOL = instance. + @param[in] ResourceExist TRUE if resource exists, PUT method wil= l be used. + FALSE if resource does not exist POST m= ethod is used. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +EFI_STATUS +RedfishProvisioningResourceCommon ( + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, + IN BOOLEAN ResourceExist + ); + +/** + Check resource from given URI. + + @param[in] This Pointer to REDFISH_RESOURCE_COMMON_PRIV= ATE instance. + @param[in] Json The JSON to consume. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +EFI_STATUS +RedfishCheckResourceCommon ( + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, + IN CHAR8 *Json + ); + +/** + Update resource to given URI. + + @param[in] This Pointer to REDFISH_RESOURCE_COMMON_PRIV= ATE instance. + @param[in] Json The JSON to consume. + + @retval EFI_SUCCESS Value is returned successfully. + @retval Others Some error happened. + +**/ +EFI_STATUS +RedfishUpdateResourceCommon ( + IN REDFISH_RESOURCE_COMMON_PRIVATE *Private, + IN CHAR8 *Json + ); + +#endif diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/Redfi= shClientPkg.dec index 8fa92d5b1e..f01509d78f 100644 --- a/RedfishClientPkg/RedfishClientPkg.dec +++ b/RedfishClientPkg/RedfishClientPkg.dec @@ -21,9 +21,12 @@ [Protocols] ## Include/Protocol/EdkIIRedfishFeature.h - gEdkIIRedfishFeatureProtocolGuid =3D { 0x785CC694, 0x4930, 0xEFBF, { 0x2= A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } } + gEdkIIRedfishFeatureProtocolGuid =3D { 0x785CC694, 0x4930, 0xEFBF= , { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } } + ## Include/Protocol/EdkIIRedfishResourceConfigProtocol.h + gEdkIIRedfishResourceConfigProtocolGuid =3D { 0x6f164c68, 0xfb09, 0x4646= , { 0xa8, 0xd3, 0x24, 0x11, 0x5d, 0xab, 0x3e, 0xe7 } } [Guids] + ## Include/Guid/RedfishClientPkgTokenSpace.h gEfiRedfishClientPkgTokenSpaceGuid =3D { 0x8c444dae, 0x728b, 0x48ee, = { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 } } [PcdsFixedAtBuild] @@ -35,3 +38,6 @@ # gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDriverStartupEv= entGuid|{0xB3, 0x8F, 0xE8, 0x7C, 0xD7, 0x4B, 0x79, 0x46, 0x87, 0xA8, 0xA8, = 0xD8, 0xDE, 0xE5, 0x0D, 0x2B}|VOID*|0x10000003 +[PcdsFixedAtBuild] + gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32|UINT= 32|0x10000001 + gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8|UINT= 32|0x10000002 -- 2.31.1.windows.1 --_000_CS1PR8401MB1144551F3A14843EB1BAF1D4FF839CS1PR8401MB1144_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Reviewed-by: Abner Chang <abner.chang@hpe.com>

Thanks


From: Wang, Nickle (HPS S= W) <nickle.wang@hpe.com>
Sent: Monday, October 25, 2021 10:47 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Wang, Nickle (HPS SW) <nickle.wang@hpe.com>; Chang, Abner = (HPS SW/FW Technologist) <abner.chang@hpe.com>; Liming Gao <gaolim= ing@byosoft.com.cn>
Subject: [PATCH V2 1/1] staging/RedfishClientPkg: Facilities of EDK2= Redfish Feature driver Env.
 
Initial common header file and meta files for feat= ure drivers.

Signed-off-by: Nickle Wang <nickle.wang@hpe.com>
Cc: Abner Chang <abner.chang@hpe.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
---
 .../Include/Guid/RedfishClientPkgTokenSpace.h |  20 +++
 .../EdkIIRedfishResourceConfigProtocol.h     = ; | 129 ++++++++++++++++++
 .../Include/RedfishCollectionCommon.h     &n= bsp;   |  53 +++++++
 .../Include/RedfishResourceCommon.h     &nbs= p;     | 123 +++++++++++++++++
 RedfishClientPkg/RedfishClientPkg.dec     &n= bsp;   |   8 +-
 5 files changed, 332 insertions(+), 1 deletion(-)
 create mode 100644 RedfishClientPkg/Include/Guid/RedfishClientPkgToke= nSpace.h
 create mode 100644 RedfishClientPkg/Include/Protocol/EdkIIRedfishReso= urceConfigProtocol.h
 create mode 100644 RedfishClientPkg/Include/RedfishCollectionCommon.h=
 create mode 100644 RedfishClientPkg/Include/RedfishResourceCommon.h
diff --git a/RedfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h b/R= edfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h
new file mode 100644
index 0000000000..a2a09ed004
--- /dev/null
+++ b/RedfishClientPkg/Include/Guid/RedfishClientPkgTokenSpace.h
@@ -0,0 +1,20 @@
+/** @file

+  GUID for RedfishClientPkg PCD Token Space

+

+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR&= gt;

+

+  SPDX-License-Identifier: BSD-2-Clause-Patent

+

+**/

+

+#ifndef REDFISHCLIENTPKG_TOKEN_SPACE_GUID_H_

+#define REDFISHCLIENTPKG_TOKEN_SPACE_GUID_H_

+

+#define REDFISHCLIENTPKG_TOKEN_SPACE_GUID \

+  { \

+    0x8c444dae, 0x728b, 0x48ee, { 0x9e, 0x19, 0x8f, 0x0a, 0= x3d, 0x4e, 0x9c, 0xc8 } \

+  }

+

+extern EFI_GUID gEfiRedfishClientPkgTokenSpaceGuid;

+

+#endif

diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigPr= otocol.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProt= ocol.h
new file mode 100644
index 0000000000..d6c41dda52
--- /dev/null
+++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.= h
@@ -0,0 +1,129 @@
+/** @file

+  This file defines the EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL interf= ace.

+

+  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR&= gt;

+

+  SPDX-License-Identifier: BSD-2-Clause-Patent

+

+**/

+

+#ifndef EDKII_REDFISH_RESOURCE_CONFIG_H_

+#define EDKII_REDFISH_RESOURCE_CONFIG_H_

+

+typedef struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL EDKII_REDFISH_RESOU= RCE_CONFIG_PROTOCOL;

+

+/**

+  Provising redfish resource by given URI.

+

+  @param[in]   This      &nbs= p;         Pointer to EDKII_REDFISH= _RESOURCE_CONFIG_PROTOCOL instance.

+  @param[in]   Uri       = ;          Target URI to creat= e resource.

+  @param[in]   HttpPostMode     &n= bsp;  TRUE if resource does not exist, HTTP POST method is used.

+            &n= bsp;            = ;          FALSE if the resour= ce exist but some of properties are missing,

+            &n= bsp;            = ;          HTTP PUT method is = used.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+typedef

+EFI_STATUS

+(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING) (

+  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL&n= bsp; *This,

+  IN     CHAR8      = ;            &n= bsp;            = ;    *Uri,

+  IN     BOOLEAN     &nb= sp;            =             &nb= sp;  HttpPostMode

+  );

+

+/**

+  Consume resource from given URI.

+

+  @param[in]   This      &nbs= p;         Pointer to EDKII_REDFISH= _RESOURCE_CONFIG_PROTOCOL instance.

+  @param[in]   Uri       = ;          The target URI to c= onsume.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+typedef

+EFI_STATUS

+(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME) (

+  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL&n= bsp; *This,

+  IN     CHAR8      = ;            &n= bsp;            = ;    *Uri

+  );

+

+

+/**

+  Update resource to given URI.

+

+  @param[in]   This      &nbs= p;         Pointer to EDKII_REDFISH= _RESOURCE_CONFIG_PROTOCOL instance.

+  @param[in]   Uri       = ;          The target URI to c= onsume.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+typedef

+EFI_STATUS

+(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE) (

+  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL&n= bsp; *This,

+  IN     CHAR8      = ;            &n= bsp;            = ;    *Uri

+  );

+

+

+/**

+  Check resource on given URI.

+

+  @param[in]   This      &nbs= p;         Pointer to EDKII_REDFISH= _RESOURCE_CONFIG_PROTOCOL instance.

+  @param[in]   Uri       = ;          The target URI to c= onsume.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+typedef

+EFI_STATUS

+(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK) (

+  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL&n= bsp; *This,

+  IN     CHAR8      = ;            &n= bsp;            = ;    *Uri

+  );

+

+//

+// definition of REDFISH_SCHEMA_INFO

+//

+#define REDFISH_SCHEMA_STRING_SIZE  (FixedPcdGet32 (PcdMaxRedfishSche= maStringSize))

+#define REDFISH_SCHEMA_VERSION_SIZE (FixedPcdGet32 (PcdMaxRedfishSchemaVer= sionSize))

+

+typedef struct _SCHEMA_INFO {

+  CHAR8        Schema[REDFISH_SCHE= MA_STRING_SIZE];

+  CHAR8        Major[REDFISH_SCHEM= A_VERSION_SIZE];

+  CHAR8        Minor[REDFISH_SCHEM= A_VERSION_SIZE];

+  CHAR8        Errata[REDFISH_SCHE= MA_VERSION_SIZE];

+} REDFISH_SCHEMA_INFO;

+

+/**

+  Get information about this protocol.

+

+  @param[in]   This      &nbs= p;         Pointer to EDKII_REDFISH= _RESOURCE_CONFIG_PROTOCOL instance.

+  @param[out]  Info       &nb= sp;        The schema information.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+typedef

+EFI_STATUS

+(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO) (

+  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL&n= bsp; *This,

+  OUT    REDFISH_SCHEMA_INFO    &n= bsp;            = ;    *Info

+  );

+

+struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL {

+  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING Provisioning;
+  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME   &nb= sp;  Consume;

+  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE   &nbs= p;   Update;

+  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK    = ;    Check;

+  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO   &n= bsp; GetInfo;

+};

+

+extern EFI_GUID gEdkIIRedfishResourceConfigProtocolGuid;

+

+#endif

diff --git a/RedfishClientPkg/Include/RedfishCollectionCommon.h b/RedfishCl= ientPkg/Include/RedfishCollectionCommon.h
new file mode 100644
index 0000000000..3962b361ed
--- /dev/null
+++ b/RedfishClientPkg/Include/RedfishCollectionCommon.h
@@ -0,0 +1,53 @@
+/** @file

+  Redfish feature driver collection common header file.

+

+  (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP&l= t;BR>

+

+  SPDX-License-Identifier: BSD-2-Clause-Patent

+

+**/

+

+#ifndef EFI_REDFISH_COLLECTION_COMMON_H_

+#define EFI_REDFISH_COLLECTION_COMMON_H_

+

+//

+// Libraries

+//

+#include <Library/BaseMemoryLib.h>

+#include <Library/DebugLib.h>

+#include <Library/MemoryAllocationLib.h>

+#include <Library/PrintLib.h>

+#include <Library/PcdLib.h>

+#include <Library/RedfishLib.h>

+#include <Library/RedfishFeatureUtilityLib.h>

+#include <Library/UefiLib.h>

+#include <Library/UefiBootServicesTableLib.h>

+

+//

+// Protocols

+//

+#include <Protocol/EdkIIRedfishConfigHandler.h>

+#include <Protocol/EdkIIRedfishResourceConfigProtocol.h>

+#include <Protocol/EdkIIRedfishFeature.h>

+#include <Protocol/RestJsonStructure.h>

+#include <Protocol/RestEx.h>

+

+#define IS_EMPTY_STRING(a)        =       ((a) =3D=3D NULL || (a)[0] =3D=3D '\0')

+#define REDFISH_DEBUG_TRACE        = ;     DEBUG_INFO

+

+typedef struct _REDFISH_COLLECTION_PRIVATE {

+  EFI_REST_JSON_STRUCTURE_PROTOCOL    *JsonStructProto= col;

+  EDKII_REDFISH_FEATURE_PROTOCOL      *Featu= reProtocol;

+  REDFISH_SERVICE        &nbs= p;            Redfis= hService;

+  EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL ConfigHandler;

+  EFI_EVENT         &nbs= p;            &= nbsp;    Event;

+  CHAR8          &n= bsp;            = ;        *CollectionPath;

+  CHAR8          &n= bsp;            = ;        *CollectionJson;

+  REDFISH_PAYLOAD        &nbs= p;            Collec= tionPayload;

+  REDFISH_RESPONSE        &nb= sp;           RedResponse= ;

+} REDFISH_COLLECTION_PRIVATE;

+

+#define REDFISH_COLLECTION_PRIVATE_DATA_FROM_PROTOCOL(This) \

+          BASE_CR ((This), RE= DFISH_COLLECTION_PRIVATE, ConfigHandler)

+

+#endif

diff --git a/RedfishClientPkg/Include/RedfishResourceCommon.h b/RedfishClie= ntPkg/Include/RedfishResourceCommon.h
new file mode 100644
index 0000000000..1ba992bb69
--- /dev/null
+++ b/RedfishClientPkg/Include/RedfishResourceCommon.h
@@ -0,0 +1,123 @@
+/** @file

+  Redfish feature driver common header file.

+

+  (C) Copyright 2020-2021 Hewlett Packard Enterprise Development LP&l= t;BR>

+

+  SPDX-License-Identifier: BSD-2-Clause-Patent

+

+**/

+

+#ifndef EFI_REDFISH_RESOURCE_COMMON_H_

+#define EFI_REDFISH_RESOURCE_COMMON_H_

+

+#define MAX_RED_PATH_LEN      128

+#define IS_EMPTY_STRING(a)    ((a) =3D=3D NULL || (a)[0] = =3D=3D '\0')

+#define REDFISH_DEBUG_TRACE   DEBUG_INFO

+

+//

+// Libraries

+//

+#include <Library/DebugLib.h>

+#include <Library/BaseMemoryLib.h>

+#include <Library/MemoryAllocationLib.h>

+#include <Library/PrintLib.h>

+#include <Library/PcdLib.h>

+#include <Library/RedfishLib.h>

+#include <Library/RedfishFeatureUtilityLib.h>

+#include <Library/RedfishPlatformConfigLib.h>

+#include <Library/UefiLib.h>

+#include <Library/UefiBootServicesTableLib.h>

+

+//

+// Protocols

+//

+#include <Protocol/EdkIIRedfishConfigHandler.h>

+#include <Protocol/EdkIIRedfishResourceConfigProtocol.h>

+#include <Protocol/RestJsonStructure.h>

+#include <Protocol/RestEx.h>

+

+

+typedef struct _REDFISH_RESOURCE_COMMON_PRIVATE {

+  REDFISH_SERVICE        &nbs= p;            &= nbsp;   RedfishService;

+  EFI_REST_JSON_STRUCTURE_PROTOCOL      = ;  *JsonStructProtocol;

+  EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  RedfishResourceConfig;=

+  EDKII_REDFISH_CONFIG_HANDLER_PROTOCOL   ConfigHandler;
+  EFI_EVENT         &nbs= p;            &= nbsp;        Event;

+  CHAR8          &n= bsp;            = ;            *Uri;
+  CHAR8          &n= bsp;            = ;            *Json;<= br>
+  REDFISH_PAYLOAD        &nbs= p;            &= nbsp;   Payload;

+} REDFISH_RESOURCE_COMMON_PRIVATE;

+

+#define REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_CONFIG_PROTOCOL(This) \<= br>
+          BASE_CR ((This), RE= DFISH_RESOURCE_COMMON_PRIVATE, ConfigHandler)

+

+#define REDFISH_RESOURCE_COMMON_PRIVATE_DATA_FROM_RESOURCE_PROTOCOL(This) = \

+          BASE_CR ((This), RE= DFISH_RESOURCE_COMMON_PRIVATE, RedfishResourceConfig)

+

+

+/**

+  Consume resource from given URI.

+

+  @param[in]   This      &nbs= p;         Pointer to REDFISH_RESOU= RCE_COMMON_PRIVATE instance.

+  @param[in]   Json      &nbs= p;         The JSON to consume.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+EFI_STATUS

+RedfishConsumeResourceCommon (

+  IN     REDFISH_RESOURCE_COMMON_PRIVATE  *P= rivate,

+  IN     CHAR8      = ;            &n= bsp;         *Json

+  );

+

+/**

+  Provisioning redfish resource by given URI.

+

+  @param[in]   This      &nbs= p;         Pointer to EFI_HP_REDFIS= H_HII_PROTOCOL instance.

+  @param[in]   ResourceExist     &= nbsp; TRUE if resource exists, PUT method will be used.

+            &n= bsp;            = ;          FALSE if resource d= oes not exist POST method is used.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+EFI_STATUS

+RedfishProvisioningResourceCommon (

+  IN     REDFISH_RESOURCE_COMMON_PRIVATE  *P= rivate,

+  IN     BOOLEAN     &nb= sp;            =         ResourceExist

+  );

+

+/**

+  Check resource from given URI.

+

+  @param[in]   This      &nbs= p;         Pointer to REDFISH_RESOU= RCE_COMMON_PRIVATE instance.

+  @param[in]   Json      &nbs= p;         The JSON to consume.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+EFI_STATUS

+RedfishCheckResourceCommon (

+  IN     REDFISH_RESOURCE_COMMON_PRIVATE  *P= rivate,

+  IN     CHAR8      = ;            &n= bsp;         *Json

+  );

+

+/**

+  Update resource to given URI.

+

+  @param[in]   This      &nbs= p;         Pointer to REDFISH_RESOU= RCE_COMMON_PRIVATE instance.

+  @param[in]   Json      &nbs= p;         The JSON to consume.

+

+  @retval EFI_SUCCESS        =       Value is returned successfully.

+  @retval Others         = ;          Some error happened= .

+

+**/

+EFI_STATUS

+RedfishUpdateResourceCommon (

+  IN     REDFISH_RESOURCE_COMMON_PRIVATE  *P= rivate,

+  IN     CHAR8      = ;            &n= bsp;         *Json

+  );

+

+#endif

diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/Redfi= shClientPkg.dec
index 8fa92d5b1e..f01509d78f 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -21,9 +21,12 @@
 

 [Protocols]

   ## Include/Protocol/EdkIIRedfishFeature.h

-  gEdkIIRedfishFeatureProtocolGuid =3D { 0x785CC694, 0x4930, 0xEFBF, = { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0xCC, 0xAA, 0x34 } }

+  gEdkIIRedfishFeatureProtocolGuid      = ;  =3D { 0x785CC694, 0x4930, 0xEFBF, { 0x2A, 0xCB, 0xA4, 0xB6, 0xA1, 0= xCC, 0xAA, 0x34 } }

+  ## Include/Protocol/EdkIIRedfishResourceConfigProtocol.h

+  gEdkIIRedfishResourceConfigProtocolGuid =3D { 0x6f164c68, 0xfb09, 0= x4646, { 0xa8, 0xd3, 0x24, 0x11, 0x5d, 0xab, 0x3e, 0xe7 } }

 

 [Guids]

+  ## Include/Guid/RedfishClientPkgTokenSpace.h

   gEfiRedfishClientPkgTokenSpaceGuid    =3D { 0x8= c444dae, 0x728b, 0x48ee, { 0x9e, 0x19, 0x8f, 0x0a, 0x3d, 0x4e, 0x9c, 0xc8 }= }

 

 [PcdsFixedAtBuild]

@@ -35,3 +38,6 @@
   #

   gEfiRedfishClientPkgTokenSpaceGuid.PcdEdkIIRedfishFeatureDrive= rStartupEventGuid|{0xB3, 0x8F, 0xE8, 0x7C, 0xD7, 0x4B, 0x79, 0x46, 0x87, 0x= A8, 0xA8, 0xD8, 0xDE, 0xE5, 0x0D, 0x2B}|VOID*|0x10000003

 

+[PcdsFixedAtBuild]

+  gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaStringSize|32= |UINT32|0x10000001

+  gEfiRedfishClientPkgTokenSpaceGuid.PcdMaxRedfishSchemaVersionSize|8= |UINT32|0x10000002

--
2.31.1.windows.1

--_000_CS1PR8401MB1144551F3A14843EB1BAF1D4FF839CS1PR8401MB1144_--