| #include "webserver_main_setup.hpp" |
| |
| #include <cstddef> |
| #include <cstdint> |
| #include <optional> |
| #include <string> |
| |
| #include "absl/flags/flag.h" |
| #include "absl/types/optional.h" |
| #include "bmcweb_config.h" |
| #include "server.h" |
| |
| #ifdef BMCWEB_ENABLE_GRPC |
| |
| ABSL_FLAG(absl::optional<int>, httpport, std::nullopt, |
| "http port to listen on"); |
| ABSL_FLAG( |
| int, mtls_grpc_port, mTlsGrpcPort, |
| "The secure gRPC port to listen on. Overwrites the compile time flag."); |
| ABSL_FLAG( |
| int, insecure_grpc_port, insecureGrpcPort, |
| "the insecure gRPC port to listen on. Overwrites the compile time flag."); |
| |
| // BMCWEB_ENABLE_STATEFUL_BMCWEB: |
| ABSL_FLAG(absl::optional<bool>, stateful, std::nullopt, |
| "enable stateful bmcweb (stateful-bmcweb) execution of incoming " |
| "redfish requests"); |
| ABSL_FLAG(absl::optional<int>, stateful_pending_max, std::nullopt, |
| "stateful - pendingDbusResponsesMax"); |
| ABSL_FLAG(absl::optional<int>, stateful_tfixed_sec, std::nullopt, |
| "stateful - tfixedThreshold"); |
| ABSL_FLAG(absl::optional<int>, stateful_tgrace_sec, std::nullopt, |
| "stateful - tgraceThreshold"); |
| ABSL_FLAG(absl::optional<int>, stateful_tlru_sec, std::nullopt, |
| "stateful - tLRUThreshold"); |
| ABSL_FLAG(absl::optional<bool>, request_stats, std::nullopt, |
| "enable request stats aggregation & collection"); |
| ABSL_FLAG(absl::optional<bool>, timetrace, std::nullopt, |
| "enable time tracing of requests"); |
| ABSL_FLAG(absl::optional<uint64_t>, timetrace_size_max, std::nullopt, |
| "Maximum number of requests stored in the timetrace in ManagedStore"); |
| ABSL_FLAG(absl::optional<bool>, stateful_logs, std::nullopt, |
| "enable managedStore logs"); |
| ABSL_FLAG(bool, redfish_events, false, "enable redfish-events feature"); |
| ABSL_FLAG(bool, testing_events, false, |
| "enable testing events for Redfish event"); |
| ABSL_FLAG(absl::optional<size_t>, redfish_event_store_size, std::nullopt, |
| "Number of redfish events to store"); |
| ABSL_FLAG(absl::optional<bool>, rde_ratelimit, std::nullopt, |
| "enable rde request rate limiting"); |
| ABSL_FLAG(absl::optional<int>, rde_errors_max, std::nullopt, |
| "Rde dbus error threshold"); |
| ABSL_FLAG(absl::optional<int>, rde_skips_max, std::nullopt, |
| "Number of requests skipped when rate limiting enabled"); |
| ABSL_FLAG(bool, multi_thread_get, enableMultiThreadGet, |
| "Enable multi-thread for Redfish GET"); |
| ABSL_FLAG(bool, exception_stack_tracer, true, |
| "Record throw-site stacks and print them from the terminate " |
| "handler. Kill switch: set to false to disable recording and keep " |
| "the default terminate handler."); |
| ABSL_FLAG(bool, enable_tlbmc, enableTlbmc, "Enable tlBMC features"); |
| ABSL_FLAG(bool, enable_tlbmc_trace, enableTlbmcTrace, "Enable tlBMC tracer"); |
| ABSL_FLAG(bool, enable_tlbmc_thermal_control, enableTlbmcThermalControl, |
| "Enable tlBMC thermal control"); |
| ABSL_FLAG(bool, enable_fast_sanity, enableFastSanity, |
| "Enable Fast-Sanity features"); |
| ABSL_FLAG(std::string, entity_config_location, entityConfigLocation, |
| "Entity configuration location."); |
| ABSL_FLAG(std::string, server_cert_path, |
| milotic::RedfishServiceConfig().own_cert_path, |
| "Path to cert file used by gRPC server."); |
| ABSL_FLAG(std::string, server_private_key_path, |
| milotic::RedfishServiceConfig().private_key_path, |
| "Path to private key file used by gRPC server."); |
| ABSL_FLAG(bool, enable_configure_core_count, enableConfigureCoreCount, |
| "Enable configuring core count"); |
| ABSL_FLAG(bool, enable_redfish_configure_ifs, enableRedfishConfigureIfs, |
| "Enable redfish configure ifs flag"); |
| ABSL_FLAG(std::string, smbios_single_host_file_path, "/var/lib/smbios/smbios2", |
| "Path to single host SMBIOS binary blob file."); |
| ABSL_FLAG(std::string, smbios_multihost_host_file_path_prefix, |
| "/var/lib/smbios/smbios-remote-host-", |
| "Prefix path to multihost SMBIOS binary blob files."); |
| |
| #endif // BMCWEB_ENABLE_GRPC |