mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 11:37:01 -07:00
Minor refactor and update README.md
This commit is contained in:
parent
2a6ffd16bb
commit
9f848113c7
3 changed files with 16 additions and 12 deletions
|
|
@ -51,9 +51,7 @@ 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)
|
||||
fmt.Printf("smd url: %v\n", url)
|
||||
fmt.Printf("res: %v\n", res.Status)
|
||||
fmt.Printf("body: %v\n", string(body))
|
||||
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
|
||||
if res != nil {
|
||||
if res.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("could not add redfish endpoint")
|
||||
|
|
@ -69,9 +67,7 @@ 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)
|
||||
fmt.Printf("smd url: %v\n", url)
|
||||
fmt.Printf("res: %v\n", res.Status)
|
||||
fmt.Printf("body: %v\n", string(body))
|
||||
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
|
||||
if res != nil {
|
||||
if res.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("could not update redfish endpoint")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue