commit | 308f70c77194b891c97e6f56c50adee4f39f0de7 | [log] [tgz] |
---|---|---|
author | Willy Tu <wltu@google.com> | Tue Sep 28 20:24:52 2021 -0700 |
committer | Willy Tu <wltu@google.com> | Wed Nov 17 16:49:31 2021 +0000 |
tree | ab563520aceed3f7f13988e12bfce85dec031c06 | |
parent | 333b530119154072b3dbf23ebd7a82355da5b51c [diff] |
chassis: refactor chassis property to prepare for future support Move `LocationCode` and `UUID` to a method to cleanup the the main Chassis handler. Tested: RedfishValidator Passed ``` *** /redfish/v1/Chassis/chassis0 INFO - Type (#Chassis.v1_14_0.Chassis), GET SUCCESS (time: 0.405691) WARNING - Thermal: The given property is deprecated by revision: This link has been deprecated in favor of the ThermalSubsystem link property. WARNING - Power: The given property is deprecated by revision: This link has been deprecated in favor of the PowerSubsystem link property. INFO - PASS INFO - ... *** /redfish/v1/Chassis/chassis1 INFO - Type (#Chassis.v1_14_0.Chassis), GET SUCCESS (time: 0.406565) WARNING - Thermal: The given property is deprecated by revision: This link has been deprecated in favor of the ThermalSubsystem link property. WARNING - Power: The given property is deprecated by revision: This link has been deprecated in favor of the PowerSubsystem link property. INFO - PASS INFO - *** /redfish/v1/Chassis/chassis1/Sensors INFO - Type (#SensorCollection.SensorCollection), GET SUCCESS (time: 0.358176) INFO - PASS INFO - *** /redfish/v1/Chassis/chassis1/ResetActionInfo INFO - Type (#ActionInfo.v1_1_2.ActionInfo), GET SUCCESS (time: 0.369962) INFO - PASS ... ``` Example, ``` $ curl -u root:0penBmc -X GET http://localhost:3967/redfish/v1/Chassis/chassis1 { "@odata.id": "/redfish/v1/Chassis/chassis1", "@odata.type": "#Chassis.v1_14_0.Chassis", "Actions": { "#Chassis.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Chassis/chassis1/ResetActionInfo", "target": "/redfish/v1/Chassis/chassis1/Actions/Chassis.Reset" } }, "ChassisType": "RackMount", "Id": "chassis1", "Links": { "ComputerSystems": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "Location": { "PartLocation": { "ServiceLabel": "PE0" } }, "Manufacturer": "manufacturer1", "Model": "model1", "Name": "chassis1", "PCIeDevices": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices" }, "Power": { "@odata.id": "/redfish/v1/Chassis/chassis1/Power" }, ... } ``` Change-Id: I7a26530d3d718ce8fbf4182ee565f9fe9d94c5b5 Signed-off-by: Willy Tu <wltu@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.