| commit | 7565ee899c320ec3c1b45ed140b16764181d0be3 | [log] [tgz] |
|---|---|---|
| author | Hao Zhou <haoooamazing@google.com> | Thu Oct 16 20:27:19 2025 -0700 |
| committer | Copybara-Service <copybara-worker@google.com> | Thu Oct 16 20:27:58 2025 -0700 |
| tree | 11ad9de9ddfc0cf94330691b39a8fff101238668 | |
| parent | 9674e1bea71d4a1cbc6ac717a98389416ed1ccb5 [diff] |
Migrate redfish-core/lib part 4
this migration include:
- redfish_core/include/utils/systemd_utils(needed by manager)
- redfish-core/lib/manager_diagnostic_data
- redfish-core/lib/managers
- redfish-core/lib/memory
- redfish-core/lib/message_registries
- redfish-core/lib/sensors
- redfish-core/lib/metric_report_definition
- redfish-core/lib/network_adapter
- redfish-core/lib/network_protocol
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.memory.h: Use absl::SimpleAtoi instead of strtol for safer string to int base 10 conversion. strtol is deprecated in g3.
```
int64_t index_value = 0;
if (!absl::SimpleAtoi(index, &index_value)) {
...
}
```
2. Add support for meson options and their preprocessor/macro, configure it for defines of build in blaze
- stateful_bmcweb(BMCWEB_ENABLE_STATEFUL_BMCWEB): default to True (for `manager_diagnostic_data`)
- bmcweb_vm_nbdproxy(BMCWEB_ENABLE_VM_NBDPROXY): default to False (for `managers`
- kvm(BMCWEB_ENABLE_KVM): default to True
- redfish_oem_manager_fan_data(BMCWEB_ENABLE_REDFISH_OEM_MANAGER_FAN_DATA): default to False (for `managers`)
- efficient_expand_memory(EFFICIENT_EXPAND_MEMORY_ENABLED): default to True ( for `memory`)
- redfish_boot_time(BMCWEB_ENABLE_REDFISH_BOOT_TIME): default to False (for `managers`, `boottime`)
- redfish_new_powersubsystem_thermalsubsystem(BMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM): default to False ( for `sensors`)
- efficient_expand_sensors(EFFICIENT_EXPAND_SENSORS_ENABLED): default to True (for `sensors`)
- health_populate(HEALTH_POPULATE): default to True (for `managers`)
3. manager_diagnostic_data.h: change global `const std::string` to constexpr c style string, e.g.
```
constexpr const char healthMon[] = "xyz.openbmc_project.HealthMon";
```
reverse workflow tested with: https://gbmc-review.git.corp.google.com/c/gbmcweb/+/47934 -> cl/784442672
#gbmcweb-g3
PiperOrigin-RevId: 820505721
Change-Id: I02ce2cbcece3f2e5d61b0a557f2edded5bbb502a
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.