diff options
author | George Keishing <gkeishin@in.ibm.com> | 2018-01-29 02:28:15 -0600 |
---|---|---|
committer | Gunnar Mills <gmills@us.ibm.com> | 2018-02-06 17:19:08 +0000 |
commit | 2f2b14a3a7a9addd39378519202ab31408e173be (patch) | |
tree | 32d15a7d46ebba2791096f0735214ae7ef87f635 | |
parent | cb44907730c61a280ff7d61d1bd42d0772bef6e1 (diff) | |
download | openbmc-docs-2f2b14a3a7a9addd39378519202ab31408e173be.tar.gz openbmc-docs-2f2b14a3a7a9addd39378519202ab31408e173be.zip |
Update REST-cheatsheet.md documentation
Added:
- Power supply redundancy setting read/write commands
- Optimize GET commands.
Change-Id: Iae73f5d5d75c45889d101f161253eab07a987ad2
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
-rw-r--r-- | REST-cheatsheet.md | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/REST-cheatsheet.md b/REST-cheatsheet.md index 0ffe5b0..f04187b 100644 --- a/REST-cheatsheet.md +++ b/REST-cheatsheet.md @@ -90,16 +90,42 @@ This document is intended to provide a set of REST client commands for OpenBMC u - Read: ``` - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET -d '{"data": [] }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET -d '{"data": [] }' https://${bmc}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://${bmc}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod ``` - Write: ``` - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Synchronization.Method.NTP" }' https://${bmc}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Synchronization.Method.Manual" }' https://${bmc}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Synchronization.Method.NTP" }' https://${bmc}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Synchronization.Method.Manual" }' https://${bmc}/xyz/openbmc_project/time/sync_method/attr/TimeSyncMethod - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Owner.Owners.BMC" }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Owner.Owners.Host” }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Owner.Owners.Split" }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner - $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Owner.Owners.Both” }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Owner.Owners.BMC" }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Owner.Owners.Host” }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Owner.Owners.Split" }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT -d '{"data": "xyz.openbmc_project.Time.Owner.Owners.Both” }' https://${bmc}/xyz/openbmc_project/time/owner/attr/TimeOwner + ``` + +* Power Supply Redundancy: + + - Read: + ``` + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST https://${bmc}/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy/action/getValue -d '{"data": []}' + ``` + + or + + ``` + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X GET https://${bmc}/xyz/openbmc_project/control/power_supply_redundancy + ``` + + - Write (Enable/Disable): + ``` + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST https://${bmc}/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy/action/setValue -d '{"data": ["Enabled"]}' + + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X POST https://${bmc}/xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy/action/setValue -d '{"data": ["Disabled"]}' + ``` + or + + ``` + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/power_supply_redundancy/attr/PowerSupplyRedundancyEnabled -d '{"data": 1}' + $ curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT https://${bmc}/xyz/openbmc_project/control/power_supply_redundancy/attr/PowerSupplyRedundancyEnabled -d '{"data": 0}' ``` |