1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace manager 5 { 6 // clang-format off 7 8 enum class ManagerType{ 9 Invalid, 10 ManagementController, 11 EnclosureManager, 12 BMC, 13 RackManager, 14 AuxiliaryController, 15 Service, 16 }; 17 18 enum class SerialConnectTypesSupported{ 19 Invalid, 20 SSH, 21 Telnet, 22 IPMI, 23 Oem, 24 }; 25 26 enum class CommandConnectTypesSupported{ 27 Invalid, 28 SSH, 29 Telnet, 30 IPMI, 31 Oem, 32 }; 33 34 enum class GraphicalConnectTypesSupported{ 35 Invalid, 36 KVMIP, 37 Oem, 38 }; 39 40 enum class ResetToDefaultsType{ 41 Invalid, 42 ResetAll, 43 PreserveNetworkAndUsers, 44 PreserveNetwork, 45 }; 46 47 NLOHMANN_JSON_SERIALIZE_ENUM(ManagerType, { 48 {ManagerType::Invalid, "Invalid"}, 49 {ManagerType::ManagementController, "ManagementController"}, 50 {ManagerType::EnclosureManager, "EnclosureManager"}, 51 {ManagerType::BMC, "BMC"}, 52 {ManagerType::RackManager, "RackManager"}, 53 {ManagerType::AuxiliaryController, "AuxiliaryController"}, 54 {ManagerType::Service, "Service"}, 55 }); 56 57 NLOHMANN_JSON_SERIALIZE_ENUM(SerialConnectTypesSupported, { 58 {SerialConnectTypesSupported::Invalid, "Invalid"}, 59 {SerialConnectTypesSupported::SSH, "SSH"}, 60 {SerialConnectTypesSupported::Telnet, "Telnet"}, 61 {SerialConnectTypesSupported::IPMI, "IPMI"}, 62 {SerialConnectTypesSupported::Oem, "Oem"}, 63 }); 64 65 NLOHMANN_JSON_SERIALIZE_ENUM(CommandConnectTypesSupported, { 66 {CommandConnectTypesSupported::Invalid, "Invalid"}, 67 {CommandConnectTypesSupported::SSH, "SSH"}, 68 {CommandConnectTypesSupported::Telnet, "Telnet"}, 69 {CommandConnectTypesSupported::IPMI, "IPMI"}, 70 {CommandConnectTypesSupported::Oem, "Oem"}, 71 }); 72 73 NLOHMANN_JSON_SERIALIZE_ENUM(GraphicalConnectTypesSupported, { 74 {GraphicalConnectTypesSupported::Invalid, "Invalid"}, 75 {GraphicalConnectTypesSupported::KVMIP, "KVMIP"}, 76 {GraphicalConnectTypesSupported::Oem, "Oem"}, 77 }); 78 79 NLOHMANN_JSON_SERIALIZE_ENUM(ResetToDefaultsType, { 80 {ResetToDefaultsType::Invalid, "Invalid"}, 81 {ResetToDefaultsType::ResetAll, "ResetAll"}, 82 {ResetToDefaultsType::PreserveNetworkAndUsers, "PreserveNetworkAndUsers"}, 83 {ResetToDefaultsType::PreserveNetwork, "PreserveNetwork"}, 84 }); 85 86 } 87 // clang-format on 88