Skip to content

Commit

Permalink
Services.Tasks(): fix no Task objects being returned (#281)
Browse files Browse the repository at this point in the history
Use the redfish.GetTaskService() method to retrieve linked Task objects instead -
since they cannot be unmarshaled by common.Client.
  • Loading branch information
joelrebel authored Oct 6, 2023
1 parent 8f9ac48 commit 227883b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion serviceroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@ func (serviceroot *Service) StorageServices() ([]*swordfish.StorageService, erro

// Tasks gets the system's tasks
func (serviceroot *Service) Tasks() ([]*redfish.Task, error) {
return redfish.ListReferencedTasks(serviceroot.GetClient(), serviceroot.tasks)
ts, err := redfish.GetTaskService(serviceroot.GetClient(), serviceroot.tasks)
if err != nil {
return nil, err
}

return ts.Tasks()
}

// TaskService gets the task service instance
Expand Down

0 comments on commit 227883b

Please sign in to comment.