Skip to content

Commit 264d4e0

Browse files
committed
Update information about boot override via REST
Update paths according to the new boot source override feature design. Add information about: - how to read current boot source override setting, - legacy/EFI selector change, - one-time/persistent flag change, - enable/disable flag change. Signed-off-by: Konstantin Aladyshev <[email protected]> Change-Id: I58ce97fe3326ba78a46e13c20f8f3eecb9fcd70d
1 parent dd148e0 commit 264d4e0

File tree

2 files changed

+51
-9
lines changed

2 files changed

+51
-9
lines changed

REST-cheatsheet.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,36 @@ Note: To keep the syntax below common between the phosphor-rest and bmcweb
123123
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X POST -d '{"data":[]}' https://${bmc}/org/open_power/control/gard/action/Reset
124124
```
125125

126-
* Set boot mode:
126+
* Control boot source override:
127+
128+
- Read current boot source override settings:
129+
```
130+
$ curl -k -H "X-Auth-Token: $token" https://${bmc}/xyz/openbmc_project/control/host0/boot/enumerate
131+
```
132+
133+
- Set boot source:
134+
```
135+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/attr/BootSource -d '{"data": "xyz.openbmc_project.Control.Boot.Source.Sources.Default"}'
136+
```
137+
138+
- Set boot mode:
139+
```
140+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/attr/BootMode -d '{"data": "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular"}'
141+
```
142+
143+
- Set boot type (valid only if host is based on the x86 CPU):
144+
```
145+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/attr/BootType -d '{"data": "xyz.openbmc_project.Control.Boot.Type.Types.EFI"}'
146+
```
147+
148+
- Set boot source override persistent:
127149
```
128-
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/one_time/attr/BootMode -d '{"data": "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular"}'
150+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/one_time/attr/Enabled -d '{"data": "false"}'
129151
```
130152

131-
* Set boot source:
153+
- Enable boot source override:
132154
```
133-
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/one_time/attr/BootSource -d '{"data": "xyz.openbmc_project.Control.Boot.Source.Sources.Default"}'
155+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/attr/Enabled -d '{"data": "true"}'
134156
```
135157

136158
* Set NTP and Nameserver:

host-management.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,20 +177,40 @@ To clear all event logs, call the top-level `DeleteAll` method:
177177

178178
With OpenBMC, the Host boot options are stored as D-Bus properties under the
179179
`control/host0/boot` path. Properties include
180-
[`BootMode`](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Control/Boot/Mode.interface.yaml)
181-
and
182-
[`BootSource`](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Control/Boot/Source.interface.yaml).
180+
[`BootMode`](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Control/Boot/Mode.interface.yaml),
181+
[`BootSource`](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Control/Boot/Source.interface.yaml)
182+
and if the host is based on x86 CPU also [`BootType`](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Control/Boot/Type.interface.yaml).
183183

184184
* Set boot mode:
185185

186186
```
187-
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/one_time/attr/BootMode -d '{"data": "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular"}'
187+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/attr/BootMode -d '{"data": "xyz.openbmc_project.Control.Boot.Mode.Modes.Regular"}'
188188
```
189189

190190
* Set boot source:
191191

192192
```
193-
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/one_time/attr/BootSource -d '{"data": "xyz.openbmc_project.Control.Boot.Source.Sources.Default"}'
193+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/attr/BootSource -d '{"data": "xyz.openbmc_project.Control.Boot.Source.Sources.Default"}'
194+
```
195+
196+
* Set boot type (valid only if host is based on the x86 CPU):
197+
198+
```
199+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/attr/BootType -d '{"data": "xyz.openbmc_project.Control.Boot.Type.Types.EFI"}'
200+
```
201+
202+
Also there are boolean [`Enable`](https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Object/Enable.interface.yaml) properties that control if the boot source override is persistent or one-time, and if the override is enabled or not.
203+
204+
* Set boot override one-time flag:
205+
206+
```
207+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/one_time/attr/Enabled -d '{"data": "true"}'
208+
```
209+
210+
* Enable boot override:
211+
212+
```
213+
$ curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/attr/Enabled -d '{"data": "true"}'
194214
```
195215
196216
## Host State Control

0 commit comments

Comments
 (0)