Documentation ¶
Index ¶
- func Debug(i ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugj(j echolog.JSON)
- func Error(i ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorj(j echolog.JSON)
- func Fatal(i ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalj(j echolog.JSON)
- func Info(i ...interface{})
- func Infof(format string, args ...interface{})
- func Infoj(j echolog.JSON)
- func Panic(i ...interface{})
- func Panicf(format string, args ...interface{})
- func Panicj(j echolog.JSON)
- func Print(i ...interface{})
- func PrintStatusCli(output []JobMessage)
- func Printf(format string, i ...interface{})
- func Printj(j echolog.JSON)
- func Warn(i ...interface{})
- func Warnf(format string, args ...interface{})
- func Warnj(j echolog.JSON)
- type Job
- func (j *Job) BmcAutoConfigure(hostList model.HostList) ([]JobMessage, error)
- func (j *Job) BmcImportConfiguration(hostList model.HostList, shutdownType, file string) ([]JobMessage, error)
- func (j *Job) BmcStatus(hostList model.HostList) ([]System, error)
- func (j *Job) ClearSel(hostList model.HostList) ([]JobMessage, error)
- func (j *Job) PowerCycle(hostList model.HostList, bootOption string) ([]JobMessage, error)
- func (j *Job) PowerCycleBmc(hostList model.HostList) ([]JobMessage, error)
- func (j *Job) PowerOff(hostList model.HostList) ([]JobMessage, error)
- func (j *Job) PowerOn(hostList model.HostList, bootOption string) ([]JobMessage, error)
- type JobMessage
- type MyLogger
- func (l *MyLogger) Debug(i ...interface{})
- func (l *MyLogger) Debugf(format string, args ...interface{})
- func (l *MyLogger) Debugj(j echolog.JSON)
- func (l *MyLogger) Error(i ...interface{})
- func (l *MyLogger) Errorf(format string, args ...interface{})
- func (l *MyLogger) Errorj(j echolog.JSON)
- func (l *MyLogger) Fatal(i ...interface{})
- func (l *MyLogger) Fatalf(format string, args ...interface{})
- func (l *MyLogger) Fatalj(j echolog.JSON)
- func (l *MyLogger) Formatter() logrus.Formatter
- func (l *MyLogger) Info(i ...interface{})
- func (l *MyLogger) Infof(format string, args ...interface{})
- func (l *MyLogger) Infoj(j echolog.JSON)
- func (l *MyLogger) Level() echolog.Lvl
- func (l *MyLogger) Output() io.Writer
- func (l *MyLogger) Panic(i ...interface{})
- func (l *MyLogger) Panicf(format string, args ...interface{})
- func (l *MyLogger) Panicj(j echolog.JSON)
- func (l *MyLogger) Prefix() string
- func (l *MyLogger) Print(i ...interface{})
- func (l *MyLogger) Printf(format string, args ...interface{})
- func (l *MyLogger) Printj(j echolog.JSON)
- func (l *MyLogger) SetFormatter(formatter logrus.Formatter)
- func (l *MyLogger) SetHeader(h string)
- func (l *MyLogger) SetLevel(v echolog.Lvl)
- func (l *MyLogger) SetOutput(w io.Writer)
- func (l *MyLogger) SetPrefix(p string)
- func (l *MyLogger) Warn(i ...interface{})
- func (l *MyLogger) Warnf(format string, args ...interface{})
- func (l *MyLogger) Warnj(j echolog.JSON)
- type Redfish
- func (r *Redfish) BmcAutoConfigure() error
- func (r *Redfish) BmcGetJob(id string) (*redfish.Job, error)
- func (r *Redfish) BmcImportConfiguration(shutdownType, path, file string) (string, error)
- func (r *Redfish) ClearSel() error
- func (r *Redfish) GetSystem() (*System, error)
- func (r *Redfish) PowerControl(resetType redfish.ResetType, bootOverride string) error
- func (r *Redfish) PowerCycle(bootOverride string) error
- func (r *Redfish) PowerCycleBmc() error
- func (r *Redfish) PowerOff() error
- func (r *Redfish) PowerOn(bootOverride string) error
- type RedfishError
- type System
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debugf ¶ added in v0.0.10
func Debugf(format string, args ...interface{})
Debugf output format message of debug level
func Errorf ¶ added in v0.0.10
func Errorf(format string, args ...interface{})
Errorf output format message of error level
func Fatalf ¶ added in v0.0.10
func Fatalf(format string, args ...interface{})
Fatalf output format message of fatal level
func Infof ¶ added in v0.0.10
func Infof(format string, args ...interface{})
Infof output format message of info level
func Panicf ¶ added in v0.0.10
func Panicf(format string, args ...interface{})
Panicf output format message of panic level
func PrintStatusCli ¶ added in v0.0.10
func PrintStatusCli(output []JobMessage)
func Printf ¶ added in v0.0.10
func Printf(format string, i ...interface{})
Printf output format message of print level
Types ¶
type Job ¶ added in v0.0.10
type Job struct {
// contains filtered or unexported fields
}
func (*Job) BmcAutoConfigure ¶ added in v0.0.10
func (j *Job) BmcAutoConfigure(hostList model.HostList) ([]JobMessage, error)
func (*Job) BmcImportConfiguration ¶ added in v0.0.10
func (*Job) ClearSel ¶ added in v0.0.10
func (j *Job) ClearSel(hostList model.HostList) ([]JobMessage, error)
func (*Job) PowerCycle ¶ added in v0.0.10
func (*Job) PowerCycleBmc ¶ added in v0.0.10
func (j *Job) PowerCycleBmc(hostList model.HostList) ([]JobMessage, error)
type JobMessage ¶ added in v0.0.10
type JobMessage struct { Status string Host string Msg string RedfishError RedfishError }
func FormatOutput ¶ added in v0.0.10
func FormatOutput(output chan JobMessage) ([]JobMessage, error)
type MyLogger ¶ added in v0.0.10
MyLogger extend logrus.MyLogger
func (*MyLogger) Debug ¶ added in v0.0.10
func (l *MyLogger) Debug(i ...interface{})
Debug output message of debug level
func (*MyLogger) Error ¶ added in v0.0.10
func (l *MyLogger) Error(i ...interface{})
Error output message of error level
func (*MyLogger) Fatal ¶ added in v0.0.10
func (l *MyLogger) Fatal(i ...interface{})
Fatal output message of fatal level
func (*MyLogger) Info ¶ added in v0.0.10
func (l *MyLogger) Info(i ...interface{})
Info output message of info level
func (*MyLogger) Panic ¶ added in v0.0.10
func (l *MyLogger) Panic(i ...interface{})
Panic output message of panic level
func (*MyLogger) Print ¶ added in v0.0.10
func (l *MyLogger) Print(i ...interface{})
Print output message of print level
func (*MyLogger) SetFormatter ¶ added in v0.0.10
SetFormatter logger formatter Only support logrus formatter
func (*MyLogger) SetHeader ¶ added in v0.0.10
SetHeader logger header Managed by Logrus itself This function do nothing
func (*MyLogger) Warn ¶ added in v0.0.10
func (l *MyLogger) Warn(i ...interface{})
Warn output message of warn level
type Redfish ¶
type Redfish struct {
// contains filtered or unexported fields
}
func NewRedfishClient ¶ added in v0.0.10
func (*Redfish) BmcAutoConfigure ¶ added in v0.0.10
func (*Redfish) BmcImportConfiguration ¶ added in v0.0.10
func (*Redfish) PowerControl ¶ added in v0.0.10
Power will change the hosts power state
func (*Redfish) PowerCycle ¶
PowerCycle will ForceRestart the host
func (*Redfish) PowerCycleBmc ¶ added in v0.0.10
type RedfishError ¶ added in v0.0.10
type RedfishError struct { Code string Error struct { MessageExtendedInfo []struct { Message string MessageArgs []string //? MessageArgsCount int `json:"MessageArgs.@odata.count"` MessageId string RelatedProperties []string //? RelatedPropertiesCount int `json:"RelatedProperties.@odata.count"` Resolution string Severity string } `json:"@Message.ExtendedInfo"` Code string `json:"code"` Message string `json:"message"` } `json:"error"` }
func ParseRedfishError ¶ added in v0.0.10
func ParseRedfishError(err error) RedfishError
type System ¶
type System struct { Name string `json:"name"` BIOSVersion string `json:"bios_version"` SerialNumber string `json:"serial_number"` Manufacturer string `json:"manufacturer"` PowerStatus string `json:"power_status"` Health string `json:"health"` TotalMemory float32 `json:"total_memory"` ProcessorCount int `json:"processor_count"` BootNext string `json:"boot_next"` BootOrder []string `json:"boot_order"` }