Remove EventType
EventType::Event doesn't exist in the Event schema.
Initially, we thought to change it to EventType::Alert, but further
inspection of the Redfish schemas shows that the property itself is
deprecated, so rather than try to make it "correct" it is better to just
remove it.
This is technically a breaking API change, but given that very few
schema-correct implementations of Redfish clients exist, even fewer
EventService receivers exist, and this hasn't been reported before, I'd
be extremely surprised if this broke any implementation.
Tested: Sending test events shows no EventType generated.
Change-Id: I933b2cc1dc2fb71714392949dd6eb030fbdcf8aa
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index d8e4e61..517910c 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -250,12 +250,6 @@
// Fill in the log entry with the gathered data
logEntryJson["EventId"] = logEntryID;
- logEntryJson["EventType"] = "Event";
-
- // TODO, the above is wrong. Below should be correct, but would change
- // behavior
- // logEntryJson["EventType"] = event_destination::EventType::Alert;
-
logEntryJson["Severity"] = message->messageSeverity;
logEntryJson["Message"] = std::move(msg);
logEntryJson["MessageId"] = messageID;
@@ -385,12 +379,6 @@
nlohmann::json& logEntryJson = logEntryArray.emplace_back();
logEntryJson["EventId"] = "TestID";
- logEntryJson["EventType"] = "Event";
-
- // TODO, the above is wrong. There's no "Event" type in the EventType
- // enum Below should be correct, but would change behavior
- // logEntryJson["EventType"] = event::EventType::Alert;
-
logEntryJson["Severity"] = log_entry::EventSeverity::OK;
logEntryJson["Message"] = "Generated test event";
logEntryJson["MessageId"] = "OpenBMC.0.2.TestEventLog";