| commit | 491d8ee799aa9405febc5d4276c6f93ad60e511f | [log] [tgz] |
|---|---|---|
| author | Santosh Puranik <santosh.puranik@in.ibm.com> | Wed Feb 06 19:46:56 2019 +0530 |
| committer | Ed Tanous <ed.tanous@intel.com> | Mon Mar 11 15:28:03 2019 +0000 |
| tree | 5524f5c4a2061435e606dbd1f3d5632add533ab3 | |
| parent | c9ab1d509ec70f895f852532f6c5b3314cb4fe65 [diff] |
Support for boot properties
This commit adds support for DBUS properties BootMode and BootSource
in the Redfish ComputerSystems schema. These properties reside on the
BMC in two DBUS objects:
/xyz/openbmc_project/control/host0/boot contains settings that apply
on each boot
/xyz/openbmc_project/control/host0/boot/one_time contains settings
that apply for one boot only
The interface definition can be looked up in
phosphor-dbus-interfaces/tree/master/xyz/openbmc_project/Control/Boot
BootMode and BootSource are together mapped into the Redfish property
BootSourceOverrideTarget. Specifically, we only support the following
BootSource's: None (default source), Pxe, Hdd, Cd, Diags and BiosSetup
Diags and BiosSetup get mapped to the BootMode property, whereas the
other values get mapped to the BootSource property.
In addition, we map the BootSourceOverrideEnabled redfish property
to the Enabled property in
/xyz/openbmc_project/control/host0/boot/one_time to indicate if the
override applies for just this boot or all future boots.
Tested:
-- Ran the Redfish schema validator - no errors.
-- Ran GET and PATCH requets on the ComputerSystem node to test
setting of each property individually as well as together.
Ex:
curl -k -H "X-Auth-Token: $bmc_token" -XGET
https://${bmc}:${port}/redfish/v1/Systems/system
....
....
"Boot": {
"BootSourceOverrideEnabled": "Disabled",
"BootSourceOverrideMode": "Legacy",
"BootSourceOverrideTarget": "None",
"BootSourceOverrideTarget@Redfish.AllowableValues": [
"None",
"Pxe",
"Hdd",
"Cd",
"Diags",
"BiosSetup"
]
}
....
curl -k -H "X-Auth-Token: $bmc_token" -X PATCH
https://${bmc}:${port}/redfish/v1/Systems/system -d '{"Boot":
{"BootSourceOverrideEnabled": "Once",
"BootSourceOverrideTarget": "Diags"}}'
curl -k -H "X-Auth-Token: $bmc_token" -XGET
https://${bmc}:${port}/redfish/v1/Systems/system
....
....
"Boot": {
"BootSourceOverrideEnabled": "Once",
"BootSourceOverrideMode": "Legacy",
"BootSourceOverrideTarget": "Diags",
"BootSourceOverrideTarget@Redfish.AllowableValues": [
"None",
"Pxe",
"Hdd",
"Cd",
"Diags",
"BiosSetup"
]
}
....
curl -k -H "X-Auth-Token: $bmc_token" -X PATCH
https://${bmc}:${port}/redfish/v1/Systems/system -d '{"Boot":
{"BootSourceOverrideEnabled": "Disabled"}}'
curl -k -H "X-Auth-Token: $bmc_token" -XGET
https://${bmc}:${port}/redfish/v1/Systems/system'
....
....
"Boot": {
"BootSourceOverrideEnabled": "Disabled",
"BootSourceOverrideMode": "Legacy",
"BootSourceOverrideTarget": "None",
"BootSourceOverrideTarget@Redfish.AllowableValues": [
"None",
"Pxe",
"Hdd",
"Cd",
"Diags",
"BiosSetup"
]
}
....
Change-Id: If8850428422de822cd0e220ceaff4168f4b50391
Signed-off-by: Santosh Puranik <santosh.puranik@in.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 prime256v1 algorithm. The certificate
C=US, O=Intel BMC, 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.