commit | cb92c03b1a8798657b9e03602e1ae851b2614e77 | [log] [tgz] |
---|---|---|
author | Andrew Geissler <geissonator@yahoo.com> | Fri Aug 17 07:56:14 2018 -0700 |
committer | Anthony Wilson <wilsonan@us.ibm.com> | Thu Apr 04 16:50:05 2019 -0500 |
tree | e0c4a9939a68cf15d1e508819e09daf7b2d1b9e8 | |
parent | 61adbda37aa63ae77585797587a7b4b6c3b61b25 [diff] |
Initial redfish logging support This was imported from a fork: https://github.com/ampere-openbmc/bmcweb/commits/ampere-next/redfish-core/lib/logservices.hpp Which had a series of commits from TungVuX and hyche The initial patch is that code verbatim. Follow up patches on top of this make the necessary changes for current bmcweb: - Move to sdbusplus - C++ naming convention changes - Clang format - Some refactoring Tested: Verified new services work correctly when queried e.g. curl -k -H "X-Auth-Token: $bmc_token" -X GET \ https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries displays the entries properly. RedfishServiceValidator results: /redfish/v1/Systems/system/LogServices pass: 3 passGet: 1 skipOptional: 1 /redfish/v1/Systems/system/LogServices/EventLog pass: 5 passGet: 1 skipOptional: 8 /redfish/v1/Systems/system/LogServices/EventLog/Entries pass: 3 passGet: 1 skipOptional: 1 /redfish/v1/Systems/system/LogServices/EventLog/<str> pass: 6 passGet: 1 skipOptional: 16 Sample Output: curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Systems/system/LogServices/EventLog/Entries { "@odata.context": "/redfish/v1/$metadata#LogEntryCollection.LogEntryCollection", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries", "@odata.type": "#LogEntryCollection.LogEntryCollection", "Description": "Collection of System Event Log Entries", "Members": [ { "@odata.context": "/redfish/v1/$metadata#LogEntry.LogEntry", "@odata.id": "/redfish/v1/Systems/system/LogServices/EventLog/Entries/1", "@odata.type": "#LogEntry.v1_4_0.LogEntry", "Created": "2019-02-22T17:11:00+00:00", "EntryType": "Event", "Id": "1", "Message": "example.xyz.openbmc_project.Example.Elog.AutoTestSimple", "Name": "System DBus Event Log Entry", "Severity": "Critical" } ], "Members@odata.count": 1, "Name": "System Event Log Entries" } Change-Id: I422b0d0ec577ea734fecfb6f49101ec5ff45a556 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
This component attempts to be a "do everything" embedded webserver for openbmc.
At this time, the webserver implements a few interfaces:
BMCWeb is configured by setting -D
flags that correspond to options in bmcweb/CMakeLists.txt
and then compiling. For example, cmake -DBMCWEB_ENABLE_KVM=NO ...
followed by make
. The option names become C++ preprocessor symbols that control which code is compiled into the program.
When BMCWeb starts running, it reads persistent configuration data (such as UUID and session data) from a local file. If this is not usable, it generates a new configuration.
When BMCWeb SSL support is enabled and a usable certificate is not found, it will generate a self-sign a certificate before launching the server. The keys are generated by the prime256v1
algorithm. The certificate
C=US, O=Intel BMC, CN=testhost
,SHA-256
algorithm.The crow project has had a number of additions to make it more useful for use in the OpenBmc Project. A non-exhaustive list is below. At the time of this writing, the crow project is not accepting patches, so for the time being crow will simply be checked in as is.