xref: /openbmc/bmcweb/redfish-core/include/generated/enums/computer_system.hpp (revision d125652e8a30dfeaad88bbfa5b1e04a80610469c)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 #include <nlohmann/json.hpp>
5 
6 namespace computer_system
7 {
8 // clang-format off
9 
10 enum class BootSource{
11     Invalid,
12     None,
13     Pxe,
14     Floppy,
15     Cd,
16     Usb,
17     Hdd,
18     BiosSetup,
19     Utilities,
20     Diags,
21     UefiShell,
22     UefiTarget,
23     SDCard,
24     UefiHttp,
25     RemoteDrive,
26     UefiBootNext,
27     Recovery,
28 };
29 
30 enum class SystemType{
31     Invalid,
32     Physical,
33     Virtual,
34     OS,
35     PhysicallyPartitioned,
36     VirtuallyPartitioned,
37     Composed,
38     DPU,
39 };
40 
41 enum class IndicatorLED{
42     Invalid,
43     Unknown,
44     Lit,
45     Blinking,
46     Off,
47 };
48 
49 enum class BootSourceOverrideEnabled{
50     Invalid,
51     Disabled,
52     Once,
53     Continuous,
54 };
55 
56 enum class MemoryMirroring{
57     Invalid,
58     System,
59     DIMM,
60     Hybrid,
61     None,
62 };
63 
64 enum class BootSourceOverrideMode{
65     Invalid,
66     Legacy,
67     UEFI,
68 };
69 
70 enum class InterfaceType{
71     Invalid,
72     TPM1_2,
73     TPM2_0,
74     TCM1_0,
75 };
76 
77 enum class HostingRole{
78     Invalid,
79     ApplicationServer,
80     StorageServer,
81     Switch,
82     Appliance,
83     BareMetalServer,
84     VirtualMachineServer,
85     ContainerServer,
86 };
87 
88 enum class InterfaceTypeSelection{
89     Invalid,
90     None,
91     FirmwareUpdate,
92     BiosSetting,
93     OemMethod,
94 };
95 
96 enum class WatchdogWarningActions{
97     Invalid,
98     None,
99     DiagnosticInterrupt,
100     SMI,
101     MessagingInterrupt,
102     SCI,
103     OEM,
104 };
105 
106 enum class WatchdogTimeoutActions{
107     Invalid,
108     None,
109     ResetSystem,
110     PowerCycle,
111     PowerDown,
112     OEM,
113 };
114 
115 enum class PowerRestorePolicyTypes{
116     Invalid,
117     AlwaysOn,
118     AlwaysOff,
119     LastState,
120 };
121 
122 enum class BootOrderTypes{
123     Invalid,
124     BootOrder,
125     AliasBootOrder,
126 };
127 
128 enum class AutomaticRetryConfig{
129     Invalid,
130     Disabled,
131     RetryAttempts,
132     RetryAlways,
133 };
134 
135 enum class BootProgressTypes{
136     Invalid,
137     None,
138     PrimaryProcessorInitializationStarted,
139     BusInitializationStarted,
140     MemoryInitializationStarted,
141     SecondaryProcessorInitializationStarted,
142     PCIResourceConfigStarted,
143     SystemHardwareInitializationComplete,
144     SetupEntered,
145     OSBootStarted,
146     OSRunning,
147     OEM,
148 };
149 
150 enum class GraphicalConnectTypesSupported{
151     Invalid,
152     KVMIP,
153     OEM,
154 };
155 
156 enum class TrustedModuleRequiredToBoot{
157     Invalid,
158     Disabled,
159     Required,
160 };
161 
162 enum class StopBootOnFault{
163     Invalid,
164     Never,
165     AnyFault,
166 };
167 
168 enum class PowerMode{
169     Invalid,
170     MaximumPerformance,
171     BalancedPerformance,
172     PowerSaving,
173     Static,
174     OSControlled,
175     OEM,
176     EfficiencyFavorPower,
177     EfficiencyFavorPerformance,
178 };
179 
180 enum class CompositionUseCase{
181     Invalid,
182     ResourceBlockCapable,
183     ExpandableSystem,
184 };
185 
186 enum class KMIPCachePolicy{
187     Invalid,
188     None,
189     AfterFirstUse,
190 };
191 
192 enum class DecommissionType{
193     Invalid,
194     All,
195     UserData,
196     ManagerConfig,
197     BIOSConfig,
198     NetworkConfig,
199     StorageConfig,
200     Logs,
201     TPM,
202 };
203 
204 enum class LastResetCauses{
205     Invalid,
206     PowerButtonPress,
207     ManagementCommand,
208     PowerRestorePolicy,
209     RTCWakeup,
210     WatchdogExpiration,
211     OSSoftRestart,
212     SystemCrash,
213     ThermalEvent,
214     PowerEvent,
215     Unknown,
216 };
217 
218 NLOHMANN_JSON_SERIALIZE_ENUM(BootSource, {
219     {BootSource::Invalid, "Invalid"},
220     {BootSource::None, "None"},
221     {BootSource::Pxe, "Pxe"},
222     {BootSource::Floppy, "Floppy"},
223     {BootSource::Cd, "Cd"},
224     {BootSource::Usb, "Usb"},
225     {BootSource::Hdd, "Hdd"},
226     {BootSource::BiosSetup, "BiosSetup"},
227     {BootSource::Utilities, "Utilities"},
228     {BootSource::Diags, "Diags"},
229     {BootSource::UefiShell, "UefiShell"},
230     {BootSource::UefiTarget, "UefiTarget"},
231     {BootSource::SDCard, "SDCard"},
232     {BootSource::UefiHttp, "UefiHttp"},
233     {BootSource::RemoteDrive, "RemoteDrive"},
234     {BootSource::UefiBootNext, "UefiBootNext"},
235     {BootSource::Recovery, "Recovery"},
236 });
237 
238 NLOHMANN_JSON_SERIALIZE_ENUM(SystemType, {
239     {SystemType::Invalid, "Invalid"},
240     {SystemType::Physical, "Physical"},
241     {SystemType::Virtual, "Virtual"},
242     {SystemType::OS, "OS"},
243     {SystemType::PhysicallyPartitioned, "PhysicallyPartitioned"},
244     {SystemType::VirtuallyPartitioned, "VirtuallyPartitioned"},
245     {SystemType::Composed, "Composed"},
246     {SystemType::DPU, "DPU"},
247 });
248 
249 NLOHMANN_JSON_SERIALIZE_ENUM(IndicatorLED, {
250     {IndicatorLED::Invalid, "Invalid"},
251     {IndicatorLED::Unknown, "Unknown"},
252     {IndicatorLED::Lit, "Lit"},
253     {IndicatorLED::Blinking, "Blinking"},
254     {IndicatorLED::Off, "Off"},
255 });
256 
257 NLOHMANN_JSON_SERIALIZE_ENUM(BootSourceOverrideEnabled, {
258     {BootSourceOverrideEnabled::Invalid, "Invalid"},
259     {BootSourceOverrideEnabled::Disabled, "Disabled"},
260     {BootSourceOverrideEnabled::Once, "Once"},
261     {BootSourceOverrideEnabled::Continuous, "Continuous"},
262 });
263 
264 NLOHMANN_JSON_SERIALIZE_ENUM(MemoryMirroring, {
265     {MemoryMirroring::Invalid, "Invalid"},
266     {MemoryMirroring::System, "System"},
267     {MemoryMirroring::DIMM, "DIMM"},
268     {MemoryMirroring::Hybrid, "Hybrid"},
269     {MemoryMirroring::None, "None"},
270 });
271 
272 NLOHMANN_JSON_SERIALIZE_ENUM(BootSourceOverrideMode, {
273     {BootSourceOverrideMode::Invalid, "Invalid"},
274     {BootSourceOverrideMode::Legacy, "Legacy"},
275     {BootSourceOverrideMode::UEFI, "UEFI"},
276 });
277 
278 NLOHMANN_JSON_SERIALIZE_ENUM(InterfaceType, {
279     {InterfaceType::Invalid, "Invalid"},
280     {InterfaceType::TPM1_2, "TPM1_2"},
281     {InterfaceType::TPM2_0, "TPM2_0"},
282     {InterfaceType::TCM1_0, "TCM1_0"},
283 });
284 
285 NLOHMANN_JSON_SERIALIZE_ENUM(HostingRole, {
286     {HostingRole::Invalid, "Invalid"},
287     {HostingRole::ApplicationServer, "ApplicationServer"},
288     {HostingRole::StorageServer, "StorageServer"},
289     {HostingRole::Switch, "Switch"},
290     {HostingRole::Appliance, "Appliance"},
291     {HostingRole::BareMetalServer, "BareMetalServer"},
292     {HostingRole::VirtualMachineServer, "VirtualMachineServer"},
293     {HostingRole::ContainerServer, "ContainerServer"},
294 });
295 
296 NLOHMANN_JSON_SERIALIZE_ENUM(InterfaceTypeSelection, {
297     {InterfaceTypeSelection::Invalid, "Invalid"},
298     {InterfaceTypeSelection::None, "None"},
299     {InterfaceTypeSelection::FirmwareUpdate, "FirmwareUpdate"},
300     {InterfaceTypeSelection::BiosSetting, "BiosSetting"},
301     {InterfaceTypeSelection::OemMethod, "OemMethod"},
302 });
303 
304 NLOHMANN_JSON_SERIALIZE_ENUM(WatchdogWarningActions, {
305     {WatchdogWarningActions::Invalid, "Invalid"},
306     {WatchdogWarningActions::None, "None"},
307     {WatchdogWarningActions::DiagnosticInterrupt, "DiagnosticInterrupt"},
308     {WatchdogWarningActions::SMI, "SMI"},
309     {WatchdogWarningActions::MessagingInterrupt, "MessagingInterrupt"},
310     {WatchdogWarningActions::SCI, "SCI"},
311     {WatchdogWarningActions::OEM, "OEM"},
312 });
313 
314 NLOHMANN_JSON_SERIALIZE_ENUM(WatchdogTimeoutActions, {
315     {WatchdogTimeoutActions::Invalid, "Invalid"},
316     {WatchdogTimeoutActions::None, "None"},
317     {WatchdogTimeoutActions::ResetSystem, "ResetSystem"},
318     {WatchdogTimeoutActions::PowerCycle, "PowerCycle"},
319     {WatchdogTimeoutActions::PowerDown, "PowerDown"},
320     {WatchdogTimeoutActions::OEM, "OEM"},
321 });
322 
323 NLOHMANN_JSON_SERIALIZE_ENUM(PowerRestorePolicyTypes, {
324     {PowerRestorePolicyTypes::Invalid, "Invalid"},
325     {PowerRestorePolicyTypes::AlwaysOn, "AlwaysOn"},
326     {PowerRestorePolicyTypes::AlwaysOff, "AlwaysOff"},
327     {PowerRestorePolicyTypes::LastState, "LastState"},
328 });
329 
330 NLOHMANN_JSON_SERIALIZE_ENUM(BootOrderTypes, {
331     {BootOrderTypes::Invalid, "Invalid"},
332     {BootOrderTypes::BootOrder, "BootOrder"},
333     {BootOrderTypes::AliasBootOrder, "AliasBootOrder"},
334 });
335 
336 NLOHMANN_JSON_SERIALIZE_ENUM(AutomaticRetryConfig, {
337     {AutomaticRetryConfig::Invalid, "Invalid"},
338     {AutomaticRetryConfig::Disabled, "Disabled"},
339     {AutomaticRetryConfig::RetryAttempts, "RetryAttempts"},
340     {AutomaticRetryConfig::RetryAlways, "RetryAlways"},
341 });
342 
343 NLOHMANN_JSON_SERIALIZE_ENUM(BootProgressTypes, {
344     {BootProgressTypes::Invalid, "Invalid"},
345     {BootProgressTypes::None, "None"},
346     {BootProgressTypes::PrimaryProcessorInitializationStarted, "PrimaryProcessorInitializationStarted"},
347     {BootProgressTypes::BusInitializationStarted, "BusInitializationStarted"},
348     {BootProgressTypes::MemoryInitializationStarted, "MemoryInitializationStarted"},
349     {BootProgressTypes::SecondaryProcessorInitializationStarted, "SecondaryProcessorInitializationStarted"},
350     {BootProgressTypes::PCIResourceConfigStarted, "PCIResourceConfigStarted"},
351     {BootProgressTypes::SystemHardwareInitializationComplete, "SystemHardwareInitializationComplete"},
352     {BootProgressTypes::SetupEntered, "SetupEntered"},
353     {BootProgressTypes::OSBootStarted, "OSBootStarted"},
354     {BootProgressTypes::OSRunning, "OSRunning"},
355     {BootProgressTypes::OEM, "OEM"},
356 });
357 
358 NLOHMANN_JSON_SERIALIZE_ENUM(GraphicalConnectTypesSupported, {
359     {GraphicalConnectTypesSupported::Invalid, "Invalid"},
360     {GraphicalConnectTypesSupported::KVMIP, "KVMIP"},
361     {GraphicalConnectTypesSupported::OEM, "OEM"},
362 });
363 
364 NLOHMANN_JSON_SERIALIZE_ENUM(TrustedModuleRequiredToBoot, {
365     {TrustedModuleRequiredToBoot::Invalid, "Invalid"},
366     {TrustedModuleRequiredToBoot::Disabled, "Disabled"},
367     {TrustedModuleRequiredToBoot::Required, "Required"},
368 });
369 
370 NLOHMANN_JSON_SERIALIZE_ENUM(StopBootOnFault, {
371     {StopBootOnFault::Invalid, "Invalid"},
372     {StopBootOnFault::Never, "Never"},
373     {StopBootOnFault::AnyFault, "AnyFault"},
374 });
375 
376 NLOHMANN_JSON_SERIALIZE_ENUM(PowerMode, {
377     {PowerMode::Invalid, "Invalid"},
378     {PowerMode::MaximumPerformance, "MaximumPerformance"},
379     {PowerMode::BalancedPerformance, "BalancedPerformance"},
380     {PowerMode::PowerSaving, "PowerSaving"},
381     {PowerMode::Static, "Static"},
382     {PowerMode::OSControlled, "OSControlled"},
383     {PowerMode::OEM, "OEM"},
384     {PowerMode::EfficiencyFavorPower, "EfficiencyFavorPower"},
385     {PowerMode::EfficiencyFavorPerformance, "EfficiencyFavorPerformance"},
386 });
387 
388 NLOHMANN_JSON_SERIALIZE_ENUM(CompositionUseCase, {
389     {CompositionUseCase::Invalid, "Invalid"},
390     {CompositionUseCase::ResourceBlockCapable, "ResourceBlockCapable"},
391     {CompositionUseCase::ExpandableSystem, "ExpandableSystem"},
392 });
393 
394 NLOHMANN_JSON_SERIALIZE_ENUM(KMIPCachePolicy, {
395     {KMIPCachePolicy::Invalid, "Invalid"},
396     {KMIPCachePolicy::None, "None"},
397     {KMIPCachePolicy::AfterFirstUse, "AfterFirstUse"},
398 });
399 
400 NLOHMANN_JSON_SERIALIZE_ENUM(DecommissionType, {
401     {DecommissionType::Invalid, "Invalid"},
402     {DecommissionType::All, "All"},
403     {DecommissionType::UserData, "UserData"},
404     {DecommissionType::ManagerConfig, "ManagerConfig"},
405     {DecommissionType::BIOSConfig, "BIOSConfig"},
406     {DecommissionType::NetworkConfig, "NetworkConfig"},
407     {DecommissionType::StorageConfig, "StorageConfig"},
408     {DecommissionType::Logs, "Logs"},
409     {DecommissionType::TPM, "TPM"},
410 });
411 
412 NLOHMANN_JSON_SERIALIZE_ENUM(LastResetCauses, {
413     {LastResetCauses::Invalid, "Invalid"},
414     {LastResetCauses::PowerButtonPress, "PowerButtonPress"},
415     {LastResetCauses::ManagementCommand, "ManagementCommand"},
416     {LastResetCauses::PowerRestorePolicy, "PowerRestorePolicy"},
417     {LastResetCauses::RTCWakeup, "RTCWakeup"},
418     {LastResetCauses::WatchdogExpiration, "WatchdogExpiration"},
419     {LastResetCauses::OSSoftRestart, "OSSoftRestart"},
420     {LastResetCauses::SystemCrash, "SystemCrash"},
421     {LastResetCauses::ThermalEvent, "ThermalEvent"},
422     {LastResetCauses::PowerEvent, "PowerEvent"},
423     {LastResetCauses::Unknown, "Unknown"},
424 });
425 
426 }
427 // clang-format on
428