Add HostPDRHandler class
HostPDRHandler has an API to fetch PDRs from the host.
The class HostPDRHandler has a function fetchPDR which basically calls
GetPDR on the host using libpldm's pldm_send_recv API.
The retrieved PDRs are stored in the BMCs primary PDR repo.
Change-Id: Ifd727316caf37d49f17e117b32ee105f6d941e0e
Signed-off-by: Pavithra Barithaya <pbaritha@in.ibm.com>
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
diff --git a/test/libpldmresponder_platform_test.cpp b/test/libpldmresponder_platform_test.cpp
index 8dfe6f1..818d5b2 100644
--- a/test/libpldmresponder_platform_test.cpp
+++ b/test/libpldmresponder_platform_test.cpp
@@ -24,7 +24,7 @@
request->request_count = 100;
auto pdrRepo = pldm_pdr_init();
- Handler handler("./pdr_jsons/state_effecter/good", pdrRepo);
+ Handler handler("./pdr_jsons/state_effecter/good", pdrRepo, nullptr);
Repo repo(pdrRepo);
ASSERT_EQ(repo.empty(), false);
auto response = handler.getPDR(req, requestPayloadLength);
@@ -55,7 +55,7 @@
request->request_count = 1;
auto pdrRepo = pldm_pdr_init();
- Handler handler("./pdr_jsons/state_effecter/good", pdrRepo);
+ Handler handler("./pdr_jsons/state_effecter/good", pdrRepo, nullptr);
Repo repo(pdrRepo);
ASSERT_EQ(repo.empty(), false);
auto response = handler.getPDR(req, requestPayloadLength);
@@ -80,7 +80,7 @@
request->request_count = 1;
auto pdrRepo = pldm_pdr_init();
- Handler handler("./pdr_jsons/state_effecter/good", pdrRepo);
+ Handler handler("./pdr_jsons/state_effecter/good", pdrRepo, nullptr);
Repo repo(pdrRepo);
ASSERT_EQ(repo.empty(), false);
auto response = handler.getPDR(req, requestPayloadLength);
@@ -103,7 +103,7 @@
request->record_handle = 1;
auto pdrRepo = pldm_pdr_init();
- Handler handler("./pdr_jsons/state_effecter/good", pdrRepo);
+ Handler handler("./pdr_jsons/state_effecter/good", pdrRepo, nullptr);
Repo repo(pdrRepo);
ASSERT_EQ(repo.empty(), false);
auto response = handler.getPDR(req, requestPayloadLength);
@@ -128,7 +128,7 @@
request->request_count = 100;
auto pdrRepo = pldm_pdr_init();
- Handler handler("./pdr_jsons/state_effecter/good", pdrRepo);
+ Handler handler("./pdr_jsons/state_effecter/good", pdrRepo, nullptr);
Repo repo(pdrRepo);
ASSERT_EQ(repo.empty(), false);
auto response = handler.getPDR(req, requestPayloadLength);
@@ -179,7 +179,7 @@
auto inPDRRepo = pldm_pdr_init();
auto outPDRRepo = pldm_pdr_init();
Repo outRepo(outPDRRepo);
- Handler handler("./pdr_jsons/state_effecter/good", inPDRRepo);
+ Handler handler("./pdr_jsons/state_effecter/good", inPDRRepo, nullptr);
Repo inRepo(inPDRRepo);
getRepoByType(inRepo, outRepo, PLDM_STATE_EFFECTER_PDR);
pdr_utils::PdrEntry e;
@@ -214,7 +214,7 @@
auto inPDRRepo = pldm_pdr_init();
auto outPDRRepo = pldm_pdr_init();
Repo outRepo(outPDRRepo);
- Handler handler("./pdr_jsons/state_effecter/good", inPDRRepo);
+ Handler handler("./pdr_jsons/state_effecter/good", inPDRRepo, nullptr);
Repo inRepo(inPDRRepo);
getRepoByType(inRepo, outRepo, PLDM_STATE_EFFECTER_PDR);
pdr_utils::PdrEntry e;