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 F2274AC0999 for ; Fri, 15 Dec 2023 01:53:24 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=+8LfuCnmc/TQ/1+4fWqerrOj54DYu5AhmtEm5K2N0Z4=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language: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=20140610; t=1702605203; v=1; b=nbeIEgqWLmSMOznISL+oD3UnrxaeJDOssucOnOE7emt9DgIcKEGd9L2yMcUyM8bFNsz0O8rD 6M9ZPv02UM4786DscAqgW45y6oOCy6MQAiQXo1vH+YfA6uO6YZdTJo01+coMZBhUOw82CbDkpjT axjT+mxHlYBTWyOSfni6+4Qw= X-Received: by 127.0.0.2 with SMTP id yVCvYY7687511x7oUz6t9ti5; Thu, 14 Dec 2023 17:53:23 -0800 X-Received: from NAM02-DM3-obe.outbound.protection.outlook.com (NAM02-DM3-obe.outbound.protection.outlook.com [40.107.95.53]) by mx.groups.io with SMTP id smtpd.web10.50552.1702605202793601775 for ; Thu, 14 Dec 2023 17:53:22 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cd8rKmZqmIRpqxHfTGrG+T8t976OGYq+q8A+DejO7Ijoc5QCFbmYlMZZVuluDpT3GTUpRCN3ORXDeOQ/9NErksNeuUcv2ZRfOaxpF8cEPuFOnoVENWto+5xhCjcBAjd2oxH55dYGxoZmjPi4ChRlMUWME8l0RWSPdVAyAEQiamwktVu+iRoR29Z7YjGWRlI/fHLxn69gqBwSDhIeNmx7EoFGjaZs31VCv85q/FvteyMwG2M2BVffP+3AP+4923d4uFMgxEvcOsw6gG2xWJrqq/J8KzKNUcHHodR0f9OwmwmhGd2/7QN+0E7/Xny0ACuO/25nprpGlBV2fe9m+nRXDw== 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=T9KaldFEyFSG0OGAWU9rS42TWu9nR8KYNAH/docI+tw=; b=Y9ImwCgzIGLlDcImQ2rB5OZWUBgaxgpiaVqRS+tOLeQWbVXik8qUmsSYSedhrK4Wtlg/ACDsdSoO2nXd5J/FOUXiJl0GpxvFgla+3FfPciCHiAfLW62tDjmzChm9Z+ccOwpED7ypCl7FwnrNgaP6EqDkK8VidgTKlBiGJ83MmfAY159/zdIGizF5+JfREOsHg+Zc3kpmfV8QkafEhOuV2HxH3W5TqZkSzXCQNIODd8XnS8rp0fSYOOee7leYg1kP3PfnLowfmQMTb3JTht3Ni4uPW30V3OSVk8jP43zz1TL3dU5ef0rkFPgZaD2DoZUIAL7sTDeyjcTveCNeH+wDNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com (2603:10b6:303:1ef::6) by IA1PR12MB8519.namprd12.prod.outlook.com (2603:10b6:208:44c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.28; Fri, 15 Dec 2023 01:53:19 +0000 X-Received: from MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::a78e:602e:415c:4cb4]) by MW4PR12MB7031.namprd12.prod.outlook.com ([fe80::a78e:602e:415c:4cb4%3]) with mapi id 15.20.7091.028; Fri, 15 Dec 2023 01:53:19 +0000 From: "Nickle Wang via groups.io" To: Mike Maslenkin , "devel@edk2.groups.io" CC: "abner.chang@amd.com" , "igork@ami.com" Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: use POST method while provisioning new property. Thread-Topic: [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: use POST method while provisioning new property. Thread-Index: AQHaLupDHGFqKX/FakyeQaYP2glDebCpjkbg Date: Fri, 15 Dec 2023 01:53:18 +0000 Message-ID: References: <20231215000400.5311-1-mike.maslenkin@gmail.com> <20231215000400.5311-5-mike.maslenkin@gmail.com> In-Reply-To: <20231215000400.5311-5-mike.maslenkin@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR12MB7031:EE_|IA1PR12MB8519:EE_ x-ms-office365-filtering-correlation-id: 1a5b4b4f-fabd-4c85-1a02-08dbfd109c4b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: EY934YURH2WWqqskFMJGnfNxwi0GA24/+2EK6DOi7cxhcwcYAQKhLGZZJwLrbTSVxhopBMnEWxcc4wS55stpkGoP+euezzuAj48opReCqDMOECXE1EAC99P2v1D1ZMACTHXe9p60NySEMflpYDiTFPAjzl87+3MKiT4h1twg1yEwrSALcQRehCQT/buw1rZ+0zKHhp7l8z9RrKaqj7u28CkZ7k1op5O5wDSKdI9IYuedVY577oHwNrUa4BtyuaDa4TNGiFkPVegeV9JaT/g31waRDwVB6DT20W1jyoS1Lx9tMRDnBegkSPsKmZWkJRLWnX1OB2gi195HdoNpSYRTaZriA8asIg4gXyNeFoRguzMbBjunzYo4JFkPUu+cGTDgziRMfffh5Y6AY6vCSoES2tObN6acNhdL01TqxBLtudyX7sc3XcsnDP9yFQilkPbEPwCouEKnpeXLl8Y4hwmsklEvNDJ5hQXpkjw5A4UsPCabjs8T4YlIw3YgnFRflgrl6AaWxVKOMzVRHLYOKZNmqNREca8x4hflzIlH+iCwAMD8+HkvplCyxNm8LqEbAWSnPL+YAHr27SbftcJilBRNXjMvN7mlSpOR+jzxjYjiVI9D0LqVnlYyryPnNtU0ZPSJzP70n6xf2f+udrvqLVQk0oiFFZx7cua6njbimLkkmtU= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?VzbMb+kR4EmSLrPBVUzjzvmIZg6hMCdjEhw3kXdxDgoAd0quqMkslEmEmvfV?= =?us-ascii?Q?QCQonoYIc9fi2BX4zUKtFrNpwYHOCBO8c8ohajZ99/UxlX4KFGTErEcchYd4?= =?us-ascii?Q?Bu7EQI0p/ET5Gw63YY+lv9Gam87QBuqph6rYzObg//RENCkGN+sAHnkFXnNq?= =?us-ascii?Q?kn9K0mWrrTqNVoT/S8ckc3Kb3Eo8uAfQBzhIZvdl4JglzRvr3eCtUc+QI+me?= =?us-ascii?Q?QA7MVJe5FQLaWTy/Qf3mxVJ7V18+oyauao9LHNN28hBdAh+vAe1PmA8oVoLB?= =?us-ascii?Q?GKmThMHJMlMkNgpXLGL9FCGSaKlnYSedMfqvq45tqhwkB3HEPskO9Z9F/NWc?= =?us-ascii?Q?L+S8hBGK/1EvXbubia9hzF4RbB8u2cchh1JllK1DvWuMpGI8xg3mxX7fygZC?= =?us-ascii?Q?KEpS8JbgTKmCocBVeCyX+UvdZk//YRca+s24TH9uFLlFNHBwFhGNe1eFtp5p?= =?us-ascii?Q?OrFYTDuBBFklNCPNcs4wkfCUQXefOC9jvF640xKz3wHnoGJJhHY5oZ3H75YN?= =?us-ascii?Q?gSEccIJnIdJBfIAVZQ+V9kOqsJQUm1z/SAA6S8x3TzNUyBA17OSVdqViZ5WF?= =?us-ascii?Q?ngwy/EAyF9MKP41NCVt9BgVrREMiljwIjTWOCsCENNcizzTbjzF71DYFIxMp?= =?us-ascii?Q?W6wWGYL9i4P4AhAIRJd178e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ascii?Q?/LkWMu6bWHkEi3iTZ8Q=3D?= MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR12MB7031.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a5b4b4f-fabd-4c85-1a02-08dbfd109c4b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2023 01:53:18.5938 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: DPtW0g7gJqkzz33xG0bccUdo/o2GAPA+PEkWKrgwl1lvkF08jLwfMTXaMd9jhXAcYVAWBmObgwaxCskbXUEQAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8519 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,nicklew@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: MvUYRYcC2txlZGgRcVv57G2fx7686176AA= 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=20140610 header.b=nbeIEgqW; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Hi Mike, Per Redfish specification 7.9 POST(create) "The POST request is submitted to the resource collection to which the new = resource will belong." If this is not a collection resource, we cannot use POST method. And /redfi= sh/v1/Systems/SYS_ID/Bios is not a collection resource. The allowed method = returned from BMC for BIOS resource is usually "GET" and "PUT". So, I think that the fourth parameter is still FALSE here. But I admit that= the function header below is confusing and did not express above rule clea= rly. /** Provisioning redfish resource by given URI. @param[in] Schema Redfish schema information. @param[in] Uri Target URI to create resource. @param[in] InformationExchange Pointer to RESOURCE_INFORMATION_EXCHANGE= . @param[in] HttpPostMode TRUE if resource does not exist, HTTP PO= ST 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. **/ Below is my suggestion. @param[in] HttpPostMode TRUE if target resource is a member of c= ollection resource, HTTP POST method is used. FALSE if targe= t resource is non-collection resource, HTTP PUT method is used. Do you think this helps to explain the use-case of fourth parameter more cl= early? Thanks, Nickle > -----Original Message----- > From: Mike Maslenkin > Sent: Friday, December 15, 2023 8:04 AM > To: devel@edk2.groups.io > Cc: abner.chang@amd.com; Nickle Wang ; > igork@ami.com; Mike Maslenkin > Subject: [edk2-redfish-client][PATCH 4/4] RedfishClientPkg: use POST meth= od > while provisioning new property. >=20 > External email: Use caution opening links or attachments >=20 >=20 > If EdkIIRedfishResourceConfigCheck fails according to the logic and > comment: new resources should be provisioned, so the POST method must be > used. Fourth parameter of EdkIIRedfishResourceConfigProvisioning is BOOLE= AN > HttpPostMode, so we pass TRUE here. >=20 > Cc: Abner Chang > Cc: Igor Kulchytskyy > Cc: Nickle Wang > Signed-off-by: Mike Maslenkin > --- > RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c > b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c > index a26a1083cd74..4fd4845f3420 100644 > --- a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c > +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c > @@ -818,9 +818,9 @@ HandleResource ( > // The target property does not exist, do the provision to create pr= operty. >=20 > // >=20 > DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s\n", __func__, Uri)= ); >=20 > - Status =3D EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri,= Private- > >InformationExchange, FALSE); >=20 > + Status =3D EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri, > + Private->InformationExchange, TRUE); >=20 > if (EFI_ERROR (Status)) { >=20 > - DEBUG ((DEBUG_ERROR, "%a, failed to provision with GET mode: %r\n"= , > __func__, Status)); >=20 > + DEBUG ((DEBUG_ERROR, "%a, failed to provision with POST mode: > + %r\n", __func__, Status)); >=20 > } >=20 >=20 >=20 > return Status; >=20 > -- > 2.32.0 (Apple Git-132) -=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 (#112583): https://edk2.groups.io/g/devel/message/112583 Mute This Topic: https://groups.io/mt/103181641/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-