summaryrefslogtreecommitdiff
path: root/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/0018-bmcweb-Add-BMC-Time-update-log-to-the-registry.patch
blob: 8293843056dc21b0ce26ac2a57cb70b4c54fe501 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From 3ec1f79d1cb29724e345586f0baefca81d98d3ae Mon Sep 17 00:00:00 2001
From: mansijos <mansi.joshi@intel.com>
Date: Wed, 26 May 2021 17:40:04 +0530
Subject: [PATCH] [bmcweb] Add BMC Time update log to the registry

Add message in registry to log an event that indicates BMC time
is set via NTP, Host or Manually.
During early stage of system boot if any critical events occur,
they are getting logged with 1970 timestamp till the time BMC
time update happens. This is expected behavior, but to call it out
explicitly it is good to log when BMC time is updated.

Tested:
Built and validator passes.
Confirmed that the event is getting logged correctly in Redfish.

Signed-off-by: mansijos <mansi.joshi@intel.com>
---
 .../registries/openbmc_message_registry.hpp   | 35 ++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/redfish-core/include/registries/openbmc_message_registry.hpp b/redfish-core/include/registries/openbmc_message_registry.hpp
index 2f981db..a00d235 100644
--- a/redfish-core/include/registries/openbmc_message_registry.hpp
+++ b/redfish-core/include/registries/openbmc_message_registry.hpp
@@ -29,7 +29,7 @@ const Header header = {
     "0.2.0",
     "OpenBMC",
 };
-constexpr std::array<MessageEntry, 193> registry = {
+constexpr std::array<MessageEntry, 196> registry = {
     MessageEntry{
         "ADDDCCorrectable",
         {
@@ -286,6 +286,39 @@ constexpr std::array<MessageEntry, 193> registry = {
                      {},
                      "None.",
                  }},
+    MessageEntry{"BMCTimeUpdatedViaHost",
+                 {
+                     "Indicates that BMC time has been set via Host.",
+                     "BMC time has been set via Host. "
+                     "Date Time is set to %1 from %2.",
+                     "OK",
+                     "OK",
+                     2,
+                     {"string", "string"},
+                     "None.",
+                 }},
+    MessageEntry{"BMCTimeUpdatedManually",
+                 {
+                     "Indicates that BMC time has been set Manually.",
+                     "BMC time has been set Manually. "
+                     "Date Time is set to %1 from %2.",
+                     "OK",
+                     "OK",
+                     2,
+                     {"string", "string"},
+                     "None.",
+                 }},
+    MessageEntry{"BMCTimeUpdatedViaNTP",
+                 {
+                     "Indicates that BMC time has been set via NTP.",
+                     "BMC time has been set via NTP. "
+                     "Date Time is set to %1 from %2.",
+                     "OK",
+                     "OK",
+                     2,
+                     {"string", "string"},
+                     "None.",
+                 }},
     MessageEntry{"ChassisIntrusionDetected",
                  {
                      "Indicates that a physical security event "
-- 
2.17.1