Skip to content

Commit

Permalink
Merge pull request #59 from sungup/fix-log-service
Browse files Browse the repository at this point in the history
add features for the LogService
  • Loading branch information
stmcginnis authored Mar 12, 2020
2 parents 08b3251 + fd9bd11 commit a55927b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion redfish/logservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ func (logservice *LogService) Entries() ([]*LogEntry, error) {
// ClearLog shall delete all entries found in the Entries collection for this
// Log Service.
func (logservice *LogService) ClearLog() error {
_, err := logservice.Client.Post(logservice.clearLogTarget, nil)
type temp struct {
Action string
}
t := temp{
Action: "LogService.ClearLog",
}

_, err := logservice.Client.Post(logservice.clearLogTarget, t)
return err
}
5 changes: 5 additions & 0 deletions redfish/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,3 +399,8 @@ func (manager *Manager) Reset(resetType ResetType) error {
func (manager *Manager) EthernetInterfaces() ([]*EthernetInterface, error) {
return ListReferencedEthernetInterfaces(manager.Client, manager.ethernetInterfaces)
}

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

0 comments on commit a55927b

Please sign in to comment.