commit | dfababfc65fb9f07050070910be0cc015df4fd2c | [log] [tgz] |
---|---|---|
author | Nan Zhou <nanzhoumails@gmail.com> | Tue May 17 23:12:06 2022 +0000 |
committer | Nan Zhou <nanzhoumails@gmail.com> | Wed May 25 23:51:36 2022 +0000 |
tree | 1e5afc9e9b1c933de7be31ab61ced4ee2fa440e6 | |
parent | ef00d7d42cc8f7d90957ab7ca1f678cd531c2cb4 [diff] |
health: take json_ptr instead of reference when filling status The existing codes populates the health status on the |AsyncResponse| or a given JSON reference. This doesn't work if we want to populates status on an array of objects, since the array can be resized which changes the address of each object. This commit changed the contructor to take a JSON pointer instead. |HealthPopulate| will populates status on |AsyncResponse->res.jsonValue|[json_ptr]. If the point can't be resolved in the |jsonValue|, |HealthPopulate| populates nothing. Fixed all places where the old reference based constructor is used. This commit is extremely useful when implementing efficient level-1 expand handler on ResourceCollections. It also prevents issues on reference lifecycles. Tested: 1. It builds 2. Tested DIMM/System/Storage health on real hardware, works as expected 3. Tested on Redfish Service Validator, no new failures on health properties. Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I305515522af50b48be92a3f4689d8166f3bc0cc0
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 -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage
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.