fix: added another check for power

This commit is contained in:
David Allen 2025-06-25 15:34:45 -06:00
parent ffe5132d8e
commit 8fb8908883
Signed by: towk
GPG key ID: 0430CDBE22619155

View file

@ -294,14 +294,15 @@ 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
powercontrolIDs := []string{} if power != nil {
for _, rf_powercontrol := range power.PowerControl { for _, rf_powercontrol := range power.PowerControl {
powercontrolIDs = append(powercontrolIDs, rf_powercontrol.ODataID) powercontrolIDs = append(powercontrolIDs, rf_powercontrol.ODataID)
} }
} }
}
}
// convert supported reset types to []string // convert supported reset types to []string
actions := []string{} actions := []string{}