From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id F1AC9D81113 for ; Wed, 6 Mar 2024 05:16:04 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=9xwHZrsgZq4Bttzz1V2SBzGCi58Du4kF9AnfIzRqSXs=; c=relaxed/simple; d=groups.io; h=From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1709702163; v=1; b=tAoj4FRPxbJyJ4TJMkmbHanQWYFLadq01tqaKTBPheGQoIO+3rLDxYhgw4VkbBkEO3HaEia7 lkY4ax86ibKLIppLmmyOt3qY9fWXD31YO0qgtVuMQ9Cd1dqWHdc2blsD7VF3ChVX78MwlTn0qzK APXhsxzY7FQbLa78D8MZodAGrmzooZIVblSvLCqkuyJoGOGTno2LCDFSvo5YH+snFpx8tb9H/b+ +jWD6e4OdbZnVterHUaNJknsFLYeQLqCZEah4VBjg9kd6FobJWUXW1hkieonTFegEFb4GGOySY2 K+5uE6ii2Gqip+yY4KmZh5Sz8Kmtgqou2nS0dYVIE+zsg== X-Received: by 127.0.0.2 with SMTP id QweoYY7687511xXAFI8aXznq; Tue, 05 Mar 2024 21:16:03 -0800 X-Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.82]) by mx.groups.io with SMTP id smtpd.web10.5467.1709702162620860890 for ; Tue, 05 Mar 2024 21:16:02 -0800 X-Received: from LV8PR12MB9452.namprd12.prod.outlook.com (2603:10b6:408:200::8) by MW4PR12MB7481.namprd12.prod.outlook.com (2603:10b6:303:212::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Wed, 6 Mar 2024 05:16:00 +0000 X-Received: from LV8PR12MB9452.namprd12.prod.outlook.com ([fe80::e006:4173:de2c:aca0]) by LV8PR12MB9452.namprd12.prod.outlook.com ([fe80::e006:4173:de2c:aca0%5]) with mapi id 15.20.7339.035; Wed, 6 Mar 2024 05:15:59 +0000 From: "Chang, Abner via groups.io" To: Nickle Wang , "devel@edk2.groups.io" CC: Igor Kulchytskyy , Nick Ramirez Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: introduce Redfish resource config2 protocol. Thread-Topic: [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: introduce Redfish resource config2 protocol. Thread-Index: AQHabjenS2DXpC9dvkSomr6sIHdqk7EqLOxQ Date: Tue, 05 Mar 2024 21:16:02 -0800 Message-ID: References: <20240304132642.41098-1-nicklew@nvidia.com> In-Reply-To: <20240304132642.41098-1-nicklew@nvidia.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=fe2554d4-6cb6-41bf-a834-be832267b6d6;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2024-03-06T05:11:00Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: LV8PR12MB9452:EE_|MW4PR12MB7481:EE_ x-ms-office365-filtering-correlation-id: 950070e6-95d9-466a-9d5b-08dc3d9c824e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: hIX5JsAMWmEkXvrZaCwjc5RxPHCrtX/EUC6dIOPMZ57zYi8G3RRI+1FUbSx49W5WGnA/vC6ZhitqrvJAm4UFsgWBNlz/L7i+LrRFgLYGPaGJoXijAczpitjEeTYC2SbudlqTlBD1c+BSgIXkbjY2awK/5fy5Mu39jM3vdImVRMcOsc1vcG1PkXM3c1sQoCzfLC7fOJpGvh+rZwX8gHMHPV+H9f9mfyxM7peN/BVc/xhnCTuOTf7BObiq9H49Yn+jTX4aofR3mJ3XImdPvxCwAxP5IaNzGMVF26qHyzOBDiP5JX2TkN5WUpmfXyFUyu6+aiflo9QWvHvLpMsjfRHoILGv90NTRfHm7VbVWDxeeSN3ZuGL271/KAdlmMK7oWk6qspXEhA4cu1oyrIk8lO+65i1s6QpfiZqv6eg3bkkU+Kgp2TuyqertCC7HhH6eI3AzrG2muqXsUIYMDf0f//TofXw4BBAMPZQZNmTVj37jnv26lXTO1XgXZb0f9XkZrjk8DYE/COfnQ7Vjd1S6s7YB5aItFEIHQWOxDnzi5zUbootphtM9DQjpcTJNtIKI6atxdETft40KhPPpNLZ5iSSLrwnJ1GOingASvC4EsiuXbZzynlZd/I80CmB15qj/phJBYzbjJhr/u/L7kitNT1fbCjq0CILa+1nqj/1QO8MMzeg7MBD0pTMDBTCTh4NElxZ7AZyq65YeLqDhopgu6JKm9hUz9KOCpT5BolYv19rzPM= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?HmhuAVtcRKDDHmokWoeD25bsk5pMZNJ0y0p3z8kZGKkFd0zC8lViK8Makwo3?= =?us-ascii?Q?f6wtiQxSMEJBzFKyaMWAcPBwUJr0A1uYgXMOxdePbRL/oTeoTrrd+ttqCzka?= =?us-ascii?Q?GdprRlG5i2eb+r0yRyILzTQB7Rd+Xme8slRkzxSZZPqoZNXz7nthVxWVzMZo?= =?us-ascii?Q?H873g8RZiFa7K39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= =?us-ascii?Q?f82cxbHSJMSx2DnD1YR2lZpiM38vI4pK2bODTvPG2iO0i0v/j9ZDoL6A0XTM?= =?us-ascii?Q?z85rpeW3q1u7cIjpgCK12TuCWP3ekVPs8+3tLrUJeJRCy+zQX/3vmsX5gCPD?= =?us-ascii?Q?4V/33zzUoOhplfel+3YD1TGLSrDHeeQRq6GObxyWS2U7sf2FoxfRxBNbhLbb?= =?us-ascii?Q?G20M+NIoP1uGXwKMNU9uPBqSkyoab8bUHy9ZcADnM913iUQYAZHoUmyKrDpw?= =?us-ascii?Q?Zc/fyfmU+ALz0nvySMlNE8pLuXsDMysD55z0CqVXhWn5d9aYP0a6uybKRX9e?= =?us-ascii?Q?CudQ0aGdgsPJMdqB52/U1s7BLDlwu0YdySdvph3rktYbdPVlFZEmZ1Uwatgt?= =?us-ascii?Q?9+ujh7hOBbXUkoE7xOAgKOYuR8oH+l3mvNGwbyL7k4JzUGCxeKfrxI6tN+Pj?= =?us-ascii?Q?Jo+3k96QvCYEtK4VeCsQSNJx8mJw+wNA16dSuWffzjLnIJQwDAZu6lY+yBGi?= =?us-ascii?Q?mGzVi0ZVy9QZ87gm1yF+f4E42pR0YovpETG9s3d0?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9452.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 950070e6-95d9-466a-9d5b-08dc3d9c824e X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Mar 2024 05:15:58.9930 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Pr9ZFm4/aEJptR3TtmQRVSGMLtVgOOnCWbfWm/Tii/8BaOT9A6jdIbAWqZhVZLQYqHeGmBdh4FOiL640HeT9dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7481 Precedence: Bulk 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,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: T7qnhEWf7D7WH6UKb1W0T8LBx7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=tAoj4FRP; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=pass (policy=none) header.from=groups.io [AMD Official Use Only - General] > -----Original Message----- > From: Nickle Wang > Sent: Monday, March 4, 2024 9:27 PM > To: devel@edk2.groups.io > Cc: Chang, Abner ; Igor Kulchytskyy > ; Nick Ramirez > Subject: [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: introduce Red= fish > resource config2 protocol. > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > Introduce EDKII Redfish Resource Config2 Protocol. Comparing to > Redfish Resource Config Protocol, this protocol adds new parameter > called "JsonText". This allows Redfish caller driver to pass JSON > context to callee. Callee save the effort of getting same data from > Redfish service again. This is useful when Redfish service supports > "expand" query parameter. "Version" is added to this protocol too so > we don't create new protocol to add new parameter in the future. > > Signed-off-by: Nickle Wang > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nick Ramirez > --- > RedfishClientPkg/RedfishClientPkg.dec | 2 + > .../EdkIIRedfishResourceConfig2Protocol.h | 148 ++++++++++++++++++ > 2 files changed, 150 insertions(+) > create mode 100644 > RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h > > diff --git a/RedfishClientPkg/RedfishClientPkg.dec > b/RedfishClientPkg/RedfishClientPkg.dec > index aa018d714..f894f30ab 100644 > --- a/RedfishClientPkg/RedfishClientPkg.dec > +++ b/RedfishClientPkg/RedfishClientPkg.dec > @@ -48,6 +48,8 @@ > gEdkIIRedfishResourceAddendumProtocolGuid =3D { 0xda36b12b, 0xaad4, > 0x4e90, { 0xba, 0xcb, 0xe3, 0xb5, 0x3b, 0x08, 0xbc, 0x54 } } > ## Include/Protocol/EdkIIRedfishOverrideProtocol.h > gEdkiiRedfishOverrideProtocolGuid =3D { 0xb55bef20, 0xf7c8, 0x= 4ae9, > { 0xa7, 0xca, 0x8b, 0xba, 0x9f, 0x7b, 0xbf, 0x9c } } > + ## Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h > + gEdkIIRedfishResourceConfig2ProtocolGuid =3D { 0xe9bef87f, 0xbff4, > 0x4872, { 0xa9, 0xa4, 0x16, 0x59, 0xbe, 0xd9, 0x1c, 0xf4 } } > > [Guids] > ## Include/Guid/RedfishClientPkgTokenSpace.h > diff --git > a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h > b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h > new file mode 100644 > index 000000000..96384e265 > --- /dev/null > +++ > b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h > @@ -0,0 +1,148 @@ > +/** @file > + This file defines the EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL > interface. > + > + Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights > reserved. > + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef EDKII_REDFISH_RESOURCE_CONFIG2_H_ > +#define EDKII_REDFISH_RESOURCE_CONFIG2_H_ > + > +#include > + > +typedef struct _EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL > EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL; > + > +/** > + Provision redfish resource by given URI. > + > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL instance. > + @param[in] Uri Target URI to create resource. > + @param[in] JsonText The JSON data in ASCII string format.= This is > optional. Can we say "The additional JSON data in ASCII string format passed to calle= e. The usage is defined between the Redfish feature driver and subordinate = Redfish resource feature driver."? Seems to me more clear about the usage. Also apply this description to the following functions. Thanks Abner > + @param[in] HttpPostMode TRUE if resource does not exist, HTTP= POST > 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_CONFIG2_PROTOCOL_PROVISIONING)( > + IN EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL *This, > + IN EFI_STRING Uri, > + IN CHAR8 *JsonText OPTIONAL, > + IN BOOLEAN HttpPostMode > + ); > + > +/** > + Consume resource from given URI. > + > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL instance. > + @param[in] Uri The target URI to consume. > + @param[in] JsonText The JSON data in ASCII string format.= This is > optional. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_CONSUME)( > + IN EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL *This, > + IN EFI_STRING Uri, > + IN CHAR8 *JsonText OPTIONAL > + ); > + > +/** > + Update resource to given URI. > + > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL instance. > + @param[in] Uri The target URI to consume. > + @param[in] JsonText The JSON data in ASCII string format.= This is > optional. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_UPDATE)( > + IN EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL *This, > + IN EFI_STRING Uri, > + IN CHAR8 *JsonText OPTIONAL > + ); > + > +/** > + Check resource on given URI. > + > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL instance. > + @param[in] Uri The target URI to consume. > + @param[in] JsonText The JSON data in ASCII string format.= This is > optional. > + > + @retval EFI_SUCCESS Value is returned successfully. > + @retval Others Some error happened. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_CHECK)( > + IN EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL *This, > + IN EFI_STRING Uri, > + IN CHAR8 *JsonText OPTIONAL > + ); > + > +/** > + Identify resource on given URI. > + > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL instance. > + @param[in] Uri The target URI to consume. > + @param[in] JsonText The JSON data in ASCII string format.= This is > optional. > + > + @retval EFI_SUCCESS This is target resource which we want= to > handle. > + @retval EFI_UNSUPPORTED This is not the target resource. > + @retval Others Some error happened. > + > +**/ > +typedef > +EFI_STATUS > +(EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_IDENTIFY)( > + IN EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL *This, > + IN EFI_STRING Uri, > + IN CHAR8 *JsonText OPTIONAL > + ); > + > +/** > + Get information about this protocol. > + > + @param[in] This Pointer to > EDKII_REDFISH_RESOURCE_CONFIG2_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_CONFIG2_PROTOCOL_GET_INFO)( > + IN EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL *This, > + OUT REDFISH_SCHEMA_INFO *Info > + ); > + > +struct _EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL { > + UINT32 Version; > + EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_PROVISIONING > Provisioning; > + EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_CONSUME > Consume; > + EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_UPDATE Update; > + EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_CHECK Check; > + EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_IDENTIFY Identify; > + EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_GET_INFO GetInfo; > +}; > + > +#define EDKII_REDFISH_RESOURCE_CONFIG2_PROTOCOL_REVISION > 0x00001000 > + > +extern EFI_GUID gEdkIIRedfishResourceConfig2ProtocolGuid; > + > +#endif > -- > 2.34.1 -=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 (#116418): https://edk2.groups.io/g/devel/message/116418 Mute This Topic: https://groups.io/mt/104721509/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-