commit | e7dbd530a5c5ba9ae29ee50fd7c1e61a128afc9b | [log] [tgz] |
---|---|---|
author | Potin Lai <potin.lai@quantatw.com> | Thu May 05 16:31:59 2022 +0800 |
committer | Ed Tanous <ed@tanous.net> | Mon May 16 17:19:21 2022 +0000 |
tree | f566f761bbcce8196f5ebe323c476c9d397ae7c6 | |
parent | c08f032533138fe8919cf28eb3489e5fb4f66519 [diff] |
log_services: fix wrong AdditionalDataURI fix wrong AdditionalDataURI of EventLog entries Tested: [Before] $ curl -s -u root:0penBmc -k https://10.10.11.203/redfish/v1/Systems/system/LogServices/EventLog/Entries/60 |\ > python -c 'import sys, json; print(json.load(sys.stdin)["AdditionalDataURI"])' /redfish/v1/Systems/system/LogServices/EventLog/attachment/60 $ curl -s -u root:0penBmc -k https://10.10.11.203/redfish/v1/Systems/system/LogServices/EventLog/attachment/60 Not Found [After] $ curl -s -u root:0penBmc -k https://10.10.11.203/redfish/v1/Systems/system/LogServices/EventLog/Entries/60 |\ > python -c 'import sys, json; print(json.load(sys.stdin)["AdditionalDataURI"])' /redfish/v1/Systems/system/LogServices/EventLog/Entries/60/attachment $ curl -s -u root:0penBmc -k https://10.10.11.203/redfish/v1/Systems/system/LogServices/EventLog/Entries/60/attachment BQAAADwAAAAGAAAAEeFXk4ABAAAtAAAAAAAAAHh5ei5vcGVuYm1jX3Byb2plY3QuTG9nZ2luZy5TRUwuRXJyb3IuQ3JlYXRlZAYAAAAAAAAACwAAAAAAAABFVkVOVF9ESVI9MQ8AAAAAAAAAR0VORVJBVE9SX0lEPTMyDQAAAAAAAABSRUNPUkRfVFlQRT0yEgAAAAAAAABTRU5TT1JfREFUQT01MjAyQzE6AAAAAAAAAFNFTlNPUl9QQVRIPS94eXovb3BlbmJtY19wcm9qZWN0L3NlbnNvcnMvdm9sdGFnZS9QMTJWX0ZBTjEIAAAAAAAAAF9QSUQ9MzAxAAAAAAAAAAAAIAAAAAAAAAAyLjEyLjAtZGV2LTEwOTQtZ2MzNDk4NzlmNi1kaXJ0eRHhV5OAAQAAAAAAAAAAAAAAAAAAAAAAAA== Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I859638a942a0afcb57f68d6a6613d5c3498ab3be
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp index 8ab94cc..0a78009 100644 --- a/redfish-core/lib/log_services.hpp +++ b/redfish-core/lib/log_services.hpp
@@ -1596,8 +1596,8 @@ if (filePath != nullptr) { asyncResp->res.jsonValue["AdditionalDataURI"] = - "/redfish/v1/Systems/system/LogServices/EventLog/attachment/" + - std::to_string(*id); + "/redfish/v1/Systems/system/LogServices/EventLog/Entries/" + + std::to_string(*id) + "/attachment"; } }, "xyz.openbmc_project.Logging",