commit | 127afa70bfa236b2949f5c385704e00de99557e4 | [log] [tgz] |
---|---|---|
author | Janet Adkins <janeta@us.ibm.com> | Mon Jun 02 10:57:40 2025 -0500 |
committer | Ed Tanous <ed@tanous.net> | Wed Jun 25 17:27:18 2025 +0000 |
tree | a42e4fbc3a58feae89a75ee4d0a5508395b802b5 | |
parent | 9a70ffcd8ee1f0a8cc15ed8691b8fa05f422548f [diff] |
EventService: Fix Redfish Validator error The Redfish Validator fails when there is a SNMPTrap type of subscription. The Context property is a required property and is missing for these types of subscriptions. ``` VERBOSE1 - Context VERBOSE1 - value: n/a <class 'str'> VERBOSE1 - Mandatory Test: FAIL VERBOSE1 - FAIL ERROR - Context: Mandatory prop does not exist VERBOSE1 - EventDestination.v1_8_0.EventDestination, Counter({'skipOptional': 15, 'pass': 6, 'passGet': 1, 'passRedfishUri': 1, 'err.Edm.String': 1, 'failMandatoryExist': 1}) curl -s https://redfish.dmtf.org/schemas/v1/EventDestination.v1_8_0.jso | jq .definitions.EventDestination.required [ "Context", "@odata.id", "@odata.type", "Id", "Name", "SubscriptionType" ] Body Response of /redfish/v1/EventService/Subscriptions/snmp1: { "@odata.id": "/redfish/v1/EventService/Subscriptions/snmp1", "@odata.type": "#EventDestination.v1_8_0.EventDestination", "Destination": "snmp://X.XX.XXX.XX:XXX", "EventFormatType": "Event", "Id": "snmp1", "Name": "Event Destination", "Protocol": "SNMPv2c", "SubscriptionType": "SNMPTrap" } ``` The Context used to be part of the response for these subscriptions. It was removed by the commit 4b712a29 [1]. It was removed since the code was incorrect. The SNMP backend owns the subscription not bmcweb. The SNMP backend does not support context, so setting the Redfish Context property to an empty string so the validator will pass. Tested: - Redfish Service Validator passes ``` Body Response of /redfish/v1/EventService/Subscriptions/snmp1: { "@odata.id": "/redfish/v1/EventService/Subscriptions/snmp1", "@odata.type": "#EventDestination.v1_8_0.EventDestination", "Context": "", "Destination": "snmp://X.XX.XXX.XX:XXX", "EventFormatType": "Event", "Id": "snmp1", "Name": "Event Destination", "Protocol": "SNMPv2c", "SubscriptionType": "SNMPTrap" } INFO - *** /redfish/v1/EventService/Subscriptions/snmp1 ... VERBOSE1 - Context VERBOSE1 - value: <class 'str'> VERBOSE1 - Mandatory Test: OK DEBUG - (Edm.String, '', 'Edm.String', 'Property', 'Edm.String') VERBOSE1 - Success ... VERBOSE1 - ServiceRoot -> EventService -> Subscriptions -> Members#0, EventDestination.v1_8_0, EventDestination VERBOSE1 - @odata.id PASS VERBOSE1 - @odata.type PASS VERBOSE1 - Context PASS ... VERBOSE1 - EventDestination.v1_8_0.EventDestination, Counter({'skipOptional': 15, 'pass': 7, 'passGet': 1, 'passRedfishUri': 1}) ... INFO - Validation has succeeded. ``` [1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/65720 [2] https://github.com/openbmc/bmcweb/blob/0a8823b0c27b8124018c8b084976ae350ae5cf7f/redfish-core/lib/event_service.hpp#L946 Signed-off-by: Janet Adkins <janeta@us.ibm.com> Change-Id: I0431e390ea98e9927207e30df220465d882e84cd
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 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 is capable of aggregating resources from satellite BMCs. Refer to AGGREGATION.md for more information on how to enable and use this feature.