1 // SPDX-License-Identifier: Apache-2.0 2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3 #pragma once 4 #include <nlohmann/json.hpp> 5 6 namespace manager 7 { 8 // clang-format off 9 10 enum class ManagerType{ 11 Invalid, 12 ManagementController, 13 EnclosureManager, 14 BMC, 15 RackManager, 16 AuxiliaryController, 17 Service, 18 FabricManager, 19 }; 20 21 enum class SerialConnectTypesSupported{ 22 Invalid, 23 SSH, 24 Telnet, 25 IPMI, 26 Oem, 27 }; 28 29 enum class CommandConnectTypesSupported{ 30 Invalid, 31 SSH, 32 Telnet, 33 IPMI, 34 Oem, 35 }; 36 37 enum class GraphicalConnectTypesSupported{ 38 Invalid, 39 KVMIP, 40 Oem, 41 }; 42 43 enum class ResetToDefaultsType{ 44 Invalid, 45 ResetAll, 46 PreserveNetworkAndUsers, 47 PreserveNetwork, 48 }; 49 50 enum class DateTimeSource{ 51 Invalid, 52 RTC, 53 Firmware, 54 Host, 55 NTP, 56 PTP, 57 }; 58 59 enum class SecurityModeTypes{ 60 Invalid, 61 FIPS_140_2, 62 FIPS_140_3, 63 CNSA_1_0, 64 CNSA_2_0, 65 SuiteB, 66 OEM, 67 Default, 68 }; 69 70 NLOHMANN_JSON_SERIALIZE_ENUM(ManagerType, { 71 {ManagerType::Invalid, "Invalid"}, 72 {ManagerType::ManagementController, "ManagementController"}, 73 {ManagerType::EnclosureManager, "EnclosureManager"}, 74 {ManagerType::BMC, "BMC"}, 75 {ManagerType::RackManager, "RackManager"}, 76 {ManagerType::AuxiliaryController, "AuxiliaryController"}, 77 {ManagerType::Service, "Service"}, 78 {ManagerType::FabricManager, "FabricManager"}, 79 }); 80 81 NLOHMANN_JSON_SERIALIZE_ENUM(SerialConnectTypesSupported, { 82 {SerialConnectTypesSupported::Invalid, "Invalid"}, 83 {SerialConnectTypesSupported::SSH, "SSH"}, 84 {SerialConnectTypesSupported::Telnet, "Telnet"}, 85 {SerialConnectTypesSupported::IPMI, "IPMI"}, 86 {SerialConnectTypesSupported::Oem, "Oem"}, 87 }); 88 89 NLOHMANN_JSON_SERIALIZE_ENUM(CommandConnectTypesSupported, { 90 {CommandConnectTypesSupported::Invalid, "Invalid"}, 91 {CommandConnectTypesSupported::SSH, "SSH"}, 92 {CommandConnectTypesSupported::Telnet, "Telnet"}, 93 {CommandConnectTypesSupported::IPMI, "IPMI"}, 94 {CommandConnectTypesSupported::Oem, "Oem"}, 95 }); 96 97 NLOHMANN_JSON_SERIALIZE_ENUM(GraphicalConnectTypesSupported, { 98 {GraphicalConnectTypesSupported::Invalid, "Invalid"}, 99 {GraphicalConnectTypesSupported::KVMIP, "KVMIP"}, 100 {GraphicalConnectTypesSupported::Oem, "Oem"}, 101 }); 102 103 NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, { 104 {ResetToDefaultsType::Invalid, "Invalid"}, 105 {ResetToDefaultsType::ResetAll, "ResetAll"}, 106 {ResetToDefaultsType::PreserveNetworkAndUsers, "PreserveNetworkAndUsers"}, 107 {ResetToDefaultsType::PreserveNetwork, "PreserveNetwork"}, 108 }); 109 110 NLOHMANN_JSON_SERIALIZE_ENUM(DateTimeSource, { 111 {DateTimeSource::Invalid, "Invalid"}, 112 {DateTimeSource::RTC, "RTC"}, 113 {DateTimeSource::Firmware, "Firmware"}, 114 {DateTimeSource::Host, "Host"}, 115 {DateTimeSource::NTP, "NTP"}, 116 {DateTimeSource::PTP, "PTP"}, 117 }); 118 119 NLOHMANN_JSON_SERIALIZE_ENUM(SecurityModeTypes, { 120 {SecurityModeTypes::Invalid, "Invalid"}, 121 {SecurityModeTypes::FIPS_140_2, "FIPS_140_2"}, 122 {SecurityModeTypes::FIPS_140_3, "FIPS_140_3"}, 123 {SecurityModeTypes::CNSA_1_0, "CNSA_1_0"}, 124 {SecurityModeTypes::CNSA_2_0, "CNSA_2_0"}, 125 {SecurityModeTypes::SuiteB, "SuiteB"}, 126 {SecurityModeTypes::OEM, "OEM"}, 127 {SecurityModeTypes::Default, "Default"}, 128 }); 129 130 } 131 // clang-format on 132