| commit | 97d2a47ddc8f11f796e4f4eba48423a8fba732c2 | [log] [tgz] |
|---|---|---|
| author | Lei YU <mine260309@gmail.com> | Tue Jun 11 17:44:27 2019 +0800 |
| committer | Ed Tanous <ed.tanous@intel.com> | Fri Jun 14 15:59:53 2019 +0000 |
| tree | 8c68f077113de65a14a2d5fea2d4254ef1413e62 | |
| parent | cee58b238fefd7ba49c55989cc5e0ece97c6509d [diff] |
REST: PUT: return DBus error description
sdbusplus adds message::get_error() to provide the actual sd_bus_error
of a message.
With this, return the error's name and message in REST API so that the
correct error is returned to end user.
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: I0bd5405c6748d124f9dd8a341e29f3918445158e
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.