Skip to content

Commit

Permalink
RedfishClientPkg/EdkIIRedfishResourceConfigLib: use HTTP cache lib
Browse files Browse the repository at this point in the history
Use Redfish Http cache library to query Redfish service.

Signed-off-by: Nickle Wang <[email protected]>
Cc: Abner Chang <[email protected]>
Cc: Igor Kulchytskyy <[email protected]>
Cc: Nick Ramirez <[email protected]>
  • Loading branch information
nicklela committed Jan 4, 2024
1 parent dba1d8f commit ab2eb2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
#
Expand Down Expand Up @@ -38,6 +39,7 @@
MemoryAllocationLib
RedfishFeatureUtilityLib
RedfishPlatformConfigLib
RedfishHttpCacheLib

[Protocols]
gEdkIIRedfishResourceConfigProtocolGuid ## CONSUMES ##
Expand Down

0 comments on commit ab2eb2d

Please sign in to comment.