| commit | d8c230b6da465017b2331c6632593ffe45bb419b | [log] [tgz] |
|---|---|---|
| author | Oliver Brewka <oliver.brewka@9elements.com> | Mon Oct 13 19:35:22 2025 +0200 |
| committer | Oliver Brewka <oliver.brewka@9elements.com> | Sun Nov 23 19:27:14 2025 +0100 |
| tree | 51624268d2a7aa1ebf0c34873fecbb5bffe6800b | |
| parent | 532cdaac92673dddc852a003a4f836f3e5101494 [diff] |
Refactor remaining DBus EventLog route handlers
Extract lambdas into separate handler functions.
Tested: Validation for the EventLog tree with redfish-dbus-log=enabled
succeeded.
```
root@romulus:~# busctl tree xyz.openbmc_project.Logging
`- /xyz
`- /xyz/openbmc_project
`- /xyz/openbmc_project/logging
|- /xyz/openbmc_project/logging/entry
| |- /xyz/openbmc_project/logging/entry/21
| |- /xyz/openbmc_project/logging/entry/22
| |- /xyz/openbmc_project/logging/entry/23
| |- /xyz/openbmc_project/logging/entry/24
| |- /xyz/openbmc_project/logging/entry/25
| |- /xyz/openbmc_project/logging/entry/26
| |- /xyz/openbmc_project/logging/entry/27
| |- /xyz/openbmc_project/logging/entry/28
| |- /xyz/openbmc_project/logging/entry/29
| `- /xyz/openbmc_project/logging/entry/30
`- /xyz/openbmc_project/logging/internal
`- /xyz/openbmc_project/logging/internal/manager
```
Patching
```
curl -k -X PATCH
'https://'"${BMC}"':'"${BMC_WEBPORT}"'/redfish/v1/Systems/system/LogServices/EventLog/Entries/22' \
-H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"'' \
-H "Content-Type: application/json" -d "{"Resolved":true}"
xyz.openbmc_project.Logging.Entry interface - -
.GetEntry method - h
.AdditionalData property a{ss} 0
.EventId property s ""
.Id property u 21
.Message property s "This is mock message 1"
.Resolution property s "" emits-change writable
.Resolved property b true
```
Deleting
```
$ curl -k -X DELETE 'https://'"${BMC}"':'"${BMC_WEBPORT}"'/redfish/v1/'"$ROUTE"'' \
-H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"'' \
-H "Content-Type: application/json"
$ busctl tree xyz.openbmc_project.Logging
`- /xyz
`- /xyz/openbmc_project
`- /xyz/openbmc_project/logging
|- /xyz/openbmc_project/logging/entry
| |- /xyz/openbmc_project/logging/entry/21
| |- /xyz/openbmc_project/logging/entry/23
| |- /xyz/openbmc_project/logging/entry/24
| |- /xyz/openbmc_project/logging/entry/25
| |- /xyz/openbmc_project/logging/entry/26
| |- /xyz/openbmc_project/logging/entry/27
| |- /xyz/openbmc_project/logging/entry/28
| |- /xyz/openbmc_project/logging/entry/29
| `- /xyz/openbmc_project/logging/entry/30
`- /xyz/openbmc_project/logging/internal
`- /xyz/openbmc_project/logging/internal/manager
```
ClearLog action
```
$ curl -v -k POST 'https://'"${BMC}"':'"${BMC_WEBPORT}"'/redfish/v1/'"$ROUTE"'' \
-H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN"'' \
-H "Content-Type: application/json"
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request completed successfully.",
"MessageArgs": [],
"MessageId": "Base.1.19.Success",
"MessageSeverity": "OK",
"Resolution": "None."
}
]
$ busctl introspect xyz.openbmc_project.Logging /xyz/openbmc_project/logging/entry/1
...
xyz.openbmc_project.Logging.Entry interface - -
.GetEntry method - h
.AdditionalData property a{ss} 5 "NUMBER_OF_LOGS" "9" "_CODE_FILE" "...
.EventId property s ""
.Id property u 1
.Message property s "xyz.openbmc_project.Logging.Cleared"
.Resolution property s ""
.Resolved property b false
...
```
Change-Id: I25a5484c17ed966376d85c9c3439350163d6c5ed
Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
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. Http1 and http2 are supported using ALPN registration for TLS connections and h2c upgrade header for http connections.
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 setup 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 supports various forms of http compression, including zstd and gzip. Client headers are observed to determine whether compressed payloads are supported.
bmcweb is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.