Skip to content

Commit

Permalink
Add Chassis PowerSubsystem access
Browse files Browse the repository at this point in the history
Missing the method call to retrieve the associated PowerSubsystem for a
Chassis object.

Signed-off-by: Sean McGinnis <[email protected]>
  • Loading branch information
stmcginnis committed May 7, 2024
1 parent 70e8a4b commit 1a49115
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions redfish/chassis.go
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,16 @@ func (chassis *Chassis) Power() (*Power, error) {
return GetPower(chassis.GetClient(), chassis.power)
}

// PowerSubsystem gets the power subsystem for the chassis
// This link has been deprecated in favor of the PowerSubsystem link property.
func (chassis *Chassis) PowerSubsystem() (*PowerSubsystem, error) {
if chassis.powerSubsystem == "" {
return nil, nil
}

return GetPowerSubsystem(chassis.GetClient(), chassis.powerSubsystem)
}

// Cables gets the connected cables.
func (chassis *Chassis) Cables() ([]*Cable, error) {
var result []*Cable
Expand Down

0 comments on commit 1a49115

Please sign in to comment.