commit | 1a1d5d6d06458f23e0c86aceda1c807c7553217a | [log] [tgz] |
---|---|---|
author | Nan Zhou <nanzhoumails@gmail.com> | Fri May 27 17:23:04 2022 +0000 |
committer | Nan Zhou <nanzhoumails@gmail.com> | Fri May 27 18:01:52 2022 +0000 |
tree | 307d164dc027656482a3dbb19e62715718d3386f | |
parent | 30f11eb44c906c59401a3532e1d4094318e00e02 [diff] |
memory: set @odata attributes only if the object is found The existing code returns a JSON payload with @odata attributes even if it is a 404 not found. This commit corrects that by moving @odata after the object is found. Tested: 1. before ``` { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm5", "@odata.type": "#Memory.v1_11_0.Memory", "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Memory named 'dimm5' was not found.", "MessageArgs": [ "Memory", "dimm5" ], "MessageId": "Base.1.11.0.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.11.0.ResourceNotFound", "message": "The requested resource of type Memory named 'dimm5' was not found." } } ``` after ``` { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Memory named 'dimm5' was not found.", "MessageArgs": [ "Memory", "dimm5" ], "MessageId": "Base.1.11.0.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.11.0.ResourceNotFound", "message": "The requested resource of type Memory named 'dimm5' was not found." } } ``` 2. Service Validator on MemoryResource passes. Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Id0f912015b0ecf25cacb22e919ebe88708187677
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.