diff options
author | George Keishing <gkeishin@in.ibm.com> | 2018-01-17 09:28:20 -0600 |
---|---|---|
committer | George Keishing <gkeishin@in.ibm.com> | 2018-01-22 22:54:21 -0600 |
commit | d2431e9337eeec6870a46ad4cc6c81a219a53981 (patch) | |
tree | 9b066f821fe87ea22cb9fa7cf26c594428761e8d | |
parent | 7b31010eb7e92b24dfca79f53944a99a5a3f4d97 (diff) | |
download | openbmc-docs-d2431e9337eeec6870a46ad4cc6c81a219a53981.tar.gz openbmc-docs-d2431e9337eeec6870a46ad4cc6c81a219a53981.zip |
Update REST-cheatsheet.md documentation
Added:
- New line to be uniform.
- Reboot host command.
- Clear gard records.
Change-Id: I736daf8552f532b35d4d60d190dd9a7eb5632133
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
-rw-r--r-- | REST-cheatsheet.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/REST-cheatsheet.md b/REST-cheatsheet.md index 29bfcab..97e43d9 100644 --- a/REST-cheatsheet.md +++ b/REST-cheatsheet.md @@ -30,28 +30,43 @@ This document is intended to provide a set of REST client commands for OpenBMC u ``` $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data":"xyz.openbmc_project.State.Chassis.Transition.Off"}' https://${bmc}//xyz/openbmc_project/state/chassis0/attr/RequestedPowerTransition ``` + * Host power on: ``` $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -d '{"data": "xyz.openbmc_project.State.Host.Transition.On"}' -X PUT https://${bmc}/xyz/openbmc_project/state/host0/attr/RequestedHostTransition ``` +* Reboot Host: + ``` + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data":"xyz.openbmc_project.State.Host.Transition.Reboot"}' https://${bmc}/xyz/openbmc_project/state/host0/attr/RequestedHostTransition + ``` + * Reboot BMC: ``` $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data":"xyz.openbmc_project.State.BMC.Transition.Reboot"}' https://${bmc}//xyz/openbmc_project/state/bmc0/attr/RequestedBMCTransition ``` + * Delete logging entries: ``` $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X DELETE https://${bmc}/xyz/openbmc_project/logging/entry/<entry_id> $ curl -b cjar -k -H 'Content-Type: application/json' -X POST -d '{"data":[]}' https://${bmc}/xyz/openbmc_project/logging/action/DeleteAll ``` + +* Clear gard records: + ``` + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST -d '{"data":[]}' https://${bmc}/org/open_power/control/gard/action/Reset + ``` + * Set boot mode: ``` $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/host0/boot/one_time/attr/BootMode -d '{"data": "xy.openbmc_project.Control.Boot.Mode.Modes.Regular"}' ``` + * Set boot source: ``` $ curl -c cjar -b cjar -k -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"} ``` + * Set NTP and Nameserver: Examples using public server. @@ -64,3 +79,4 @@ This document is intended to provide a set of REST client commands for OpenBMC u ``` $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": ["time.google.com"] }' https://${bmc}/xyz/openbmc_project/network/eth0/attr/Nameservers ``` + |