public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Nickle Wang via groups.io" <nicklew=nvidia.com@groups.io>
To: "Chang, Abner" <Abner.Chang@amd.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 1/3] RedfishClientPkg: introduce Redfish resource config2 protocol.
Date: Wed, 06 Mar 2024 06:17:07 -0800	[thread overview]
Message-ID: <MW4PR12MB70313C1AF47915EFE6F601BDD9212@MW4PR12MB7031.namprd12.prod.outlook.com> (raw)
In-Reply-To: <LV8PR12MB9452DB6F6D361837B58A9BD9EA212@LV8PR12MB9452.namprd12.prod.outlook.com>

> Can we say "The additional JSON data in ASCII string format passed to callee. 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 for your comment, Abner! I update the description of "JsonText" in version 2 patch set.

Regards,
Nickle

> -----Original Message-----
> From: Chang, Abner <Abner.Chang@amd.com>
> Sent: Wednesday, March 6, 2024 1:16 PM
> To: Nickle Wang <nicklew@nvidia.com>; devel@edk2.groups.io
> Cc: Igor Kulchytskyy <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: RE: [edk2-redfish-client][PATCH 1/3] RedfishClientPkg: introduce Redfish
> resource config2 protocol.
> 
> External email: Use caution opening links or attachments
> 
> 
> [AMD Official Use Only - General]
> 
> > -----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 1/3] RedfishClientPkg: introduce
> > Redfish resource config2 protocol.
> >
> > Caution: This message originated from an External Source. Use proper
> > caution 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 <nicklew@nvidia.com>
> > Cc: Abner Chang <abner.chang@amd.com>
> > Cc: Igor Kulchytskyy <igork@ami.com>
> > Cc: Nick Ramirez <nramirez@nvidia.com>
> > ---
> >  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 = { 0xda36b12b, 0xaad4,
> > 0x4e90, { 0xba, 0xcb, 0xe3, 0xb5, 0x3b, 0x08, 0xbc, 0x54 } }
> >    ## Include/Protocol/EdkIIRedfishOverrideProtocol.h
> >    gEdkiiRedfishOverrideProtocolGuid         = { 0xb55bef20, 0xf7c8, 0x4ae9,
> > { 0xa7, 0xca, 0x8b, 0xba, 0x9f, 0x7b, 0xbf, 0x9c } }
> > +  ## Include/Protocol/EdkIIRedfishResourceConfig2Protocol.h
> > +  gEdkIIRedfishResourceConfig2ProtocolGuid  = { 0xe9bef87f, 0xbff4,
> > 0x4872, { 0xa9, 0xa4, 0x16, 0x59, 0xbe, 0xd9, 0x1c, 0xf4 } }
> >
> >  [Guids]
> >    ## Include/Guid/RedfishClientPkgTokenSpace.h
> > diff --git
> > a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protoco
> > l.h
> > b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protoco
> > l.h
> > new file mode 100644
> > index 000000000..96384e265
> > --- /dev/null
> > +++
> > b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfig2Protoco
> > l.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 <Protocol/EdkIIRedfishResourceConfigProtocol.h>
> > +
> > +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 callee. 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



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116448): https://edk2.groups.io/g/devel/message/116448
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]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2024-03-06 14:17 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 1/3] RedfishClientPkg: introduce Redfish resource config2 protocol Nickle Wang via groups.io
2024-03-06  5:16 ` Chang, Abner via groups.io
2024-03-06 14:17   ` Nickle Wang via groups.io [this message]

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=MW4PR12MB70313C1AF47915EFE6F601BDD9212@MW4PR12MB7031.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