diff options
author | Ed Tanous <edtanous@google.com> | 2022-12-22 00:21:52 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-12-28 23:02:34 +0300 |
commit | 853c0dc5486bbab77b2d1f158152de93847c20d9 (patch) | |
tree | 686790cd60d628ea1719cc307ef1088f06e68019 | |
parent | ed194be4aff97177c6062bad9e2372099f07cd3e (diff) | |
download | bmcweb-853c0dc5486bbab77b2d1f158152de93847c20d9.tar.xz |
Generate includes for all schemas
Even for schemas we ignore, we should still generate the enums for them,
just to keep changes like [1] smaller.
Tested: Code compiles. No functional binary change.
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/55215
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I78adf1204a319bc14900152f94161afea21f2e07
42 files changed, 2569 insertions, 8 deletions
diff --git a/redfish-core/include/generated/enums/acceleration_function.hpp b/redfish-core/include/generated/enums/acceleration_function.hpp new file mode 100644 index 0000000000..405e355745 --- /dev/null +++ b/redfish-core/include/generated/enums/acceleration_function.hpp @@ -0,0 +1,33 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace acceleration_function +{ +// clang-format off + +enum class AccelerationFunctionType{ + Invalid, + Encryption, + Compression, + PacketInspection, + PacketSwitch, + Scheduler, + AudioProcessing, + VideoProcessing, + OEM, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(AccelerationFunctionType, { + {AccelerationFunctionType::Invalid, "Invalid"}, + {AccelerationFunctionType::Encryption, "Encryption"}, + {AccelerationFunctionType::Compression, "Compression"}, + {AccelerationFunctionType::PacketInspection, "PacketInspection"}, + {AccelerationFunctionType::PacketSwitch, "PacketSwitch"}, + {AccelerationFunctionType::Scheduler, "Scheduler"}, + {AccelerationFunctionType::AudioProcessing, "AudioProcessing"}, + {AccelerationFunctionType::VideoProcessing, "VideoProcessing"}, + {AccelerationFunctionType::OEM, "OEM"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/aggregation_source.hpp b/redfish-core/include/generated/enums/aggregation_source.hpp new file mode 100644 index 0000000000..9e7266e693 --- /dev/null +++ b/redfish-core/include/generated/enums/aggregation_source.hpp @@ -0,0 +1,59 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace aggregation_source +{ +// clang-format off + +enum class SNMPAuthenticationProtocols{ + Invalid, + None, + CommunityString, + HMAC_MD5, + HMAC_SHA96, + HMAC128_SHA224, + HMAC192_SHA256, + HMAC256_SHA384, + HMAC384_SHA512, +}; + +enum class SNMPEncryptionProtocols{ + Invalid, + None, + CBC_DES, + CFB128_AES128, +}; + +enum class AggregationType{ + Invalid, + NotificationsOnly, + Full, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(SNMPAuthenticationProtocols, { + {SNMPAuthenticationProtocols::Invalid, "Invalid"}, + {SNMPAuthenticationProtocols::None, "None"}, + {SNMPAuthenticationProtocols::CommunityString, "CommunityString"}, + {SNMPAuthenticationProtocols::HMAC_MD5, "HMAC_MD5"}, + {SNMPAuthenticationProtocols::HMAC_SHA96, "HMAC_SHA96"}, + {SNMPAuthenticationProtocols::HMAC128_SHA224, "HMAC128_SHA224"}, + {SNMPAuthenticationProtocols::HMAC192_SHA256, "HMAC192_SHA256"}, + {SNMPAuthenticationProtocols::HMAC256_SHA384, "HMAC256_SHA384"}, + {SNMPAuthenticationProtocols::HMAC384_SHA512, "HMAC384_SHA512"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(SNMPEncryptionProtocols, { + {SNMPEncryptionProtocols::Invalid, "Invalid"}, + {SNMPEncryptionProtocols::None, "None"}, + {SNMPEncryptionProtocols::CBC_DES, "CBC_DES"}, + {SNMPEncryptionProtocols::CFB128_AES128, "CFB128_AES128"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(AggregationType, { + {AggregationType::Invalid, "Invalid"}, + {AggregationType::NotificationsOnly, "NotificationsOnly"}, + {AggregationType::Full, "Full"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/allow_deny.hpp b/redfish-core/include/generated/enums/allow_deny.hpp new file mode 100644 index 0000000000..78dcb63364 --- /dev/null +++ b/redfish-core/include/generated/enums/allow_deny.hpp @@ -0,0 +1,45 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace allow_deny +{ +// clang-format off + +enum class IPAddressType{ + Invalid, + IPv4, + IPv6, +}; + +enum class AllowType{ + Invalid, + Allow, + Deny, +}; + +enum class DataDirection{ + Invalid, + Ingress, + Egress, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(IPAddressType, { + {IPAddressType::Invalid, "Invalid"}, + {IPAddressType::IPv4, "IPv4"}, + {IPAddressType::IPv6, "IPv6"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(AllowType, { + {AllowType::Invalid, "Invalid"}, + {AllowType::Allow, "Allow"}, + {AllowType::Deny, "Deny"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(DataDirection, { + {DataDirection::Invalid, "Invalid"}, + {DataDirection::Ingress, "Ingress"}, + {DataDirection::Egress, "Egress"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/battery.hpp b/redfish-core/include/generated/enums/battery.hpp new file mode 100644 index 0000000000..7ed84f09eb --- /dev/null +++ b/redfish-core/include/generated/enums/battery.hpp @@ -0,0 +1,23 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace battery +{ +// clang-format off + +enum class ChargeState{ + Invalid, + Idle, + Charging, + Discharging, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ChargeState, { + {ChargeState::Invalid, "Invalid"}, + {ChargeState::Idle, "Idle"}, + {ChargeState::Charging, "Charging"}, + {ChargeState::Discharging, "Discharging"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/circuit.hpp b/redfish-core/include/generated/enums/circuit.hpp new file mode 100644 index 0000000000..9b1dd40fac --- /dev/null +++ b/redfish-core/include/generated/enums/circuit.hpp @@ -0,0 +1,229 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace circuit +{ +// clang-format off + +enum class PowerState{ + Invalid, + On, + Off, + PowerCycle, +}; + +enum class BreakerStates{ + Invalid, + Normal, + Tripped, + Off, +}; + +enum class PowerRestorePolicyTypes{ + Invalid, + AlwaysOn, + AlwaysOff, + LastState, +}; + +enum class PhaseWiringType{ + Invalid, + OnePhase3Wire, + TwoPhase3Wire, + OneOrTwoPhase3Wire, + TwoPhase4Wire, + ThreePhase4Wire, + ThreePhase5Wire, +}; + +enum class NominalVoltageType{ + Invalid, + AC100To127V, + AC100To240V, + AC100To277V, + AC120V, + AC200To240V, + AC200To277V, + AC208V, + AC230V, + AC240V, + AC240AndDC380V, + AC277V, + AC277AndDC380V, + AC400V, + AC480V, + DC48V, + DC240V, + DC380V, + DCNeg48V, + DC16V, + DC12V, + DC9V, + DC5V, + DC3_3V, + DC1_8V, +}; + +enum class PlugType{ + Invalid, + NEMA_5_15P, + NEMA_L5_15P, + NEMA_5_20P, + NEMA_L5_20P, + NEMA_L5_30P, + NEMA_6_15P, + NEMA_L6_15P, + NEMA_6_20P, + NEMA_L6_20P, + NEMA_L6_30P, + NEMA_L14_20P, + NEMA_L14_30P, + NEMA_L15_20P, + NEMA_L15_30P, + NEMA_L21_20P, + NEMA_L21_30P, + NEMA_L22_20P, + NEMA_L22_30P, + California_CS8265, + California_CS8365, + IEC_60320_C14, + IEC_60320_C20, + IEC_60309_316P6, + IEC_60309_332P6, + IEC_60309_363P6, + IEC_60309_516P6, + IEC_60309_532P6, + IEC_60309_563P6, + IEC_60309_460P9, + IEC_60309_560P9, + Field_208V_3P4W_60A, + Field_400V_3P5W_32A, +}; + +enum class CircuitType{ + Invalid, + Mains, + Branch, + Subfeed, + Feeder, + Bus, +}; + +enum class VoltageType{ + Invalid, + AC, + DC, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(PowerState, { + {PowerState::Invalid, "Invalid"}, + {PowerState::On, "On"}, + {PowerState::Off, "Off"}, + {PowerState::PowerCycle, "PowerCycle"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(BreakerStates, { + {BreakerStates::Invalid, "Invalid"}, + {BreakerStates::Normal, "Normal"}, + {BreakerStates::Tripped, "Tripped"}, + {BreakerStates::Off, "Off"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(PowerRestorePolicyTypes, { + {PowerRestorePolicyTypes::Invalid, "Invalid"}, + {PowerRestorePolicyTypes::AlwaysOn, "AlwaysOn"}, + {PowerRestorePolicyTypes::AlwaysOff, "AlwaysOff"}, + {PowerRestorePolicyTypes::LastState, "LastState"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(PhaseWiringType, { + {PhaseWiringType::Invalid, "Invalid"}, + {PhaseWiringType::OnePhase3Wire, "OnePhase3Wire"}, + {PhaseWiringType::TwoPhase3Wire, "TwoPhase3Wire"}, + {PhaseWiringType::OneOrTwoPhase3Wire, "OneOrTwoPhase3Wire"}, + {PhaseWiringType::TwoPhase4Wire, "TwoPhase4Wire"}, + {PhaseWiringType::ThreePhase4Wire, "ThreePhase4Wire"}, + {PhaseWiringType::ThreePhase5Wire, "ThreePhase5Wire"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(NominalVoltageType, { + {NominalVoltageType::Invalid, "Invalid"}, + {NominalVoltageType::AC100To127V, "AC100To127V"}, + {NominalVoltageType::AC100To240V, "AC100To240V"}, + {NominalVoltageType::AC100To277V, "AC100To277V"}, + {NominalVoltageType::AC120V, "AC120V"}, + {NominalVoltageType::AC200To240V, "AC200To240V"}, + {NominalVoltageType::AC200To277V, "AC200To277V"}, + {NominalVoltageType::AC208V, "AC208V"}, + {NominalVoltageType::AC230V, "AC230V"}, + {NominalVoltageType::AC240V, "AC240V"}, + {NominalVoltageType::AC240AndDC380V, "AC240AndDC380V"}, + {NominalVoltageType::AC277V, "AC277V"}, + {NominalVoltageType::AC277AndDC380V, "AC277AndDC380V"}, + {NominalVoltageType::AC400V, "AC400V"}, + {NominalVoltageType::AC480V, "AC480V"}, + {NominalVoltageType::DC48V, "DC48V"}, + {NominalVoltageType::DC240V, "DC240V"}, + {NominalVoltageType::DC380V, "DC380V"}, + {NominalVoltageType::DCNeg48V, "DCNeg48V"}, + {NominalVoltageType::DC16V, "DC16V"}, + {NominalVoltageType::DC12V, "DC12V"}, + {NominalVoltageType::DC9V, "DC9V"}, + {NominalVoltageType::DC5V, "DC5V"}, + {NominalVoltageType::DC3_3V, "DC3_3V"}, + {NominalVoltageType::DC1_8V, "DC1_8V"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(PlugType, { + {PlugType::Invalid, "Invalid"}, + {PlugType::NEMA_5_15P, "NEMA_5_15P"}, + {PlugType::NEMA_L5_15P, "NEMA_L5_15P"}, + {PlugType::NEMA_5_20P, "NEMA_5_20P"}, + {PlugType::NEMA_L5_20P, "NEMA_L5_20P"}, + {PlugType::NEMA_L5_30P, "NEMA_L5_30P"}, + {PlugType::NEMA_6_15P, "NEMA_6_15P"}, + {PlugType::NEMA_L6_15P, "NEMA_L6_15P"}, + {PlugType::NEMA_6_20P, "NEMA_6_20P"}, + {PlugType::NEMA_L6_20P, "NEMA_L6_20P"}, + {PlugType::NEMA_L6_30P, "NEMA_L6_30P"}, + {PlugType::NEMA_L14_20P, "NEMA_L14_20P"}, + {PlugType::NEMA_L14_30P, "NEMA_L14_30P"}, + {PlugType::NEMA_L15_20P, "NEMA_L15_20P"}, + {PlugType::NEMA_L15_30P, "NEMA_L15_30P"}, + {PlugType::NEMA_L21_20P, "NEMA_L21_20P"}, + {PlugType::NEMA_L21_30P, "NEMA_L21_30P"}, + {PlugType::NEMA_L22_20P, "NEMA_L22_20P"}, + {PlugType::NEMA_L22_30P, "NEMA_L22_30P"}, + {PlugType::California_CS8265, "California_CS8265"}, + {PlugType::California_CS8365, "California_CS8365"}, + {PlugType::IEC_60320_C14, "IEC_60320_C14"}, + {PlugType::IEC_60320_C20, "IEC_60320_C20"}, + {PlugType::IEC_60309_316P6, "IEC_60309_316P6"}, + {PlugType::IEC_60309_332P6, "IEC_60309_332P6"}, + {PlugType::IEC_60309_363P6, "IEC_60309_363P6"}, + {PlugType::IEC_60309_516P6, "IEC_60309_516P6"}, + {PlugType::IEC_60309_532P6, "IEC_60309_532P6"}, + {PlugType::IEC_60309_563P6, "IEC_60309_563P6"}, + {PlugType::IEC_60309_460P9, "IEC_60309_460P9"}, + {PlugType::IEC_60309_560P9, "IEC_60309_560P9"}, + {PlugType::Field_208V_3P4W_60A, "Field_208V_3P4W_60A"}, + {PlugType::Field_400V_3P5W_32A, "Field_400V_3P5W_32A"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(CircuitType, { + {CircuitType::Invalid, "Invalid"}, + {CircuitType::Mains, "Mains"}, + {CircuitType::Branch, "Branch"}, + {CircuitType::Subfeed, "Subfeed"}, + {CircuitType::Feeder, "Feeder"}, + {CircuitType::Bus, "Bus"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(VoltageType, { + {VoltageType::Invalid, "Invalid"}, + {VoltageType::AC, "AC"}, + {VoltageType::DC, "DC"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/collection_capabilities.hpp b/redfish-core/include/generated/enums/collection_capabilities.hpp new file mode 100644 index 0000000000..94ccc63a9e --- /dev/null +++ b/redfish-core/include/generated/enums/collection_capabilities.hpp @@ -0,0 +1,29 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace collection_capabilities +{ +// clang-format off + +enum class UseCase{ + Invalid, + ComputerSystemComposition, + ComputerSystemConstrainedComposition, + VolumeCreation, + ResourceBlockComposition, + ResourceBlockConstrainedComposition, + RegisterResourceBlock, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(UseCase, { + {UseCase::Invalid, "Invalid"}, + {UseCase::ComputerSystemComposition, "ComputerSystemComposition"}, + {UseCase::ComputerSystemConstrainedComposition, "ComputerSystemConstrainedComposition"}, + {UseCase::VolumeCreation, "VolumeCreation"}, + {UseCase::ResourceBlockComposition, "ResourceBlockComposition"}, + {UseCase::ResourceBlockConstrainedComposition, "ResourceBlockConstrainedComposition"}, + {UseCase::RegisterResourceBlock, "RegisterResourceBlock"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/component_integrity.hpp b/redfish-core/include/generated/enums/component_integrity.hpp new file mode 100644 index 0000000000..433b195e46 --- /dev/null +++ b/redfish-core/include/generated/enums/component_integrity.hpp @@ -0,0 +1,93 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace component_integrity +{ +// clang-format off + +enum class ComponentIntegrityType{ + Invalid, + SPDM, + TPM, + OEM, +}; + +enum class MeasurementSpecification{ + Invalid, + DMTF, +}; + +enum class SPDMmeasurementSummaryType{ + Invalid, + TCB, + All, +}; + +enum class DMTFmeasurementTypes{ + Invalid, + ImmutableROM, + MutableFirmware, + HardwareConfiguration, + FirmwareConfiguration, + MutableFirmwareVersion, + MutableFirmwareSecurityVersionNumber, + MeasurementManifest, +}; + +enum class VerificationStatus{ + Invalid, + Success, + Failed, +}; + +enum class SecureSessionType{ + Invalid, + Plain, + EncryptedAuthenticated, + AuthenticatedOnly, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ComponentIntegrityType, { + {ComponentIntegrityType::Invalid, "Invalid"}, + {ComponentIntegrityType::SPDM, "SPDM"}, + {ComponentIntegrityType::TPM, "TPM"}, + {ComponentIntegrityType::OEM, "OEM"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(MeasurementSpecification, { + {MeasurementSpecification::Invalid, "Invalid"}, + {MeasurementSpecification::DMTF, "DMTF"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(SPDMmeasurementSummaryType, { + {SPDMmeasurementSummaryType::Invalid, "Invalid"}, + {SPDMmeasurementSummaryType::TCB, "TCB"}, + {SPDMmeasurementSummaryType::All, "All"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(DMTFmeasurementTypes, { + {DMTFmeasurementTypes::Invalid, "Invalid"}, + {DMTFmeasurementTypes::ImmutableROM, "ImmutableROM"}, + {DMTFmeasurementTypes::MutableFirmware, "MutableFirmware"}, + {DMTFmeasurementTypes::HardwareConfiguration, "HardwareConfiguration"}, + {DMTFmeasurementTypes::FirmwareConfiguration, "FirmwareConfiguration"}, + {DMTFmeasurementTypes::MutableFirmwareVersion, "MutableFirmwareVersion"}, + {DMTFmeasurementTypes::MutableFirmwareSecurityVersionNumber, "MutableFirmwareSecurityVersionNumber"}, + {DMTFmeasurementTypes::MeasurementManifest, "MeasurementManifest"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(VerificationStatus, { + {VerificationStatus::Invalid, "Invalid"}, + {VerificationStatus::Success, "Success"}, + {VerificationStatus::Failed, "Failed"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(SecureSessionType, { + {SecureSessionType::Invalid, "Invalid"}, + {SecureSessionType::Plain, "Plain"}, + {SecureSessionType::EncryptedAuthenticated, "EncryptedAuthenticated"}, + {SecureSessionType::AuthenticatedOnly, "AuthenticatedOnly"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/composition_service.hpp b/redfish-core/include/generated/enums/composition_service.hpp new file mode 100644 index 0000000000..d5258ad28c --- /dev/null +++ b/redfish-core/include/generated/enums/composition_service.hpp @@ -0,0 +1,33 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace composition_service +{ +// clang-format off + +enum class ComposeRequestType{ + Invalid, + Preview, + PreviewReserve, + Apply, +}; + +enum class ComposeRequestFormat{ + Invalid, + Manifest, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ComposeRequestType, { + {ComposeRequestType::Invalid, "Invalid"}, + {ComposeRequestType::Preview, "Preview"}, + {ComposeRequestType::PreviewReserve, "PreviewReserve"}, + {ComposeRequestType::Apply, "Apply"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(ComposeRequestFormat, { + {ComposeRequestFormat::Invalid, "Invalid"}, + {ComposeRequestFormat::Manifest, "Manifest"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/connection.hpp b/redfish-core/include/generated/enums/connection.hpp new file mode 100644 index 0000000000..1f9c1ecebe --- /dev/null +++ b/redfish-core/include/generated/enums/connection.hpp @@ -0,0 +1,51 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace connection +{ +// clang-format off + +enum class ConnectionType{ + Invalid, + Storage, + Memory, +}; + +enum class AccessCapability{ + Invalid, + Read, + Write, +}; + +enum class AccessState{ + Invalid, + Optimized, + NonOptimized, + Standby, + Unavailable, + Transitioning, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ConnectionType, { + {ConnectionType::Invalid, "Invalid"}, + {ConnectionType::Storage, "Storage"}, + {ConnectionType::Memory, "Memory"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(AccessCapability, { + {AccessCapability::Invalid, "Invalid"}, + {AccessCapability::Read, "Read"}, + {AccessCapability::Write, "Write"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(AccessState, { + {AccessState::Invalid, "Invalid"}, + {AccessState::Optimized, "Optimized"}, + {AccessState::NonOptimized, "NonOptimized"}, + {AccessState::Standby, "Standby"}, + {AccessState::Unavailable, "Unavailable"}, + {AccessState::Transitioning, "Transitioning"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/connection_method.hpp b/redfish-core/include/generated/enums/connection_method.hpp new file mode 100644 index 0000000000..efa296d890 --- /dev/null +++ b/redfish-core/include/generated/enums/connection_method.hpp @@ -0,0 +1,29 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace connection_method +{ +// clang-format off + +enum class ConnectionMethodType{ + Invalid, + Redfish, + SNMP, + IPMI15, + IPMI20, + NETCONF, + OEM, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ConnectionMethodType, { + {ConnectionMethodType::Invalid, "Invalid"}, + {ConnectionMethodType::Redfish, "Redfish"}, + {ConnectionMethodType::SNMP, "SNMP"}, + {ConnectionMethodType::IPMI15, "IPMI15"}, + {ConnectionMethodType::IPMI20, "IPMI20"}, + {ConnectionMethodType::NETCONF, "NETCONF"}, + {ConnectionMethodType::OEM, "OEM"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/control.hpp b/redfish-core/include/generated/enums/control.hpp new file mode 100644 index 0000000000..0db080a2b1 --- /dev/null +++ b/redfish-core/include/generated/enums/control.hpp @@ -0,0 +1,69 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace control +{ +// clang-format off + +enum class ControlType{ + Invalid, + Temperature, + Power, + Frequency, + FrequencyMHz, + Pressure, +}; + +enum class SetPointType{ + Invalid, + Single, + Range, +}; + +enum class ControlMode{ + Invalid, + Automatic, + Override, + Manual, + Disabled, +}; + +enum class ImplementationType{ + Invalid, + Programmable, + Direct, + Monitored, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ControlType, { + {ControlType::Invalid, "Invalid"}, + {ControlType::Temperature, "Temperature"}, + {ControlType::Power, "Power"}, + {ControlType::Frequency, "Frequency"}, + {ControlType::FrequencyMHz, "FrequencyMHz"}, + {ControlType::Pressure, "Pressure"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(SetPointType, { + {SetPointType::Invalid, "Invalid"}, + {SetPointType::Single, "Single"}, + {SetPointType::Range, "Range"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(ControlMode, { + {ControlMode::Invalid, "Invalid"}, + {ControlMode::Automatic, "Automatic"}, + {ControlMode::Override, "Override"}, + {ControlMode::Manual, "Manual"}, + {ControlMode::Disabled, "Disabled"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(ImplementationType, { + {ImplementationType::Invalid, "Invalid"}, + {ImplementationType::Programmable, "Programmable"}, + {ImplementationType::Direct, "Direct"}, + {ImplementationType::Monitored, "Monitored"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/endpoint.hpp b/redfish-core/include/generated/enums/endpoint.hpp new file mode 100644 index 0000000000..31b68eba1b --- /dev/null +++ b/redfish-core/include/generated/enums/endpoint.hpp @@ -0,0 +1,63 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace endpoint +{ +// clang-format off + +enum class EntityType{ + Invalid, + StorageInitiator, + RootComplex, + NetworkController, + Drive, + StorageExpander, + DisplayController, + Bridge, + Processor, + Volume, + AccelerationFunction, + MediaController, + MemoryChunk, + Switch, + FabricBridge, + Manager, + StorageSubsystem, +}; + +enum class EntityRole{ + Invalid, + Initiator, + Target, + Both, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(EntityType, { + {EntityType::Invalid, "Invalid"}, + {EntityType::StorageInitiator, "StorageInitiator"}, + {EntityType::RootComplex, "RootComplex"}, + {EntityType::NetworkController, "NetworkController"}, + {EntityType::Drive, "Drive"}, + {EntityType::StorageExpander, "StorageExpander"}, + {EntityType::DisplayController, "DisplayController"}, + {EntityType::Bridge, "Bridge"}, + {EntityType::Processor, "Processor"}, + {EntityType::Volume, "Volume"}, + {EntityType::AccelerationFunction, "AccelerationFunction"}, + {EntityType::MediaController, "MediaController"}, + {EntityType::MemoryChunk, "MemoryChunk"}, + {EntityType::Switch, "Switch"}, + {EntityType::FabricBridge, "FabricBridge"}, + {EntityType::Manager, "Manager"}, + {EntityType::StorageSubsystem, "StorageSubsystem"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(EntityRole, { + {EntityRole::Invalid, "Invalid"}, + {EntityRole::Initiator, "Initiator"}, + {EntityRole::Target, "Target"}, + {EntityRole::Both, "Both"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/endpoint_group.hpp b/redfish-core/include/generated/enums/endpoint_group.hpp new file mode 100644 index 0000000000..224cc0bfac --- /dev/null +++ b/redfish-core/include/generated/enums/endpoint_group.hpp @@ -0,0 +1,43 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace endpoint_group +{ +// clang-format off + +enum class AccessState{ + Invalid, + Optimized, + NonOptimized, + Standby, + Unavailable, + Transitioning, +}; + +enum class GroupType{ + Invalid, + Client, + Server, + Initiator, + Target, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(AccessState, { + {AccessState::Invalid, "Invalid"}, + {AccessState::Optimized, "Optimized"}, + {AccessState::NonOptimized, "NonOptimized"}, + {AccessState::Standby, "Standby"}, + {AccessState::Unavailable, "Unavailable"}, + {AccessState::Transitioning, "Transitioning"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(GroupType, { + {GroupType::Invalid, "Invalid"}, + {GroupType::Client, "Client"}, + {GroupType::Server, "Server"}, + {GroupType::Initiator, "Initiator"}, + {GroupType::Target, "Target"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/external_account_provider.hpp b/redfish-core/include/generated/enums/external_account_provider.hpp new file mode 100644 index 0000000000..176321ea54 --- /dev/null +++ b/redfish-core/include/generated/enums/external_account_provider.hpp @@ -0,0 +1,75 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace external_account_provider +{ +// clang-format off + +enum class AccountProviderTypes{ + Invalid, + RedfishService, + ActiveDirectoryService, + LDAPService, + OEM, + TACACSplus, + OAuth2, +}; + +enum class AuthenticationTypes{ + Invalid, + Token, + KerberosKeytab, + UsernameAndPassword, + OEM, +}; + +enum class TACACSplusPasswordExchangeProtocol{ + Invalid, + ASCII, + PAP, + CHAP, + MSCHAPv1, + MSCHAPv2, +}; + +enum class OAuth2Mode{ + Invalid, + Discovery, + Offline, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(AccountProviderTypes, { + {AccountProviderTypes::Invalid, "Invalid"}, + {AccountProviderTypes::RedfishService, "RedfishService"}, + {AccountProviderTypes::ActiveDirectoryService, "ActiveDirectoryService"}, + {AccountProviderTypes::LDAPService, "LDAPService"}, + {AccountProviderTypes::OEM, "OEM"}, + {AccountProviderTypes::TACACSplus, "TACACSplus"}, + {AccountProviderTypes::OAuth2, "OAuth2"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationTypes, { + {AuthenticationTypes::Invalid, "Invalid"}, + {AuthenticationTypes::Token, "Token"}, + {AuthenticationTypes::KerberosKeytab, "KerberosKeytab"}, + {AuthenticationTypes::UsernameAndPassword, "UsernameAndPassword"}, + {AuthenticationTypes::OEM, "OEM"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(TACACSplusPasswordExchangeProtocol, { + {TACACSplusPasswordExchangeProtocol::Invalid, "Invalid"}, + {TACACSplusPasswordExchangeProtocol::ASCII, "ASCII"}, + {TACACSplusPasswordExchangeProtocol::PAP, "PAP"}, + {TACACSplusPasswordExchangeProtocol::CHAP, "CHAP"}, + {TACACSplusPasswordExchangeProtocol::MSCHAPv1, "MSCHAPv1"}, + {TACACSplusPasswordExchangeProtocol::MSCHAPv2, "MSCHAPv2"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(OAuth2Mode, { + {OAuth2Mode::Invalid, "Invalid"}, + {OAuth2Mode::Discovery, "Discovery"}, + {OAuth2Mode::Offline, "Offline"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/facility.hpp b/redfish-core/include/generated/enums/facility.hpp new file mode 100644 index 0000000000..62c8fa079d --- /dev/null +++ b/redfish-core/include/generated/enums/facility.hpp @@ -0,0 +1,25 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace facility +{ +// clang-format off + +enum class FacilityType{ + Invalid, + Room, + Floor, + Building, + Site, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(FacilityType, { + {FacilityType::Invalid, "Invalid"}, + {FacilityType::Room, "Room"}, + {FacilityType::Floor, "Floor"}, + {FacilityType::Building, "Building"}, + {FacilityType::Site, "Site"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/host_interface.hpp b/redfish-core/include/generated/enums/host_interface.hpp new file mode 100644 index 0000000000..d6401aa29b --- /dev/null +++ b/redfish-core/include/generated/enums/host_interface.hpp @@ -0,0 +1,35 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace host_interface +{ +// clang-format off + +enum class HostInterfaceType{ + Invalid, + NetworkHostInterface, +}; + +enum class AuthenticationMode{ + Invalid, + AuthNone, + BasicAuth, + RedfishSessionAuth, + OemAuth, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(HostInterfaceType, { + {HostInterfaceType::Invalid, "Invalid"}, + {HostInterfaceType::NetworkHostInterface, "NetworkHostInterface"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationMode, { + {AuthenticationMode::Invalid, "Invalid"}, + {AuthenticationMode::AuthNone, "AuthNone"}, + {AuthenticationMode::BasicAuth, "BasicAuth"}, + {AuthenticationMode::RedfishSessionAuth, "RedfishSessionAuth"}, + {AuthenticationMode::OemAuth, "OemAuth"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/job.hpp b/redfish-core/include/generated/enums/job.hpp new file mode 100644 index 0000000000..becebe81ae --- /dev/null +++ b/redfish-core/include/generated/enums/job.hpp @@ -0,0 +1,43 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace job +{ +// clang-format off + +enum class JobState{ + Invalid, + New, + Starting, + Running, + Suspended, + Interrupted, + Pending, + Stopping, + Completed, + Cancelled, + Exception, + Service, + UserIntervention, + Continue, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(JobState, { + {JobState::Invalid, "Invalid"}, + {JobState::New, "New"}, + {JobState::Starting, "Starting"}, + {JobState::Running, "Running"}, + {JobState::Suspended, "Suspended"}, + {JobState::Interrupted, "Interrupted"}, + {JobState::Pending, "Pending"}, + {JobState::Stopping, "Stopping"}, + {JobState::Completed, "Completed"}, + {JobState::Cancelled, "Cancelled"}, + {JobState::Exception, "Exception"}, + {JobState::Service, "Service"}, + {JobState::UserIntervention, "UserIntervention"}, + {JobState::Continue, "Continue"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/key.hpp b/redfish-core/include/generated/enums/key.hpp new file mode 100644 index 0000000000..b7cb31e1da --- /dev/null +++ b/redfish-core/include/generated/enums/key.hpp @@ -0,0 +1,49 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace key +{ +// clang-format off + +enum class KeyType{ + Invalid, + NVMeoF, + SSH, +}; + +enum class NVMeoFSecurityProtocolType{ + Invalid, + DHHC, + TLS_PSK, + OEM, +}; + +enum class NVMeoFSecureHashType{ + Invalid, + SHA256, + SHA384, + SHA512, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(KeyType, { + {KeyType::Invalid, "Invalid"}, + {KeyType::NVMeoF, "NVMeoF"}, + {KeyType::SSH, "SSH"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecurityProtocolType, { + {NVMeoFSecurityProtocolType::Invalid, "Invalid"}, + {NVMeoFSecurityProtocolType::DHHC, "DHHC"}, + {NVMeoFSecurityProtocolType::TLS_PSK, "TLS_PSK"}, + {NVMeoFSecurityProtocolType::OEM, "OEM"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecureHashType, { + {NVMeoFSecureHashType::Invalid, "Invalid"}, + {NVMeoFSecureHashType::SHA256, "SHA256"}, + {NVMeoFSecureHashType::SHA384, "SHA384"}, + {NVMeoFSecureHashType::SHA512, "SHA512"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/key_policy.hpp b/redfish-core/include/generated/enums/key_policy.hpp new file mode 100644 index 0000000000..526a7da7f2 --- /dev/null +++ b/redfish-core/include/generated/enums/key_policy.hpp @@ -0,0 +1,89 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace key_policy +{ +// clang-format off + +enum class KeyPolicyType{ + Invalid, + NVMeoF, +}; + +enum class NVMeoFSecurityProtocolType{ + Invalid, + DHHC, + TLS_PSK, + OEM, +}; + +enum class NVMeoFSecureHashType{ + Invalid, + SHA256, + SHA384, + SHA512, +}; + +enum class NVMeoFSecurityTransportType{ + Invalid, + TLSv2, + TLSv3, +}; + +enum class NVMeoFCipherSuiteType{ + Invalid, + TLS_AES_128_GCM_SHA256, + TLS_AES_256_GCM_SHA384, +}; + +enum class NVMeoFDHGroupType{ + Invalid, + FFDHE2048, + FFDHE3072, + FFDHE4096, + FFDHE6144, + FFDHE8192, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(KeyPolicyType, { + {KeyPolicyType::Invalid, "Invalid"}, + {KeyPolicyType::NVMeoF, "NVMeoF"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecurityProtocolType, { + {NVMeoFSecurityProtocolType::Invalid, "Invalid"}, + {NVMeoFSecurityProtocolType::DHHC, "DHHC"}, + {NVMeoFSecurityProtocolType::TLS_PSK, "TLS_PSK"}, + {NVMeoFSecurityProtocolType::OEM, "OEM"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecureHashType, { + {NVMeoFSecureHashType::Invalid, "Invalid"}, + {NVMeoFSecureHashType::SHA256, "SHA256"}, + {NVMeoFSecureHashType::SHA384, "SHA384"}, + {NVMeoFSecureHashType::SHA512, "SHA512"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFSecurityTransportType, { + {NVMeoFSecurityTransportType::Invalid, "Invalid"}, + {NVMeoFSecurityTransportType::TLSv2, "TLSv2"}, + {NVMeoFSecurityTransportType::TLSv3, "TLSv3"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFCipherSuiteType, { + {NVMeoFCipherSuiteType::Invalid, "Invalid"}, + {NVMeoFCipherSuiteType::TLS_AES_128_GCM_SHA256, "TLS_AES_128_GCM_SHA256"}, + {NVMeoFCipherSuiteType::TLS_AES_256_GCM_SHA384, "TLS_AES_256_GCM_SHA384"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(NVMeoFDHGroupType, { + {NVMeoFDHGroupType::Invalid, "Invalid"}, + {NVMeoFDHGroupType::FFDHE2048, "FFDHE2048"}, + {NVMeoFDHGroupType::FFDHE3072, "FFDHE3072"}, + {NVMeoFDHGroupType::FFDHE4096, "FFDHE4096"}, + {NVMeoFDHGroupType::FFDHE6144, "FFDHE6144"}, + {NVMeoFDHGroupType::FFDHE8192, "FFDHE8192"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/license.hpp b/redfish-core/include/generated/enums/license.hpp new file mode 100644 index 0000000000..37897d2cb8 --- /dev/null +++ b/redfish-core/include/generated/enums/license.hpp @@ -0,0 +1,49 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace license +{ +// clang-format off + +enum class LicenseType{ + Invalid, + Production, + Prototype, + Trial, +}; + +enum class AuthorizationScope{ + Invalid, + Device, + Capacity, + Service, +}; + +enum class LicenseOrigin{ + Invalid, + BuiltIn, + Installed, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(LicenseType, { + {LicenseType::Invalid, "Invalid"}, + {LicenseType::Production, "Production"}, + {LicenseType::Prototype, "Prototype"}, + {LicenseType::Trial, "Trial"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(AuthorizationScope, { + {AuthorizationScope::Invalid, "Invalid"}, + {AuthorizationScope::Device, "Device"}, + {AuthorizationScope::Capacity, "Capacity"}, + {AuthorizationScope::Service, "Service"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(LicenseOrigin, { + {LicenseOrigin::Invalid, "Invalid"}, + {LicenseOrigin::BuiltIn, "BuiltIn"}, + {LicenseOrigin::Installed, "Installed"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/license_service.hpp b/redfish-core/include/generated/enums/license_service.hpp new file mode 100644 index 0000000000..52bf5e308d --- /dev/null +++ b/redfish-core/include/generated/enums/license_service.hpp @@ -0,0 +1,35 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace license_service +{ +// clang-format off + +enum class TransferProtocolType{ + Invalid, + CIFS, + FTP, + SFTP, + HTTP, + HTTPS, + SCP, + TFTP, + OEM, + NFS, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(TransferProtocolType, { + {TransferProtocolType::Invalid, "Invalid"}, + {TransferProtocolType::CIFS, "CIFS"}, + {TransferProtocolType::FTP, "FTP"}, + {TransferProtocolType::SFTP, "SFTP"}, + {TransferProtocolType::HTTP, "HTTP"}, + {TransferProtocolType::HTTPS, "HTTPS"}, + {TransferProtocolType::SCP, "SCP"}, + {TransferProtocolType::TFTP, "TFTP"}, + {TransferProtocolType::OEM, "OEM"}, + {TransferProtocolType::NFS, "NFS"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/manifest.hpp b/redfish-core/include/generated/enums/manifest.hpp new file mode 100644 index 0000000000..9ac10e9fcf --- /dev/null +++ b/redfish-core/include/generated/enums/manifest.hpp @@ -0,0 +1,43 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace manifest +{ +// clang-format off + +enum class Expand{ + Invalid, + None, + All, + Relevant, +}; + +enum class StanzaType{ + Invalid, + ComposeSystem, + DecomposeSystem, + ComposeResource, + DecomposeResource, + OEM, + RegisterResourceBlock, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(Expand, { + {Expand::Invalid, "Invalid"}, + {Expand::None, "None"}, + {Expand::All, "All"}, + {Expand::Relevant, "Relevant"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(StanzaType, { + {StanzaType::Invalid, "Invalid"}, + {StanzaType::ComposeSystem, "ComposeSystem"}, + {StanzaType::DecomposeSystem, "DecomposeSystem"}, + {StanzaType::ComposeResource, "ComposeResource"}, + {StanzaType::DecomposeResource, "DecomposeResource"}, + {StanzaType::OEM, "OEM"}, + {StanzaType::RegisterResourceBlock, "RegisterResourceBlock"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/media_controller.hpp b/redfish-core/include/generated/enums/media_controller.hpp new file mode 100644 index 0000000000..000b299fba --- /dev/null +++ b/redfish-core/include/generated/enums/media_controller.hpp @@ -0,0 +1,19 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace media_controller +{ +// clang-format off + +enum class MediaControllerType{ + Invalid, + Memory, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(MediaControllerType, { + {MediaControllerType::Invalid, "Invalid"}, + {MediaControllerType::Memory, "Memory"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/memory_chunks.hpp b/redfish-core/include/generated/enums/memory_chunks.hpp new file mode 100644 index 0000000000..7137c4a1a1 --- /dev/null +++ b/redfish-core/include/generated/enums/memory_chunks.hpp @@ -0,0 +1,23 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace memory_chunks +{ +// clang-format off + +enum class AddressRangeType{ + Invalid, + Volatile, + PMEM, + Block, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(AddressRangeType, { + {AddressRangeType::Invalid, "Invalid"}, + {AddressRangeType::Volatile, "Volatile"}, + {AddressRangeType::PMEM, "PMEM"}, + {AddressRangeType::Block, "Block"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/network_device_function.hpp b/redfish-core/include/generated/enums/network_device_function.hpp new file mode 100644 index 0000000000..f85483c09a --- /dev/null +++ b/redfish-core/include/generated/enums/network_device_function.hpp @@ -0,0 +1,101 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace network_device_function +{ +// clang-format off + +enum class NetworkDeviceTechnology{ + Invalid, + Disabled, + Ethernet, + FibreChannel, + iSCSI, + FibreChannelOverEthernet, + InfiniBand, +}; + +enum class IPAddressType{ + Invalid, + IPv4, + IPv6, +}; + +enum class AuthenticationMethod{ + Invalid, + None, + CHAP, + MutualCHAP, +}; + +enum class WWNSource{ + Invalid, + ConfiguredLocally, + ProvidedByFabric, +}; + +enum class BootMode{ + Invalid, + Disabled, + PXE, + iSCSI, + FibreChannel, + FibreChannelOverEthernet, + HTTP, +}; + +enum class DataDirection{ + Invalid, + None, + Ingress, + Egress, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(NetworkDeviceTechnology, { + {NetworkDeviceTechnology::Invalid, "Invalid"}, + {NetworkDeviceTechnology::Disabled, "Disabled"}, + {NetworkDeviceTechnology::Ethernet, "Ethernet"}, + {NetworkDeviceTechnology::FibreChannel, "FibreChannel"}, + {NetworkDeviceTechnology::iSCSI, "iSCSI"}, + {NetworkDeviceTechnology::FibreChannelOverEthernet, "FibreChannelOverEthernet"}, + {NetworkDeviceTechnology::InfiniBand, "InfiniBand"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(IPAddressType, { + {IPAddressType::Invalid, "Invalid"}, + {IPAddressType::IPv4, "IPv4"}, + {IPAddressType::IPv6, "IPv6"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(AuthenticationMethod, { + {AuthenticationMethod::Invalid, "Invalid"}, + {AuthenticationMethod::None, "None"}, + {AuthenticationMethod::CHAP, "CHAP"}, + {AuthenticationMethod::MutualCHAP, "MutualCHAP"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(WWNSource, { + {WWNSource::Invalid, "Invalid"}, + {WWNSource::ConfiguredLocally, "ConfiguredLocally"}, + {WWNSource::ProvidedByFabric, "ProvidedByFabric"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(BootMode, { + {BootMode::Invalid, "Invalid"}, + {BootMode::Disabled, "Disabled"}, + {BootMode::PXE, "PXE"}, + {BootMode::iSCSI, "iSCSI"}, + {BootMode::FibreChannel, "FibreChannel"}, + {BootMode::FibreChannelOverEthernet, "FibreChannelOverEthernet"}, + {BootMode::HTTP, "HTTP"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(DataDirection, { + {DataDirection::Invalid, "Invalid"}, + {DataDirection::None, "None"}, + {DataDirection::Ingress, "Ingress"}, + {DataDirection::Egress, "Egress"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/network_port.hpp b/redfish-core/include/generated/enums/network_port.hpp new file mode 100644 index 0000000000..a8ddffaf6a --- /dev/null +++ b/redfish-core/include/generated/enums/network_port.hpp @@ -0,0 +1,89 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace network_port +{ +// clang-format off + +enum class LinkStatus{ + Invalid, + Down, + Up, + Starting, + Training, +}; + +enum class LinkNetworkTechnology{ + Invalid, + Ethernet, + InfiniBand, + FibreChannel, +}; + +enum class SupportedEthernetCapabilities{ + Invalid, + WakeOnLAN, + EEE, +}; + +enum class FlowControl{ + Invalid, + None, + TX, + RX, + TX_RX, +}; + +enum class PortConnectionType{ + Invalid, + NotConnected, + NPort, + PointToPoint, + PrivateLoop, + PublicLoop, + Generic, + ExtenderFabric, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(LinkStatus, { + {LinkStatus::Invalid, "Invalid"}, + {LinkStatus::Down, "Down"}, + {LinkStatus::Up, "Up"}, + {LinkStatus::Starting, "Starting"}, + {LinkStatus::Training, "Training"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(LinkNetworkTechnology, { + {LinkNetworkTechnology::Invalid, "Invalid"}, + {LinkNetworkTechnology::Ethernet, "Ethernet"}, + {LinkNetworkTechnology::InfiniBand, "InfiniBand"}, + {LinkNetworkTechnology::FibreChannel, "FibreChannel"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(SupportedEthernetCapabilities, { + {SupportedEthernetCapabilities::Invalid, "Invalid"}, + {SupportedEthernetCapabilities::WakeOnLAN, "WakeOnLAN"}, + {SupportedEthernetCapabilities::EEE, "EEE"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(FlowControl, { + {FlowControl::Invalid, "Invalid"}, + {FlowControl::None, "None"}, + {FlowControl::TX, "TX"}, + {FlowControl::RX, "RX"}, + {FlowControl::TX_RX, "TX_RX"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(PortConnectionType, { + {PortConnectionType::Invalid, "Invalid"}, + {PortConnectionType::NotConnected, "NotConnected"}, + {PortConnectionType::NPort, "NPort"}, + {PortConnectionType::PointToPoint, "PointToPoint"}, + {PortConnectionType::PrivateLoop, "PrivateLoop"}, + {PortConnectionType::PublicLoop, "PublicLoop"}, + {PortConnectionType::Generic, "Generic"}, + {PortConnectionType::ExtenderFabric, "ExtenderFabric"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/outlet.hpp b/redfish-core/include/generated/enums/outlet.hpp new file mode 100644 index 0000000000..504bec142f --- /dev/null +++ b/redfish-core/include/generated/enums/outlet.hpp @@ -0,0 +1,71 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace outlet +{ +// clang-format off + +enum class PowerState{ + Invalid, + On, + Off, + PowerCycle, +}; + +enum class ReceptacleType{ + Invalid, + NEMA_5_15R, + NEMA_5_20R, + NEMA_L5_20R, + NEMA_L5_30R, + NEMA_L6_20R, + NEMA_L6_30R, + IEC_60320_C13, + IEC_60320_C19, + CEE_7_Type_E, + CEE_7_Type_F, + SEV_1011_TYPE_12, + SEV_1011_TYPE_23, + BS_1363_Type_G, + BusConnection, +}; + +enum class VoltageType{ + Invalid, + AC, + DC, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(PowerState, { + {PowerState::Invalid, "Invalid"}, + {PowerState::On, "On"}, + {PowerState::Off, "Off"}, + {PowerState::PowerCycle, "PowerCycle"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(ReceptacleType, { + {ReceptacleType::Invalid, "Invalid"}, + {ReceptacleType::NEMA_5_15R, "NEMA_5_15R"}, + {ReceptacleType::NEMA_5_20R, "NEMA_5_20R"}, + {ReceptacleType::NEMA_L5_20R, "NEMA_L5_20R"}, + {ReceptacleType::NEMA_L5_30R, "NEMA_L5_30R"}, + {ReceptacleType::NEMA_L6_20R, "NEMA_L6_20R"}, + {ReceptacleType::NEMA_L6_30R, "NEMA_L6_30R"}, + {ReceptacleType::IEC_60320_C13, "IEC_60320_C13"}, + {ReceptacleType::IEC_60320_C19, "IEC_60320_C19"}, + {ReceptacleType::CEE_7_Type_E, "CEE_7_Type_E"}, + {ReceptacleType::CEE_7_Type_F, "CEE_7_Type_F"}, + {ReceptacleType::SEV_1011_TYPE_12, "SEV_1011_TYPE_12"}, + {ReceptacleType::SEV_1011_TYPE_23, "SEV_1011_TYPE_23"}, + {ReceptacleType::BS_1363_Type_G, "BS_1363_Type_G"}, + {ReceptacleType::BusConnection, "BusConnection"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(VoltageType, { + {VoltageType::Invalid, "Invalid"}, + {VoltageType::AC, "AC"}, + {VoltageType::DC, "DC"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/outlet_group.hpp b/redfish-core/include/generated/enums/outlet_group.hpp new file mode 100644 index 0000000000..d274635ea9 --- /dev/null +++ b/redfish-core/include/generated/enums/outlet_group.hpp @@ -0,0 +1,23 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace outlet_group +{ +// clang-format off + +enum class PowerState{ + Invalid, + On, + Off, + PowerCycle, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(PowerState, { + {PowerState::Invalid, "Invalid"}, + {PowerState::On, "On"}, + {PowerState::Off, "Off"}, + {PowerState::PowerCycle, "PowerCycle"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/port.hpp b/redfish-core/include/generated/enums/port.hpp new file mode 100644 index 0000000000..c5e6585c83 --- /dev/null +++ b/redfish-core/include/generated/enums/port.hpp @@ -0,0 +1,237 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace port +{ +// clang-format off + +enum class PortType{ + Invalid, + UpstreamPort, + DownstreamPort, + InterswitchPort, + ManagementPort, + BidirectionalPort, + UnconfiguredPort, +}; + +enum class PortMedium{ + Invalid, + Electrical, + Optical, +}; + +enum class LinkState{ + Invalid, + Enabled, + Disabled, +}; + +enum class LinkStatus{ + Invalid, + LinkUp, + Starting, + Training, + LinkDown, + NoLink, +}; + +enum class LinkNetworkTechnology{ + Invalid, + Ethernet, + InfiniBand, + FibreChannel, + GenZ, +}; + +enum class PortConnectionType{ + Invalid, + NotConnected, + NPort, + PointToPoint, + PrivateLoop, + PublicLoop, + Generic, + ExtenderFabric, + FPort, + EPort, + TEPort, + NPPort, + GPort, + NLPort, + FLPort, + EXPort, + UPort, + DPort, +}; + +enum class SupportedEthernetCapabilities{ + Invalid, + WakeOnLAN, + EEE, +}; + +enum class FlowControl{ + Invalid, + None, + TX, + RX, + TX_RX, +}; + +enum class IEEE802IdSubtype{ + Invalid, + ChassisComp, + IfAlias, + PortComp, + MacAddr, + NetworkAddr, + IfName, + AgentId, + LocalAssign, + NotTransmitted, +}; + +enum class SFPType{ + Invalid, + SFP, + SFPPlus, + SFP28, + cSFP, + SFPDD, + QSFP, + QSFPPlus, + QSFP14, + QSFP28, + QSFP56, + MiniSASHD, +}; + +enum class MediumType{ + Invalid, + Copper, + FiberOptic, +}; + +enum class FiberConnectionType{ + Invalid, + SingleMode, + MultiMode, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(PortType, { + {PortType::Invalid, "Invalid"}, + {PortType::UpstreamPort, "UpstreamPort"}, + {PortType::DownstreamPort, "DownstreamPort"}, + {PortType::InterswitchPort, "InterswitchPort"}, + {PortType::ManagementPort, "ManagementPort"}, + {PortType::BidirectionalPort, "BidirectionalPort"}, + {PortType::UnconfiguredPort, "UnconfiguredPort"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(PortMedium, { + {PortMedium::Invalid, "Invalid"}, + {PortMedium::Electrical, "Electrical"}, + {PortMedium::Optical, "Optical"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(LinkState, { + {LinkState::Invalid, "Invalid"}, + {LinkState::Enabled, "Enabled"}, + {LinkState::Disabled, "Disabled"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(LinkStatus, { + {LinkStatus::Invalid, "Invalid"}, + {LinkStatus::LinkUp, "LinkUp"}, + {LinkStatus::Starting, "Starting"}, + {LinkStatus::Training, "Training"}, + {LinkStatus::LinkDown, "LinkDown"}, + {LinkStatus::NoLink, "NoLink"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(LinkNetworkTechnology, { + {LinkNetworkTechnology::Invalid, "Invalid"}, + {LinkNetworkTechnology::Ethernet, "Ethernet"}, + {LinkNetworkTechnology::InfiniBand, "InfiniBand"}, + {LinkNetworkTechnology::FibreChannel, "FibreChannel"}, + {LinkNetworkTechnology::GenZ, "GenZ"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(PortConnectionType, { + {PortConnectionType::Invalid, "Invalid"}, + {PortConnectionType::NotConnected, "NotConnected"}, + {PortConnectionType::NPort, "NPort"}, + {PortConnectionType::PointToPoint, "PointToPoint"}, + {PortConnectionType::PrivateLoop, "PrivateLoop"}, + {PortConnectionType::PublicLoop, "PublicLoop"}, + {PortConnectionType::Generic, "Generic"}, + {PortConnectionType::ExtenderFabric, "ExtenderFabric"}, + {PortConnectionType::FPort, "FPort"}, + {PortConnectionType::EPort, "EPort"}, + {PortConnectionType::TEPort, "TEPort"}, + {PortConnectionType::NPPort, "NPPort"}, + {PortConnectionType::GPort, "GPort"}, + {PortConnectionType::NLPort, "NLPort"}, + {PortConnectionType::FLPort, "FLPort"}, + {PortConnectionType::EXPort, "EXPort"}, + {PortConnectionType::UPort, "UPort"}, + {PortConnectionType::DPort, "DPort"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(SupportedEthernetCapabilities, { + {SupportedEthernetCapabilities::Invalid, "Invalid"}, + {SupportedEthernetCapabilities::WakeOnLAN, "WakeOnLAN"}, + {SupportedEthernetCapabilities::EEE, "EEE"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(FlowControl, { + {FlowControl::Invalid, "Invalid"}, + {FlowControl::None, "None"}, + {FlowControl::TX, "TX"}, + {FlowControl::RX, "RX"}, + {FlowControl::TX_RX, "TX_RX"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(IEEE802IdSubtype, { + {IEEE802IdSubtype::Invalid, "Invalid"}, + {IEEE802IdSubtype::ChassisComp, "ChassisComp"}, + {IEEE802IdSubtype::IfAlias, "IfAlias"}, + {IEEE802IdSubtype::PortComp, "PortComp"}, + {IEEE802IdSubtype::MacAddr, "MacAddr"}, + {IEEE802IdSubtype::NetworkAddr, "NetworkAddr"}, + {IEEE802IdSubtype::IfName, "IfName"}, + {IEEE802IdSubtype::AgentId, "AgentId"}, + {IEEE802IdSubtype::LocalAssign, "LocalAssign"}, + {IEEE802IdSubtype::NotTransmitted, "NotTransmitted"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(SFPType, { + {SFPType::Invalid, "Invalid"}, + {SFPType::SFP, "SFP"}, + {SFPType::SFPPlus, "SFPPlus"}, + {SFPType::SFP28, "SFP28"}, + {SFPType::cSFP, "cSFP"}, + {SFPType::SFPDD, "SFPDD"}, + {SFPType::QSFP, "QSFP"}, + {SFPType::QSFPPlus, "QSFPPlus"}, + {SFPType::QSFP14, "QSFP14"}, + {SFPType::QSFP28, "QSFP28"}, + {SFPType::QSFP56, "QSFP56"}, + {SFPType::MiniSASHD, "MiniSASHD"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(MediumType, { + {MediumType::Invalid, "Invalid"}, + {MediumType::Copper, "Copper"}, + {MediumType::FiberOptic, "FiberOptic"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(FiberConnectionType, { + {FiberConnectionType::Invalid, "Invalid"}, + {FiberConnectionType::SingleMode, "SingleMode"}, + {FiberConnectionType::MultiMode, "MultiMode"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/power_distribution.hpp b/redfish-core/include/generated/enums/power_distribution.hpp new file mode 100644 index 0000000000..f101e200c3 --- /dev/null +++ b/redfish-core/include/generated/enums/power_distribution.hpp @@ -0,0 +1,45 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace power_distribution +{ +// clang-format off + +enum class PowerEquipmentType{ + Invalid, + RackPDU, + FloorPDU, + ManualTransferSwitch, + AutomaticTransferSwitch, + Switchgear, + PowerShelf, + Bus, +}; + +enum class TransferSensitivityType{ + Invalid, + High, + Medium, + Low, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(PowerEquipmentType, { + {PowerEquipmentType::Invalid, "Invalid"}, + {PowerEquipmentType::RackPDU, "RackPDU"}, + {PowerEquipmentType::FloorPDU, "FloorPDU"}, + {PowerEquipmentType::ManualTransferSwitch, "ManualTransferSwitch"}, + {PowerEquipmentType::AutomaticTransferSwitch, "AutomaticTransferSwitch"}, + {PowerEquipmentType::Switchgear, "Switchgear"}, + {PowerEquipmentType::PowerShelf, "PowerShelf"}, + {PowerEquipmentType::Bus, "Bus"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(TransferSensitivityType, { + {TransferSensitivityType::Invalid, "Invalid"}, + {TransferSensitivityType::High, "High"}, + {TransferSensitivityType::Medium, "Medium"}, + {TransferSensitivityType::Low, "Low"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/protocol.hpp b/redfish-core/include/generated/enums/protocol.hpp new file mode 100644 index 0000000000..1f8d2bb0dc --- /dev/null +++ b/redfish-core/include/generated/enums/protocol.hpp @@ -0,0 +1,91 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace protocol +{ +// clang-format off + +enum class Protocol{ + Invalid, + PCIe, + AHCI, + UHCI, + SAS, + SATA, + USB, + NVMe, + FC, + iSCSI, + FCoE, + FCP, + FICON, + NVMeOverFabrics, + SMB, + NFSv3, + NFSv4, + HTTP, + HTTPS, + FTP, + SFTP, + iWARP, + RoCE, + RoCEv2, + I2C, + TCP, + UDP, + TFTP, + GenZ, + MultiProtocol, + InfiniBand, + Ethernet, + NVLink, + OEM, + DisplayPort, + HDMI, + VGA, + DVI, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(Protocol, { + {Protocol::Invalid, "Invalid"}, + {Protocol::PCIe, "PCIe"}, + {Protocol::AHCI, "AHCI"}, + {Protocol::UHCI, "UHCI"}, + {Protocol::SAS, "SAS"}, + {Protocol::SATA, "SATA"}, + {Protocol::USB, "USB"}, + {Protocol::NVMe, "NVMe"}, + {Protocol::FC, "FC"}, + {Protocol::iSCSI, "iSCSI"}, + {Protocol::FCoE, "FCoE"}, + {Protocol::FCP, "FCP"}, + {Protocol::FICON, "FICON"}, + {Protocol::NVMeOverFabrics, "NVMeOverFabrics"}, + {Protocol::SMB, "SMB"}, + {Protocol::NFSv3, "NFSv3"}, + {Protocol::NFSv4, "NFSv4"}, + {Protocol::HTTP, "HTTP"}, + {Protocol::HTTPS, "HTTPS"}, + {Protocol::FTP, "FTP"}, + {Protocol::SFTP, "SFTP"}, + {Protocol::iWARP, "iWARP"}, + {Protocol::RoCE, "RoCE"}, + {Protocol::RoCEv2, "RoCEv2"}, + {Protocol::I2C, "I2C"}, + {Protocol::TCP, "TCP"}, + {Protocol::UDP, "UDP"}, + {Protocol::TFTP, "TFTP"}, + {Protocol::GenZ, "GenZ"}, + {Protocol::MultiProtocol, "MultiProtocol"}, + {Protocol::InfiniBand, "InfiniBand"}, + {Protocol::Ethernet, "Ethernet"}, + {Protocol::NVLink, "NVLink"}, + {Protocol::OEM, "OEM"}, + {Protocol::DisplayPort, "DisplayPort"}, + {Protocol::HDMI, "HDMI"}, + {Protocol::VGA, "VGA"}, + {Protocol::DVI, "DVI"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/registered_client.hpp b/redfish-core/include/generated/enums/registered_client.hpp new file mode 100644 index 0000000000..c638953dc1 --- /dev/null +++ b/redfish-core/include/generated/enums/registered_client.hpp @@ -0,0 +1,21 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace registered_client +{ +// clang-format off + +enum class ClientType{ + Invalid, + Monitor, + Configure, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ClientType, { + {ClientType::Invalid, "Invalid"}, + {ClientType::Monitor, "Monitor"}, + {ClientType::Configure, "Configure"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/resource_block.hpp b/redfish-core/include/generated/enums/resource_block.hpp new file mode 100644 index 0000000000..98f3178931 --- /dev/null +++ b/redfish-core/include/generated/enums/resource_block.hpp @@ -0,0 +1,67 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace resource_block +{ +// clang-format off + +enum class ResourceBlockType{ + Invalid, + Compute, + Processor, + Memory, + Network, + Storage, + ComputerSystem, + Expansion, + IndependentResource, +}; + +enum class CompositionState{ + Invalid, + Composing, + ComposedAndAvailable, + Composed, + Unused, + Failed, + Unavailable, +}; + +enum class PoolType{ + Invalid, + Free, + Active, + Unassigned, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ResourceBlockType, { + {ResourceBlockType::Invalid, "Invalid"}, + {ResourceBlockType::Compute, "Compute"}, + {ResourceBlockType::Processor, "Processor"}, + {ResourceBlockType::Memory, "Memory"}, + {ResourceBlockType::Network, "Network"}, + {ResourceBlockType::Storage, "Storage"}, + {ResourceBlockType::ComputerSystem, "ComputerSystem"}, + {ResourceBlockType::Expansion, "Expansion"}, + {ResourceBlockType::IndependentResource, "IndependentResource"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(CompositionState, { + {CompositionState::Invalid, "Invalid"}, + {CompositionState::Composing, "Composing"}, + {CompositionState::ComposedAndAvailable, "ComposedAndAvailable"}, + {CompositionState::Composed, "Composed"}, + {CompositionState::Unused, "Unused"}, + {CompositionState::Failed, "Failed"}, + {CompositionState::Unavailable, "Unavailable"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(PoolType, { + {PoolType::Invalid, "Invalid"}, + {PoolType::Free, "Free"}, + {PoolType::Active, "Active"}, + {PoolType::Unassigned, "Unassigned"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/schedule.hpp b/redfish-core/include/generated/enums/schedule.hpp new file mode 100644 index 0000000000..cf978669a3 --- /dev/null +++ b/redfish-core/include/generated/enums/schedule.hpp @@ -0,0 +1,67 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace schedule +{ +// clang-format off + +enum class DayOfWeek{ + Invalid, + Monday, + Tuesday, + Wednesday, + Thursday, + Friday, + Saturday, + Sunday, + Every, +}; + +enum class MonthOfYear{ + Invalid, + January, + February, + March, + April, + May, + June, + July, + August, + September, + October, + November, + December, + Every, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(DayOfWeek, { + {DayOfWeek::Invalid, "Invalid"}, + {DayOfWeek::Monday, "Monday"}, + {DayOfWeek::Tuesday, "Tuesday"}, + {DayOfWeek::Wednesday, "Wednesday"}, + {DayOfWeek::Thursday, "Thursday"}, + {DayOfWeek::Friday, "Friday"}, + {DayOfWeek::Saturday, "Saturday"}, + {DayOfWeek::Sunday, "Sunday"}, + {DayOfWeek::Every, "Every"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(MonthOfYear, { + {MonthOfYear::Invalid, "Invalid"}, + {MonthOfYear::January, "January"}, + {MonthOfYear::February, "February"}, + {MonthOfYear::March, "March"}, + {MonthOfYear::April, "April"}, + {MonthOfYear::May, "May"}, + {MonthOfYear::June, "June"}, + {MonthOfYear::July, "July"}, + {MonthOfYear::August, "August"}, + {MonthOfYear::September, "September"}, + {MonthOfYear::October, "October"}, + {MonthOfYear::November, "November"}, + {MonthOfYear::December, "December"}, + {MonthOfYear::Every, "Every"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/secure_boot.hpp b/redfish-core/include/generated/enums/secure_boot.hpp new file mode 100644 index 0000000000..9d0e31d39f --- /dev/null +++ b/redfish-core/include/generated/enums/secure_boot.hpp @@ -0,0 +1,51 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace secure_boot +{ +// clang-format off + +enum class SecureBootCurrentBootType{ + Invalid, + Enabled, + Disabled, +}; + +enum class SecureBootModeType{ + Invalid, + SetupMode, + UserMode, + AuditMode, + DeployedMode, +}; + +enum class ResetKeysType{ + Invalid, + ResetAllKeysToDefault, + DeleteAllKeys, + DeletePK, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(SecureBootCurrentBootType, { + {SecureBootCurrentBootType::Invalid, "Invalid"}, + {SecureBootCurrentBootType::Enabled, "Enabled"}, + {SecureBootCurrentBootType::Disabled, "Disabled"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(SecureBootModeType, { + {SecureBootModeType::Invalid, "Invalid"}, + {SecureBootModeType::SetupMode, "SetupMode"}, + {SecureBootModeType::UserMode, "UserMode"}, + {SecureBootModeType::AuditMode, "AuditMode"}, + {SecureBootModeType::DeployedMode, "DeployedMode"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(ResetKeysType, { + {ResetKeysType::Invalid, "Invalid"}, + {ResetKeysType::ResetAllKeysToDefault, "ResetAllKeysToDefault"}, + {ResetKeysType::DeleteAllKeys, "DeleteAllKeys"}, + {ResetKeysType::DeletePK, "DeletePK"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/secure_boot_database.hpp b/redfish-core/include/generated/enums/secure_boot_database.hpp new file mode 100644 index 0000000000..aa4bfd439e --- /dev/null +++ b/redfish-core/include/generated/enums/secure_boot_database.hpp @@ -0,0 +1,21 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace secure_boot_database +{ +// clang-format off + +enum class ResetKeysType{ + Invalid, + ResetAllKeysToDefault, + DeleteAllKeys, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ResetKeysType, { + {ResetKeysType::Invalid, "Invalid"}, + {ResetKeysType::ResetAllKeysToDefault, "ResetAllKeysToDefault"}, + {ResetKeysType::DeleteAllKeys, "DeleteAllKeys"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/serial_interface.hpp b/redfish-core/include/generated/enums/serial_interface.hpp new file mode 100644 index 0000000000..87c27fe77a --- /dev/null +++ b/redfish-core/include/generated/enums/serial_interface.hpp @@ -0,0 +1,67 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace serial_interface +{ +// clang-format off + +enum class SignalType{ + Invalid, + Rs232, + Rs485, +}; + +enum class Parity{ + Invalid, + None, + Even, + Odd, + Mark, + Space, +}; + +enum class FlowControl{ + Invalid, + None, + Software, + Hardware, +}; + +enum class PinOut{ + Invalid, + Cisco, + Cyclades, + Digi, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(SignalType, { + {SignalType::Invalid, "Invalid"}, + {SignalType::Rs232, "Rs232"}, + {SignalType::Rs485, "Rs485"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(Parity, { + {Parity::Invalid, "Invalid"}, + {Parity::None, "None"}, + {Parity::Even, "Even"}, + {Parity::Odd, "Odd"}, + {Parity::Mark, "Mark"}, + {Parity::Space, "Space"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(FlowControl, { + {FlowControl::Invalid, "Invalid"}, + {FlowControl::None, "None"}, + {FlowControl::Software, "Software"}, + {FlowControl::Hardware, "Hardware"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(PinOut, { + {PinOut::Invalid, "Invalid"}, + {PinOut::Cisco, "Cisco"}, + {PinOut::Cyclades, "Cyclades"}, + {PinOut::Digi, "Digi"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/signature.hpp b/redfish-core/include/generated/enums/signature.hpp new file mode 100644 index 0000000000..ce19467e8c --- /dev/null +++ b/redfish-core/include/generated/enums/signature.hpp @@ -0,0 +1,19 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace signature +{ +// clang-format off + +enum class SignatureTypeRegistry{ + Invalid, + UEFI, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(SignatureTypeRegistry, { + {SignatureTypeRegistry::Invalid, "Invalid"}, + {SignatureTypeRegistry::UEFI, "UEFI"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/trusted_component.hpp b/redfish-core/include/generated/enums/trusted_component.hpp new file mode 100644 index 0000000000..0b2a4e0dea --- /dev/null +++ b/redfish-core/include/generated/enums/trusted_component.hpp @@ -0,0 +1,21 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace trusted_component +{ +// clang-format off + +enum class TrustedComponentType{ + Invalid, + Discrete, + Integrated, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(TrustedComponentType, { + {TrustedComponentType::Invalid, "Invalid"}, + {TrustedComponentType::Discrete, "Discrete"}, + {TrustedComponentType::Integrated, "Integrated"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/volume.hpp b/redfish-core/include/generated/enums/volume.hpp new file mode 100644 index 0000000000..1c94c5da46 --- /dev/null +++ b/redfish-core/include/generated/enums/volume.hpp @@ -0,0 +1,229 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace volume +{ +// clang-format off + +enum class InitializeType{ + Invalid, + Fast, + Slow, +}; + +enum class InitializeMethod{ + Invalid, + Skip, + Background, + Foreground, +}; + +enum class RAIDType{ + Invalid, + RAID0, + RAID1, + RAID3, + RAID4, + RAID5, + RAID6, + RAID10, + RAID01, + RAID6TP, + RAID1E, + RAID50, + RAID60, + RAID00, + RAID10E, + RAID1Triple, + RAID10Triple, + None, +}; + +enum class VolumeType{ + Invalid, + RawDevice, + NonRedundant, + Mirrored, + StripedWithParity, + SpannedMirrors, + SpannedStripesWithParity, +}; + +enum class EncryptionTypes{ + Invalid, + NativeDriveEncryption, + ControllerAssisted, + SoftwareAssisted, +}; + +enum class WriteHoleProtectionPolicyType{ + Invalid, + Off, + Journaling, + DistributedLog, + Oem, +}; + +enum class VolumeUsageType{ + Invalid, + Data, + SystemData, + CacheOnly, + SystemReserve, + ReplicationReserve, +}; + +enum class ReadCachePolicyType{ + Invalid, + ReadAhead, + AdaptiveReadAhead, + Off, +}; + +enum class WriteCachePolicyType{ + Invalid, + WriteThrough, + ProtectedWriteBack, + UnprotectedWriteBack, + Off, +}; + +enum class WriteCacheStateType{ + Invalid, + Unprotected, + Protected, + Degraded, +}; + +enum class LBAFormatType{ + Invalid, + LBAFormat0, + LBAFormat1, + LBAFormat2, + LBAFormat3, + LBAFormat4, + LBAFormat5, + LBAFormat6, + LBAFormat7, + LBAFormat8, + LBAFormat9, + LBAFormat10, + LBAFormat11, + LBAFormat12, + LBAFormat13, + LBAFormat14, + LBAFormat15, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(InitializeType, { + {InitializeType::Invalid, "Invalid"}, + {InitializeType::Fast, "Fast"}, + {InitializeType::Slow, "Slow"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(InitializeMethod, { + {InitializeMethod::Invalid, "Invalid"}, + {InitializeMethod::Skip, "Skip"}, + {InitializeMethod::Background, "Background"}, + {InitializeMethod::Foreground, "Foreground"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(RAIDType, { + {RAIDType::Invalid, "Invalid"}, + {RAIDType::RAID0, "RAID0"}, + {RAIDType::RAID1, "RAID1"}, + {RAIDType::RAID3, "RAID3"}, + {RAIDType::RAID4, "RAID4"}, + {RAIDType::RAID5, "RAID5"}, + {RAIDType::RAID6, "RAID6"}, + {RAIDType::RAID10, "RAID10"}, + {RAIDType::RAID01, "RAID01"}, + {RAIDType::RAID6TP, "RAID6TP"}, + {RAIDType::RAID1E, "RAID1E"}, + {RAIDType::RAID50, "RAID50"}, + {RAIDType::RAID60, "RAID60"}, + {RAIDType::RAID00, "RAID00"}, + {RAIDType::RAID10E, "RAID10E"}, + {RAIDType::RAID1Triple, "RAID1Triple"}, + {RAIDType::RAID10Triple, "RAID10Triple"}, + {RAIDType::None, "None"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(VolumeType, { + {VolumeType::Invalid, "Invalid"}, + {VolumeType::RawDevice, "RawDevice"}, + {VolumeType::NonRedundant, "NonRedundant"}, + {VolumeType::Mirrored, "Mirrored"}, + {VolumeType::StripedWithParity, "StripedWithParity"}, + {VolumeType::SpannedMirrors, "SpannedMirrors"}, + {VolumeType::SpannedStripesWithParity, "SpannedStripesWithParity"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(EncryptionTypes, { + {EncryptionTypes::Invalid, "Invalid"}, + {EncryptionTypes::NativeDriveEncryption, "NativeDriveEncryption"}, + {EncryptionTypes::ControllerAssisted, "ControllerAssisted"}, + {EncryptionTypes::SoftwareAssisted, "SoftwareAssisted"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(WriteHoleProtectionPolicyType, { + {WriteHoleProtectionPolicyType::Invalid, "Invalid"}, + {WriteHoleProtectionPolicyType::Off, "Off"}, + {WriteHoleProtectionPolicyType::Journaling, "Journaling"}, + {WriteHoleProtectionPolicyType::DistributedLog, "DistributedLog"}, + {WriteHoleProtectionPolicyType::Oem, "Oem"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(VolumeUsageType, { + {VolumeUsageType::Invalid, "Invalid"}, + {VolumeUsageType::Data, "Data"}, + {VolumeUsageType::SystemData, "SystemData"}, + {VolumeUsageType::CacheOnly, "CacheOnly"}, + {VolumeUsageType::SystemReserve, "SystemReserve"}, + {VolumeUsageType::ReplicationReserve, "ReplicationReserve"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(ReadCachePolicyType, { + {ReadCachePolicyType::Invalid, "Invalid"}, + {ReadCachePolicyType::ReadAhead, "ReadAhead"}, + {ReadCachePolicyType::AdaptiveReadAhead, "AdaptiveReadAhead"}, + {ReadCachePolicyType::Off, "Off"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(WriteCachePolicyType, { + {WriteCachePolicyType::Invalid, "Invalid"}, + {WriteCachePolicyType::WriteThrough, "WriteThrough"}, + {WriteCachePolicyType::ProtectedWriteBack, "ProtectedWriteBack"}, + {WriteCachePolicyType::UnprotectedWriteBack, "UnprotectedWriteBack"}, + {WriteCachePolicyType::Off, "Off"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(WriteCacheStateType, { + {WriteCacheStateType::Invalid, "Invalid"}, + {WriteCacheStateType::Unprotected, "Unprotected"}, + {WriteCacheStateType::Protected, "Protected"}, + {WriteCacheStateType::Degraded, "Degraded"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(LBAFormatType, { + {LBAFormatType::Invalid, "Invalid"}, + {LBAFormatType::LBAFormat0, "LBAFormat0"}, + {LBAFormatType::LBAFormat1, "LBAFormat1"}, + {LBAFormatType::LBAFormat2, "LBAFormat2"}, + {LBAFormatType::LBAFormat3, "LBAFormat3"}, + {LBAFormatType::LBAFormat4, "LBAFormat4"}, + {LBAFormatType::LBAFormat5, "LBAFormat5"}, + {LBAFormatType::LBAFormat6, "LBAFormat6"}, + {LBAFormatType::LBAFormat7, "LBAFormat7"}, + {LBAFormatType::LBAFormat8, "LBAFormat8"}, + {LBAFormatType::LBAFormat9, "LBAFormat9"}, + {LBAFormatType::LBAFormat10, "LBAFormat10"}, + {LBAFormatType::LBAFormat11, "LBAFormat11"}, + {LBAFormatType::LBAFormat12, "LBAFormat12"}, + {LBAFormatType::LBAFormat13, "LBAFormat13"}, + {LBAFormatType::LBAFormat14, "LBAFormat14"}, + {LBAFormatType::LBAFormat15, "LBAFormat15"}, +}); + +} +// clang-format on diff --git a/redfish-core/include/generated/enums/zone.hpp b/redfish-core/include/generated/enums/zone.hpp new file mode 100644 index 0000000000..5208ee120f --- /dev/null +++ b/redfish-core/include/generated/enums/zone.hpp @@ -0,0 +1,41 @@ +#pragma once +#include <nlohmann/json.hpp> + +namespace zone +{ +// clang-format off + +enum class ExternalAccessibility{ + Invalid, + GloballyAccessible, + NonZonedAccessible, + ZoneOnly, + NoInternalRouting, +}; + +enum class ZoneType{ + Invalid, + Default, + ZoneOfEndpoints, + ZoneOfZones, + ZoneOfResourceBlocks, +}; + +NLOHMANN_JSON_SERIALIZE_ENUM(ExternalAccessibility, { + {ExternalAccessibility::Invalid, "Invalid"}, + {ExternalAccessibility::GloballyAccessible, "GloballyAccessible"}, + {ExternalAccessibility::NonZonedAccessible, "NonZonedAccessible"}, + {ExternalAccessibility::ZoneOnly, "ZoneOnly"}, + {ExternalAccessibility::NoInternalRouting, "NoInternalRouting"}, +}); + +NLOHMANN_JSON_SERIALIZE_ENUM(ZoneType, { + {ZoneType::Invalid, "Invalid"}, + {ZoneType::Default, "Default"}, + {ZoneType::ZoneOfEndpoints, "ZoneOfEndpoints"}, + {ZoneType::ZoneOfZones, "ZoneOfZones"}, + {ZoneType::ZoneOfResourceBlocks, "ZoneOfResourceBlocks"}, +}); + +} +// clang-format on diff --git a/scripts/update_schemas.py b/scripts/update_schemas.py index 0b66ac6b3f..8021cbb5d5 100755 --- a/scripts/update_schemas.py +++ b/scripts/update_schemas.py @@ -261,20 +261,21 @@ with open(metadata_index_path, "w") as metadata_index: for filename in csdl_filenames: # filename looks like Zone_v1.xml - filenamesplit = filename.split("_") - if filenamesplit[0] not in include_list: - print("excluding schema: " + filename) - continue - with open(os.path.join(schema_path, filename), "wb") as schema_out: + content = zip_ref.read(os.path.join("csdl", filename)) + content = content.replace(b"\r\n", b"\n") + + schema_out.write(content) + + filenamesplit = filename.split("_") + if filenamesplit[0] not in include_list: + continue metadata_index.write( ' <edmx:Reference Uri="/redfish/v1/schema/' + filename + '">\n' ) - content = zip_ref.read(os.path.join("csdl", filename)) - content = content.replace(b"\r\n", b"\n") xml_root = ET.fromstring(content) edmx = "{http://docs.oasis-open.org/odata/ns/edmx}" edm = "{http://docs.oasis-open.org/odata/ns/edm}" @@ -296,7 +297,6 @@ with open(metadata_index_path, "w") as metadata_index: + namespace + '"/>\n' ) - schema_out.write(content) metadata_index.write(" </edmx:Reference>\n") metadata_index.write( @@ -391,3 +391,19 @@ with open(os.path.join(cpp_path, "schemas.hpp"), "w") as hpp_file: zip_ref.close() generate_schema_enums.main() + +# Now delete the xml schema files we aren't supporting +if os.path.exists(schema_path): + files = [ + os.path.join(schema_path, f) + for f in os.listdir(schema_path) + if not f.startswith(skip_prefixes) + ] + for filename in files: + # filename will include the absolute path + filenamesplit = filename.split("/") + name = filenamesplit.pop() + namesplit = name.split("_") + if namesplit[0] not in include_list: + print("excluding schema: " + filename) + os.remove(filename) |