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 }; 19 20 enum class SerialConnectTypesSupported{ 21 Invalid, 22 SSH, 23 Telnet, 24 IPMI, 25 Oem, 26 }; 27 28 enum class CommandConnectTypesSupported{ 29 Invalid, 30 SSH, 31 Telnet, 32 IPMI, 33 Oem, 34 }; 35 36 enum class GraphicalConnectTypesSupported{ 37 Invalid, 38 KVMIP, 39 Oem, 40 }; 41 42 enum class ResetToDefaultsType{ 43 Invalid, 44 ResetAll, 45 PreserveNetworkAndUsers, 46 PreserveNetwork, 47 }; 48 49 enum class DateTimeSource{ 50 Invalid, 51 RTC, 52 Firmware, 53 Host, 54 NTP, 55 PTP, 56 }; 57 58 enum class SecurityModeTypes{ 59 Invalid, 60 FIPS_140_2, 61 FIPS_140_3, 62 CNSA_1_0, 63 CNSA_2_0, 64 SuiteB, 65 OEM, 66 Default, 67 }; 68 69 NLOHMANN_JSON_SERIALIZE_ENUM(ManagerType, { 70 {ManagerType::Invalid, "Invalid"}, 71 {ManagerType::ManagementController, "ManagementController"}, 72 {ManagerType::EnclosureManager, "EnclosureManager"}, 73 {ManagerType::BMC, "BMC"}, 74 {ManagerType::RackManager, "RackManager"}, 75 {ManagerType::AuxiliaryController, "AuxiliaryController"}, 76 {ManagerType::Service, "Service"}, 77 }); 78 79 NLOHMANN_JSON_SERIALIZE_ENUM(SerialConnectTypesSupported, { 80 {SerialConnectTypesSupported::Invalid, "Invalid"}, 81 {SerialConnectTypesSupported::SSH, "SSH"}, 82 {SerialConnectTypesSupported::Telnet, "Telnet"}, 83 {SerialConnectTypesSupported::IPMI, "IPMI"}, 84 {SerialConnectTypesSupported::Oem, "Oem"}, 85 }); 86 87 NLOHMANN_JSON_SERIALIZE_ENUM(CommandConnectTypesSupported, { 88 {CommandConnectTypesSupported::Invalid, "Invalid"}, 89 {CommandConnectTypesSupported::SSH, "SSH"}, 90 {CommandConnectTypesSupported::Telnet, "Telnet"}, 91 {CommandConnectTypesSupported::IPMI, "IPMI"}, 92 {CommandConnectTypesSupported::Oem, "Oem"}, 93 }); 94 95 NLOHMANN_JSON_SERIALIZE_ENUM(GraphicalConnectTypesSupported, { 96 {GraphicalConnectTypesSupported::Invalid, "Invalid"}, 97 {GraphicalConnectTypesSupported::KVMIP, "KVMIP"}, 98 {GraphicalConnectTypesSupported::Oem, "Oem"}, 99 }); 100 101 NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, { 102 {ResetToDefaultsType::Invalid, "Invalid"}, 103 {ResetToDefaultsType::ResetAll, "ResetAll"}, 104 {ResetToDefaultsType::PreserveNetworkAndUsers, "PreserveNetworkAndUsers"}, 105 {ResetToDefaultsType::PreserveNetwork, "PreserveNetwork"}, 106 }); 107 108 NLOHMANN_JSON_SERIALIZE_ENUM(DateTimeSource, { 109 {DateTimeSource::Invalid, "Invalid"}, 110 {DateTimeSource::RTC, "RTC"}, 111 {DateTimeSource::Firmware, "Firmware"}, 112 {DateTimeSource::Host, "Host"}, 113 {DateTimeSource::NTP, "NTP"}, 114 {DateTimeSource::PTP, "PTP"}, 115 }); 116 117 NLOHMANN_JSON_SERIALIZE_ENUM(SecurityModeTypes, { 118 {SecurityModeTypes::Invalid, "Invalid"}, 119 {SecurityModeTypes::FIPS_140_2, "FIPS_140_2"}, 120 {SecurityModeTypes::FIPS_140_3, "FIPS_140_3"}, 121 {SecurityModeTypes::CNSA_1_0, "CNSA_1_0"}, 122 {SecurityModeTypes::CNSA_2_0, "CNSA_2_0"}, 123 {SecurityModeTypes::SuiteB, "SuiteB"}, 124 {SecurityModeTypes::OEM, "OEM"}, 125 {SecurityModeTypes::Default, "Default"}, 126 }); 127 128 } 129 // clang-format on 130