summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2020-10-26 20:44:53 +0300
committerGunnar Mills <gmills@us.ibm.com>2020-10-27 06:24:34 +0300
commit743e9a1f7c0b746086c84b0c50cf2db3df5dbac9 (patch)
tree36c32b4323506fab4506fe2b3c5ccbfb44b60f97
parentf23b729676559f539790580930b1ff3b0c05805b (diff)
downloadbmcweb-743e9a1f7c0b746086c84b0c50cf2db3df5dbac9.tar.xz
log_services: Remove odata.context
A series of commits 8 months ago removed odata.context. These creeped back in. Redfish made odata.context optional (1.6.0 of DSP0266, Sept 2018). Redfish has removed odata.context from example payloads in the specification (1.7.0 of DSP0266), removed it from the mockups, and Redfish recommended not using. The reason for making optional and removing from mockups/examples, "no one could figure out how to use it and it did not add value". Don't see value in it for our implementation. Tested: Was tested in a series in an earlier patch set. Change-Id: Ibee7a3839388d4bcafa16ad78b8211e8338c45dc Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--redfish-core/lib/log_services.hpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index 04f82f7c96..ce5b2c8c5a 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -2994,7 +2994,6 @@ class PostCodesLogService : public Node
asyncResp->res.jsonValue = {
{"@odata.id", "/redfish/v1/Systems/system/LogServices/PostCodes"},
{"@odata.type", "#LogService.v1_1_0.LogService"},
- {"@odata.context", "/redfish/v1/$metadata#LogService.LogService"},
{"Name", "POST Code Log Service"},
{"Description", "POST Code Log Service"},
{"Id", "BIOS POST Code Log"},
@@ -3153,20 +3152,18 @@ static void fillPostCodeEntry(
// add to AsyncResp
logEntryArray.push_back({});
nlohmann::json& bmcLogEntry = logEntryArray.back();
- bmcLogEntry = {
- {"@odata.type", "#LogEntry.v1_4_0.LogEntry"},
- {"@odata.context", "/redfish/v1/$metadata#LogEntry.LogEntry"},
- {"@odata.id", "/redfish/v1/Systems/system/LogServices/"
- "PostCodes/Entries/" +
- postcodeEntryID},
- {"Name", "POST Code Log Entry"},
- {"Id", postcodeEntryID},
- {"Message", std::move(msg)},
- {"MessageId", "OpenBMC.0.1.BIOSPOSTCode"},
- {"MessageArgs", std::move(messageArgs)},
- {"EntryType", "Event"},
- {"Severity", std::move(severity)},
- {"Created", entryTimeStr}};
+ bmcLogEntry = {{"@odata.type", "#LogEntry.v1_4_0.LogEntry"},
+ {"@odata.id", "/redfish/v1/Systems/system/LogServices/"
+ "PostCodes/Entries/" +
+ postcodeEntryID},
+ {"Name", "POST Code Log Entry"},
+ {"Id", postcodeEntryID},
+ {"Message", std::move(msg)},
+ {"MessageId", "OpenBMC.0.1.BIOSPOSTCode"},
+ {"MessageArgs", std::move(messageArgs)},
+ {"EntryType", "Event"},
+ {"Severity", std::move(severity)},
+ {"Created", entryTimeStr}};
}
}
@@ -3310,9 +3307,6 @@ class PostCodesEntryCollection : public Node
asyncResp->res.jsonValue["@odata.type"] =
"#LogEntryCollection.LogEntryCollection";
- asyncResp->res.jsonValue["@odata.context"] =
- "/redfish/v1/"
- "$metadata#LogEntryCollection.LogEntryCollection";
asyncResp->res.jsonValue["@odata.id"] =
"/redfish/v1/Systems/system/LogServices/PostCodes/Entries";
asyncResp->res.jsonValue["Name"] = "BIOS POST Code Log Entries";
@@ -3396,8 +3390,6 @@ class PostCodesEntry : public Node
}
asyncResp->res.jsonValue["@odata.type"] = "#LogEntry.v1_4_0.LogEntry";
- asyncResp->res.jsonValue["@odata.context"] =
- "/redfish/v1/$metadata#LogEntry.LogEntry";
asyncResp->res.jsonValue["@odata.id"] =
"/redfish/v1/Systems/system/LogServices/PostCodes/"
"Entries";