| commit | 69f353069256230827258dc35e9059cc51982cf2 | [log] [tgz] |
|---|---|---|
| author | Gunnar Mills <gmills@us.ibm.com> | Sun May 17 16:06:31 2020 -0500 |
| committer | Gunnar Mills <gmills@us.ibm.com> | Thu May 21 18:15:34 2020 +0000 |
| tree | 80008e0254238726d810aa92e3b62f9296e74e8d | |
| parent | 7d1cc387d312e2a8e4844f9d69ab39b042acd5ce [diff] |
Redfish: Set AutomaticRetry (AutoReboot)
"AutomaticRetryConfig" can be 3 values, Disabled, RetryAlways, and
RetryAttempts. OpenBMC only supports Disabled and RetryAttempts.
Use AllowableValues to show this.
"AutomaticRetryAttempts" is hardcoded in OpenBMC.
"RemainingAutomaticRetryAttempts" is readonly in Redfish.
Tested: Validator passes.
PATCHing "Boot" "BootSourceOverrideEnabled" and
"BootSourceOverrideTarget" still work.
curl -k https://$bmc/redfish/v1/Systems/system
...
"Boot": {
"AutomaticRetryAttempts": 3,
"AutomaticRetryConfig": "RetryAttempts",
"AutomaticRetryConfig@Redfish.AllowableValues": [
"Disabled",
"RetryAttempts"
],
Can see the following two set correctly on Redfish and D-Bus:
curl -k -v -X PATCH https://${bmc}/redfish/v1/Systems/system -d \
'{"Boot":{"AutomaticRetryConfig": "Disabled"}}'
...
< HTTP/1.1 204 No Content
curl -k -v -X PATCH https://${bmc}/redfish/v1/Systems/system -d \
'{"Boot":{"AutomaticRetryConfig": "RetryAttempts"}}'
...
< HTTP/1.1 204 No Content
Handles bad data:
curl -k -v -X PATCH https://${bmc}/redfish/v1/Systems/system -d \
'{"Boot":{"AutomaticRetryConfig": "BadValue"}}'
...
< HTTP/1.1 400 Bad Request
...
"AutomaticRetryConfig@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_0_0.Message",
"Message": "The value BadValue for the property AutomaticRetryConfig is not in the list of acceptable values.",
"MessageArgs": [
"BadValue",
"AutomaticRetryConfig"
],
"MessageId": "Base.1.4.0.PropertyValueNotInList",
Change-Id: I603ccce1a682ac40f2e496cba9172e2a6dfdb58d
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/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 secp384r1 algorithm. The certificate
C=US, O=OpenBMC, CN=testhost,SHA-256 algorithm.