| commit | c3e66384950402e0e690efb3aeace59f38bc1025 | [log] [tgz] |
|---|---|---|
| author | Hao Zhou <haoooamazing@google.com> | Fri Oct 10 18:56:09 2025 -0700 |
| committer | Copybara-Service <copybara-worker@google.com> | Fri Oct 10 18:57:04 2025 -0700 |
| tree | 89c49520e599d143662dcf346d04da843429f792 | |
| parent | a08c990a897bc365ca00129d97915bda3a40f0b5 [diff] |
Migrate redfish-core/lib part 3
this migration include:
- redfish-core/include/gzfile
- redfish-core/include/task_messages
- redfish-core/lib/external_storer
- redfish-core/lib/fabric_adapters
- redfish-core/lib/fan
- redfish-core/lib/hypervisor_system
- redfish-core/lib/log_services (log_services_eventlog)
- redfish-core/lib/task
(2176 linter issues solved && all libs compiled with blaze)
beside normal migration work (implement copybara transform, resolve linter issues, header replacement, add blaze rule to build new code as library, format code, etc), this CL also does the following:
1. log_services.cc: change function `getJournalMetadata` to `getJournalMetadataToInt64` to remove ambiguity since the function only used for base 10 severity parsing. Use `absl::SimpleAtoi` instead of strtol safer conversion. absl::string_view is not guaranteed to be null terminated. Also add error log and check conversion result, if fail, return EINVAL
```
bool parsed = absl::SimpleAtoi(metadata, &contents);
if (!parsed) {
BMCWEB_LOG_ERROR <<
return -EINVAL;
}
```
2.Add support for meson options and their preprocessor/macro, configure it for defines of lib `log_service` and `task` in blaze
- redfish_rasmanager_log(BMCWEB_ENABLE_RASMANAGER_EVENT_LOG): default to False
- cper_crashdump_use_faultlog_id(BMCWEB_ENABLE_CPER_CRASHDUMP_USE_FAULTLOG_ID): default to False
- redfish_host_logger(BMCWEB_ENABLE_REDFISH_HOST_LOGGER): default to True
- redfish_system_fault_log(BMCWEB_ENABLE_REDFISH_SYSTEM_FAULT_LOG): default to False
- redfish_event_log(BMCWEB_ENABLE_REDFISH_EVENT_LOG): default to False
- redfish_dump_log(BMCWEB_ENABLE_REDFISH_DUMP_LOG): default to False
- redfish_cpu_log(BMCWEB_ENABLE_REDFISH_CPU_LOG): default to False
- redfish_ppr(BMCWEB_ENABLE_PPR): default to False
- redfish_external_storer(BMCWEB_ENABLE_REDFISH_EXTERNAL_STORER): default to True
- redfish_boot_time_log(BMCWEB_ENABLE_REDFISH_BOOT_TIME_LOG): default to False
- redfish_bmc_journal(BMCWEB_ENABLE_REDFISH_BMC_JOURNAL): default to True
- health_populate(HEALTH_POPULATE): default to True
3. fix the transformation for health.hpp to avoid unexpected change in commment: `#include \"third_party/gbmcweb/redfish_core/lib/ethernet.h` <-> `#include \"ethernet.hpp`
reverse workflow tested with: https://gbmc-review.git.corp.google.com/c/gbmcweb/+/47934 -> cl/784442672
#gbmcweb-g3
PiperOrigin-RevId: 817872503
Change-Id: I8baf3329ff420b66fc55bcaeae2158c4b0a3642b
This project is Google's version of BMCWeb.
See Readme Google for Google added features. The following is the original README of OpenBMC/BMCWeb.
==============================================================================
This component attempts to be a “do everything” embedded webserver for OpenBMC.
The webserver implements a few distinct interfaces:
bmcweb at a protocol level supports http and https. TLS is supported through OpenSSL.
Bmcweb supports multiple authentication protocols:
Each of these types of authentication is able to be enabled or disabled both via runtime policy changes (through the relevant Redfish APIs) or via configure time options. All authentication mechanisms supporting username/password are routed to libpam, to allow for customization in authentication implementations.
All authorization in bmcweb is determined at routing time, and per route, and conform to the Redfish PrivilegeRegistry.
*Note: Non-Redfish functions are mapped to the closest equivalent Redfish privilege level.
bmcweb is configured per the meson build files. Available options are documented in meson_options.txt
meson builddir ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson will automatically download them via its wrap dependencies mentioned in bmcweb/subprojects.
bmcweb relies on some on-system data for storage of persistent data that is internal to the process. Details on the exact data stored and when it is read/written can seen from the persistent_data namespace.
When SSL support is enabled and a usable certificate is not found, bmcweb will generate a self-signed a certificate before launching the server. Please see the bmcweb source code for details on the parameters this certificate is built with.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.