Use Redfish Http cache library to query Redfish service. Signed-off-by: Nickle Wang <nick...@nvidia.com> Cc: Abner Chang <abner.ch...@amd.com> Cc: Igor Kulchytskyy <ig...@ami.com> Cc: Nick Ramirez <nrami...@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 (#113078): https://edk2.groups.io/g/devel/message/113078 Mute This Topic: https://groups.io/mt/103500389/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-