public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-redfish-client][PATCH 3/6] RedfishClientPkg: Update Redfish Resource Config Protocol
@ 2023-05-09 13:58 Nickle Wang
  2023-05-10  1:29 ` Chang, Abner
  0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang @ 2023-05-09 13:58 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Igor Kulchytskyy

Update Redfish resource config protocol to support Identify action in
order to identify remote resource and see if this is resource belongs
to current owner or not. Use unicode string instead of ASCII string for
all interfaces to align with HTTP interface.

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
---
 .../EdkIIRedfishResourceConfigProtocol.h      | 29 +++++++++++++++----
 1 file changed, 24 insertions(+), 5 deletions(-)

diff --git a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h
index 814fa9f9..3f49a56e 100644
--- a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h
+++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h
@@ -1,7 +1,7 @@
 /** @file
   This file defines the EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL interface.
 
-  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
+  (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -29,7 +29,7 @@ typedef
 EFI_STATUS
 (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING)(
   IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
-  IN     CHAR8                                   *Uri,
+  IN     EFI_STRING                              Uri,
   IN     BOOLEAN                                 HttpPostMode
   );
 
@@ -47,7 +47,7 @@ typedef
 EFI_STATUS
 (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME)(
   IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
-  IN     CHAR8                                   *Uri
+  IN     EFI_STRING                              Uri
   );
 
 /**
@@ -64,7 +64,7 @@ typedef
 EFI_STATUS
 (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE)(
   IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
-  IN     CHAR8                                   *Uri
+  IN     EFI_STRING                              Uri
   );
 
 /**
@@ -81,7 +81,25 @@ typedef
 EFI_STATUS
 (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK)(
   IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
-  IN     CHAR8                                   *Uri
+  IN     EFI_STRING                              Uri
+  );
+
+/**
+  Identify resource on given URI.
+
+  @param[in]   This                Pointer to EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance.
+  @param[in]   Uri                 The target URI to consume.
+
+  @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_CONFIG_PROTOCOL_IDENTIFY)(
+  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
+  IN     EFI_STRING                              Uri
   );
 
 //
@@ -119,6 +137,7 @@ struct _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL {
   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_IDENTIFY        Identify;
   EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO        GetInfo;
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-redfish-client][PATCH 3/6] RedfishClientPkg: Update Redfish Resource Config Protocol
  2023-05-09 13:58 [edk2-redfish-client][PATCH 3/6] RedfishClientPkg: Update Redfish Resource Config Protocol Nickle Wang
@ 2023-05-10  1:29 ` Chang, Abner
  0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner @ 2023-05-10  1:29 UTC (permalink / raw)
  To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy

[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Tuesday, May 9, 2023 9:59 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>
> Subject: [edk2-redfish-client][PATCH 3/6] RedfishClientPkg: Update Redfish
> Resource Config Protocol
> 
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> 
> 
> Update Redfish resource config protocol to support Identify action in order
> to identify remote resource and see if this is resource belongs to current
> owner or not. Use unicode string instead of ASCII string for all interfaces to
> align with HTTP interface.
> 
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> ---
>  .../EdkIIRedfishResourceConfigProtocol.h      | 29 +++++++++++++++----
>  1 file changed, 24 insertions(+), 5 deletions(-)
> 
> diff --git
> a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h
> b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h
> index 814fa9f9..3f49a56e 100644
> ---
> a/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtocol.h
> +++ b/RedfishClientPkg/Include/Protocol/EdkIIRedfishResourceConfigProtoc
> +++ ol.h
> @@ -1,7 +1,7 @@
>  /** @file
>    This file defines the EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL
> interface.
> 
> -  (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
> +  (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP<BR>
> 
>    SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -29,7 +29,7 @@ typedef
>  EFI_STATUS
>  (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_PROVISIONING)(
>    IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
> -  IN     CHAR8                                   *Uri,
> +  IN     EFI_STRING                              Uri,
>    IN     BOOLEAN                                 HttpPostMode
>    );
> 
> @@ -47,7 +47,7 @@ typedef
>  EFI_STATUS
>  (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CONSUME)(
>    IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
> -  IN     CHAR8                                   *Uri
> +  IN     EFI_STRING                              Uri
>    );
> 
>  /**
> @@ -64,7 +64,7 @@ typedef
>  EFI_STATUS
>  (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_UPDATE)(
>    IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
> -  IN     CHAR8                                   *Uri
> +  IN     EFI_STRING                              Uri
>    );
> 
>  /**
> @@ -81,7 +81,25 @@ typedef
>  EFI_STATUS
>  (EFIAPI *EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_CHECK)(
>    IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
> -  IN     CHAR8                                   *Uri
> +  IN     EFI_STRING                              Uri
> +  );
> +
> +/**
> +  Identify resource on given URI.
> +
> +  @param[in]   This                Pointer to
> EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL instance.
> +  @param[in]   Uri                 The target URI to consume.
> +
> +  @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_CONFIG_PROTOCOL_IDENTIFY)(
> +  IN     EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL  *This,
> +  IN     EFI_STRING                              Uri
>    );
> 
>  //
> @@ -119,6 +137,7 @@ struct
> _EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL {
>    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_IDENTIFY        Identify;
>    EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL_GET_INFO        GetInfo;
>  };
> 
> --
> 2.17.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-10  1:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 13:58 [edk2-redfish-client][PATCH 3/6] RedfishClientPkg: Update Redfish Resource Config Protocol Nickle Wang
2023-05-10  1:29 ` Chang, Abner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox