mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Fixed issue with AddRedfishEndpoint returning nil
This commit is contained in:
parent
e5613d9a30
commit
b730e98fb3
1 changed files with 6 additions and 0 deletions
|
|
@ -51,6 +51,9 @@ func AddRedfishEndpoint(data []byte, headers map[string]string) error {
|
|||
// Add redfish endpoint via POST `/hsm/v2/Inventory/RedfishEndpoints` endpoint
|
||||
url := makeEndpointUrl("/Inventory/RedfishEndpoints")
|
||||
res, body, err := util.MakeRequest(url, "POST", data, headers)
|
||||
if res == nil {
|
||||
return fmt.Errorf("no response")
|
||||
}
|
||||
fmt.Printf("smd url: %v\n", url)
|
||||
fmt.Printf("res: %v\n", res.Status)
|
||||
fmt.Printf("body: %v\n", string(body))
|
||||
|
|
@ -69,6 +72,9 @@ func UpdateRedfishEndpoint(xname string, data []byte, headers map[string]string)
|
|||
// Update redfish endpoint via PUT `/hsm/v2/Inventory/RedfishEndpoints` endpoint
|
||||
url := makeEndpointUrl("/Inventory/RedfishEndpoints/" + xname)
|
||||
res, body, err := util.MakeRequest(url, "PUT", data, headers)
|
||||
if res == nil {
|
||||
return fmt.Errorf("no response")
|
||||
}
|
||||
fmt.Printf("smd url: %v\n", url)
|
||||
fmt.Printf("res: %v\n", res.Status)
|
||||
fmt.Printf("body: %v\n", string(body))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue