From: "Chang, Abner via groups.io" <abner.chang=amd.com@groups.io>
To: Nickle Wang <nicklew@nvidia.com>,
"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Igor Kulchytskyy <igork@ami.com>, Nick Ramirez <nramirez@nvidia.com>
Subject: Re: [edk2-devel] [edk2-redfish-client][PATCH 3/3] RedfishClientPkg/Features: support config2 protocol
Date: Tue, 05 Mar 2024 21:50:59 -0800 [thread overview]
Message-ID: <LV8PR12MB9452269F2F408EBD27800F6AEA212@LV8PR12MB9452.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20240304132658.41244-1-nicklew@nvidia.com>
[AMD Official Use Only - General]
Hi Nickle, I think we have to merge this patch with 2/3. Otherwise, the build will be failed on the commit of 2/3, right?
Thanks
Abner
> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Monday, March 4, 2024 9:27 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [edk2-redfish-client][PATCH 3/3] RedfishClientPkg/Features: support
> config2 protocol
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Because EdkIIRedfishResourceConfigLib is updated to support
> Redfish resource config2 protocol, update corresponding
> functions in feature drivers.
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Nick Ramirez <nramirez@nvidia.com>
> ---
> .../Features/Bios/v1_0_9/Common/BiosCommon.c | 14 +++++++-------
> .../BootOptionCollectionDxe.c | 14 +++++++-------
> .../ComputerSystemCollectionDxe.c | 16 ++++++++--------
> .../MemoryCollectionDxe/MemoryCollectionDxe.c | 16 ++++++++--------
> 4 files changed, 30 insertions(+), 30 deletions(-)
>
> diff --git a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> index 1f3c30147..1eb269a84 100644
> --- a/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> +++ b/RedfishClientPkg/Features/Bios/v1_0_9/Common/BiosCommon.c
> @@ -782,7 +782,7 @@ HandleResource (
>
> DEBUG ((REDFISH_DEBUG_TRACE, "%a, process resource for: %s\n",
> __func__, Uri));
>
> - Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, &SchemaInfo);
> + Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, NULL, &SchemaInfo);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to get schema information from: %s
> %r\n", __func__, Uri, Status));
> return Status;
> @@ -795,7 +795,7 @@ HandleResource (
> DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri));
> ConfigLang = RedfishGetConfigLanguage (Uri);
> if (ConfigLang == NULL) {
> - Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, Private-
> >InformationExchange);
> + Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, NULL,
> Private->InformationExchange);
> if (EFI_ERROR (Status)) {
> if (Status == EFI_UNSUPPORTED) {
> DEBUG ((DEBUG_MANAGEABILITY, "%a, \"%s\" is not handled by us\n",
> __func__, Uri));
> @@ -811,17 +811,17 @@ HandleResource (
> }
>
> //
> - // Check and see if target property exist or not even when collection
> memeber exists.
> + // Check and see if target property exist or not even when collection
> member exists.
> // If not, we sill do provision.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a Check for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigCheck (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigCheck (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> //
> // The target property does not exist, do the provision to create property.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri,
> Private->InformationExchange, FALSE);
> + Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri, NULL,
> Private->InformationExchange, FALSE);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to provision with GET mode: %r\n",
> __func__, Status));
> }
> @@ -833,7 +833,7 @@ HandleResource (
> // Consume first.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a consume for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigConsume (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigConsume (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to consume resource for: %s: %r\n",
> __func__, Uri, Status));
> }
> @@ -842,7 +842,7 @@ HandleResource (
> // Patch.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a update for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigUpdate (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigUpdate (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to update resource for: %s: %r\n",
> __func__, Uri, Status));
> }
> diff --git
> a/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDxe
> .c
> b/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDxe
> .c
> index 4f94a4495..cd1437f54 100644
> ---
> a/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDxe
> .c
> +++
> b/RedfishClientPkg/Features/BootOptionCollection/BootOptionCollectionDxe
> .c
> @@ -44,7 +44,7 @@ HandleResource (
>
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a:
> process resource for: %s\n", __func__, Uri));
>
> - Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, &SchemaInfo);
> + Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, NULL, &SchemaInfo);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to get schema information from: %s
> %r\n", __func__, Uri, Status));
> return Status;
> @@ -58,7 +58,7 @@ HandleResource (
> SystemRestDetected = FALSE;
> ConfigLang = RedfishGetConfigLanguage (Uri);
> if (ConfigLang == NULL) {
> - Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, Private-
> >InformationExchange);
> + Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, NULL,
> Private->InformationExchange);
> if (EFI_ERROR (Status)) {
> if (Status == EFI_UNSUPPORTED) {
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a:
> \"%s\" is not handled by us\n", __func__, Uri));
> @@ -88,7 +88,7 @@ HandleResource (
> // If not, we sill do provision.
> //
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a Check
> for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigCheck (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigCheck (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> if (Status == EFI_UNSUPPORTED) {
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a:
> \"%s\" is not handled by us\n", __func__, Uri));
> @@ -99,7 +99,7 @@ HandleResource (
> // The target property does not exist, do the provision to create property.
> //
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a
> provision for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri,
> Private->InformationExchange, FALSE);
> + Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri, NULL,
> Private->InformationExchange, FALSE);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to provision with GET mode: %r\n",
> __func__, Status));
> }
> @@ -114,7 +114,7 @@ HandleResource (
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a
> system has been reset to default setting. ignore pending settings because they
> may be stale values\n", __func__));
> } else {
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a
> consume for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigConsume (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigConsume (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to consume resource for: %s: %r\n",
> __func__, Uri, Status));
> }
> @@ -124,7 +124,7 @@ HandleResource (
> // Patch.
> //
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a update
> for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigUpdate (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigUpdate (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to update resource for: %s: %r\n",
> __func__, Uri, Status));
> }
> @@ -262,7 +262,7 @@ CreateCollectionResource (
>
> DEBUG ((REDFISH_BOOT_OPTION_COLLECTION_DEBUG_TRACE, "%a:
> supported schema: %a %a.%a.%a\n", __func__, SchemaInfo.Schema,
> SchemaInfo.Major, SchemaInfo.Minor, SchemaInfo.Errata));
>
> - Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo,
> BootOptionUri, Private->InformationExchange, TRUE);
> + Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo,
> BootOptionUri, NULL, Private->InformationExchange, TRUE);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to create resource for: %s: %r\n",
> __func__, BootOptionUri, Status));
> }
> diff --git
> a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSyste
> mCollectionDxe.c
> b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSyste
> mCollectionDxe.c
> index 975ba0564..55a6d07db 100644
> ---
> a/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSyste
> mCollectionDxe.c
> +++
> b/RedfishClientPkg/Features/ComputerSystemCollectionDxe/ComputerSyste
> mCollectionDxe.c
> @@ -35,7 +35,7 @@ HandleResource (
>
> DEBUG ((REDFISH_DEBUG_TRACE, "%a: process resource for: %s\n",
> __func__, Uri));
>
> - Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, &SchemaInfo);
> + Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, NULL, &SchemaInfo);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to get schema information from: %s
> %r\n", __func__, Uri, Status));
> return Status;
> @@ -48,7 +48,7 @@ HandleResource (
> DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri));
> ConfigLang = RedfishGetConfigLanguage (Uri);
> if (ConfigLang == NULL) {
> - Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, Private-
> >InformationExchange);
> + Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, NULL,
> Private->InformationExchange);
> if (EFI_ERROR (Status)) {
> if (Status == EFI_UNSUPPORTED) {
> DEBUG ((DEBUG_MANAGEABILITY, "%a: \"%s\" is not handled by us\n",
> __func__, Uri));
> @@ -90,11 +90,11 @@ HandleResource (
> }
>
> //
> - // Check and see if target property exist or not even when collection
> memeber exists.
> + // Check and see if target property exist or not even when collection
> member exists.
> // If not, we sill do provision.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a Check for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigCheck (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigCheck (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> if (Status == EFI_UNSUPPORTED) {
> DEBUG ((REDFISH_DEBUG_TRACE, "%a: \"%s\" is not handled by us\n",
> __func__, Uri));
> @@ -105,7 +105,7 @@ HandleResource (
> // The target property does not exist, do the provision to create property.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri,
> Private->InformationExchange, FALSE);
> + Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri, NULL,
> Private->InformationExchange, FALSE);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to provision with PATCH mode: %r\n",
> __func__, Status));
> }
> @@ -117,7 +117,7 @@ HandleResource (
> // Consume first.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a consume for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigConsume (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigConsume (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to consume resource for: %s: %r\n",
> __func__, Uri, Status));
> }
> @@ -126,7 +126,7 @@ HandleResource (
> // Patch.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a update for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigUpdate (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigUpdate (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to update resource for: %s: %r\n",
> __func__, Uri, Status));
> }
> @@ -236,7 +236,7 @@ CreateCollectionResource (
>
> DEBUG ((REDFISH_DEBUG_TRACE, "%a: supported schema: %a
> %a.%a.%a\n", __func__, SchemaInfo.Schema, SchemaInfo.Major,
> SchemaInfo.Minor, SchemaInfo.Errata));
>
> - Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Private-
> >CollectionUri, Private->InformationExchange, TRUE);
> + Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Private-
> >CollectionUri, NULL, Private->InformationExchange, TRUE);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a: failed to create resource for: %s: %r\n",
> __func__, Private->CollectionUri, Status));
> }
> diff --git
> a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
> b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
> index 1b7d74e86..d963fb52a 100644
> ---
> a/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
> +++
> b/RedfishClientPkg/Features/MemoryCollectionDxe/MemoryCollectionDxe.c
> @@ -35,7 +35,7 @@ HandleResource (
>
> DEBUG ((REDFISH_DEBUG_TRACE, "%a, process resource for: %s\n",
> __func__, Uri));
>
> - Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, &SchemaInfo);
> + Status = GetRedfishSchemaInfo (Private->RedfishService, Private-
> >JsonStructProtocol, Uri, NULL, &SchemaInfo);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to get schema information from: %s
> %r\n", __func__, Uri, Status));
> return Status;
> @@ -48,7 +48,7 @@ HandleResource (
> DEBUG ((REDFISH_DEBUG_TRACE, "%a Identify for %s\n", __func__, Uri));
> ConfigLang = RedfishGetConfigLanguage (Uri);
> if (ConfigLang == NULL) {
> - Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, Private-
> >InformationExchange);
> + Status = EdkIIRedfishResourceConfigIdentify (&SchemaInfo, Uri, NULL,
> Private->InformationExchange);
> if (EFI_ERROR (Status)) {
> if (Status == EFI_UNSUPPORTED) {
> DEBUG ((DEBUG_MANAGEABILITY, "%a, \"%s\" is not handled by us\n",
> __func__, Uri));
> @@ -86,17 +86,17 @@ HandleResource (
> }
>
> //
> - // Check and see if target property exist or not even when collection
> memeber exists.
> + // Check and see if target property exist or not even when collection
> member exists.
> // If not, we sill do provision.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a Check for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigCheck (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigCheck (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> //
> // The target property does not exist, do the provision to create property.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a provision for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri,
> Private->InformationExchange, FALSE);
> + Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Uri, NULL,
> Private->InformationExchange, FALSE);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to provision with GET mode: %r\n",
> __func__, Status));
> }
> @@ -108,7 +108,7 @@ HandleResource (
> // Consume first.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a consume for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigConsume (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigConsume (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to consume resource for: %s: %r\n",
> __func__, Uri, Status));
> }
> @@ -117,7 +117,7 @@ HandleResource (
> // Patch.
> //
> DEBUG ((REDFISH_DEBUG_TRACE, "%a update for %s\n", __func__, Uri));
> - Status = EdkIIRedfishResourceConfigUpdate (&SchemaInfo, Uri);
> + Status = EdkIIRedfishResourceConfigUpdate (&SchemaInfo, Uri, NULL);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to update resource for: %s: %r\n",
> __func__, Uri, Status));
> }
> @@ -227,7 +227,7 @@ CreateCollectionResource (
>
> DEBUG ((REDFISH_DEBUG_TRACE, "%a, supported schema: %a
> %a.%a.%a\n", __func__, SchemaInfo.Schema, SchemaInfo.Major,
> SchemaInfo.Minor, SchemaInfo.Errata));
>
> - Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Private-
> >CollectionUri, Private->InformationExchange, TRUE);
> + Status = EdkIIRedfishResourceConfigProvisioning (&SchemaInfo, Private-
> >CollectionUri, NULL, Private->InformationExchange, TRUE);
> if (EFI_ERROR (Status)) {
> DEBUG ((DEBUG_ERROR, "%a, failed to create resource for: %s: %r\n",
> __func__, Private->CollectionUri, Status));
> }
> --
> 2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116419): https://edk2.groups.io/g/devel/message/116419
Mute This Topic: https://groups.io/mt/104721516/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-03-06 5:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 13:26 [edk2-devel] [edk2-redfish-client][PATCH 3/3] RedfishClientPkg/Features: support config2 protocol Nickle Wang via groups.io
2024-03-06 5:50 ` Chang, Abner via groups.io [this message]
2024-03-06 6:41 ` Nickle Wang via groups.io
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=LV8PR12MB9452269F2F408EBD27800F6AEA212@LV8PR12MB9452.namprd12.prod.outlook.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox