diff options
author | Potin Lai <potin.lai@quantatw.com> | 2022-05-05 11:31:59 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-05-16 20:19:21 +0300 |
commit | e7dbd530a5c5ba9ae29ee50fd7c1e61a128afc9b (patch) | |
tree | f566f761bbcce8196f5ebe323c476c9d397ae7c6 | |
parent | c08f032533138fe8919cf28eb3489e5fb4f66519 (diff) | |
download | bmcweb-e7dbd530a5c5ba9ae29ee50fd7c1e61a128afc9b.tar.xz |
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
-rw-r--r-- | redfish-core/lib/log_services.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp index 8ab94cc670..0a78009b95 100644 --- a/redfish-core/lib/log_services.hpp +++ b/redfish-core/lib/log_services.hpp @@ -1596,8 +1596,8 @@ inline void requestRoutesDBusEventLogEntry(App& app) 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", |