Re: [edk2-staging][PATCH v2 03/15] edk2-staging/RedfishClientPkg: Update Redfish Resource Config Protocol


Chang, Abner
 

[AMD Official Use Only - General]

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

-----Original Message-----
From: Nickle Wang <nickle.wang@...>
Sent: Monday, July 25, 2022 9:36 AM
To: devel@edk2.groups.io
Cc: Chang, Abner <Abner.Chang@...>; Yang, Atom
<Atom.Yang@...>; Nick Ramirez <nramirez@...>
Subject: [edk2-staging][PATCH v2 03/15] edk2-staging/RedfishClientPkg: Update
Redfish Resource Config Protocol

[CAUTION: External Email]

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 <nickle.wang@...>
Cc: Abner Chang <abner.chang@...>
Cc: Yang Atom <Atom.Yang@...>
Cc: Nick Ramirez <nramirez@...>
---
.../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 d6c41dda52..574c82c442 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
);


@@ -65,7 +65,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
);


@@ -83,7 +83,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
);

//
@@ -121,6 +139,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.32.0.windows.2

Join devel@edk2.groups.io to automatically receive all group messages.