Minor changes

This commit is contained in:
David Allen 2024-08-12 13:08:30 -06:00
parent da2abdfa8d
commit e02558fd00
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
3 changed files with 10 additions and 9 deletions

View file

@ -6,7 +6,7 @@ import (
"net/http"
"net/url"
"github.com/OpenCHAMI/magellan/internal/util"
"github.com/OpenCHAMI/magellan/pkg/client"
)
type UpdateParams struct {
@ -43,7 +43,7 @@ func UpdateFirmwareRemote(q *UpdateParams) error {
if err != nil {
return fmt.Errorf("failed to marshal data: %v", err)
}
res, body, err := util.MakeRequest(nil, updateUrl, "POST", data, headers)
res, body, err := client.MakeRequest(nil, updateUrl, "POST", data, headers)
if err != nil {
return fmt.Errorf("something went wrong: %v", err)
} else if res == nil {
@ -63,7 +63,7 @@ func GetUpdateStatus(q *UpdateParams) error {
}
uri.User = url.UserPassword(q.Username, q.Password)
updateUrl := fmt.Sprintf("%s/redfish/v1/UpdateService", uri.String())
res, body, err := util.MakeRequest(nil, updateUrl, "GET", nil, nil)
res, body, err := client.MakeRequest(nil, updateUrl, "GET", nil, nil)
if err != nil {
return fmt.Errorf("something went wrong: %v", err)
} else if res == nil {