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 NLOHMANN_JSON_SERIALIZE_ENUM(ManagerType, { 59 {ManagerType::Invalid, "Invalid"}, 60 {ManagerType::ManagementController, "ManagementController"}, 61 {ManagerType::EnclosureManager, "EnclosureManager"}, 62 {ManagerType::BMC, "BMC"}, 63 {ManagerType::RackManager, "RackManager"}, 64 {ManagerType::AuxiliaryController, "AuxiliaryController"}, 65 {ManagerType::Service, "Service"}, 66 }); 67 68 NLOHMANN_JSON_SERIALIZE_ENUM(SerialConnectTypesSupported, { 69 {SerialConnectTypesSupported::Invalid, "Invalid"}, 70 {SerialConnectTypesSupported::SSH, "SSH"}, 71 {SerialConnectTypesSupported::Telnet, "Telnet"}, 72 {SerialConnectTypesSupported::IPMI, "IPMI"}, 73 {SerialConnectTypesSupported::Oem, "Oem"}, 74 }); 75 76 NLOHMANN_JSON_SERIALIZE_ENUM(CommandConnectTypesSupported, { 77 {CommandConnectTypesSupported::Invalid, "Invalid"}, 78 {CommandConnectTypesSupported::SSH, "SSH"}, 79 {CommandConnectTypesSupported::Telnet, "Telnet"}, 80 {CommandConnectTypesSupported::IPMI, "IPMI"}, 81 {CommandConnectTypesSupported::Oem, "Oem"}, 82 }); 83 84 NLOHMANN_JSON_SERIALIZE_ENUM(GraphicalConnectTypesSupported, { 85 {GraphicalConnectTypesSupported::Invalid, "Invalid"}, 86 {GraphicalConnectTypesSupported::KVMIP, "KVMIP"}, 87 {GraphicalConnectTypesSupported::Oem, "Oem"}, 88 }); 89 90 NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, { 91 {ResetToDefaultsType::Invalid, "Invalid"}, 92 {ResetToDefaultsType::ResetAll, "ResetAll"}, 93 {ResetToDefaultsType::PreserveNetworkAndUsers, "PreserveNetworkAndUsers"}, 94 {ResetToDefaultsType::PreserveNetwork, "PreserveNetwork"}, 95 }); 96 97 NLOHMANN_JSON_SERIALIZE_ENUM(DateTimeSource, { 98 {DateTimeSource::Invalid, "Invalid"}, 99 {DateTimeSource::RTC, "RTC"}, 100 {DateTimeSource::Firmware, "Firmware"}, 101 {DateTimeSource::Host, "Host"}, 102 {DateTimeSource::NTP, "NTP"}, 103 {DateTimeSource::PTP, "PTP"}, 104 }); 105 106 } 107 // clang-format on 108