mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Merge pull request #53 from OpenCHAMI/minor-changes
Change collect messages to use JSON format
This commit is contained in:
commit
904d157a61
1 changed files with 4 additions and 2 deletions
|
|
@ -6,6 +6,8 @@ package client
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SmdClient struct {
|
type SmdClient struct {
|
||||||
|
|
@ -46,7 +48,7 @@ func (c SmdClient) Add(data HTTPBody, headers HTTPHeader) error {
|
||||||
return fmt.Errorf("returned status code %d when adding endpoint", res.StatusCode)
|
return fmt.Errorf("returned status code %d when adding endpoint", res.StatusCode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
|
log.Debug().Msgf("%v (%v)\n%s\n", url, res.Status, string(body))
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
@ -67,7 +69,7 @@ func (c SmdClient) Update(data HTTPBody, headers HTTPHeader) error {
|
||||||
return fmt.Errorf("failed to update redfish endpoint (returned %s)", res.Status)
|
return fmt.Errorf("failed to update redfish endpoint (returned %s)", res.Status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fmt.Printf("%v (%v)\n%s\n", url, res.Status, string(body))
|
log.Debug().Msgf("%v (%v)\n%s\n", url, res.Status, string(body))
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue