mirror of
https://github.com/davidallendj/magellan.git
synced 2025-12-20 03:27:03 -07:00
fix: added another check for power
This commit is contained in:
parent
ffe5132d8e
commit
8fb8908883
1 changed files with 7 additions and 6 deletions
|
|
@ -294,12 +294,13 @@ func walkSystems(rf_systems []*redfish.ComputerSystem, rf_chassis *redfish.Chass
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warn().Err(err).Str("id", rf_computersystem.ID).
|
log.Warn().Err(err).Str("id", rf_computersystem.ID).
|
||||||
Str("system", rf_computersystem.Name).Msg("failed to get power-related details from chassis")
|
Str("system", rf_computersystem.Name).Msg("failed to get power-related details from chassis")
|
||||||
}
|
} else {
|
||||||
|
// extract the power control odata.id resource
|
||||||
// extract the power control odata.id resource
|
if power != nil {
|
||||||
powercontrolIDs := []string{}
|
for _, rf_powercontrol := range power.PowerControl {
|
||||||
for _, rf_powercontrol := range power.PowerControl {
|
powercontrolIDs = append(powercontrolIDs, rf_powercontrol.ODataID)
|
||||||
powercontrolIDs = append(powercontrolIDs, rf_powercontrol.ODataID)
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue