mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Minor changes to fix lint errors
This commit is contained in:
parent
128f9ad42d
commit
81ec43a923
11 changed files with 90 additions and 78 deletions
|
|
@ -54,12 +54,12 @@ func (c SmdClient) Update(data HTTPBody, headers HTTPHeader) error {
|
|||
// Update redfish endpoint via PUT `/hsm/v2/Inventory/RedfishEndpoints` endpoint
|
||||
url := c.RootEndpoint("/Inventory/RedfishEndpoints/" + c.Xname)
|
||||
res, body, err := MakeRequest(c.Client, url, http.MethodPut, data, headers)
|
||||
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
|
||||
if res != nil {
|
||||
statusOk := res.StatusCode >= 200 && res.StatusCode < 300
|
||||
if !statusOk {
|
||||
return fmt.Errorf("failed to update redfish endpoint (returned %s)", res.Status)
|
||||
}
|
||||
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue