Skip to content

Commit

Permalink
Add log services to Chassis (#232)
Browse files Browse the repository at this point in the history
  • Loading branch information
xflipped authored Feb 27, 2023
1 parent 2e369e1 commit 290b8a5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions redfish/chassis.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ type Chassis struct {
thermal string
power string
networkAdapters string
// logServices shall be a link to a collection of type LogServiceCollection.
logServices string
computerSystems []string
resourceBlocks []string
managedBy []string
Expand Down Expand Up @@ -262,6 +264,7 @@ func (chassis *Chassis) UnmarshalJSON(b []byte) error {
Thermal common.Link
Power common.Link
NetworkAdapters common.Link
LogServices common.Link
Links linkReference
Actions Actions
}
Expand All @@ -283,6 +286,7 @@ func (chassis *Chassis) UnmarshalJSON(b []byte) error {
chassis.thermal = t.Thermal.String()
chassis.power = t.Power.String()
chassis.networkAdapters = t.NetworkAdapters.String()
chassis.logServices = t.LogServices.String()
chassis.computerSystems = t.Links.ComputerSystems.ToStrings()
chassis.resourceBlocks = t.Links.ResourceBlocks.ToStrings()
chassis.managedBy = t.Links.ManagedBy.ToStrings()
Expand Down Expand Up @@ -507,6 +511,11 @@ func (chassis *Chassis) NetworkAdapters() ([]*NetworkAdapter, error) {
return ListReferencedNetworkAdapter(chassis.Client, chassis.networkAdapters)
}

// LogServices get this chassis's log services.
func (chassis *Chassis) LogServices() ([]*LogService, error) {
return ListReferencedLogServices(chassis.Client, chassis.logServices)
}

// The Assembly schema defines an assembly.
// Assembly information contains details about a device, such as part number, serial number, manufacturer, and production date.
// It also provides access to the original data for the assembly.
Expand Down

0 comments on commit 290b8a5

Please sign in to comment.