* [edk2-devel] [edk2-redfish-client][PATCH v2 08/10] RedfishClientPkg/EdkIIRedfishResourceConfigLib: use HTTP cache lib
@ 2024-01-04 2:32 Nickle Wang via groups.io
0 siblings, 0 replies; only message in thread
From: Nickle Wang via groups.io @ 2024-01-04 2:32 UTC (permalink / raw)
To: devel; +Cc: Abner Chang, Igor Kulchytskyy, Nick Ramirez
Use Redfish Http cache library to query Redfish service.
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>
---
.../EdkIIRedfishResourceConfigLib.inf | 2 ++
.../EdkIIRedfishResourceConfigLib.c | 6 ++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.inf b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.inf
index 0da3423d..a5a81e9a 100644
--- a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.inf
+++ b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.inf
@@ -1,6 +1,7 @@
## @file
#
# (C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR>
+# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
@@ -38,6 +39,7 @@
MemoryAllocationLib
RedfishFeatureUtilityLib
RedfishPlatformConfigLib
+ RedfishHttpCacheLib
[Protocols]
gEdkIIRedfishResourceConfigProtocolGuid ## CONSUMES ##
diff --git a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
index 09ae3921..ed225a23 100644
--- a/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
+++ b/RedfishClientPkg/Library/EdkIIRedfishResourceConfigLib/EdkIIRedfishResourceConfigLib.c
@@ -2,7 +2,7 @@
Redfish resource config library implementation
(C) Copyright 2022 Hewlett Packard Enterprise Development LP<BR>
- Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+ Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -16,6 +16,7 @@
#include <Library/EdkIIRedfishResourceConfigLib.h>
#include <Library/RedfishFeatureUtilityLib.h>
#include <Library/RedfishPlatformConfigLib.h>
+#include <Library/RedfishHttpCacheLib.h>
EDKII_REDFISH_RESOURCE_CONFIG_PROTOCOL *mRedfishResourceConfigProtocol = NULL;
EFI_HANDLE mCachedHandle;
@@ -56,7 +57,8 @@ GetRedfishSchemaInfo (
return EFI_INVALID_PARAMETER;
}
- Status = GetResourceByUri (RedfishService, Uri, &Response);
+ ZeroMem (&Response, sizeof (Response));
+ Status = RedfishHttpGetResource (RedfishService, Uri, &Response, TRUE);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a, failed to get resource from %s: %r", __func__, Uri, Status));
return Status;
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113122): https://edk2.groups.io/g/devel/message/113122
Mute This Topic: https://groups.io/mt/103516020/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-04 2:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-04 2:32 [edk2-devel] [edk2-redfish-client][PATCH v2 08/10] RedfishClientPkg/EdkIIRedfishResourceConfigLib: use HTTP cache lib Nickle Wang via groups.io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox