11
29
Fork
You've already forked ipmitool
33

dev-support-https-interface-on-upstream #56

Closed
LeiYu_bd wants to merge 4 commits from LeiYu_bd/ipmitool:dev-support-https-interface-on-upstream into master
pull from: LeiYu_bd/ipmitool:dev-support-https-interface-on-upstream
merge into: IPMITool:master
IPMITool:master
IPMITool:bugfix/43-Fix-timezone-and-DST-in-SEL
IPMITool:pages
IPMITool:bugfix/fix-ci-builds
IPMITool:feature/refactor-sdr-name-handling
IPMITool:cleanup/nm
IPMITool:feature/add-support-for-boot-mailbox
IPMITool:codefactor
IPMITool:bugfix/26
First-time contributor
Copy link

Add OpenBMC https interface.
See related changes in https://gerrit.openbmc.org/q/topic:%22ipmi-https%22

Add OpenBMC https interface. See related changes in https://gerrit.openbmc.org/q/topic:%22ipmi-https%22
OpenBMC runs bmcweb as https service and it has APIs to handle ipmi
requests.
The detailed protocol is decribed at:
https://gerrit.openbmc.org/c/openbmc/docs/+/80188
This commit add initial configure options to support the https
interface.
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Use libcurl to connect the BMC with websocket, and implement the ipmi's
request/response functions by invoking websocket's send/recv.
The `-H` argument supports below URIs:
* IPv4 address
* IPv6 address with square brackets, like `[xx:xx::xx]`
* Domain
* Websocket with IPv4 address or domain like `wss://xxx`
* Websocket with IPv6 address like `wss://[xxx]`
Tested:
```
 # IPMI with https interface
 export ipmi_bmc="xxx" # The above supported URIs
 export token="xxx"
 ipmitool -I https -H ${ipmi_bmc} -P ${token} mc info
 # If failure to connect to the BMC
 ipmitool: https: failed to connect to wss://xxx/ipmi: Couldn't connect to server
 # If token expires
 ipmitool: https: failed to connect to wss://xxx/ipmi: HTTP response code said error
 HTTP Response Code: 401
 Please check if your token expires.
```
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Add bridge command support.
Tested: On a machine with ME to handle the bridge command:
```
 Use https interface:
 ipmitool -I https -H ${ipmi_bmc} -P ${token} -b 0x06 -t 0x2c raw 0x06 0x01
 50 01 06 03 02 21 57 01 00 18 0b 06 14 00 01
```
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Implementing ipmi https SOL using `/console/default` URI, which is
implemented by OpenBMC by default.
Only `sol activate` is supported, and user shall enter `Enter ~ .` to
quite the session.
Tested:
```
 ipmitool -I https -H ${ipmi_bmc} -P ${token} sol activate
 [Type '~.' to exit ipmi https sol]
 ... # Use the SOL session
 ~. [terminated ipmitool]
```
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Author
First-time contributor
Copy link

Be noted that this MR shall NOT be merged until the OpenBMC-related changes are merged.

Be noted that this MR shall NOT be merged until the OpenBMC-related changes are merged.

Closing as the linked change in OpenBMC has been rejected/abandoned

Closing as the linked change in OpenBMC has been rejected/abandoned

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
IPMITool/ipmitool!56
Reference in a new issue
IPMITool/ipmitool
No description provided.
Delete branch "LeiYu_bd/ipmitool:dev-support-https-interface-on-upstream"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?