Fix old style login and REST
This login style hasn't been used for quite a while. The majority of the
docs have been cleaned up.
Update so that we can deprecate the login forms that haven't been used
for a long time.
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/86801
Moved over to Redfish for the Power on.
Change-Id: I3f69ce7c93c4cc5f4a51e55cea66d10f7584b491
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/cheatsheet.md b/cheatsheet.md
index feec98f..8031fd1 100644
--- a/cheatsheet.md
+++ b/cheatsheet.md
@@ -125,8 +125,9 @@
with the BMC...
```bash
-curl -c cjar -b cjar -k -H "Content-Type: application/json" \
- -X POST https://localhost:2443/login -d "{\"data\": [ \"root\", \"0penBmc\" ] }"
+curl -k -H "Content-Type: application/json" -X POST -D headers.txt \
+ https://${bmc}/redfish/v1/SessionService/Sessions -d \
+ '{"UserName":"root", "Password":"0penBmc"}'
```
or
@@ -175,7 +176,15 @@
Login:
```bash
-curl -c cjar -k -X POST -H "Content-Type: application/json" -d '{"data": [ "root", "0penBmc" ] }' https://${bmc}/login
+curl --insecure -H "Content-Type: application/json" -X POST -D headers.txt \
+ https://${bmc}/redfish/v1/SessionService/Sessions -d \
+ '{"UserName":"root", "Password":"0penBmc"}'
+```
+
+A file, headers.txt, will be created. Find the "X-Auth-Token" in that file.
+
+```bash
+export bmc_token=<token>
```
Connect to host console:
@@ -187,9 +196,9 @@
Power on:
```bash
-curl -c cjar -b cjar -k -H "Content-Type: application/json" -X PUT \
- -d '{"data": "xyz.openbmc_project.State.Host.Transition.On"}' \
- https://${bmc}/xyz/openbmc_project/state/host0/attr/RequestedHostTransition
+curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X POST \
+ https://${bmc}/redfish/v1/Systems/system/Actions/ComputerSystem.Reset \
+ -d '{"ResetType": "On"}'
```
## GDB