commit | c951448acb5c81a69569326c080b1a50e5678cbf | [log] [tgz] |
---|---|---|
author | Jonathan Doman <jonathan.doman@intel.com> | Wed Feb 24 09:20:51 2021 -0800 |
committer | Ed Tanous <ed@tanous.net> | Fri Mar 19 22:03:21 2021 +0000 |
tree | 249eadcb382f98b115605b4e9e26404b9fc239b7 | |
parent | 6c9a279eeec173dd64bf4866beec90839f1a1a42 [diff] |
Refactor Processor object lookup In order to reuse the D-Bus lookup logic for both GET and PATCH requests, separate the GetSubTree call from the processing loop. This way, we can have one common place to determine if 404 Not Found should be returned for any type of Processor request. This also improves 404 handling by filtering out those objects which don't implement Item.Cpu or Item.Accelerator. Previously it was possible to request e.g. /redfish/v1/Systems/system/Processors/dimm0 and get back some information about that DIMM. This change will ensure non-CPU items return a 404. Tested: - All links in the ProcessorCollection return the same data that they did before this change. - Invalid Processor IDs (e.g. dimm0 from above) now return 404 error message. Signed-off-by: Jonathan Doman <jonathan.doman@intel.com> Change-Id: I0f09ba1189b7a068c8c0ffe136d19e9587765d18
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/meson_options.txt
and then compiling. For example, meson <builddir> -Dkvm=disabled ...
followed by ninja
in build directory. The option names become C++ preprocessor symbols that control which code is compiled into the program.
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C buildir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in bmcweb/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja coverage -C builddir test
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 secp384r1
algorithm. The certificate
C=US, O=OpenBMC, CN=testhost
,SHA-256
algorithm.