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
|
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include <nlohmann/json.hpp>
namespace physical_context
{
// clang-format off
enum class PhysicalContext{
Invalid,
Room,
Intake,
Exhaust,
LiquidInlet,
LiquidOutlet,
Front,
Back,
Upper,
Lower,
CPU,
CPUSubsystem,
GPU,
GPUSubsystem,
FPGA,
Accelerator,
ASIC,
Backplane,
SystemBoard,
PowerSupply,
PowerSubsystem,
VoltageRegulator,
Rectifier,
StorageDevice,
StorageSubsystem,
NetworkingDevice,
ExpansionSubsystem,
ComputeBay,
StorageBay,
NetworkBay,
ExpansionBay,
PowerSupplyBay,
Memory,
MemorySubsystem,
Chassis,
Fan,
CoolingSubsystem,
Motor,
Transformer,
ACUtilityInput,
ACStaticBypassInput,
ACMaintenanceBypassInput,
DCBus,
ACOutput,
ACInput,
PowerOutlet,
TrustedModule,
Board,
Transceiver,
Battery,
Pump,
Filter,
Reservoir,
Switch,
Manager,
};
enum class PhysicalSubContext{
Invalid,
Input,
Output,
};
enum class LogicalContext{
Invalid,
Capacity,
Environment,
Network,
Performance,
Security,
Storage,
};
NLOHMANN_JSON_SERIALIZE_ENUM(PhysicalContext, {
{PhysicalContext::Invalid, "Invalid"},
{PhysicalContext::Room, "Room"},
{PhysicalContext::Intake, "Intake"},
{PhysicalContext::Exhaust, "Exhaust"},
{PhysicalContext::LiquidInlet, "LiquidInlet"},
{PhysicalContext::LiquidOutlet, "LiquidOutlet"},
{PhysicalContext::Front, "Front"},
{PhysicalContext::Back, "Back"},
{PhysicalContext::Upper, "Upper"},
{PhysicalContext::Lower, "Lower"},
{PhysicalContext::CPU, "CPU"},
{PhysicalContext::CPUSubsystem, "CPUSubsystem"},
{PhysicalContext::GPU, "GPU"},
{PhysicalContext::GPUSubsystem, "GPUSubsystem"},
{PhysicalContext::FPGA, "FPGA"},
{PhysicalContext::Accelerator, "Accelerator"},
{PhysicalContext::ASIC, "ASIC"},
{PhysicalContext::Backplane, "Backplane"},
{PhysicalContext::SystemBoard, "SystemBoard"},
{PhysicalContext::PowerSupply, "PowerSupply"},
{PhysicalContext::PowerSubsystem, "PowerSubsystem"},
{PhysicalContext::VoltageRegulator, "VoltageRegulator"},
{PhysicalContext::Rectifier, "Rectifier"},
{PhysicalContext::StorageDevice, "StorageDevice"},
{PhysicalContext::StorageSubsystem, "StorageSubsystem"},
{PhysicalContext::NetworkingDevice, "NetworkingDevice"},
{PhysicalContext::ExpansionSubsystem, "ExpansionSubsystem"},
{PhysicalContext::ComputeBay, "ComputeBay"},
{PhysicalContext::StorageBay, "StorageBay"},
{PhysicalContext::NetworkBay, "NetworkBay"},
{PhysicalContext::ExpansionBay, "ExpansionBay"},
{PhysicalContext::PowerSupplyBay, "PowerSupplyBay"},
{PhysicalContext::Memory, "Memory"},
{PhysicalContext::MemorySubsystem, "MemorySubsystem"},
{PhysicalContext::Chassis, "Chassis"},
{PhysicalContext::Fan, "Fan"},
{PhysicalContext::CoolingSubsystem, "CoolingSubsystem"},
{PhysicalContext::Motor, "Motor"},
{PhysicalContext::Transformer, "Transformer"},
{PhysicalContext::ACUtilityInput, "ACUtilityInput"},
{PhysicalContext::ACStaticBypassInput, "ACStaticBypassInput"},
{PhysicalContext::ACMaintenanceBypassInput, "ACMaintenanceBypassInput"},
{PhysicalContext::DCBus, "DCBus"},
{PhysicalContext::ACOutput, "ACOutput"},
{PhysicalContext::ACInput, "ACInput"},
{PhysicalContext::PowerOutlet, "PowerOutlet"},
{PhysicalContext::TrustedModule, "TrustedModule"},
{PhysicalContext::Board, "Board"},
{PhysicalContext::Transceiver, "Transceiver"},
{PhysicalContext::Battery, "Battery"},
{PhysicalContext::Pump, "Pump"},
{PhysicalContext::Filter, "Filter"},
{PhysicalContext::Reservoir, "Reservoir"},
{PhysicalContext::Switch, "Switch"},
{PhysicalContext::Manager, "Manager"},
});
NLOHMANN_JSON_SERIALIZE_ENUM(PhysicalSubContext, {
{PhysicalSubContext::Invalid, "Invalid"},
{PhysicalSubContext::Input, "Input"},
{PhysicalSubContext::Output, "Output"},
});
NLOHMANN_JSON_SERIALIZE_ENUM(LogicalContext, {
{LogicalContext::Invalid, "Invalid"},
{LogicalContext::Capacity, "Capacity"},
{LogicalContext::Environment, "Environment"},
{LogicalContext::Network, "Network"},
{LogicalContext::Performance, "Performance"},
{LogicalContext::Security, "Security"},
{LogicalContext::Storage, "Storage"},
});
// clang-format on
} // namespace physical_context
|