mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
Rearranged collect error to only show when not force updating
This commit is contained in:
parent
989ec611c6
commit
2e036c549d
1 changed files with 2 additions and 1 deletions
|
|
@ -150,7 +150,6 @@ func CollectInventory(assets *[]RemoteAsset, params *CollectParams) error {
|
||||||
if smdClient.URI != "" {
|
if smdClient.URI != "" {
|
||||||
err = smdClient.Add(body, headers)
|
err = smdClient.Add(body, headers)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msgf("failed to add Redfish endpoint")
|
|
||||||
|
|
||||||
// try updating instead
|
// try updating instead
|
||||||
if params.ForceUpdate {
|
if params.ForceUpdate {
|
||||||
|
|
@ -159,6 +158,8 @@ func CollectInventory(assets *[]RemoteAsset, params *CollectParams) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().Err(err).Msgf("failed to forcibly update Redfish endpoint")
|
log.Error().Err(err).Msgf("failed to forcibly update Redfish endpoint")
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log.Error().Err(err).Msgf("failed to add Redfish endpoint")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue