commit | faa34ccff8ab4f2f6d8b848a9a229efe09e5fca2 | [log] [tgz] |
---|---|---|
author | Ed Tanous <edtanous@google.com> | Thu Jun 03 13:27:02 2021 -0700 |
committer | Ed Tanous <ed@tanous.net> | Wed Jun 09 17:15:05 2021 +0000 |
tree | 2d6a5713938330ade706a6b07186822810c4d9a9 | |
parent | cef1ddfb4ff56100beb1d11a491f79d4abce4864 [diff] |
Move Sessions to non Node structure This commit, in line with 7e860f1550c8686eec42f7a75bc5f2ef51e756ad moves the session service over to the normal BMCWEB routes. This is relatively painless, with the exception of the fact that the previous classes held members of the other classes in their struct. This was an attempt at a design pattern from very early on that never really worked in practice, so it was largely abandoned, and now this is cleaning up the last remains of it. This commit accomplishes this by making two critical changes, first, Delete /redfish/v1/SessionService/Sessions/<sessionId> no longer returns the structure of the session that was deleted, instead returns 204 unmodified, which is very similar to what we do in other cases. While this is a breaking change, it's not clear what a user would even do with a returned deleted session, so it seems really unlikely to break anyone. This commit also creates a separate method to fill in a session object with a given session details, such that the POST and GET methods can share a single implementation. This is more efficient than the old way, as it prevents a double lookup from the session store. Tested: Tested redfish validator on system. No new failures (UUID failure still present) Change-Id: If5d2b2c5a21af05ed0cb02a15bd1c1c976b8da12 Signed-off-by: Ed Tanous <edtanous@google.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/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 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.