diff options
author | Sui Chen <suichen@google.com> | 2022-04-11 09:08:53 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-05-02 19:45:46 +0300 |
commit | f12b57b27157418bbc2c1bf96f1d1cd9db52739b (patch) | |
tree | 80db66b82e7d2b07172c806c421e0b3778fefe3c /redfish-core/include/registries | |
parent | 61b83d0cce255cf98d6a2bbe6924307b69742959 (diff) | |
download | bmcweb-f12b57b27157418bbc2c1bf96f1d1cd9db52739b.tar.xz |
Add OpenBMC.1.0.ServiceStarted to registry
This change adds OpenBMC.1.0.ServiceStarted to the registry, and adds a
test case for getMessage and getMessageFromRegistry. The
getMessageFromRegistry function is moved to a .cpp file so it can be
called from the test.
Unit test passes.
When tested in QEMU: With
https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/52591 applied,
restarting a service generates a corresponding log entry.
bmc# systemctl restart rsyslogd
host$ wget -q -O - \
http://localhost:10080/redfish/v1/Systems/system/LogServices/EventLog/Entries/
...
{
"@odata.id":
/redfish/v1/Systems/system/LogServices/EventLog/Entries/47441_1",
"@odata.type": "#LogEntry.v1_8_0.LogEntry",
"Created": "1970-01-01T13:10:41+00:00",
"EntryType": "Event",
"Id": "47441_1",
"Message": "Service rsyslog.service has started successfully.",
"MessageArgs": [
"rsyslog.service"
],
"MessageId": "OpenBMC.1.0.ServiceStarted",
"Name": "System Event Log Entry",
"Severity": "OK"
},
Signed-off-by: Sui Chen <suichen@google.com>
Change-Id: Iea6fa6e3ea8591853169043c1c04f5a7cf00b2f6
Diffstat (limited to 'redfish-core/include/registries')
-rw-r--r-- | redfish-core/include/registries/openbmc_message_registry.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp index db624e73b6..80d30c30f6 100644 --- a/redfish-core/include/registries/openbmc_message_registry.hpp +++ b/redfish-core/include/registries/openbmc_message_registry.hpp @@ -21,12 +21,12 @@ namespace redfish::registries::openbmc const Header header = { "Copyright 2022 OpenBMC. All rights reserved.", "#MessageRegistry.v1_4_0.MessageRegistry", - "OpenBMC.0.3.1", + "OpenBMC.0.4.0", "OpenBMC Message Registry", "en", "This registry defines the base messages for OpenBMC.", "OpenBMC", - "0.3.1", + "0.4.0", "OpenBMC", }; constexpr std::array registry = { @@ -2120,6 +2120,15 @@ constexpr std::array registry = { {"string"}, "None.", }}, + MessageEntry{"ServiceStarted", + { + "Indicates that a service has started successfully.", + "Service %1 has started successfully.", + "OK", + 1, + {"string"}, + "None.", + }}, MessageEntry{"SparingRedundancyDegraded", { "Indicates the sparing redundancy state is degraded.", |