| commit | c72aa4757b57da6e4dae2325b7d0570c6be3d89b | [log] [tgz] |
|---|---|---|
| author | Lei YU <mine260309@gmail.com> | Thu May 16 15:31:18 2019 +0800 |
| committer | Ed Tanous <ed.tanous@intel.com> | Wed May 29 21:28:41 2019 +0000 |
| tree | e711ef20a9ab5447b65a7bed78bcf986ec402ada | |
| parent | da131a9a053f304528cae6573f97bb6f3db951b2 [diff] |
REST: PUT: return DBus error description
The boost::system::error_code returned by the DBus call will contain the
DBus error name and description in its error_category, use the
category's name and message as REST API's description and message.
Tested: Verify the REST API output when trying to set host time while
the settings does not allow that:
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT -d '{"data": 1436655598435272}' https://$bmc/xyz/openbmc_project/time/bmc/attr/Elapsed
{
"data": {
"description": "xyz.openbmc_project.Time.Error.NotAllowed"
},
"message": "The operation is not allowed",
"status": "error"
}
Resolves openbmc/bmcweb#83
Change-Id: I90c11c0fc61e55329c809ecb5f948ae041a579d0
Signed-off-by: Lei YU <mine260309@gmail.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/CMakeLists.txt and then compiling. For example, cmake -DBMCWEB_ENABLE_KVM=NO ... followed by make. The option names become C++ preprocessor symbols that control which code is compiled into the program.
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 prime256v1 algorithm. The certificate
C=US, O=OpenBMC, CN=testhost,SHA-256 algorithm.The crow project has had a number of additions to make it more useful for use in the OpenBmc Project. A non-exhaustive list is below. At the time of this writing, the crow project is not accepting patches, so for the time being crow will simply be checked in as is.