mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Modify firmware updating function with HTTP
This commit is contained in:
parent
372f68e2ff
commit
10ba18ade4
1 changed files with 3 additions and 3 deletions
|
|
@ -730,12 +730,12 @@ func UpdateFirmware(client bmclib.Client, l log.Logger, q *QueryParams) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func UpdateFirmwareRemote(imageURI string, q *QueryParams) error {
|
func UpdateFirmwareV2(serverIP string, imageURI string, component string, q *QueryParams) error {
|
||||||
url := baseUrl(q) + "UpdateService/Actions/SimpleUpdate"
|
url := baseUrl(q) + "UpdateService/Actions/SimpleUpdate"
|
||||||
b := map[string]any{
|
b := map[string]any{
|
||||||
"UpdateComponent": "BMC",
|
"UpdateComponent": component, // BMC, BIOS
|
||||||
"TransferProtocol": "HTTP",
|
"TransferProtocol": "HTTP",
|
||||||
"ImageURI": imageURI,
|
"ImageURI": "http://" + serverIP + "/" + imageURI,
|
||||||
}
|
}
|
||||||
data, err := json.Marshal(b)
|
data, err := json.Marshal(b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue