summaryrefslogtreecommitdiff
path: root/redfish-core/include/generated/enums/log_entry.hpp
blob: af5ce6f6a3d78be6801c997eddffc162423ab8ed (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include <nlohmann/json.hpp>

namespace log_entry
{
// clang-format off

enum class EventSeverity{
    Invalid,
    OK,
    Warning,
    Critical,
};

enum class LogEntryType{
    Invalid,
    Event,
    SEL,
    Oem,
    CXL,
};

enum class LogEntryCode{
    Invalid,
    Assert,
    Deassert,
    LowerNoncriticalgoinglow,
    LowerNoncriticalgoinghigh,
    LowerCriticalgoinglow,
    LowerCriticalgoinghigh,
    LowerNonrecoverablegoinglow,
    LowerNonrecoverablegoinghigh,
    UpperNoncriticalgoinglow,
    UpperNoncriticalgoinghigh,
    UpperCriticalgoinglow,
    UpperCriticalgoinghigh,
    UpperNonrecoverablegoinglow,
    UpperNonrecoverablegoinghigh,
    TransitiontoIdle,
    TransitiontoActive,
    TransitiontoBusy,
    StateDeasserted,
    StateAsserted,
    PredictiveFailuredeasserted,
    PredictiveFailureasserted,
    LimitNotExceeded,
    LimitExceeded,
    PerformanceMet,
    PerformanceLags,
    TransitiontoOK,
    TransitiontoNonCriticalfromOK,
    TransitiontoCriticalfromlesssevere,
    TransitiontoNonrecoverablefromlesssevere,
    TransitiontoNonCriticalfrommoresevere,
    TransitiontoCriticalfromNonrecoverable,
    TransitiontoNonrecoverable,
    Monitor,
    Informational,
    DeviceRemovedDeviceAbsent,
    DeviceInsertedDevicePresent,
    DeviceDisabled,
    DeviceEnabled,
    TransitiontoRunning,
    TransitiontoInTest,
    TransitiontoPowerOff,
    TransitiontoOnLine,
    TransitiontoOffLine,
    TransitiontoOffDuty,
    TransitiontoDegraded,
    TransitiontoPowerSave,
    InstallError,
    FullyRedundant,
    RedundancyLost,
    RedundancyDegraded,
    NonredundantSufficientResourcesfromRedundant,
    NonredundantSufficientResourcesfromInsufficientResources,
    NonredundantInsufficientResources,
    RedundancyDegradedfromFullyRedundant,
    RedundancyDegradedfromNonredundant,
    D0PowerState,
    D1PowerState,
    D2PowerState,
    D3PowerState,
    OEM,
};

enum class SensorType{
    Invalid,
    PlatformSecurityViolationAttempt,
    Temperature,
    Voltage,
    Current,
    Fan,
    PhysicalChassisSecurity,
    Processor,
    PowerSupplyConverter,
    PowerUnit,
    CoolingDevice,
    OtherUnitsbasedSensor,
    Memory,
    DriveSlotBay,
    POSTMemoryResize,
    SystemFirmwareProgress,
    EventLoggingDisabled,
    SystemEvent,
    CriticalInterrupt,
    ButtonSwitch,
    ModuleBoard,
    MicrocontrollerCoprocessor,
    AddinCard,
    Chassis,
    ChipSet,
    OtherFRU,
    CableInterconnect,
    Terminator,
    SystemBootRestart,
    BootError,
    BaseOSBootInstallationStatus,
    OSStopShutdown,
    SlotConnector,
    SystemACPIPowerState,
    Watchdog,
    PlatformAlert,
    EntityPresence,
    MonitorASICIC,
    LAN,
    ManagementSubsystemHealth,
    Battery,
    SessionAudit,
    VersionChange,
    FRUState,
    OEM,
};

enum class LogDiagnosticDataTypes{
    Invalid,
    Manager,
    PreOS,
    OS,
    OEM,
    CPER,
    CPERSection,
    Device,
};

enum class OriginatorTypes{
    Invalid,
    Client,
    Internal,
    SupportingService,
};

enum class CXLEntryType{
    Invalid,
    DynamicCapacity,
    Informational,
    Warning,
    Failure,
    Fatal,
};

NLOHMANN_JSON_SERIALIZE_ENUM(EventSeverity, {
    {EventSeverity::Invalid, "Invalid"},
    {EventSeverity::OK, "OK"},
    {EventSeverity::Warning, "Warning"},
    {EventSeverity::Critical, "Critical"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(LogEntryType, {
    {LogEntryType::Invalid, "Invalid"},
    {LogEntryType::Event, "Event"},
    {LogEntryType::SEL, "SEL"},
    {LogEntryType::Oem, "Oem"},
    {LogEntryType::CXL, "CXL"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(LogEntryCode, {
    {LogEntryCode::Invalid, "Invalid"},
    {LogEntryCode::Assert, "Assert"},
    {LogEntryCode::Deassert, "Deassert"},
    {LogEntryCode::LowerNoncriticalgoinglow, "Lower Non-critical - going low"},
    {LogEntryCode::LowerNoncriticalgoinghigh, "Lower Non-critical - going high"},
    {LogEntryCode::LowerCriticalgoinglow, "Lower Critical - going low"},
    {LogEntryCode::LowerCriticalgoinghigh, "Lower Critical - going high"},
    {LogEntryCode::LowerNonrecoverablegoinglow, "Lower Non-recoverable - going low"},
    {LogEntryCode::LowerNonrecoverablegoinghigh, "Lower Non-recoverable - going high"},
    {LogEntryCode::UpperNoncriticalgoinglow, "Upper Non-critical - going low"},
    {LogEntryCode::UpperNoncriticalgoinghigh, "Upper Non-critical - going high"},
    {LogEntryCode::UpperCriticalgoinglow, "Upper Critical - going low"},
    {LogEntryCode::UpperCriticalgoinghigh, "Upper Critical - going high"},
    {LogEntryCode::UpperNonrecoverablegoinglow, "Upper Non-recoverable - going low"},
    {LogEntryCode::UpperNonrecoverablegoinghigh, "Upper Non-recoverable - going high"},
    {LogEntryCode::TransitiontoIdle, "Transition to Idle"},
    {LogEntryCode::TransitiontoActive, "Transition to Active"},
    {LogEntryCode::TransitiontoBusy, "Transition to Busy"},
    {LogEntryCode::StateDeasserted, "State Deasserted"},
    {LogEntryCode::StateAsserted, "State Asserted"},
    {LogEntryCode::PredictiveFailuredeasserted, "Predictive Failure deasserted"},
    {LogEntryCode::PredictiveFailureasserted, "Predictive Failure asserted"},
    {LogEntryCode::LimitNotExceeded, "Limit Not Exceeded"},
    {LogEntryCode::LimitExceeded, "Limit Exceeded"},
    {LogEntryCode::PerformanceMet, "Performance Met"},
    {LogEntryCode::PerformanceLags, "Performance Lags"},
    {LogEntryCode::TransitiontoOK, "Transition to OK"},
    {LogEntryCode::TransitiontoNonCriticalfromOK, "Transition to Non-Critical from OK"},
    {LogEntryCode::TransitiontoCriticalfromlesssevere, "Transition to Critical from less severe"},
    {LogEntryCode::TransitiontoNonrecoverablefromlesssevere, "Transition to Non-recoverable from less severe"},
    {LogEntryCode::TransitiontoNonCriticalfrommoresevere, "Transition to Non-Critical from more severe"},
    {LogEntryCode::TransitiontoCriticalfromNonrecoverable, "Transition to Critical from Non-recoverable"},
    {LogEntryCode::TransitiontoNonrecoverable, "Transition to Non-recoverable"},
    {LogEntryCode::Monitor, "Monitor"},
    {LogEntryCode::Informational, "Informational"},
    {LogEntryCode::DeviceRemovedDeviceAbsent, "Device Removed / Device Absent"},
    {LogEntryCode::DeviceInsertedDevicePresent, "Device Inserted / Device Present"},
    {LogEntryCode::DeviceDisabled, "Device Disabled"},
    {LogEntryCode::DeviceEnabled, "Device Enabled"},
    {LogEntryCode::TransitiontoRunning, "Transition to Running"},
    {LogEntryCode::TransitiontoInTest, "Transition to In Test"},
    {LogEntryCode::TransitiontoPowerOff, "Transition to Power Off"},
    {LogEntryCode::TransitiontoOnLine, "Transition to On Line"},
    {LogEntryCode::TransitiontoOffLine, "Transition to Off Line"},
    {LogEntryCode::TransitiontoOffDuty, "Transition to Off Duty"},
    {LogEntryCode::TransitiontoDegraded, "Transition to Degraded"},
    {LogEntryCode::TransitiontoPowerSave, "Transition to Power Save"},
    {LogEntryCode::InstallError, "Install Error"},
    {LogEntryCode::FullyRedundant, "Fully Redundant"},
    {LogEntryCode::RedundancyLost, "Redundancy Lost"},
    {LogEntryCode::RedundancyDegraded, "Redundancy Degraded"},
    {LogEntryCode::NonredundantSufficientResourcesfromRedundant, "Non-redundant:Sufficient Resources from Redundant"},
    {LogEntryCode::NonredundantSufficientResourcesfromInsufficientResources, "Non-redundant:Sufficient Resources from Insufficient Resources"},
    {LogEntryCode::NonredundantInsufficientResources, "Non-redundant:Insufficient Resources"},
    {LogEntryCode::RedundancyDegradedfromFullyRedundant, "Redundancy Degraded from Fully Redundant"},
    {LogEntryCode::RedundancyDegradedfromNonredundant, "Redundancy Degraded from Non-redundant"},
    {LogEntryCode::D0PowerState, "D0 Power State"},
    {LogEntryCode::D1PowerState, "D1 Power State"},
    {LogEntryCode::D2PowerState, "D2 Power State"},
    {LogEntryCode::D3PowerState, "D3 Power State"},
    {LogEntryCode::OEM, "OEM"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(SensorType, {
    {SensorType::Invalid, "Invalid"},
    {SensorType::PlatformSecurityViolationAttempt, "Platform Security Violation Attempt"},
    {SensorType::Temperature, "Temperature"},
    {SensorType::Voltage, "Voltage"},
    {SensorType::Current, "Current"},
    {SensorType::Fan, "Fan"},
    {SensorType::PhysicalChassisSecurity, "Physical Chassis Security"},
    {SensorType::Processor, "Processor"},
    {SensorType::PowerSupplyConverter, "Power Supply / Converter"},
    {SensorType::PowerUnit, "PowerUnit"},
    {SensorType::CoolingDevice, "CoolingDevice"},
    {SensorType::OtherUnitsbasedSensor, "Other Units-based Sensor"},
    {SensorType::Memory, "Memory"},
    {SensorType::DriveSlotBay, "Drive Slot/Bay"},
    {SensorType::POSTMemoryResize, "POST Memory Resize"},
    {SensorType::SystemFirmwareProgress, "System Firmware Progress"},
    {SensorType::EventLoggingDisabled, "Event Logging Disabled"},
    {SensorType::SystemEvent, "System Event"},
    {SensorType::CriticalInterrupt, "Critical Interrupt"},
    {SensorType::ButtonSwitch, "Button/Switch"},
    {SensorType::ModuleBoard, "Module/Board"},
    {SensorType::MicrocontrollerCoprocessor, "Microcontroller/Coprocessor"},
    {SensorType::AddinCard, "Add-in Card"},
    {SensorType::Chassis, "Chassis"},
    {SensorType::ChipSet, "ChipSet"},
    {SensorType::OtherFRU, "Other FRU"},
    {SensorType::CableInterconnect, "Cable/Interconnect"},
    {SensorType::Terminator, "Terminator"},
    {SensorType::SystemBootRestart, "SystemBoot/Restart"},
    {SensorType::BootError, "Boot Error"},
    {SensorType::BaseOSBootInstallationStatus, "BaseOSBoot/InstallationStatus"},
    {SensorType::OSStopShutdown, "OS Stop/Shutdown"},
    {SensorType::SlotConnector, "Slot/Connector"},
    {SensorType::SystemACPIPowerState, "System ACPI PowerState"},
    {SensorType::Watchdog, "Watchdog"},
    {SensorType::PlatformAlert, "Platform Alert"},
    {SensorType::EntityPresence, "Entity Presence"},
    {SensorType::MonitorASICIC, "Monitor ASIC/IC"},
    {SensorType::LAN, "LAN"},
    {SensorType::ManagementSubsystemHealth, "Management Subsystem Health"},
    {SensorType::Battery, "Battery"},
    {SensorType::SessionAudit, "Session Audit"},
    {SensorType::VersionChange, "Version Change"},
    {SensorType::FRUState, "FRUState"},
    {SensorType::OEM, "OEM"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(LogDiagnosticDataTypes, {
    {LogDiagnosticDataTypes::Invalid, "Invalid"},
    {LogDiagnosticDataTypes::Manager, "Manager"},
    {LogDiagnosticDataTypes::PreOS, "PreOS"},
    {LogDiagnosticDataTypes::OS, "OS"},
    {LogDiagnosticDataTypes::OEM, "OEM"},
    {LogDiagnosticDataTypes::CPER, "CPER"},
    {LogDiagnosticDataTypes::CPERSection, "CPERSection"},
    {LogDiagnosticDataTypes::Device, "Device"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(OriginatorTypes, {
    {OriginatorTypes::Invalid, "Invalid"},
    {OriginatorTypes::Client, "Client"},
    {OriginatorTypes::Internal, "Internal"},
    {OriginatorTypes::SupportingService, "SupportingService"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(CXLEntryType, {
    {CXLEntryType::Invalid, "Invalid"},
    {CXLEntryType::DynamicCapacity, "DynamicCapacity"},
    {CXLEntryType::Informational, "Informational"},
    {CXLEntryType::Warning, "Warning"},
    {CXLEntryType::Failure, "Failure"},
    {CXLEntryType::Fatal, "Fatal"},
});

// clang-format on
} // namespace log_entry