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
|
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include <nlohmann/json.hpp>
namespace manager
{
// clang-format off
enum class ManagerType{
Invalid,
ManagementController,
EnclosureManager,
BMC,
RackManager,
AuxiliaryController,
Service,
FabricManager,
};
enum class SerialConnectTypesSupported{
Invalid,
SSH,
Telnet,
IPMI,
Oem,
};
enum class CommandConnectTypesSupported{
Invalid,
SSH,
Telnet,
IPMI,
Oem,
};
enum class GraphicalConnectTypesSupported{
Invalid,
KVMIP,
Oem,
};
enum class ResetToDefaultsType{
Invalid,
ResetAll,
PreserveNetworkAndUsers,
PreserveNetwork,
SensorThresholds,
};
enum class DateTimeSource{
Invalid,
RTC,
Firmware,
Host,
NTP,
PTP,
DHCP,
};
enum class SecurityModeTypes{
Invalid,
FIPS_140_2,
FIPS_140_3,
CNSA_1_0,
CNSA_2_0,
SuiteB,
OEM,
Default,
};
NLOHMANN_JSON_SERIALIZE_ENUM(ManagerType, {
{ManagerType::Invalid, "Invalid"},
{ManagerType::ManagementController, "ManagementController"},
{ManagerType::EnclosureManager, "EnclosureManager"},
{ManagerType::BMC, "BMC"},
{ManagerType::RackManager, "RackManager"},
{ManagerType::AuxiliaryController, "AuxiliaryController"},
{ManagerType::Service, "Service"},
{ManagerType::FabricManager, "FabricManager"},
});
NLOHMANN_JSON_SERIALIZE_ENUM(SerialConnectTypesSupported, {
{SerialConnectTypesSupported::Invalid, "Invalid"},
{SerialConnectTypesSupported::SSH, "SSH"},
{SerialConnectTypesSupported::Telnet, "Telnet"},
{SerialConnectTypesSupported::IPMI, "IPMI"},
{SerialConnectTypesSupported::Oem, "Oem"},
});
NLOHMANN_JSON_SERIALIZE_ENUM(CommandConnectTypesSupported, {
{CommandConnectTypesSupported::Invalid, "Invalid"},
{CommandConnectTypesSupported::SSH, "SSH"},
{CommandConnectTypesSupported::Telnet, "Telnet"},
{CommandConnectTypesSupported::IPMI, "IPMI"},
{CommandConnectTypesSupported::Oem, "Oem"},
});
NLOHMANN_JSON_SERIALIZE_ENUM(GraphicalConnectTypesSupported, {
{GraphicalConnectTypesSupported::Invalid, "Invalid"},
{GraphicalConnectTypesSupported::KVMIP, "KVMIP"},
{GraphicalConnectTypesSupported::Oem, "Oem"},
});
NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, {
{ResetToDefaultsType::Invalid, "Invalid"},
{ResetToDefaultsType::ResetAll, "ResetAll"},
{ResetToDefaultsType::PreserveNetworkAndUsers, "PreserveNetworkAndUsers"},
{ResetToDefaultsType::PreserveNetwork, "PreserveNetwork"},
{ResetToDefaultsType::SensorThresholds, "SensorThresholds"},
});
NLOHMANN_JSON_SERIALIZE_ENUM(DateTimeSource, {
{DateTimeSource::Invalid, "Invalid"},
{DateTimeSource::RTC, "RTC"},
{DateTimeSource::Firmware, "Firmware"},
{DateTimeSource::Host, "Host"},
{DateTimeSource::NTP, "NTP"},
{DateTimeSource::PTP, "PTP"},
{DateTimeSource::DHCP, "DHCP"},
});
NLOHMANN_JSON_SERIALIZE_ENUM(SecurityModeTypes, {
{SecurityModeTypes::Invalid, "Invalid"},
{SecurityModeTypes::FIPS_140_2, "FIPS_140_2"},
{SecurityModeTypes::FIPS_140_3, "FIPS_140_3"},
{SecurityModeTypes::CNSA_1_0, "CNSA_1_0"},
{SecurityModeTypes::CNSA_2_0, "CNSA_2_0"},
{SecurityModeTypes::SuiteB, "SuiteB"},
{SecurityModeTypes::OEM, "OEM"},
{SecurityModeTypes::Default, "Default"},
});
// clang-format on
} // namespace manager
|