commit | 98e386ec2e203b8dfb69cb4037924fd913c98ce0 | [log] [tgz] |
---|---|---|
author | Gunnar Mills <gmills@us.ibm.com> | Fri Oct 30 14:58:09 2020 -0500 |
committer | Gunnar Mills <gmills@us.ibm.com> | Mon Nov 09 22:56:07 2020 +0000 |
tree | 81e6f129961c8e7444989a4819c3c2dfd1b4e68a | |
parent | 8f9ee3cd141a0d49f703d4358c81ddb644703cc2 [diff] |
AssetTag: Add PATCH support Use the same AssetTag logic from the GET. Look for xyz.openbmc_project.Inventory.Item.System interface then call that service and path to set the AssetTag. This assumes there is 1 "Item.System". Considered something like "if (!boost::ends_with(path, "system")) continue; " but no where else does bmcweb check that the Item.System is named "system" i.e. that /redfish/v1/Systems/system is actually named "system" on D-Bus. Considered looking that the service had the interface if not move to the next service but the GET code does not so just followed it. Tested: curl -k-X PATCH -d '{"AssetTag": "Paramo"}' https://${bmc}/redfish/v1/Systems/system/ curl -k https://${bmc}/redfish/v1/Systems/system/ { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_12_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo", "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset" } }, "AssetTag": "Paramo", ... Validator passes. Change-Id: I45f80a8a69457f76e6e83ad2333856abe61de933 Signed-off-by: Gunnar Mills <gmills@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/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.