1 #pragma once 2 #include <nlohmann/json.hpp> 3 4 namespace network_device_function 5 { 6 // clang-format off 7 8 enum class NetworkDeviceTechnology{ 9 Invalid, 10 Disabled, 11 Ethernet, 12 FibreChannel, 13 iSCSI, 14 FibreChannelOverEthernet, 15 InfiniBand, 16 }; 17 18 enum class IPAddressType{ 19 Invalid, 20 IPv4, 21 IPv6, 22 }; 23 24 enum class AuthenticationMethod{ 25 Invalid, 26 None, 27 CHAP, 28 MutualCHAP, 29 }; 30 31 enum class WWNSource{ 32 Invalid, 33 ConfiguredLocally, 34 ProvidedByFabric, 35 }; 36 37 enum class BootMode{ 38 Invalid, 39 Disabled, 40 PXE, 41 iSCSI, 42 FibreChannel, 43 FibreChannelOverEthernet, 44 HTTP, 45 }; 46 47 enum class DataDirection{ 48 Invalid, 49 None, 50 Ingress, 51 Egress, 52 }; 53 54 NLOHMANN_JSON_SERIALIZE_ENUM(NetworkDeviceTechnology, { 55 {NetworkDeviceTechnology::Invalid, "Invalid"}, 56 {NetworkDeviceTechnology::Disabled, "Disabled"}, 57 {NetworkDeviceTechnology::Ethernet, "Ethernet"}, 58 {NetworkDeviceTechnology::FibreChannel, "FibreChannel"}, 59 {NetworkDeviceTechnology::iSCSI, "iSCSI"}, 60 {NetworkDeviceTechnology::FibreChannelOverEthernet, "FibreChannelOverEthernet"}, 61 {NetworkDeviceTechnology::InfiniBand, "InfiniBand"}, 62 }); 63 64 NLOHMANN_JSON_SERIALIZE_ENUM(IPAddressType, { 65 {IPAddressType::Invalid, "Invalid"}, 66 {IPAddressType::IPv4, "IPv4"}, 67 {IPAddressType::IPv6, "IPv6"}, 68 }); 69 70 NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationMethod, { 71 {AuthenticationMethod::Invalid, "Invalid"}, 72 {AuthenticationMethod::None, "None"}, 73 {AuthenticationMethod::CHAP, "CHAP"}, 74 {AuthenticationMethod::MutualCHAP, "MutualCHAP"}, 75 }); 76 77 NLOHMANN_JSON_SERIALIZE_ENUM(WWNSource, { 78 {WWNSource::Invalid, "Invalid"}, 79 {WWNSource::ConfiguredLocally, "ConfiguredLocally"}, 80 {WWNSource::ProvidedByFabric, "ProvidedByFabric"}, 81 }); 82 83 NLOHMANN_JSON_SERIALIZE_ENUM(BootMode, { 84 {BootMode::Invalid, "Invalid"}, 85 {BootMode::Disabled, "Disabled"}, 86 {BootMode::PXE, "PXE"}, 87 {BootMode::iSCSI, "iSCSI"}, 88 {BootMode::FibreChannel, "FibreChannel"}, 89 {BootMode::FibreChannelOverEthernet, "FibreChannelOverEthernet"}, 90 {BootMode::HTTP, "HTTP"}, 91 }); 92 93 NLOHMANN_JSON_SERIALIZE_ENUM(DataDirection, { 94 {DataDirection::Invalid, "Invalid"}, 95 {DataDirection::None, "None"}, 96 {DataDirection::Ingress, "Ingress"}, 97 {DataDirection::Egress, "Egress"}, 98 }); 99 100 } 101 // clang-format on 102